Window position array brought up to date, speed slider behaviour ok. TODO: save EmuSpeed setting in config file and bind it to current code.

This commit is contained in:
grinvader
2005-05-17 22:25:52 +00:00
parent bd4b1b70a8
commit a437a0ab78
3 changed files with 92 additions and 47 deletions

View File

@@ -457,10 +457,34 @@ NEWSYM PrevWinMode, db 0
NEWSYM PrevFSMode, db 0 NEWSYM PrevFSMode, db 0
%endif %endif
; Window position index
; GAME 1 > Load
; 2 > Pick state
; 12 > Reset
; 14 > Save/Open state
; CONFIG 3 > Inputs
; 4 > Options
; 5 > Video
; 6 > Sound
; 17 > Add-ons
; 18 > Chip cfg
; 19 > Paths
; 20 > Saves
; 21 > Speed
; CHEAT 7 > Add/Browse
; 13 > Search
;(NETPLAY 8 > Internet)
; MISC 9 > Misc keys
; 10 > GUI opns
; 11 > About
; 15 > Movie opn
; 16 > Key comb.
;# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
OldWinPos db 0 OldWinPos db 0
GUIwinposx dd 0,5 ,60 ,30 ,55 ,50 ,65 ,5 ,30 ,20 ,10 ,80 ,65 ,20 ,70 ,50 ,3 ,50 GUIwinposx dd 0, 5,60,30,55,50,65, 5,30,20,10,80,65,20,70,50, 3,50,50, 5,10,20
GUIwinposxexp times 30 dd 0 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 GUIwinposy dd 0,20,70,30,20,22,36,20,30,20,30,20,60,30,65,50,22,60,20,20,20,20
GUIwinposyexp times 30 dd 0 GUIwinposyexp times 30 dd 0
NEWSYM GUIEffect, db 0 NEWSYM GUIEffect, db 0

View File

@@ -46,7 +46,7 @@ ProcessMouse:
mov edx,223 mov edx,223
call Set_MouseYMax call Set_MouseYMax
.noholda .noholda
cmp byte[GUIHold],1 cmp byte[GUIHold],1 ; GUI Windows
jne .nohold1 jne .nohold1
mov ecx,0 mov ecx,0
mov edx,255 mov edx,255
@@ -69,7 +69,7 @@ ProcessMouse:
mov edx,[GUIHoldYlim] mov edx,[GUIHoldYlim]
call Set_MouseYMax call Set_MouseYMax
.nohold2m .nohold2m
cmp byte[GUIHold],3 cmp byte[GUIHold],3 ; Scrollbars
jne .nohold3m jne .nohold3m
mov ecx,[GUIHoldXlimL] mov ecx,[GUIHoldXlimL]
mov edx,[GUIHoldXlimR] mov edx,[GUIHoldXlimR]
@@ -344,6 +344,8 @@ ProcessMouseButtons:
je near .hold4 je near .hold4
cmp byte[GUIHold],5 cmp byte[GUIHold],5
je near .hold5 je near .hold5
cmp byte[GUIHold],6
je near .hold6
cmp byte[GUIHold],1 cmp byte[GUIHold],1
je near .hold je near .hold
cmp byte[GUIHold],255 cmp byte[GUIHold],255
@@ -360,20 +362,20 @@ ProcessMouseButtons:
call Set_MousePosition call Set_MousePosition
ret ret
.hold2 .hold2
; Slide Bar Hold ; Colour Slide Bar Hold
mov eax,[GUIHoldYlim] mov eax,[GUIHoldYlim]
mov [GUImouseposy],eax mov [GUImouseposy],eax
mov ebx,[GUImouseposx] mov ebx,[GUImouseposx]
mov eax,[GUIHoldXlimL] mov eax,[GUIHoldXlimL]
cmp ebx,eax cmp ebx,eax
jnl .noless jnl .noless2
mov [GUImouseposx],eax mov [GUImouseposx],eax
.noless .noless2
mov eax,[GUIHoldXlimR] mov eax,[GUIHoldXlimR]
cmp ebx,eax cmp ebx,eax
jng .nogreat jng .nogreat2
mov [GUImouseposx],eax mov [GUImouseposx],eax
.nogreat .nogreat2
mov byte[lastmouseholded],1 mov byte[lastmouseholded],1
jmp DisplayGUIOptnsClick jmp DisplayGUIOptnsClick
.hold3 .hold3
@@ -406,17 +408,17 @@ ProcessMouseButtons:
mov edx,[GUImouseposy] mov edx,[GUImouseposy]
sub edx,[GUIwinposy+ebx*4] sub edx,[GUIwinposy+ebx*4]
cmp eax,[GUIHoldXlimL] cmp eax,[GUIHoldXlimL]
jl near .nobhold jl near .nobhold4
cmp edx,[GUIHoldYlim] cmp edx,[GUIHoldYlim]
jl near .nobhold jl near .nobhold4
cmp eax,[GUIHoldXlimR] cmp eax,[GUIHoldXlimR]
jg near .nobhold jg near .nobhold4
cmp edx,[GUIHoldYlimR] cmp edx,[GUIHoldYlimR]
jg near .nobhold jg near .nobhold4
mov al,[GUICBHold2] mov al,[GUICBHold2]
mov [GUICBHold],al mov [GUICBHold],al
ret ret
.nobhold .nobhold4
mov byte[GUICBHold],0 mov byte[GUICBHold],0
ret ret
.hold5 .hold5
@@ -426,16 +428,33 @@ ProcessMouseButtons:
mov ebx,[GUImouseposx] mov ebx,[GUImouseposx]
mov eax,[GUIHoldXlimL] mov eax,[GUIHoldXlimL]
cmp ebx,eax cmp ebx,eax
jnl .nolessa jnl .noless5
mov [GUImouseposx],eax mov [GUImouseposx],eax
.nolessa .noless5
mov eax,[GUIHoldXlimR] mov eax,[GUIHoldXlimR]
cmp ebx,eax cmp ebx,eax
jng .nogreata jng .nogreat5
mov [GUImouseposx],eax mov [GUImouseposx],eax
.nogreata .nogreat5
mov byte[lastmouseholded],1 mov byte[lastmouseholded],1
jmp DisplayGUISoundClick jmp DisplayGUISoundClick
.hold6
; Speed Slide Bar Hold
mov eax,[GUIHoldYlim]
mov [GUImouseposy],eax
mov ebx,[GUImouseposx]
mov eax,[GUIHoldXlimL]
cmp ebx,eax
jnl .noless6
mov [GUImouseposx],eax
.noless6
mov eax,[GUIHoldXlimR]
cmp ebx,eax
jng .nogreat6
mov [GUImouseposx],eax
.nogreat6
mov byte[lastmouseholded],1
jmp DisplayGUISpeedClick
.hold .hold
cmp word[GUImouseposy],16 cmp word[GUImouseposy],16
jge .noover jge .noover
@@ -467,7 +486,6 @@ ProcessMouseButtons:
mov byte[GUIpclicked],0 mov byte[GUIpclicked],0
mov byte[GUIHold],0 mov byte[GUIHold],0
%ifdef __LINUX__ %ifdef __LINUX__
cmp byte[GUIcwinpress],1 cmp byte[GUIcwinpress],1
jne .notwinpressa jne .notwinpressa
@@ -3227,13 +3245,17 @@ DisplayGUISaveClick:
ret ret
DisplayGUISpeedClick: DisplayGUISpeedClick:
mov eax,[GUImouseposx] ; this updates the mouse location
sub eax,[GUIwinposx+21*4] ; effectively 'grabbing' the cursor !
mov edx,[GUImouseposy]
sub edx,[GUIwinposy+21*4]
GUIClickCButton 11,125,byte[FastFwdToggle] ; Checkbox GUIClickCButton 11,125,byte[FastFwdToggle] ; Checkbox
DGOptnsProcBox 12,58,[KeyFastFrwrd] ; Shortcut Boxes DGOptnsProcBox 12,58,[KeyFastFrwrd] ; Shortcut Boxes
DGOptnsProcBox 12,68,[KeySlowDown] DGOptnsProcBox 12,68,[KeySlowDown]
DGOptnsProcBox 12,78,[KeyResetSpeed] DGOptnsProcBox 12,78,[KeyResetSpeed]
; Speed Slider ; Speed Slider
cmp eax,15 ; X-Range for click-area cmp eax,15 ; X-Range for click-area
jl near .nomovebar jl near .nomovebar
cmp eax,15+116 cmp eax,15+116
@@ -3244,8 +3266,8 @@ DisplayGUISpeedClick:
jl near .nomovebar jl near .nomovebar
cmp edx,33 cmp edx,33
jg near .nomovebar jg near .nomovebar
mov [EmuSpeed],al ; Lock mouse to bar when clicked mov [EmuSpeed],al
mov byte[GUIHold],6 mov byte[GUIHold],6 ; Lock mouse to bar when clicked
mov eax,[GUIwinposy+21*4] mov eax,[GUIwinposy+21*4]
add eax,31 add eax,31
mov [GUIHoldYlim],eax mov [GUIHoldYlim],eax

View File

@@ -6398,11 +6398,10 @@ DisplayGUISpeed: ;Speed Options
mov eax,dword[GUIwinposx+21*4] ;Slider mov eax,dword[GUIwinposx+21*4] ;Slider
mov ebx,dword[GUIwinposy+21*4] mov ebx,dword[GUIwinposy+21*4]
mov ecx,eax
add eax,15 add eax,15
add ecx,15+116
; add ebx,91
add ebx,31 add ebx,31
mov ecx,eax
add ecx,116
xor edx,edx xor edx,edx
mov dl,215 mov dl,215
sub dl,[GUIWincoladd] sub dl,[GUIWincoladd]