From aed422c23795e3b0dee1dfcdd0c4340be4ecc2f5 Mon Sep 17 00:00:00 2001 From: johns <> Date: Sun, 19 May 2002 22:05:53 +0000 Subject: [PATCH] No tips in network play. --- doc/ChangeLog.html | 7 ++++++- src/stratagus/mainloop.cpp | 8 ++++++-- src/stratagus/script.cpp | 1 + src/ui/menus.cpp | 13 ++++++++----- 4 files changed, 21 insertions(+), 8 deletions(-) diff --git a/doc/ChangeLog.html b/doc/ChangeLog.html index 9f0ba349b..829aed01e 100644 --- a/doc/ChangeLog.html +++ b/doc/ChangeLog.html @@ -808,7 +808,12 @@ <LI>Fixed bug #422586: Lose a group on entering a building. <LI>Fixed bug #515713: Color didn't cycle continuos in buttons. <LI>Fixed bug #520492: Small map crashed with big screen. - <LI>Multiple viewports implementation separated completely from the old single-viewport one, reported bugs fixed. + <LI>Multiple viewports implementation separated completely from the old + single-viewport one, reported bugs fixed. (from Latimerius) + <LI>Fixed bug #472075: Diplomacy over network. + <LI>Fixed bug #440634: Sea Attack: Can't use transports. + <LI>Fixed bug #557954: Opponent's action markers are visible. + <LI>The tips are only shown in the single player game. <LI>+++ </UL> diff --git a/src/stratagus/mainloop.cpp b/src/stratagus/mainloop.cpp index f822679fb..3dd75b538 100644 --- a/src/stratagus/mainloop.cpp +++ b/src/stratagus/mainloop.cpp @@ -689,12 +689,16 @@ global void GameMainLoop(void) GameCursor=TheUI.Point.Cursor; GameRunning=1; - showtip=ShowTips; + showtip=0; + if( NetworkFildes==-1 ) { // Don't show them for net play + showtip=ShowTips; + } for( ; GameRunning; ) { #if DEBUG - if (setjmp (main_loop)) + if (setjmp (main_loop)) { GamePaused = 1; + } #endif // // Game logic part diff --git a/src/stratagus/script.cpp b/src/stratagus/script.cpp index f5128c60b..a76b8d67a 100644 --- a/src/stratagus/script.cpp +++ b/src/stratagus/script.cpp @@ -137,6 +137,7 @@ local SCM CclSetShowTips(SCM flag) ** @param tip A new tip to be displayed before level. ** ** @todo FIXME: Memory for tips is never freed. +** FIXME: Make Tips dynamic. */ local SCM CclAddTip(SCM tip) { diff --git a/src/ui/menus.cpp b/src/ui/menus.cpp index 0c0f5be25..77ed5f20e 100644 --- a/src/ui/menus.cpp +++ b/src/ui/menus.cpp @@ -2494,10 +2494,11 @@ local void InitTips(Menuitem *mi __attribute__((unused))) int font; int l; - if( ShowTips ) + if( ShowTips ) { TipsMenuItems[1].d.gem.state=MI_GSTATE_CHECKED; - else + } else { TipsMenuItems[1].d.gem.state=MI_GSTATE_UNCHECKED; + } FreeTips(); @@ -2507,8 +2508,9 @@ local void InitTips(Menuitem *mi __attribute__((unused))) line=5; p=Tips[CurrentTip]; - if( !p ) + if( !p ) { return; + } l=0; s=str=strdup(p); @@ -2527,8 +2529,9 @@ local void InitTips(Menuitem *mi __attribute__((unused))) fprintf(stderr, "line too long: \"%s\"\n", s); break; } - if( space ) + if( space ) { *space=' '; + } space=s1; *space='\0'; } @@ -5391,7 +5394,7 @@ global void InitMenus(unsigned int race) MenuButtonGfx.Sprite = LoadSprite(file, 300, 144); // 50/53 images! // - // Autodetect the swamp tileset + // Autodetect the swamp tileset // #ifdef HAVE_EXPANSION strcpy(ScenSelectFullPath, FreeCraftLibPath);