This is an automated email from the git hooks/post-receive script. jpuydt-guest pushed a commit to branch master in repository freedroidrpg.
commit ab04d630c60852da45fe6b407b113b2a74ba7ee5 Author: Julien Puydt <[email protected]> Date: Thu Nov 10 16:52:12 2016 +0100 Updated d/patches/27_debug.diff --- debian/changelog | 1 + debian/patches/27_debug.diff | 164 ++++++++++++++++++++----------------------- 2 files changed, 76 insertions(+), 89 deletions(-) diff --git a/debian/changelog b/debian/changelog index cb338cd..75461aa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,7 @@ freedroidrpg (0.16.1-1) UNRELEASED; urgency=medium * Updated debian/patches/07_framerate.diff. * Updated debian/patches/17_debianize.diff. * Updated debian/patches/20_enter_keys.diff. + * Updated debian/patches/27_debug.diff. -- Julien Puydt <[email protected]> Thu, 10 Nov 2016 09:10:23 +0100 diff --git a/debian/patches/27_debug.diff b/debian/patches/27_debug.diff index f84accb..16747ae 100644 --- a/debian/patches/27_debug.diff +++ b/debian/patches/27_debug.diff @@ -1,82 +1,16 @@ -Index: freedroidrpg-0.15.1/src/init.c -=================================================================== ---- freedroidrpg-0.15.1.orig/src/init.c 2012-05-05 12:51:11.000000000 +0000 -+++ freedroidrpg-0.15.1/src/init.c 2012-05-05 12:51:15.000000000 +0000 -@@ -1025,6 +1025,9 @@ - [-l character-name | --load=character-name] \n\ - [-r Y | --resolution=Y] Y = 99 lists hardcoded resolutions. \n\ - Y may also be of the form 'WxH' e.g. '800x600'\n\ -+"; -+ -+char report_bugs_string[] = "\ - \n\ - Please report bugs either by entering them into the bug tracker\n\ - on our website at:\n\n\ -@@ -1090,6 +1093,7 @@ - case 'h': - case '?': - printf("%s",usage_string); -+ DebugPrintf( 1, report_bugs_string ); - exit(0); - break; - -@@ -1150,6 +1154,13 @@ - if (resolution_code >= 0 && resolution_code < nb_res) { - GameConfig.screen_width = hard_resolutions[resolution_code].xres; - GameConfig.screen_height = hard_resolutions[resolution_code].yres; -+ } else if( resolution_code == 99 ) { -+ printf( "Available resolution codes:\n" ); -+ int i; -+ for (i = 0; i < nb_res; ++i) { -+ printf( "\t%d = %s\n", i, hard_resolutions[i].comment); -+ } -+ exit( 0 ); - } else { - fprintf(stderr, "\nresolution code received: %d\n", resolution_code); - char *txt = (char *)malloc((nb_res * 128 + 1) * sizeof(char)); -@@ -1485,7 +1496,7 @@ - // We mention the version of FreedroidRPG, so that debug reports - // are easier to assign to the different versions of the game. - // -- DebugPrintf(-4, "\nHello, this is FreedroidRPG, version %s.", VERSION); -+ DebugPrintf(1, "\nHello, this is FreedroidRPG, version %s.", VERSION); - - set_signal_handlers(); - -Index: freedroidrpg-0.15.1/src/misc.c -=================================================================== ---- freedroidrpg-0.15.1.orig/src/misc.c 2012-05-05 12:49:37.000000000 +0000 -+++ freedroidrpg-0.15.1/src/misc.c 2012-05-05 12:51:15.000000000 +0000 -@@ -1201,15 +1201,15 @@ - */ - void Terminate(int exit_code, int save_config) - { -- printf("\n---------------------------------------------------------------------------------"); -- printf("\nTermination of freedroidRPG initiated... "); -+ DebugPrintf( 1, "\n---------------------------------------------------------------------------------"); -+ DebugPrintf( 1, "\nTermination of freedroidRPG initiated... "); - - // We save the config file in any case. - - if (save_config) - SaveGameConfig(); - -- printf("Thank you for playing freedroidRPG.\n\n"); -+ DebugPrintf( 1, "Thank you for playing freedroidRPG.\n\n"); - SDL_Quit(); - - // Finally, especially on win32 systems, we should open an editor with -Index: freedroidrpg-0.15.1/src/graphics.c -=================================================================== ---- freedroidrpg-0.15.1.orig/src/graphics.c 2012-05-05 12:49:37.000000000 +0000 -+++ freedroidrpg-0.15.1/src/graphics.c 2012-05-05 12:51:15.000000000 +0000 -@@ -608,16 +608,16 @@ +Author: Bart Mertens +Description: Reduces output on stdout/stderr +Forwarded: no + +--- a/src/graphics.c ++++ b/src/graphics.c +@@ -602,16 +602,16 @@ // Since we want to use openGl, it might be good to check the OpenGL vendor string // provided by the graphics driver. Let's see... // - fprintf(stderr, "\n-OpenGL--------------------------------------------------------------------------"); - fprintf(stderr, "\nVendor : %s", glGetString(GL_VENDOR)); -+ DebugPrintf(1, stderr, "\n-OpenGL--------------------------------------------------------------------------"); ++ DebugPrintf(1, stderr, "\n-OpenGL--------------------------------------------------------------------------"); + DebugPrintf(1, stderr, "\nVendor : %s", glGetString(GL_VENDOR)); open_gl_check_error_status(__FUNCTION__); - fprintf(stderr, "\nRenderer : %s", glGetString(GL_RENDERER)); @@ -90,10 +24,10 @@ Index: freedroidrpg-0.15.1/src/graphics.c open_gl_check_error_status(__FUNCTION__); - fprintf(stderr, "\n\n"); + DebugPrintf(1, stderr, "\n\n"); + } #endif - }; // void safely_show_open_gl_driver_info ( void ) -@@ -712,11 +712,11 @@ +@@ -703,11 +703,11 @@ GameConfig.next_time_height_of_screen = GameConfig.screen_height; break; default: @@ -108,16 +42,18 @@ Index: freedroidrpg-0.15.1/src/graphics.c /* ErrorMessage ( __FUNCTION__ , "\ SDL reported, that the video mode mentioned \nabove is not supported UNDER THE COLOR DEPTH MENTIONED ABOVE!\n\ -@@ -743,7 +743,7 @@ +@@ -734,8 +734,8 @@ SDL_GL_GetAttribute(SDL_GL_BLUE_SIZE, &blue_size); SDL_GL_GetAttribute(SDL_GL_ALPHA_SIZE, &alpha_size); SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE, &depth_size); - fprintf(stderr, "\n\nvideo mode set (bpp=%d RGBA=%d%d%d%d depth=%d)", -+ DebugPrintf(1, "\n\nvideo mode set (bpp=%d RGBA=%d%d%d%d depth=%d)", - buffer_size, red_size, green_size, blue_size, alpha_size, depth_size); +- buffer_size, red_size, green_size, blue_size, alpha_size, depth_size); ++ DebugPrintf(1, stderr, "\n\nvideo mode set (bpp=%d RGBA=%d%d%d%d depth=%d)", ++ buffer_size, red_size, green_size, blue_size, alpha_size, depth_size); } -@@ -791,7 +791,7 @@ + show_open_gl_driver_info(); +@@ -779,7 +779,7 @@ // NOTE: This has got NOTHING to do with OpenGL and OpenGL venour or the like yet... // if (SDL_VideoDriverName(vid_driver, 80)) { @@ -125,8 +61,8 @@ Index: freedroidrpg-0.15.1/src/graphics.c + DebugPrintf(1, "\nVideo system type: %s.", vid_driver); } else { fprintf(stderr, "Video driver seems not to exist or initialization failure!\nError code: %s\n", SDL_GetError()); - Terminate(EXIT_FAILURE, FALSE); -@@ -805,7 +805,7 @@ + Terminate(EXIT_FAILURE); +@@ -793,7 +793,7 @@ // We note the screen resolution used. // @@ -135,16 +71,66 @@ Index: freedroidrpg-0.15.1/src/graphics.c // We query the available video configuration on this system. // -Index: freedroidrpg-0.15.1/src/main.c -=================================================================== ---- freedroidrpg-0.15.1.orig/src/main.c 2012-05-05 12:49:37.000000000 +0000 -+++ freedroidrpg-0.15.1/src/main.c 2012-05-05 12:51:15.000000000 +0000 -@@ -430,7 +430,7 @@ - if (!strcmp(curShip.AllLevels[i]->Levelname, "Town")) - continue; +--- a/src/init.c ++++ b/src/init.c +@@ -544,8 +544,8 @@ + " [-l character-name | --load=character-name]\n" + " [-r Y | --resolution=Y] Y = 99 lists hardcoded resolutions.\n" + " Y may also be of the form 'WxH' e.g. '800x600'\n" +-" [-d X | --debug=X] X = 0-5; default 1\n" +-"\n" ++ " [-d X | --debug=X] X = 0-5; default 1\n"; ++const char report_bugs_string[] = "\n" + "Please report bugs either by entering them into the bug tracker on our website at:\n\n" + "http://bugs.freedroid.org\n\n" + "or by sending an e-mail to:\n\n" +@@ -610,6 +610,7 @@ + case 'h': + case '?': + printf("%s",usage_string); ++ DebugPrintf(1, report_bugs_string); + exit(0); + break; + +@@ -1024,7 +1025,7 @@ + // We mention the version of FreedroidRPG, so that debug reports + // are easier to assign to the different versions of the game. + +- DebugPrintf(-4, "\nHello, this is FreedroidRPG, version %s.\n", freedroid_version); ++ DebugPrintf(1, "\nHello, this is FreedroidRPG, version %s.\n", freedroid_version); + } + + /* ----------------------------------------------------------------- +--- a/src/main.c ++++ b/src/main.c +@@ -418,7 +418,7 @@ + // + if (Me.time_since_last_visit_or_respawn[i] > 600 && !(curShip.AllLevels[i]->flags & NO_RESPAWN)) { - DebugPrintf(-10, "\nNow respawning all bots on level : %d. ", i); + DebugPrintf(1, "\nNow respawning all bots on level : %d. ", i); Me.time_since_last_visit_or_respawn[i] = 0; respawn_level(i); +--- a/src/misc.c ++++ b/src/misc.c +@@ -1402,8 +1402,8 @@ + void Terminate(int exit_code) + { + if (!do_benchmark) { +- printf("\n---------------------------------------------------------------------------------"); +- printf("\nTermination of freedroidRPG initiated... "); ++ DebugPrintf(1, "\n---------------------------------------------------------------------------------"); ++ DebugPrintf(1, "\nTermination of freedroidRPG initiated... "); + } + + // Save the config file only in case of success. +@@ -1423,7 +1423,7 @@ + free_memory_before_exit(); + + if (!do_benchmark) { +- printf("Thank you for playing freedroidRPG.\n\n"); ++ DebugPrintf(1, "Thank you for playing freedroidRPG.\n\n"); + } + + IMMEDIATE_EXIT: -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/freedroidrpg.git _______________________________________________ Pkg-games-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

