Added "Speed Option" window, moved FF and Rewind keyboard shortcuts there. Added incomplete speed slider

This commit is contained in:
ipher
2005-05-14 08:56:22 +00:00
parent 254b5fd3cf
commit f474d2a413
3 changed files with 196 additions and 22 deletions

View File

@@ -105,7 +105,7 @@ EXTSYM JoyMaxX209,JoyMinY209,JoyMaxY209,GetCoords,GetCoords3,MultiTap,SFXEnable
EXTSYM RestoreSystemVars,GUIBIFIL,GUIHQ2X,GUIHQ3X,GUIHQ4X,firstsaveinc,nssdip1
EXTSYM nssdip2,nssdip3,nssdip4,nssdip5,nssdip6,SkipMovie,MovieStop,MoviePlay
EXTSYM MovieRecord,MovieInsertChapter,MovieSeekAhead,MovieSeekBehind
EXTSYM ResetDuringMovie,MovieDumpRaw
EXTSYM ResetDuringMovie,MovieDumpRaw,EmuSpeed
%ifdef __LINUX__
EXTSYM numlockptr
@@ -155,6 +155,7 @@ NEWSYM WaterOn, db 1
; Sound
; Paths
; Saves
; Speed
; MultiPlay only has "Internet" for Windows/Linux
@@ -178,11 +179,12 @@ NEWSYM WaterOn, db 1
; 18 = Chip Config
; 19 = Paths
; 20 = Saves
; 21 = Speed
;The first byte is the number of fields on the right not including the seperators
MenuDat1 db 12, 3,1,1,1,1,1,1,1,1,1,0,1,2,0
MenuDat2 db 8, 3,1,1,0,1,1,1,0,2,0,0
MenuDat3 db 13, 3,1,1,1,1,0,1,1,0,1,1,1,1,2,0
MenuDat3 db 14, 3,1,1,1,1,0,1,1,0,1,1,1,1,1,2,0
MenuDat4 db 2, 3,1,2,0
MenuDat5 db 1, 3,2,0
MenuDat6 db 6, 3,1,1,1,1,0,2,0
@@ -226,6 +228,7 @@ GUIConfigMenuData
db 1,'SOUND ',0
db 1,'PATHS ',0
db 1,'SAVES ',0
db 1,'SPEED ',0
GUICheatMenuData
db 1,'ADD CODE ',0
db 1,'BROWSE ',0
@@ -576,7 +579,8 @@ NEWSYM EMUPauseKey, dd 0
NEWSYM INCRFrameKey, dd 0
NEWSYM PauseLoad, db 0
NEWSYM PauseRewind, db 0
;NEWSYM end
NEWSYM KeyResetSpeed, dd 0
;end NEWSYM end
GUIsave equ $-GUIRAdd
@@ -594,11 +598,11 @@ GUIwinactiv resb 18
ViewBuffer resb 50*32
SECTION .data ; Window sizes and positions
; LOAD STAT INPT OPT VID SND CHT NET GMKEY GUIOP ABT RSET SRC STCN MOVE CMBO ADDO CHIP PATH SAVE
GUIwinposxo dd 0,5 ,60 ,30 ,55 ,50 ,35 ,5 ,30 ,10 ,10 ,50 ,65 ,20 ,70 ,40 ,3 ,50 ,50 ,5 ,20
GUIwinposyo dd 0,20 ,70 ,30 ,20 ,20 ,20 ,20 ,30 ,30 ,20 ,20 ,60 ,30 ,65 ,35 ,22 ,60 ,60 ,20 ,30
GUIwinsizex dd 0,244 ,126 ,189 ,167 ,180 ,188 ,244 ,8*16,235 ,240 ,190 ,9*16,8*16,9*16,180 ,250 ,160 ,160 ,244 ,200
GUIwinsizey dd 0,190 ,3*16,166 ,190 ,192 ,188 ,191 ,40 ,170 ,150 ,190 ,42 ,40 ,42 ,160 ,190 ,100 ,100 ,190 ,160
; LOAD STAT INPT OPT VID SND CHT NET GMKEY GUIOP ABT RSET SRC STCN MOVE CMBO ADDO CHIP PATH SAVE SPED
GUIwinposxo dd 0,5 ,60 ,30 ,55 ,50 ,35 ,5 ,30 ,10 ,10 ,50 ,65 ,20 ,70 ,40 ,3 ,50 ,50 ,5 ,20 ,20
GUIwinposyo dd 0,20 ,70 ,30 ,20 ,20 ,20 ,20 ,30 ,30 ,20 ,20 ,60 ,30 ,65 ,35 ,22 ,60 ,60 ,20 ,30 ,30
GUIwinsizex dd 0,244 ,126 ,189 ,167 ,180 ,188 ,244 ,8*16,235 ,240 ,190 ,9*16,8*16,9*16,180 ,250 ,160 ,160 ,244 ,200 ,200
GUIwinsizey dd 0,190 ,3*16,166 ,190 ,192 ,188 ,191 ,40 ,170 ,150 ,190 ,42 ,40 ,42 ,160 ,190 ,100 ,100 ,190 ,160 ,160
GUIwinptr db 0
section .bss
@@ -2487,7 +2491,7 @@ CheckMenuItemHelp:
%%skip
%endmacro
GUITryMenuItem:
GUITryMenuItem: ; Defines which menu item calls what window number
cmp byte[GUIcmenupos],1
jne near .noquickload
checkqloadvalue 0
@@ -2627,6 +2631,7 @@ GUITryMenuItem:
GUICheckMenuItem 6, 11 ; Sound
GUICheckMenuItem 19, 12 ; Paths
GUICheckMenuItem 20, 13 ; Saves
GUICheckMenuItem 21, 14 ; Speed
.noconfig
cmp byte[romloadskip],0
jne near .nocheat
@@ -2693,7 +2698,7 @@ SECTION .data
.message1 db 'CONFIGURATION FILES SAVED.',0
SECTION .text
DisplayBoxes:
DisplayBoxes: ; Displays window when item is clicked
xor esi,esi
mov byte[cwindrawn],0
.next2
@@ -2819,6 +2824,11 @@ DisplayBoxes:
call DisplayGUISave
jmp .finstuff
.nosave
cmp al,21
jne .nospeed
call DisplayGUISpeed
jmp .finstuff
.nospeed
.finstuff
pop esi
inc esi
@@ -3139,7 +3149,7 @@ DisplayMenu:
.nomenu2
cmp byte[GUIcmenupos],3
jne near .nomenu3
GUIDrawMenuM 52,16,9,14,GUIConfigMenuData,54,57,22,159,42 ;19+14*10
GUIDrawMenuM 52,16,9,15,GUIConfigMenuData,54,57,22,169,42 ;19+15*10
mov dword[GUICYLocPtr],MenuDat3
.nomenu3
cmp byte[GUIcmenupos],4

View File

@@ -989,6 +989,8 @@ GUIWinClicked:
je near DisplayGUIPathsClick
cmp ebx,20
je near DisplayGUISaveClick
cmp ebx,21
je near DisplayGUISpeedClick
ret
%macro GUIClickCButton 3
cmp eax,%1+1
@@ -3222,6 +3224,52 @@ DisplayGUISaveClick:
DGOptnsProcBox 8+38,157,[KeyRewind]
ret
DisplayGUISpeedClick
DGOptnsProcBox 100,28,[KeyFastFrwrd]
DGOptnsProcBox 100,38,[KeySlowDown]
DGOptnsProcBox 100,48,[KeyResetSpeed]
cmp eax,15
jl near .nomovebar
cmp eax,15+100
jg near .nomovebar
cmp edx,89
jl near .nomovebar
cmp edx,93
jg near .nomovebar
sub eax,15
mov [EmuSpeed],al
; mov [cfgvolume],al
mov byte[GUIHold],5
mov eax,[GUIwinposy+21*4]
add eax,91
mov [GUIHoldYlim],eax
xor eax,eax
xor edx,edx
mov al,[EmuSpeed]
shl eax,7
mov ebx,100
div ebx
cmp al,127
jb .noof
mov al,127
.noof
; mov [MusicVol],al
; mov al,[DSPMem+0Ch]
; call WDSPReg0C
; mov al,[DSPMem+1Ch]
; call WDSPReg1C
mov eax,[GUIwinposx+21*4]
add eax,15
mov [GUIHoldXlimL],eax
add eax,100
mov [GUIHoldXlimR],eax
.nomovebar
ret
DrawMouse:
mov edi,[vidbuffer]
add edi,16

View File

@@ -1,4 +1,4 @@
;Copyright (C) 1997-2005 ZSNES Team ( zsKnight, _Demo_, pagefault, Nach )
s;Copyright (C) 1997-2005 ZSNES Team ( zsKnight, _Demo_, pagefault, Nach )
;
;http://www.zsnes.com
;http://sourceforge.net/projects/zsnes
@@ -2586,8 +2586,14 @@ DisplayGUISound: ; Sound Related Options
mov al,[cfgSoundQuality]
shl eax,3
add [GUITemp],eax
mov byte[GUItextcolor],223
mov byte[GUItextcolor],223 ; Text
GUIOuttextwin2 6,23,64,[GUITemp]
mov byte[GUItextcolor],221 ; Shadow
cmp byte[GUIWincoladd],0
je .zero4
mov byte[GUItextcolor],222
.zero4
GUIOuttextwin2 6,22,63,[GUITemp]
; Draw borders
@@ -2614,12 +2620,6 @@ DisplayGUISound: ; Sound Related Options
; Volume Level Slider
mov byte[GUItextcolor],221
cmp byte[GUIWincoladd],0
je .zero4
mov byte[GUItextcolor],222
.zero4
GUIOuttextwin2 6,22,63,[GUITemp]
mov eax,dword[GUIwinposx+6*4]
mov ebx,dword[GUIwinposy+6*4]
mov ecx,eax
@@ -4052,10 +4052,10 @@ DisplayGameOptns:
DGOptnsDrawBox 78,130,[KeyNewGfxSwt]
DGOptnsDrawBox 78,140,[KeyWinDisble]
DGOptnsDrawBox 78,150,[KeyOffsetMSw]
DGOptnsDrawBox 78,160,[KeySlowDown]
; DGOptnsDrawBox 78,160,[KeySlowDown]
DGOptnsDrawBox 78,170,[EMUPauseKey]
; DGOptnsDrawBox 178,100,[KeyRewind]
DGOptnsDrawBox 178,110,[KeyFastFrwrd]
; DGOptnsDrawBox 178,110,[KeyFastFrwrd]
DGOptnsDrawBox 178,120,[KeyVolUp]
DGOptnsDrawBox 178,130,[KeyVolDown]
DGOptnsDrawBox 178,140,[KeyFRateUp]
@@ -6361,6 +6361,121 @@ GUISaveTextZ2 db '-',0
GUISaveTextZ3 db ' ',0
DisplayGUISpeed: ;Speed Options
GUIDrawWindowBox 21,GUISpeedDisp
mov byte[GUItextcolor],217 ;Shadow
cmp byte[GUIWincoladd],0
je .zero
mov byte[GUItextcolor],211
.zero
sub byte[GUItextcolor],15
GUIOuttextwin2 21,8,29,GUISpeedTextA1
GUIOuttextwin2 21,8,39,GUISpeedTextA2
GUIOuttextwin2 21,8,49,GUISpeedTextA3
add byte[GUItextcolor],15 ;Text
GUIOuttextwin2 21,7,28,GUISpeedTextA1
GUIOuttextwin2 21,7,38,GUISpeedTextA2
GUIOuttextwin2 21,7,48,GUISpeedTextA3
mov al,[GUIWincol] ;Yellow Shadow
mov [GUIGameOptnsColA],al
mov byte[GUIGameOptnsColB],202
cmp byte[GUIWincoladd],0
je .zero3
mov byte[GUIGameOptnsColB],196
.zero3
mov al,byte[GUIGameOptnsColA]
mov byte[GUItextcolor],al
GUIOuttextwin2 21,7,18,GUISpeedTextA
GUIOuttextwin2 21,20,78,GUISpeedTextB
mov byte[GUIGameOptnsColA],163 ;Yellow Text
mov byte[GUIGameOptnsColB],217
cmp byte[GUIWincoladd],0
je .zero8
mov byte[GUIGameOptnsColA],164
mov byte[GUIGameOptnsColB],211
.zero8
mov al,byte[GUIGameOptnsColA]
mov byte[GUItextcolor],al
GUIOuttextwin2 21,7,18,GUISpeedTextA
GUIOuttextwin2 21,20,78,GUISpeedTextB
DDrawBox 21,100,28,[KeyFastFrwrd] ;Shortcut Boxes
DDrawBox 21,100,38,[KeySlowDown]
DDrawBox 21,100,48,[KeyResetSpeed]
mov eax,dword[GUIwinposx+21*4] ; Slider
mov ebx,dword[GUIwinposy+21*4]
mov ecx,eax
add eax,15
add ecx,15+100
add ebx,91
xor edx,edx
mov dl,215
sub dl,[GUIWincoladd]
DrawGUILine
inc ecx
inc eax
sub dl,13
DrawGUILine
xor eax,eax
mov al,[EmuSpeed]
mov dword[GUITemp],11
add [GUITemp],eax
GUIDisplayIconWin 21,[GUITemp],87,GUIIconDataSlideBar
mov dword[GUISpeedTextB1],' '
mov esi,GUISpeedTextB1+2
xor eax,eax
mov al,[EmuSpeed]
mov ebx,10
div bl
add ah,48
mov [esi],ah
cmp al,0
je .nomore
dec esi
xor ah,ah
div bl
add ah,48
mov [esi],ah
cmp al,0
je .nomore
dec esi
xor ah,ah
div bl
add ah,48
mov [esi],ah
.nomore
mov [GUITemp],esi
mov byte[GUItextcolor],223
GUIOuttextwin2 21,119,89,[GUITemp]
mov byte[GUItextcolor],221
cmp byte[GUIWincoladd],0
je .zero5
mov byte[GUItextcolor],222
.zero5
GUIOuttextwin2 21,118,88,[GUITemp]
ret
SECTION .data
GUISpeedTextA db 'SHORTCUTS : ',0
GUISpeedTextA1 db 'FAST FORWARD',0
GUISpeedTextA2 db 'SLOWDOWN',0
GUISpeedTextA3 db 'RESET SPEED',0
GUISpeedTextB db 'SPEED : ',0
GUISpeedTextB1 db '---',0
;General data
GUILoadDisp db 'LOAD GAME',0
GUIResetDisp db 'RESET GAME',0
@@ -6382,6 +6497,7 @@ GUIAddOnsDisp db 'ADD-ON SELECTOR',0
GUIChipConfigDisp db 'CONFIGURE CHIPS',0
GUIPathsDisp db 'SETUP PATHS',0
GUISaveDisp db 'SAVE OPTIONS',0
GUISpeedDisp db 'SPEED OPTIONS',0
SECTION .bss
GUIItemBoxColor resd 1