More code cleanup (and trailing spacesremoval).

This commit is contained in:
grinvader
2005-05-10 00:18:29 +00:00
parent b1facc3dfe
commit 53557bd5ef
3 changed files with 59 additions and 76 deletions

View File

@@ -535,7 +535,14 @@ reexecuteb2:
je near .activatereset
mov eax,[KeySaveState]
test byte[pressed+eax],1
jnz near savestate
jz .nosavestt
mov byte[pressed+1],0
mov byte[pressed+eax],2
pushad
call statesaver
popad
jmp reexecuteb
.nosavestt
mov eax,[KeyLoadState]
test byte[pressed+eax],1
jz .noloadstt0
@@ -661,34 +668,6 @@ NEWSYM HIRQCycNext, dd 0
NEWSYM HIRQNextExe, db 0
;*******************************************************
; Save/Load States
;*******************************************************
SECTION .data
NEWSYM firstsaveinc, db 0
NEWSYM txtsavemsg, db 'STATE - SAVED.',0
NEWSYM txtsavemsgfail, db 'UNABLE TO SAVE.',0
SECTION .text
NEWSYM savestate
mov byte[pressed+1],0
mov eax,[KeySaveState]
mov byte[pressed+eax],2
pushad
call statesaver
popad
jmp reexecuteb
SECTION .data
.fname2 db 9,'image.dat',0
NEWSYM txtloadmsg, db 'STATE - LOADED.',0
NEWSYM txtconvmsg, db 'STATE - TOO OLD.',0
NEWSYM txtnfndmsg, db 'UNABLE TO LOAD STATE -.',0
SECTION .text
;*******************************************************
; Int 08h vector
;*******************************************************

View File

@@ -416,12 +416,13 @@ void ResetState()
ResState(Voice7BufPtr);
}
extern unsigned int statefileloc, CurrentHandle, SfxRomBuffer;
extern unsigned int SfxCROM, SfxLastRamAdr, SfxRAMMem;
extern unsigned int MsgCount, MessageOn;
extern unsigned char AutoIncSaveSlot, firstsaveinc, fnamest[512];
extern unsigned char cbitmode, NoPictureSave, txtsavemsg[14];
extern unsigned char *Msgptr, txtsavemsgfail[15];
unsigned char firstsaveinc = 0, txtsavemsg[14] = "STATE - SAVED.";
unsigned char txtsavemsgfail[15] = "UNABLE TO SAVE.";
extern unsigned int statefileloc, CurrentHandle, SfxRomBuffer, SfxCROM;
extern unsigned int SfxLastRamAdr, SfxRAMMem, MsgCount, MessageOn;
extern unsigned char AutoIncSaveSlot, fnamest[512], cbitmode, NoPictureSave;
extern unsigned char *Msgptr;
extern unsigned short PrevPicture[64*56];
static FILE *fhandle;
@@ -592,10 +593,13 @@ void statesaver()
stim();
}
unsigned char txtloadmsg[16] = "STATE - LOADED.";
unsigned char txtconvmsg[17] = "STATE - TOO OLD.";
unsigned char txtnfndmsg[24] = "UNABLE TO LOAD STATE -.";
extern unsigned int KeyLoadState, Totalbyteloaded, SfxMemTable[256], SfxCPB;
extern unsigned int SfxPBR, SfxROMBR, SfxRAMBR;
extern unsigned char pressed[256+128+64], multchange, txtloadmsg[15];
extern unsigned char txtconvmsg[16], txtnfndmsg[23], ioportval, SDD1Enable;
extern unsigned char pressed[256+128+64], multchange, ioportval, SDD1Enable;
extern unsigned char nexthdma;
static void read_save_state_data(unsigned char **dest, void *data, size_t len)