From c5f6611a1adeb0e4965f30a5179314075c6df391 Mon Sep 17 00:00:00 2001 From: n-a-c-h <> Date: Sun, 11 Jan 2004 01:29:40 +0000 Subject: [PATCH] Finished paths box. --- zsnes/src/gui/gui.asm | 18 +++++++++++------- zsnes/src/gui/guikeys.inc | 23 ++++++++++++++++++++++- zsnes/src/gui/guimouse.inc | 26 +++++++++++++------------- zsnes/src/gui/guiwindp.inc | 4 ++++ 4 files changed, 50 insertions(+), 21 deletions(-) diff --git a/zsnes/src/gui/gui.asm b/zsnes/src/gui/gui.asm index d624148d..23c896e9 100644 --- a/zsnes/src/gui/gui.asm +++ b/zsnes/src/gui/gui.asm @@ -611,13 +611,17 @@ NEWSYM hqFilter, db 0 NEWSYM reserved, db 0 NEWSYM scale2xFilter, db 0 NEWSYM st010difficulty, db 0 ; place holder till we commit the other Seta 10 file -NEWSYM SRAMPath, times 16384 db 0 -NEWSYM SnapPath, times 16384 db 0 -NEWSYM SPCPath, times 16384 db 0 -NEWSYM BSXPath, times 16384 db 0 -NEWSYM STPath, times 16384 db 0 -NEWSYM GNextPath, times 16384 db 0 -NEWSYM SGPath, times 16384 db 0 +NEWSYM SRAMPath, times 1024 db 0 +NEWSYM SnapPath, times 1024 db 0 +NEWSYM SPCPath, times 1024 db 0 +NEWSYM BSXPath, times 1024 db 0 +NEWSYM STPath, times 1024 db 0 +NEWSYM GNextPath, times 1024 db 0 +NEWSYM SGPath, times 1024 db 0 +NEWSYM FEOEZPath, times 1024 db 0 +NEWSYM SJNSPath, times 1024 db 0 +NEWSYM MDHPath, times 1024 db 0 +NEWSYM SPL4Path, times 1024 db 0 GUIsave equ $-GUIRAdd diff --git a/zsnes/src/gui/guikeys.inc b/zsnes/src/gui/guikeys.inc index e7cfab30..4451d037 100644 --- a/zsnes/src/gui/guikeys.inc +++ b/zsnes/src/gui/guikeys.inc @@ -1503,6 +1503,26 @@ GUIPathKeys: mov eax,GNextPath jmp .boxselected .notBox7 + cmp dword[GUIInputBox],8 + jne .notBox8 + mov eax,FEOEZPath + jmp .boxselected +.notBox8 + cmp dword[GUIInputBox],9 + jne .notBox9 + mov eax,SJNSPath + jmp .boxselected +.notBox9 + cmp dword[GUIInputBox],10 + jne .notBox10 + mov eax,MDHPath + jmp .boxselected +.notBox10 + cmp dword[GUIInputBox],11 + jne .notBox11 + mov eax,SPL4Path + jmp .boxselected +.notBox11 .boxselected mov ecx,eax @@ -1525,7 +1545,7 @@ GUIPathKeys: .notbackspace ;check if we're at the end - add ecx,16383 + add ecx,dword[GUIInputLimit] cmp eax,ecx jne .stillroom ret @@ -1537,6 +1557,7 @@ GUIPathKeys: SECTION .bss GUIInputBox resd 1 +GUIInputLimit resd 1 SECTION .text GUIComboKeys: diff --git a/zsnes/src/gui/guimouse.inc b/zsnes/src/gui/guimouse.inc index c51245d2..aaab41f0 100644 --- a/zsnes/src/gui/guimouse.inc +++ b/zsnes/src/gui/guimouse.inc @@ -1783,7 +1783,7 @@ SECTION .text %%noclick %endmacro -%macro GUITextBoxInputNach 5 +%macro GUITextBoxInputNach 6 cmp eax,%1 jl %%noclick cmp edx,%2 @@ -1793,6 +1793,7 @@ SECTION .text cmp edx,%4 jg %%noclick mov dword[GUIInputBox],%5 + mov dword[GUIInputLimit],%6-1 %%noclick %endmacro @@ -3252,18 +3253,17 @@ DisplayGUIChipClick ret DisplayGUIPathsClick - GUITextBoxInputNach 75,15,230,25,1 ;SRAMPath - GUITextBoxInputNach 75,35,230,45,2 ;SnapPath - GUITextBoxInputNach 75,55,230,65,3 ;SPCPath - GUITextBoxInputNach 8,95,100,105,4 ;BSXPath - GUITextBoxInputNach 8,120,100,130,5 ;SGPath - GUITextBoxInputNach 135,95,235,105,6 ;STPath - GUITextBoxInputNach 135,120,235,130,7 ;GNextPath - - ;GUITextBoxInput 8,155,100,165,,16384 - ;GUITextBoxInput 8,180,100,190,,16384 - ;GUITextBoxInput 135,155,235,165,,16384 - ;GUITextBoxInput 135,180,235,190,,16384 + GUITextBoxInputNach 75,15,230,25,1,1024 ;SRAMPath + GUITextBoxInputNach 75,35,230,45,2,1024 ;SnapPath + GUITextBoxInputNach 75,55,230,65,3,1024 ;SPCPath + GUITextBoxInputNach 8,95,100,105,4,1024 ;BSXPath + GUITextBoxInputNach 8,120,100,130,5,1024 ;SGPath + GUITextBoxInputNach 135,95,235,105,6,1024 ;STPath + GUITextBoxInputNach 135,120,235,130,7,1024 ;GNextPath + GUITextBoxInputNach 8,155,100,165,8,1024 ;FEOEZPath + GUITextBoxInputNach 8,180,100,190,9,1024 ;SJNSPath + GUITextBoxInputNach 135,155,235,165,10,1024 ;MDHPath + GUITextBoxInputNach 135,180,235,190,11,1024 ;SPL4Path ret DrawMouse: diff --git a/zsnes/src/gui/guiwindp.inc b/zsnes/src/gui/guiwindp.inc index c2769bbb..2e24be89 100644 --- a/zsnes/src/gui/guiwindp.inc +++ b/zsnes/src/gui/guiwindp.inc @@ -6387,6 +6387,10 @@ DisplayGUIPaths: GUIOuttextwin2d 19,10,124,SGPath,15 GUIOuttextwin2d 19,137,99,STPath,15 GUIOuttextwin2d 19,137,124,GNextPath,15 + GUIOuttextwin2d 19,10,159,FEOEZPath,15 + GUIOuttextwin2d 19,10,184,SJNSPath,15 + GUIOuttextwin2d 19,137,159,MDHPath,15 + GUIOuttextwin2d 19,137,184,SPL4Path,15 ret SECTION .data