Added keys to increment/decrement state slot

This commit is contained in:
pagefault
2001-09-12 23:14:31 +00:00
parent 640be5bc0b
commit 363920e57a
4 changed files with 103 additions and 2 deletions

View File

@@ -597,6 +597,8 @@ NEWSYM AutoIncSaveSlot, db 0
NEWSYM TCPIPAddress, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
NEWSYM SoundInterpType, db 2
NEWSYM KeyDisplayFPS, dd 0
NEWSYM KeyIncStateSlot, dd 0
NEWSYM KeyDecStateSlot, dd 0
GUIsave equ $-GUIRAdd
@@ -617,9 +619,9 @@ ModemPTimer dd 0 ; Timer for modem process
ModemOKStat db 0 ; OK is detected on modem status
; LOAD STAT INPT OPT VID SND CHT NET GMKEY GUIOP ABT RSET SRC STCN MOVE CMBO ADDO
GUIwinposxo dd 0,5 ,60 ,30 ,55 ,50 ,35 ,5 ,30 ,20 ,10 ,80 ,65 ,20 ,70 ,50 ,3 ,50
GUIwinposxo dd 0,5 ,60 ,30 ,55 ,50 ,35 ,5 ,30 ,10 ,10 ,80 ,65 ,20 ,70 ,50 ,3 ,50
GUIwinposyo dd 0,20 ,70 ,30 ,20 ,20 ,20 ,20 ,30 ,20 ,20 ,50 ,60 ,30 ,65 ,50 ,22 ,60
GUIwinsizex dd 0,244 ,126 ,189 ,167 ,170 ,188 ,244 ,8*16,224 ,240 ,7*16,9*16,8*16,9*16,140 ,250 ,160
GUIwinsizex dd 0,244 ,126 ,189 ,167 ,170 ,188 ,244 ,8*16,235 ,240 ,7*16,9*16,8*16,9*16,140 ,250 ,160
GUIwinsizey dd 0,190 ,3*16,166 ,190 ,192 ,184 ,191 ,40 ,189 ,192 ,108 ,42 ,40 ,42 ,70 ,190 ,60
GUIwinptr db 0

View File

@@ -2712,10 +2712,12 @@ DisplayGameOptnsClick:
DGOptnsProcBox 27+45*3,120,[KeyDisableSC7]
DGOptnsProcBox 27+45*2,132,[KeyStateSlc0]
DGOptnsProcBox 27+45*3,132,[KeyStateSlc1]
DGOptnsProcBox 27+45*4,132,[KeyIncStateSlot]
DGOptnsProcBox 27,140,[KeyStateSlc2]
DGOptnsProcBox 27+45,140,[KeyStateSlc3]
DGOptnsProcBox 27+45*2,140,[KeyStateSlc4]
DGOptnsProcBox 27+45*3,140,[KeyStateSlc5]
DGOptnsProcBox 27+45*4,140,[KeyDecStateSlot]
DGOptnsProcBox 27,148,[KeyStateSlc6]
DGOptnsProcBox 27+45,148,[KeyStateSlc7]
DGOptnsProcBox 27+45*2,148,[KeyStateSlc8]

View File

@@ -4482,6 +4482,7 @@ DisplayGameOptns:
GUIOuttextwin2 9,9+45*2,134,GUIGameOptnsText7
mov byte[GUIGameOptnsText7+2],'1'
GUIOuttextwin2 9,9+45*3,134,GUIGameOptnsText7
GUIOuttextwin2 9,9+45*4,134,GUIGameOptnsTextY
mov byte[GUIGameOptnsText7+2],'2'
GUIOuttextwin2 9,9,141,GUIGameOptnsText7
mov byte[GUIGameOptnsText7+2],'3'
@@ -4490,6 +4491,7 @@ DisplayGameOptns:
GUIOuttextwin2 9,9+45*2,142,GUIGameOptnsText7
mov byte[GUIGameOptnsText7+2],'5'
GUIOuttextwin2 9,9+45*3,142,GUIGameOptnsText7
GUIOuttextwin2 9,9+45*4,142,GUIGameOptnsTextZ
mov byte[GUIGameOptnsText7+2],'6'
GUIOuttextwin2 9,9,150,GUIGameOptnsText7
mov byte[GUIGameOptnsText7+2],'7'
@@ -4588,6 +4590,7 @@ DisplayGameOptns:
GUIOuttextwin2 9,8+45*2,133,GUIGameOptnsText7
mov byte[GUIGameOptnsText7+2],'1'
GUIOuttextwin2 9,8+45*3,133,GUIGameOptnsText7
GUIOuttextwin2 9,8+45*4,133,GUIGameOptnsTextY
mov byte[GUIGameOptnsText7+2],'2'
GUIOuttextwin2 9,8,141,GUIGameOptnsText7
mov byte[GUIGameOptnsText7+2],'3'
@@ -4596,6 +4599,7 @@ DisplayGameOptns:
GUIOuttextwin2 9,8+45*2,141,GUIGameOptnsText7
mov byte[GUIGameOptnsText7+2],'5'
GUIOuttextwin2 9,8+45*3,141,GUIGameOptnsText7
GUIOuttextwin2 9,8+45*4,141,GUIGameOptnsTextZ
mov byte[GUIGameOptnsText7+2],'6'
GUIOuttextwin2 9,8,149,GUIGameOptnsText7
mov byte[GUIGameOptnsText7+2],'7'
@@ -4654,10 +4658,12 @@ DisplayGameOptns:
DGOptnsDrawBox 27+45*3,120,[KeyDisableSC7]
DGOptnsDrawBox 27+45*2,132,[KeyStateSlc0]
DGOptnsDrawBox 27+45*3,132,[KeyStateSlc1]
DGOptnsDrawBox 27+45*4,132,[KeyIncStateSlot]
DGOptnsDrawBox 27,140,[KeyStateSlc2]
DGOptnsDrawBox 27+45,140,[KeyStateSlc3]
DGOptnsDrawBox 27+45*2,140,[KeyStateSlc4]
DGOptnsDrawBox 27+45*3,140,[KeyStateSlc5]
DGOptnsDrawBox 27+45*4,140,[KeyDecStateSlot]
DGOptnsDrawBox 27,148,[KeyStateSlc6]
DGOptnsDrawBox 27+45,148,[KeyStateSlc7]
DGOptnsDrawBox 27+45*2,148,[KeyStateSlc8]
@@ -4709,6 +4715,8 @@ GUIGameOptnsTextT db 'SLOWDWN KEY',0
GUIGameOptnsTextU db 'CLOCK',0
GUIGameOptnsTextV db 'SAVE SPC',0
GUIGameOptnsTextX db 'DISPLAY FPS',0
GUIGameOptnsTextY db 'ST+',0
GUIGameOptnsTextZ db 'ST-',0
DisplayGUIOptns:
GUIDrawWindowBox 10,GUIGUIDisp

View File

@@ -33,6 +33,7 @@ EXTSYM KeyBGDisble0,KeyBGDisble1,KeyBGDisble2,KeyBGDisble3,KeySprDisble
EXTSYM KeyResetAll,KeyExtraEnab,KeyWinDisble,KeyNewGfxSwt,KeyOffsetMSw
EXTSYM KeyStateSlc0,KeyStateSlc1,KeyStateSlc2,KeyStateSlc3,KeyStateSlc4
EXTSYM KeyStateSlc5,KeyStateSlc6,KeyStateSlc7,KeyStateSlc8,KeyStateSlc9
EXTSYM KeyIncStateSlot,KeyDecStateSlot
EXTSYM maxskip,DSPMem,SprValAdd,dsp1ptr,dsp1array,FastFwdToggle,SaveSramData
EXTSYM ngextbg,Mode7HiRes,Check60hz,Get_MouseData,Get_MousePositionDisplacement
EXTSYM WindowDisables,scanlines,romispal
@@ -723,6 +724,94 @@ NEWSYM cachevideo
soundselcomp KeyDisableSC5,Voice5Disable,Voice5Status,'6'
soundselcomp KeyDisableSC6,Voice6Disable,Voice6Status,'7'
soundselcomp KeyDisableSC7,Voice7Disable,Voice7Status,'8'
mov eax,[KeyIncStateSlot]
test byte[pressed+eax],1
je .noincstateslot
mov byte[pressed+eax],2
mov eax,[statefileloc]
mov dh,[fnamest+eax]
%ifndef __LINUX__
cmp dh,'T'
%else
cmp dh,'t'
%endif
je .secondstate
cmp dh,'9'
je .jumptofirststate
inc dh
jmp .donextstate
.secondstate
mov dh,'1'
jmp .donextstate
.jumptofirststate
%ifndef __LINUX__
mov dh,'T'
%else
mov dh,'t'
%endif
.donextstate
mov byte[fnamest+eax],dh
%ifndef __LINUX__
cmp dh,'T'
%else
cmp dh,'t'
%endif
je .firststatemsg
mov byte[sselm+11],dh
jmp .incstatemsg
.firststatemsg
mov byte[sselm+11],'0'
.incstatemsg
mov dword[Msgptr],sselm
mov eax,[MsgCount]
mov [MessageOn],eax
xor dh,dh
.noincstateslot
mov eax,[KeyDecStateSlot]
test byte[pressed+eax],1
je .nodecstateslot
mov byte[pressed+eax],2
mov eax,[statefileloc]
mov dh,[fnamest+eax]
%ifndef __LINUX__
cmp dh,'T'
%else
cmp dh,'t'
%endif
je .jumptolaststate
dec dh
cmp dh,'0'
jne .doprevstate
.firststate
%ifndef __LINUX__
mov dh,'T'
%else
mov dh,'t'
%endif
jmp .doprevstate
.jumptolaststate
mov dh,'9'
.doprevstate
mov byte[fnamest+eax],dh
%ifndef __LINUX__
cmp dh,'T'
%else
cmp dh,'t'
%endif
je .firststatemsg2
mov byte[sselm+11],dh
jmp .decstatemsg
.firststatemsg2
mov byte[sselm+11],'0'
.decstatemsg
mov dword[Msgptr],sselm
mov eax,[MsgCount]
mov [MessageOn],eax
xor dh,dh
.nodecstateslot
.finishchatskip
cmp byte[curblank],0h
jne near yesblank