From 82db91f831f652b6f230608c0d971435d8f16982 Mon Sep 17 00:00:00 2001 From: stainless <> Date: Sat, 10 Nov 2001 23:34:43 +0000 Subject: [PATCH] Added toggle for 'boiling water' effect to the GUI. --- zsnes/src/gui/gui.asm | 6 +++++- zsnes/src/gui/guikeys.inc | 6 +++++- zsnes/src/gui/guimouse.inc | 1 + zsnes/src/gui/guiwindp.inc | 13 +++++++++++-- zsnes/src/water.c | 5 +++++ 5 files changed, 27 insertions(+), 4 deletions(-) diff --git a/zsnes/src/gui/gui.asm b/zsnes/src/gui/gui.asm index e7256aa8..d86318ce 100644 --- a/zsnes/src/gui/gui.asm +++ b/zsnes/src/gui/gui.asm @@ -511,7 +511,7 @@ GUIwinposxexp times 30 dd 0 GUIwinposy dd 0,20 ,70 ,30 ,20 ,22 ,36 ,20 ,30 ,20 ,30 ,70 ,60 ,30 ,65 ,50 ,22 ,60 GUIwinposyexp times 30 dd 0 -GUIEffect db 0 +NEWSYM GUIEffect, db 0 NEWSYM pl5selk, dd 0 ; 4SELECT = SHIFT NEWSYM pl5startk, dd 0 ; 4START = ENTER @@ -2032,6 +2032,10 @@ NEWSYM StartGUI jne .nowater call DrawWater .nowater + cmp byte[GUIEffect],3 + jne .nowater2 + call DrawWater +.nowater2 ; call TestSent cmp byte[CNetType],20 jne .noreceive diff --git a/zsnes/src/gui/guikeys.inc b/zsnes/src/gui/guikeys.inc index 20a8c32c..f1c61fd1 100644 --- a/zsnes/src/gui/guikeys.inc +++ b/zsnes/src/gui/guikeys.inc @@ -946,8 +946,12 @@ GUIGUIOptnsKeys: GUIkeystoggleoptn byte[GUIEffect],1 .guioptn7 cmp dh,'E' - jne .guioptn8 + jne .guioptn7b GUIkeystoggleoptn byte[GUIEffect],2 +.guioptn7b + cmp dh,'B' + jne .guioptn8 + GUIkeystoggleoptn byte[GUIEffect],3 .guioptn8 %ifdef __WIN32__ cmp dh,'A' diff --git a/zsnes/src/gui/guimouse.inc b/zsnes/src/gui/guimouse.inc index da56fdbb..32e7e4ee 100644 --- a/zsnes/src/gui/guimouse.inc +++ b/zsnes/src/gui/guimouse.inc @@ -2780,6 +2780,7 @@ DisplayGUIOptnsClick: GUIClickCButton 12,73,byte[JoyPad1Move] GUIClickCButton6 12,83,byte[GUIEffect],1 GUIClickCButton6 12,93,byte[GUIEffect],2 + GUIClickCButton6 124,93,byte[GUIEffect],3 GUIClickCButton 124,23,byte[GUIEnableTransp] %ifdef __WIN32__ GUIClickCButton 12,168,byte[AlwaysOnTop] diff --git a/zsnes/src/gui/guiwindp.inc b/zsnes/src/gui/guiwindp.inc index d847bc8f..4a258b37 100644 --- a/zsnes/src/gui/guiwindp.inc +++ b/zsnes/src/gui/guiwindp.inc @@ -4883,10 +4883,16 @@ DisplayGUIOptns: GUIDisplayIconWin 10,12,83,[GUITemp] mov dword[GUITemp],GUIIconDataCheckBoxUC cmp byte[GUIEffect],2 + jne .nocheck7b + mov dword[GUITemp],GUIIconDataCheckBoxC +.nocheck7b + GUIDisplayIconWin 10,12,93,[GUITemp] + mov dword[GUITemp],GUIIconDataCheckBoxUC + cmp byte[GUIEffect],3 jne .nocheck8 mov dword[GUITemp],GUIIconDataCheckBoxC .nocheck8 - GUIDisplayIconWin 10,12,93,[GUITemp] + GUIDisplayIconWin 10,124,93,[GUITemp] %ifdef __WIN32__ mov dword[GUITemp],GUIIconDataCheckBoxUC cmp byte[MouseWheel],1 @@ -4953,6 +4959,7 @@ DisplayGUIOptns: GUIOuttextwin2 10,147,111,GUIGUIOptnsTextI GUIOuttextwin2u 10,26,88,GUIGUIOptnsTextB,1 GUIOuttextwin2u 10,26,98,GUIGUIOptnsTextC,3 + GUIOuttextwin2u 10,138,98,GUIGUIOptnsTextCb,13 GUIOuttextwin2u 10,138,28,GUIGUIOptnsTextJ,0 GUIOuttextwin2u 10,138,48,GUIGUIOptnsTextM,0 %ifdef __WIN32__ @@ -4980,6 +4987,7 @@ DisplayGUIOptns: GUIOuttextwin2 10,146,110,GUIGUIOptnsTextI GUIOuttextwin2 10,25,87,GUIGUIOptnsTextB GUIOuttextwin2 10,25,97,GUIGUIOptnsTextC + GUIOuttextwin2 10,137,97,GUIGUIOptnsTextCb GUIOuttextwin2 10,137,27,GUIGUIOptnsTextJ GUIOuttextwin2 10,137,47,GUIGUIOptnsTextM %ifdef __WIN32__ @@ -5071,7 +5079,8 @@ GUIGUIOptnsText8 db 'CLICK ENTERS GUI',0 GUIGUIOptnsText9 dd 0 GUIGUIOptnsTextA db 'USE JOYPAD1',0 GUIGUIOptnsTextB dd 'SNOW EFFECT',0 -GUIGUIOptnsTextC dd 'WATER EFFECT',0 +GUIGUIOptnsTextC dd 'WATER EFFECT A',0 +GUIGUIOptnsTextCb dd 'WATER EFFECT B',0 GUIGUIOptnsTextD dd 'MAIN WINDOW OPTIONS :',0 GUIGUIOptnsTextE dd 'ALWAYS ON TOP',0 GUIGUIOptnsTextF db 'SAVE MAIN WINDOW POSITION',0 diff --git a/zsnes/src/water.c b/zsnes/src/water.c index f3621885..3350d1a6 100644 --- a/zsnes/src/water.c +++ b/zsnes/src/water.c @@ -55,6 +55,8 @@ static int offset; static int pheight=400; static int radius=30; +extern char GUIEffect; + void DrawWater(void) { // tslast=tscurrent; @@ -77,6 +79,9 @@ void DrawWater(void) DrawWaterWithLight(Height[Hpage],1); #endif + if (GUIEffect==2) { mode=0x0001; } + else { mode = 0x0004; } + if(mode&2) // && (tscurrent-tslast)) { int x,y;