[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

upload to stable: berusky



Hello,

I would like to apply the attached patch to the game package "berusky"
in lenny stable.

 | Problem description: The level hint shown is the hint for
 | the first level of the level set, not the hint for the
 | selected level.
 | Solution: Set the level number before the level hint is shown,
 | so that the shown hint corresponds to the level number.

OK for upload to stable ?

Regards,

Bart Martens

Problem description: The level hint shown is the hint for
the first level of the level set, not the hint for the
selected level.
Solution: Set the level number before the level hint is shown,
so that the shown hint corresponds to the level number.

diff -ruN -x '*.png' -x '*.jpg' -x '*.ogg' -x '*_image_archive' ../orig/berusky-1.1/src/berusky.cpp ./src/berusky.cpp
--- ../orig/berusky-1.1/src/berusky.cpp	2007-03-13 18:34:21.000000000 +0100
+++ ./src/berusky.cpp	2009-06-13 21:15:53.000000000 +0200
@@ -121,6 +121,11 @@
   return(FALSE);
 }
 
+void berusky::levelset_set_level( int level )
+{
+  state.level_num = level;
+}
+
 int  berusky::levelset_get_level(void)
 {
   return(state.level_num);
diff -ruN -x '*.png' -x '*.jpg' -x '*.ogg' -x '*_image_archive' ../orig/berusky-1.1/src/berusky_gui.cpp ./src/berusky_gui.cpp
--- ../orig/berusky-1.1/src/berusky_gui.cpp	2007-04-22 09:47:30.000000000 +0200
+++ ./src/berusky_gui.cpp	2009-06-13 21:18:52.000000000 +0200
@@ -874,6 +874,7 @@
       
         bool ret = p_ber->levelset_load(set);
         assert(ret);
+        p_ber->levelset_set_level(level);
       
         p_grf->fill(0,0,GAME_RESOLUTION_X,GAME_RESOLUTION_Y,0);
         p_font->alignment_set(CENTER);
diff -ruN -x '*.png' -x '*.jpg' -x '*.ogg' -x '*_image_archive' ../orig/berusky-1.1/src/berusky.h ./src/berusky.h
--- ../orig/berusky-1.1/src/berusky.h	2007-04-23 21:10:03.000000000 +0200
+++ ./src/berusky.h	2009-06-13 20:43:19.000000000 +0200
@@ -143,6 +143,7 @@
   bool   levelset_load(int set);
   bool   levelset_is_custom(void);
   
+  void   levelset_set_level(int level);
   int    levelset_get_level(void);
   int    levelset_get_set(void);
   int    levelset_get_levelnum(void);

Reply to: