Restructured some code

This commit is contained in:
pagefault
2001-09-17 00:44:54 +00:00
parent 25621af7ce
commit 8a50fbfcae
2 changed files with 35 additions and 33 deletions

View File

@@ -1521,10 +1521,10 @@ NEWSYM statesaver
je .clearfirstinc je .clearfirstinc
mov eax,[statefileloc] mov eax,[statefileloc]
mov dh,[fnamest+eax] mov dh,[fnamest+eax]
%ifndef __LINUX__ %ifdef __LINUX__
cmp dh,'T'
%else
cmp dh,'t' cmp dh,'t'
%else
cmp dh,'T'
%endif %endif
je .secondstate je .secondstate
cmp dh,'9' cmp dh,'9'
@@ -1535,10 +1535,10 @@ NEWSYM statesaver
mov dh,'1' mov dh,'1'
jmp .donextstate jmp .donextstate
.jumptofirststate .jumptofirststate
%ifndef __LINUX__ %ifdef __LINUX__
mov dh,'T'
%else
mov dh,'t' mov dh,'t'
%else
mov dh,'T'
%endif %endif
.donextstate .donextstate
mov byte[fnamest+eax],dh mov byte[fnamest+eax],dh

View File

@@ -695,6 +695,7 @@ NEWSYM cachevideo
jne .nodisplayfps jne .nodisplayfps
xor byte[FPSOn],1 xor byte[FPSOn],1
.nodisplayfps .nodisplayfps
; do state selects ; do state selects
stateselcomp KeyStateSlc0,'0','T' stateselcomp KeyStateSlc0,'0','T'
stateselcomp KeyStateSlc1,'1','1' stateselcomp KeyStateSlc1,'1','1'
@@ -715,15 +716,6 @@ NEWSYM cachevideo
mov eax,[MsgCount] mov eax,[MsgCount]
mov [MessageOn],eax mov [MessageOn],eax
.nostsl0 .nostsl0
; do sound disables
soundselcomp KeyDisableSC0,Voice0Disable,Voice0Status,'1'
soundselcomp KeyDisableSC1,Voice1Disable,Voice1Status,'2'
soundselcomp KeyDisableSC2,Voice2Disable,Voice2Status,'3'
soundselcomp KeyDisableSC3,Voice3Disable,Voice3Status,'4'
soundselcomp KeyDisableSC4,Voice4Disable,Voice4Status,'5'
soundselcomp KeyDisableSC5,Voice5Disable,Voice5Status,'6'
soundselcomp KeyDisableSC6,Voice6Disable,Voice6Status,'7'
soundselcomp KeyDisableSC7,Voice7Disable,Voice7Status,'8'
mov eax,[KeyIncStateSlot] mov eax,[KeyIncStateSlot]
test byte[pressed+eax],1 test byte[pressed+eax],1
@@ -731,10 +723,10 @@ NEWSYM cachevideo
mov byte[pressed+eax],2 mov byte[pressed+eax],2
mov eax,[statefileloc] mov eax,[statefileloc]
mov dh,[fnamest+eax] mov dh,[fnamest+eax]
%ifndef __LINUX__ %ifdef __LINUX__
cmp dh,'T'
%else
cmp dh,'t' cmp dh,'t'
%else
cmp dh,'T'
%endif %endif
je .secondstate je .secondstate
cmp dh,'9' cmp dh,'9'
@@ -745,17 +737,17 @@ NEWSYM cachevideo
mov dh,'1' mov dh,'1'
jmp .donextstate jmp .donextstate
.jumptofirststate .jumptofirststate
%ifndef __LINUX__ %ifdef __LINUX__
mov dh,'T'
%else
mov dh,'t' mov dh,'t'
%else
mov dh,'T'
%endif %endif
.donextstate .donextstate
mov byte[fnamest+eax],dh mov byte[fnamest+eax],dh
%ifndef __LINUX__ %ifdef __LINUX__
cmp dh,'T'
%else
cmp dh,'t' cmp dh,'t'
%else
cmp dh,'T'
%endif %endif
je .firststatemsg je .firststatemsg
mov byte[sselm+11],dh mov byte[sselm+11],dh
@@ -775,30 +767,30 @@ NEWSYM cachevideo
mov byte[pressed+eax],2 mov byte[pressed+eax],2
mov eax,[statefileloc] mov eax,[statefileloc]
mov dh,[fnamest+eax] mov dh,[fnamest+eax]
%ifndef __LINUX__ %ifdef __LINUX__
cmp dh,'T'
%else
cmp dh,'t' cmp dh,'t'
%else
cmp dh,'T'
%endif %endif
je .jumptolaststate je .jumptolaststate
dec dh dec dh
cmp dh,'0' cmp dh,'0'
jne .doprevstate jne .doprevstate
.firststate .firststate
%ifndef __LINUX__ %ifdef __LINUX__
mov dh,'T'
%else
mov dh,'t' mov dh,'t'
%else
mov dh,'T'
%endif %endif
jmp .doprevstate jmp .doprevstate
.jumptolaststate .jumptolaststate
mov dh,'9' mov dh,'9'
.doprevstate .doprevstate
mov byte[fnamest+eax],dh mov byte[fnamest+eax],dh
%ifndef __LINUX__ %ifdef __LINUX__
cmp dh,'T'
%else
cmp dh,'t' cmp dh,'t'
%else
cmp dh,'T'
%endif %endif
je .firststatemsg2 je .firststatemsg2
mov byte[sselm+11],dh mov byte[sselm+11],dh
@@ -812,6 +804,16 @@ NEWSYM cachevideo
xor dh,dh xor dh,dh
.nodecstateslot .nodecstateslot
; do sound disables
soundselcomp KeyDisableSC0,Voice0Disable,Voice0Status,'1'
soundselcomp KeyDisableSC1,Voice1Disable,Voice1Status,'2'
soundselcomp KeyDisableSC2,Voice2Disable,Voice2Status,'3'
soundselcomp KeyDisableSC3,Voice3Disable,Voice3Status,'4'
soundselcomp KeyDisableSC4,Voice4Disable,Voice4Status,'5'
soundselcomp KeyDisableSC5,Voice5Disable,Voice5Status,'6'
soundselcomp KeyDisableSC6,Voice6Disable,Voice6Status,'7'
soundselcomp KeyDisableSC7,Voice7Disable,Voice7Status,'8'
.finishchatskip .finishchatskip
cmp byte[curblank],0h cmp byte[curblank],0h
jne near yesblank jne near yesblank