twind/twind-1.1.0.twind.c.patch
Matthias Mailänder a3ef238f9c Accepting request 253999 from home:nemysis
- Change %fdupes
- Use %{name}.desktop instead of Desktop Entry in spec
- Use %{name}-rpmlintrc instead of Patch1
- Remove not needed mkdir -p
- Use pkgconfig instead of pkgconfig(sdl)
- Change sed, cosmetical changes
- Correct Path, Highscore and Permissions, that more users can
  use same Highscore with own Results
- Use $CURRENT_YEAR
- Remove chmod g-s and use %attr(0755,root,games) %{_bindir}/%{name}
- Use %{_datadir}/%{name} instead of %{_datadir}/%{name}/*

- Add descriptions for patches
- Reordering BuildRequires, added pkgconfig(sdl)
- Add sed, /usr/bin/twind: Operation not permitted
- Simplify installation handling
- Add localstatedir
- Fix Desktop file and rpmlint only say
  no-manual-page-for-binary twind which not exist
- Add twind-1.1.0.twind.c.patch in spec
- Add forgotten twind-1.1.0.COPYING.patch to twind.spec
- Initial package creation
- Use mine first FreeBSD port games/twind for patch, new created with Quilt

  twind-1.1.0.twind.c.patch
- Add twind-1.1.0.COPYING.patch, correct Address
- Add Desktop file and icon
- Use %%fdupes macro to reduce size of the package

OBS-URL: https://build.opensuse.org/request/show/253999
OBS-URL: https://build.opensuse.org/package/show/games/twind?expand=0&rev=1
2014-10-05 12:11:01 +00:00

54 lines
3.2 KiB
Diff

Index: twind.c
===================================================================
--- twind.c.orig 2004-07-16 03:44:50.000000000 +0200
+++ twind.c 2014-09-08 17:04:00.111420759 +0200
@@ -674,10 +674,10 @@ int get_input_for_menu(char *menu_items[
if (event.button.x >= MENULX && event.button.x < MENURX && event.button.y >= starty && event.button.y < (starty + height)) {
current_menu_high = (event.button.y - starty) / game.font[font].height;
/* re-assign current_menu_high if blank option */
- if (menu_items[game.menu][current_menu_high] == "")
+ if (*menu_items[game.menu][current_menu_high] == '\0')
current_menu_high = game.last_menu_high;
if (game.last_menu_high != current_menu_high) {
- if (menu_items[game.menu][current_menu_high] != "") {
+ if (*menu_items[game.menu][current_menu_high] != '\0') {
#ifndef NOAUDIO
if (game.audio_enabled) Mix_PlayChannel(MENU_OPTION, game.sound[MENU_OPTION], 0);
#endif
@@ -697,7 +697,7 @@ int get_input_for_menu(char *menu_items[
if (event.button.x >= MENULX && event.button.x < MENURX && event.button.y >= starty && event.button.y < (starty + height)) {
current_menu_high = (event.button.y - starty) / game.font[font].height;
/* make sure the option isn't blank */
- if (menu_items[game.menu][current_menu_high] != "") {
+ if (*menu_items[game.menu][current_menu_high] != '\0') {
#ifndef NOAUDIO
if (game.audio_enabled) Mix_PlayChannel(OPTION_CHOICE, game.sound[OPTION_CHOICE], 0);
#endif
@@ -917,7 +917,7 @@ int move_in_menu(char *menu_items[][MAX_
#endif
current_menu_high--;
/* if option blank, go to previous */
- while (menu_items[game.menu][current_menu_high] == "")
+ while (*menu_items[game.menu][current_menu_high] == '\0')
current_menu_high--;
/* wrap around to the bottom entry */
if (current_menu_high == -1)
@@ -930,7 +930,7 @@ int move_in_menu(char *menu_items[][MAX_
#endif
current_menu_high++;
/* if option blank, go to next */
- while (menu_items[game.menu][current_menu_high] == "")
+ while (*menu_items[game.menu][current_menu_high] == '\0')
current_menu_high++;
/* wrap around to the top entry */
if (current_menu_high == game.menu_item_cnt)
@@ -1536,7 +1536,7 @@ void play_game() {
if (level_time && game.stop_timer + game.added_time < game.best_time)
game.best_time = game.stop_timer + game.added_time;
/* subtract a set amount of time after level 11 */
- if (game.current_level > 11)
+ if (game.current_level >= 11)
game.level_time -= 10;
else
game.level_time = times[level_time];