Fixed GameDirectory in the config

This commit is contained in:
theoddone33
2001-04-17 04:14:13 +00:00
parent 8dc680737e
commit fe529760f9

View File

@@ -458,6 +458,7 @@ NEWSYM DOScreatenewcfg
je .yesloadsdir je .yesloadsdir
jmp .loop jmp .loop
.yesloadsdir .yesloadsdir
%ifndef __LINUX__
mov al,[SRAMDrive] mov al,[SRAMDrive]
add al,65 add al,65
mov [edi],al mov [edi],al
@@ -465,6 +466,7 @@ NEWSYM DOScreatenewcfg
mov byte[edi+2],'\' mov byte[edi+2],'\'
add edi,3 add edi,3
add ecx,3 add ecx,3
%endif
mov ebx,SRAMDir mov ebx,SRAMDir
.nextinsertdira .nextinsertdira
mov al,[ebx] mov al,[ebx]
@@ -481,6 +483,7 @@ NEWSYM DOScreatenewcfg
.insertdirb .insertdirb
cmp byte[DontSavePath],1 cmp byte[DontSavePath],1
je .insertdirc je .insertdirc
%ifndef __LINUX__
mov al,[LoadDrive] mov al,[LoadDrive]
add al,65 add al,65
mov [edi],al mov [edi],al
@@ -488,6 +491,7 @@ NEWSYM DOScreatenewcfg
mov byte[edi+2],'\' mov byte[edi+2],'\'
add edi,3 add edi,3
add ecx,3 add ecx,3
%endif
mov ebx,LoadDir mov ebx,LoadDir
.nextinsertdir .nextinsertdir
mov al,[ebx] mov al,[ebx]
@@ -502,6 +506,7 @@ NEWSYM DOScreatenewcfg
jmp .loop jmp .loop
.insertdirc .insertdirc
%ifndef __LINUX__
mov al,[LoadDriveB] mov al,[LoadDriveB]
add al,65 add al,65
mov [edi],al mov [edi],al
@@ -509,6 +514,7 @@ NEWSYM DOScreatenewcfg
mov byte[edi+2],'\' mov byte[edi+2],'\'
add edi,3 add edi,3
add ecx,3 add ecx,3
%endif
mov ebx,LoadDirB mov ebx,LoadDirB
.nextinsertdirc .nextinsertdirc
mov al,[ebx] mov al,[ebx]
@@ -638,7 +644,7 @@ db '',13,10
db 'SaveDirectory = %d',13,10 db 'SaveDirectory = %d',13,10
db '',13,10 db '',13,10
db '; Game directory. This is the directory where the GUI starts at.',13,10 db '; Game directory. This is the directory where the GUI starts at.',13,10
db '; ZSNES automatically writes the current directory here apon exit.',13,10 db '; ZSNES automatically writes the current directory here upon exit.',13,10
db '',13,10 db '',13,10
db 'GameDirectory = %e',13,10 db 'GameDirectory = %e',13,10
.cfgfilesize equ $-.cfgfiledata .cfgfilesize equ $-.cfgfiledata
@@ -768,11 +774,13 @@ NEWSYM getcfg
cmp dl,' ' cmp dl,' '
je .skipcopyb je .skipcopyb
.nospaceskip .nospaceskip
%ifndef __LINUX__
cmp dl,'a' cmp dl,'a'
jb .nocapneededb jb .nocapneededb
cmp dl,'z' cmp dl,'z'
ja .nocapneededb ja .nocapneededb
sub dl,'a'-'A' sub dl,'a'-'A'
%endif
.nocapneededb .nocapneededb
mov byte[.usespace],1 mov byte[.usespace],1
mov [.stringb+ebx],dl mov [.stringb+ebx],dl
@@ -1548,6 +1556,7 @@ NEWSYM getcfg
.getsavedir .getsavedir
cmp dword[.strlenb],3 cmp dword[.strlenb],3
jb .nosavedir jb .nosavedir
%ifndef __LINUX__
cmp byte[.stringb+1],':' cmp byte[.stringb+1],':'
jne .nosavedir jne .nosavedir
cmp byte[.stringb+2],'\' cmp byte[.stringb+2],'\'
@@ -1556,12 +1565,19 @@ NEWSYM getcfg
mov al,[.stringb] mov al,[.stringb]
sub al,65 sub al,65
mov [SRAMDrive],al mov [SRAMDrive],al
%else
mov byte[cfgloadsdir],1
%endif
push ecx push ecx
push esi push esi
push edi push edi
mov ecx,[.strlenb] mov ecx,[.strlenb]
%ifndef __LINUX__
sub ecx,3 sub ecx,3
mov esi,.stringb+3 mov esi,.stringb+3
%else
mov esi,.stringb
%endif
mov edi,SRAMDir mov edi,SRAMDir
cmp ecx,0 cmp ecx,0
je .ndird je .ndird
@@ -1583,6 +1599,7 @@ NEWSYM getcfg
.getloaddir .getloaddir
cmp dword[.strlenb],3 cmp dword[.strlenb],3
jb .noloaddir jb .noloaddir
%ifndef __LINUX__
cmp byte[.stringb+1],':' cmp byte[.stringb+1],':'
jne .noloaddir jne .noloaddir
cmp byte[.stringb+2],'\' cmp byte[.stringb+2],'\'
@@ -1592,13 +1609,20 @@ NEWSYM getcfg
sub al,65 sub al,65
mov [LoadDrive],al mov [LoadDrive],al
mov [LoadDriveB],al mov [LoadDriveB],al
%else
mov byte[cfgloadgdir],1
%endif
push ecx push ecx
push esi push esi
push edi push edi
push ebx push ebx
mov ecx,[.strlenb] mov ecx,[.strlenb]
%ifndef __LINUX__
sub ecx,3 sub ecx,3
mov esi,.stringb+3 mov esi,.stringb+3
%else
mov esi,.stringb
%endif
mov edi,LoadDir mov edi,LoadDir
mov ebx,LoadDirB mov ebx,LoadDirB
cmp ecx,0 cmp ecx,0