From ea1e34a964c59f586d3c5695ca0ebcfe4a5953b3 Mon Sep 17 00:00:00 2001 From: n-a-c-h <> Date: Sun, 10 Jul 2005 02:05:12 +0000 Subject: [PATCH] Changed __LINUX__ to __UNIXSDL__. --- zsnes/src/Makefile.in | 2 +- zsnes/src/SConstruct | 6 +-- zsnes/src/asm_call.h | 2 +- zsnes/src/cfgload.c | 22 ++++---- zsnes/src/cfgparse.psr | 2 +- zsnes/src/chips/c4emu.c | 2 +- zsnes/src/chips/dsp1emu.c | 2 +- zsnes/src/chips/seta10.c | 2 +- zsnes/src/configure.in | 20 +++---- zsnes/src/cpu/executec.c | 2 +- zsnes/src/cpu/memtable.c | 2 +- zsnes/src/debug.c | 2 +- zsnes/src/effects/water.c | 2 +- zsnes/src/gblhdr.h | 4 +- zsnes/src/gui/gui.asm | 8 +-- zsnes/src/gui/guifuncs.c | 2 +- zsnes/src/gui/guikeys.inc | 102 +++++++++++++++++------------------ zsnes/src/gui/guiload.inc | 14 ++--- zsnes/src/gui/guimouse.inc | 10 ++-- zsnes/src/gui/guiwindp.inc | 14 ++--- zsnes/src/init.asm | 14 ++--- zsnes/src/initc.c | 2 +- zsnes/src/linux/sdlintrf.asm | 8 +-- zsnes/src/linux/zfilew.c | 16 +++--- zsnes/src/net/ztcp.c | 36 ++++++------- zsnes/src/parsegen.cpp | 2 +- zsnes/src/patch.c | 2 +- zsnes/src/ui.asm | 22 ++++---- zsnes/src/uic.c | 2 +- zsnes/src/video/procvid.asm | 8 +-- zsnes/src/video/procvidc.c | 2 +- zsnes/src/zip/unzip.c | 2 +- zsnes/src/zip/zpng.c | 8 +-- zsnes/src/zip/zpng.h | 2 +- zsnes/src/zloader.c | 10 ++-- zsnes/src/zmovie.c | 2 +- zsnes/src/zstate.c | 6 +-- 37 files changed, 183 insertions(+), 183 deletions(-) diff --git a/zsnes/src/Makefile.in b/zsnes/src/Makefile.in index 27c0a521..e1d1b26e 100644 --- a/zsnes/src/Makefile.in +++ b/zsnes/src/Makefile.in @@ -96,7 +96,7 @@ PSR=parsegen @NASMPATH@ @NFLAGS@ -o $@ $< %.o: %.psr - ./${PSR} -D__LINUX__ temppsr.c $< + ./${PSR} -D__UNIXSDL__ temppsr.c $< @CC@ -I. -o $@ -c temppsr.c rm -f temppsr.c diff --git a/zsnes/src/SConstruct b/zsnes/src/SConstruct index fb8be2e5..24499600 100644 --- a/zsnes/src/SConstruct +++ b/zsnes/src/SConstruct @@ -12,7 +12,7 @@ def parsegen_emitter(target,source,env): return (target,source) if platform == 'posix': - psrbld = Builder(action ='./parsegen -D__LINUX__ cfgparse.c', + psrbld = Builder(action ='./parsegen -D__UNIXSDL__ cfgparse.c', emitter = parsegen_emitter, suffix = '.c', src_suffix = '.psr') @@ -196,8 +196,8 @@ env = conf.Finish () # Perform any platform-specific initialization if platform == 'posix': src = chipssrc + netsrc + cpusrc + dossrc + effectssrc + guisrc + videosrc + zipsrc + jmasrc + linuxsrc - env.Append (CCFLAGS = '-D__LINUX__') - env.Append (ASFLAGS = '-DELF -D__LINUX__') + env.Append (CCFLAGS = '-D__UNIXSDL__') + env.Append (ASFLAGS = '-DELF -D__UNIXSDL__') env.Append (CCFLAGS = '-I.') env.Append (CCFLAGS = '-I/usr/include/SDL') diff --git a/zsnes/src/asm_call.h b/zsnes/src/asm_call.h index d19ddd7c..cdb4a7f5 100644 --- a/zsnes/src/asm_call.h +++ b/zsnes/src/asm_call.h @@ -49,7 +49,7 @@ I'd fix that if anyone knows if that parameter defines something I can check #define ASM_COMMAND(line) #line"\n\t" -#ifdef __LINUX__ +#ifdef __UNIXSDL__ #define ASM_CALL(func) ASM_COMMAND(call func) #else #define ASM_CALL(func) ASM_COMMAND(call _ ## func) diff --git a/zsnes/src/cfgload.c b/zsnes/src/cfgload.c index 333c20b3..c741b571 100644 --- a/zsnes/src/cfgload.c +++ b/zsnes/src/cfgload.c @@ -22,7 +22,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#ifdef __LINUX__ +#ifdef __UNIXSDL__ #include "gblhdr.h" #else #include @@ -46,7 +46,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #ifdef __WIN32__ #define StringI "VIDEOMODEWIN" #endif -#ifdef __LINUX__ +#ifdef __UNIXSDL__ #define StringI "VIDEOMODELIN" #endif #ifdef __MSDOS__ @@ -145,7 +145,7 @@ extern unsigned int ZOpenFile(); //Create_File. Open_File extern unsigned int ZFileWrite(); //Write_File(); extern unsigned int ZCloseFile(); //Close_File -#ifdef __LINUX__ +#ifdef __UNIXSDL__ extern char zcfgdir[1024]; unsigned char cfgloadsdir = 1; //Set to yes, since savedir is always set and considered to be changed #else @@ -374,7 +374,7 @@ void DOScreatenewcfg() return; } -#ifdef __LINUX__ +#ifdef __UNIXSDL__ chdir(zcfgdir); #endif @@ -450,7 +450,7 @@ void DOScreatenewcfg() sprintf(buffer, "VideoModeWin = %d\r\n\r\n", cfgcvidmode); SAVE_LINE(buffer); #endif -#ifdef __LINUX__ +#ifdef __UNIXSDL__ #ifdef __OPENGL__ WRITE_LINE("; Video Mode, 0 - 18\r\n"); #else @@ -535,7 +535,7 @@ void DOScreatenewcfg() sprintf(buffer, "\r\nInterpolation = %d\r\n\r\n", cfginterp); SAVE_LINE(buffer); -#ifndef __LINUX__ +#ifndef __UNIXSDL__ WRITE_LINE("; VSync (1 = Enable, 0 = Disable) - Wait for Vertical Sync (Fast cpu reqd)\r\n\r\n"); sprintf(buffer, "VSync = %d\r\n\r\n", cfgvsync); SAVE_LINE(buffer); @@ -582,7 +582,7 @@ void DOScreatenewcfg() if (DontSavePath != 1) { -#ifdef __LINUX__ +#ifdef __UNIXSDL__ sprintf(buffer, "GameDirectory = %s\r\n\r\n", LoadDir); #else sprintf(buffer, "GameDirectory = %c:\\%s\r\n", (char) (*LoadDrive + 65), LoadDir); @@ -590,7 +590,7 @@ void DOScreatenewcfg() } else { -#ifdef __LINUX__ +#ifdef __UNIXSDL__ sprintf(buffer, "GameDirectory = %s\r\n\r\n", LoadDirB); #else sprintf(buffer, "GameDirectory = %c:\\%s\r\n", (char) (*LoadDriveB + 65), LoadDirB); @@ -709,7 +709,7 @@ void getcfg() temp = _string[i]; if (_usespace || temp != ' ') { -#ifndef __LINUX__ +#ifndef __UNIXSDL__ if (temp >= 'a' && temp <= 'z') temp -= ('a' - 'A'); #endif @@ -1254,7 +1254,7 @@ void getcfg() { if (_strlenb >= 3) { -#ifndef __LINUX__ +#ifndef __UNIXSDL__ if (_stringb[1] == ':' && _stringb[2] == '\\') { cfgloadgdir = 1; @@ -1270,7 +1270,7 @@ void getcfg() #endif strcpy(LoadDirB, LoadDir); -#ifndef __LINUX__ +#ifndef __UNIXSDL__ } #endif } diff --git a/zsnes/src/cfgparse.psr b/zsnes/src/cfgparse.psr index 596bc4c1..877240ee 100644 --- a/zsnes/src/cfgparse.psr +++ b/zsnes/src/cfgparse.psr @@ -185,7 +185,7 @@ prevloadfnamel times 512*10 db 0 %ifdef __WIN32__ NEWSYM PrevWinMode, db 2 NEWSYM PrevFSMode, db 6 -%elifdef __LINUX__ +%elifdef __UNIXSDL__ NEWSYM PrevWinMode, db 2 NEWSYM PrevFSMode, db 3 %elifdef __MSDOS__ diff --git a/zsnes/src/chips/c4emu.c b/zsnes/src/chips/c4emu.c index cb96704e..a1be07ad 100644 --- a/zsnes/src/chips/c4emu.c +++ b/zsnes/src/chips/c4emu.c @@ -20,7 +20,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef __LINUX__ +#ifdef __UNIXSDL__ #include "../gblhdr.h" #else #include diff --git a/zsnes/src/chips/dsp1emu.c b/zsnes/src/chips/dsp1emu.c index d8988610..f56cc166 100644 --- a/zsnes/src/chips/dsp1emu.c +++ b/zsnes/src/chips/dsp1emu.c @@ -23,7 +23,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #define __ZSNES__ -#if (defined __ZSNES__ && __LINUX__) +#if (defined __ZSNES__ && __UNIXSDL__) #include "../gblhdr.h" #else diff --git a/zsnes/src/chips/seta10.c b/zsnes/src/chips/seta10.c index d0633af3..c3199ca5 100755 --- a/zsnes/src/chips/seta10.c +++ b/zsnes/src/chips/seta10.c @@ -22,7 +22,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. //http://users.tpg.com.au/trauma/dsp/st010.html -#ifdef __LINUX__ +#ifdef __UNIXSDL__ #include "gblhdr.h" #else #include //sqrt() diff --git a/zsnes/src/configure.in b/zsnes/src/configure.in index fedf8ff6..3a4a683c 100644 --- a/zsnes/src/configure.in +++ b/zsnes/src/configure.in @@ -30,24 +30,24 @@ NFLAGS="$NFLAGS -w-orphan-labels" AC_PROG_INSTALL case "$target" in *-*-linux*) - CFLAGS="$CFLAGS -D__LINUX__" - NFLAGS="$NFLAGS -D__LINUX__ -f elf -DELF" + CFLAGS="$CFLAGS -D__UNIXSDL__" + NFLAGS="$NFLAGS -D__UNIXSDL__ -f elf -DELF" ;; *-*-beos*) - CFLAGS="$CFLAGS -D__LINUX__ -D__BEOS__" - NFLAGS="$NFLAGS -D__LINUX__ -D__BEOS__ -f elf -DELF" + CFLAGS="$CFLAGS -D__UNIXSDL__ -D__BEOS__" + NFLAGS="$NFLAGS -D__UNIXSDL__ -D__BEOS__ -f elf -DELF" ;; *-*-*openbsd*) - CFLAGS="$CFLAGS -D__LINUX__ -D__FreeBSD__" - NFLAGS="$NFLAGS -D__LINUX__ -D__FreeBSD__ -DELF -f elf" + CFLAGS="$CFLAGS -D__UNIXSDL__ -D__FreeBSD__" + NFLAGS="$NFLAGS -D__UNIXSDL__ -D__FreeBSD__ -DELF -f elf" ;; *-*-*bsd*) - CFLAGS="$CFLAGS -D__LINUX__ -D__FreeBSD__" - NFLAGS="$NFLAGS -D__LINUX__ -D__FreeBSD__ -DELF -f elf" + CFLAGS="$CFLAGS -D__UNIXSDL__ -D__FreeBSD__" + NFLAGS="$NFLAGS -D__UNIXSDL__ -D__FreeBSD__ -DELF -f elf" ;; *-*-cygwin* | *-*-*ming*) - CFLAGS="$CFLAGS -D__LINUX__" - NFLAGS="$NFLAGS -D__LINUX__ -f win32" + CFLAGS="$CFLAGS -D__UNIXSDL__" + NFLAGS="$NFLAGS -D__UNIXSDL__ -f win32" ;; *) AC_MSG_ERROR(This Target is Not Supported) diff --git a/zsnes/src/cpu/executec.c b/zsnes/src/cpu/executec.c index 1d3f39f4..de019de5 100755 --- a/zsnes/src/cpu/executec.c +++ b/zsnes/src/cpu/executec.c @@ -22,7 +22,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#ifdef __LINUX__ +#ifdef __UNIXSDL__ #include "../gblhdr.h" #define DIR_SLASH "/" #else diff --git a/zsnes/src/cpu/memtable.c b/zsnes/src/cpu/memtable.c index 8e819ecb..080bd1ac 100644 --- a/zsnes/src/cpu/memtable.c +++ b/zsnes/src/cpu/memtable.c @@ -22,7 +22,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#ifdef __LINUX__ +#ifdef __UNIXSDL__ #include "../gblhdr.h" #define DIR_SLASH "/" #else diff --git a/zsnes/src/debug.c b/zsnes/src/debug.c index e7d6f31e..111c6ab3 100644 --- a/zsnes/src/debug.c +++ b/zsnes/src/debug.c @@ -22,7 +22,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#ifdef __LINUX__ +#ifdef __UNIXSDL__ #include "gblhdr.h" #define DIR_SLASH "/" #else diff --git a/zsnes/src/effects/water.c b/zsnes/src/effects/water.c index c8a06907..b11716d3 100644 --- a/zsnes/src/effects/water.c +++ b/zsnes/src/effects/water.c @@ -20,7 +20,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef __LINUX__ +#ifdef __UNIXSDL__ #include "../gblhdr.h" #else #include diff --git a/zsnes/src/gblhdr.h b/zsnes/src/gblhdr.h index 98bdaad0..45694d39 100644 --- a/zsnes/src/gblhdr.h +++ b/zsnes/src/gblhdr.h @@ -93,7 +93,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #define getpagesize() 4096 #endif - #ifdef __LINUX__ + #ifdef __UNIXSDL__ #include "SDL.h" #include #ifndef __BEOS__ @@ -114,7 +114,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #endif #endif - #ifdef __LINUX__ + #ifdef __UNIXSDL__ #if !defined(__FreeBSD__) && !defined(__BEOS__) #include #else diff --git a/zsnes/src/gui/gui.asm b/zsnes/src/gui/gui.asm index 05d4cbc3..11341adb 100644 --- a/zsnes/src/gui/gui.asm +++ b/zsnes/src/gui/gui.asm @@ -142,7 +142,7 @@ EXTSYM GUIwinposy2,GUIwinposx2,AllowMultipleInst,Surround,SoundBufEn,SPCDisable EXTSYM GUIEnableTransp,FilteredGUI,MouseWheel,TrapMouseCursor,AlwaysOnTop EXTSYM pl1p209,pl1p209b,SaveMainWindowPos,FastFwdToggle,SidewinderFix,RaisePitch -%ifdef __LINUX__ +%ifdef __UNIXSDL__ EXTSYM numlockptr %endif %ifdef __WIN32__ @@ -1843,7 +1843,7 @@ guipostvideofail: call GUIUnBuffer call DisplayBoxes call DisplayMenu -%ifndef __LINUX__ +%ifndef __UNIXSDL__ mov dword[GUIkeydelay],0FFFFFFFFh %else mov dword[GUIkeydelay],0x0 @@ -2626,7 +2626,7 @@ DisplayMenu: GUIBox 0,14,229,14,70 GUIBox 0,15,229,15,71 -%ifdef __LINUX__ +%ifdef __UNIXSDL__ GUIShadow 238,9,247,20 GUIShadow 249,9,257,20 %endif @@ -2637,7 +2637,7 @@ DisplayMenu: %endif .notwinpressa -%ifdef __LINUX__ +%ifdef __UNIXSDL__ mov byte[GUIMenuItem+36],247 GUIDMHelpB 233,242,GUIMenuItem+36,1 mov byte[GUIMenuItem+36],'x' diff --git a/zsnes/src/gui/guifuncs.c b/zsnes/src/gui/guifuncs.c index 14b75241..3da6dac4 100644 --- a/zsnes/src/gui/guifuncs.c +++ b/zsnes/src/gui/guifuncs.c @@ -22,7 +22,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#ifdef __LINUX__ +#ifdef __UNIXSDL__ #include "gblhdr.h" #define DIR_SLASH "/" #else diff --git a/zsnes/src/gui/guikeys.inc b/zsnes/src/gui/guikeys.inc index 9df199f6..d6f82d08 100644 --- a/zsnes/src/gui/guikeys.inc +++ b/zsnes/src/gui/guikeys.inc @@ -179,7 +179,7 @@ GUIgetcurrentinput: mov byte[GUIDelayB],0 ; Convert pressed to keys mov dword[GUIfirstkey],0 -%ifdef __LINUX___ +%ifdef __UNIXSDL___ GUIqcheckkeys 90 ; UP GUIqcheckkeys 96 ; DOWN GUIqcheckkeys 92 ; LEFT @@ -228,7 +228,7 @@ GUIgetcurrentinput: GUIqcheckkeys2 [pl1Ak],7 .nopad1 xor al,al -%ifdef __LINUX__ +%ifdef __UNIXSDL__ GUIgetprkeys 90,90 ; UP GUIgetprkeys 96,96 ; DOWN GUIgetprkeys 92,92 ; LEFT @@ -268,7 +268,7 @@ GUIgetcurrentinput: mov al,cl .notextkb -%ifdef __LINUX__ +%ifdef __UNIXSDL__ GUIgetprkeys 90,90 ; UP GUIgetprkeys 96,96 ; DOWN GUIgetprkeys 92,92 ; LEFT @@ -625,7 +625,7 @@ GUIgetcurrentinput: jne .noenter call GUITryMenuItem .noenter -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,92 je .leftpressed cmp dword[numlockptr],1 @@ -645,7 +645,7 @@ GUIgetcurrentinput: .left mov byte[GUIcmenupos],6 .noleft -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,94 je .rightpressed cmp dword[numlockptr],1 @@ -665,7 +665,7 @@ GUIgetcurrentinput: .noright cmp byte[GUIcmenupos],0 je near .noupdown -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,96 je .downpressed cmp dword[numlockptr],1 @@ -691,7 +691,7 @@ GUIgetcurrentinput: mov [GUIcrowpos],al jmp .nokey .nodown -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al, 90 je .uppressed cmp dword[numlockptr],1 @@ -1163,7 +1163,7 @@ GUIVideoKeys: jne .nograyscale xor byte[GrayscaleMode],1 .nograyscale -%ifndef __LINUX__ +%ifndef __UNIXSDL__ cmp dh,'V' jne .novsync xor byte[vsyncon],1 @@ -1178,7 +1178,7 @@ GUIVideoKeys: .novsync %endif ; "Home" -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp dl,89 je .yeshome cmp dword[numlockptr],1 @@ -1194,7 +1194,7 @@ GUIVideoKeys: mov dword[GUIcurrentvideoviewloc],0 .nohome ; "End" -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp dl,95 je .yesendp cmp dword[numlockptr],1 @@ -1216,7 +1216,7 @@ GUIVideoKeys: mov dword[GUIcurrentvideoviewloc],0 .noendp ; "Up" -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp dl,90 je .up cmp dword[numlockptr],1 @@ -1238,7 +1238,7 @@ GUIVideoKeys: dec dword[GUIcurrentvideocursloc] .noup ; "Down" -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp dl,96 je .yesdown cmp dword[numlockptr],1 @@ -1261,7 +1261,7 @@ GUIVideoKeys: inc dword[GUIcurrentvideoviewloc] .nodown ; "PageUp" -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp dl,91 je .yespageup cmp dword[numlockptr],1 @@ -1285,7 +1285,7 @@ GUIVideoKeys: .posc .nopageup ; "PageDown" -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp dl,97 je .yespagedn cmp dword[numlockptr],1 @@ -1623,7 +1623,7 @@ GUICheatKeys: jne .nozero ret .nozero -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,89 je .homepressed cmp dword[numlockptr],1 @@ -1639,7 +1639,7 @@ GUICheatKeys: mov dword[GUIcurrentcheatviewloc],0 ret .nohome -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,89 je .endppressed cmp dword[numlockptr],1 @@ -1662,7 +1662,7 @@ GUICheatKeys: .posve ret .noendp -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,90 je .up cmp dword[numlockptr],1 @@ -1683,7 +1683,7 @@ GUICheatKeys: .noviewdec dec dword[GUIcurrentcheatcursloc] .noup -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al, 96 je .downpressed cmp dword[numlockptr],1 @@ -1706,7 +1706,7 @@ GUICheatKeys: inc dword[GUIcurrentcheatviewloc] .noviewinc .nodown -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,91 je .pageuppressed cmp dword[numlockptr],1 @@ -1729,7 +1729,7 @@ GUICheatKeys: mov dword[GUIcurrentcheatcursloc],0 .posc .nopageup -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al, 97 je .pagednpressed cmp dword[numlockptr],1 @@ -2082,7 +2082,7 @@ GUICheatSearchKeys: mov byte[CheatCompareValue],3 .notnotequalthan -%ifdef __LINUX__ ; Select with Arrow Keys +%ifdef __UNIXSDL__ ; Select with Arrow Keys cmp al,90 je .yesmoveup cmp dword[numlockptr],1 @@ -2098,7 +2098,7 @@ GUICheatSearchKeys: je .nomoveup dec byte[CheatCompareValue] .nomoveup -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,96 je .yesmovedown cmp dword[numlockptr],1 @@ -2149,7 +2149,7 @@ GUICheatSearchKeys: ret .nozero ; Select Codes with arrow keys -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,89 je .yeshome cmp dword[numlockptr],1 @@ -2165,7 +2165,7 @@ GUICheatSearchKeys: mov dword[GUIcurrentchtsrcviewloc],0 ret .nohome -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,95 je .yesendp cmp dword[numlockptr],1 @@ -2188,7 +2188,7 @@ GUICheatSearchKeys: .posve ret .noendp -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,90 je .up cmp dword[numlockptr],1 @@ -2209,7 +2209,7 @@ GUICheatSearchKeys: .noviewdec dec dword[GUIcurrentchtsrccursloc] .noup -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,96 je .yesdown cmp dword[numlockptr],1 @@ -2233,7 +2233,7 @@ GUICheatSearchKeys: .noviewinc .nodown -%ifdef __LINUX__ ; Pageup/Down to select Cheats +%ifdef __UNIXSDL__ ; Pageup/Down to select Cheats cmp al,91 je .yespgup cmp dword[numlockptr],1 @@ -2256,7 +2256,7 @@ GUICheatSearchKeys: mov dword[GUIcurrentchtsrccursloc],0 .posc .nopageup -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,97 je .yespgdn cmp dword[numlockptr],1 @@ -2361,7 +2361,7 @@ GUIStateSelKeys: mov [GUIcmenupos],al ret .noenter -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,92 ; linux keypad left je .yesleft cmp dword[numlockptr],1 ; if numlock on, disregard numpad @@ -2390,7 +2390,7 @@ GUIStateSelKeys: dec cl jmp .done .noleft -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,94 ; linux keypad right je .yesright cmp dword[numlockptr],1 ; if numlock on, disregard numpad @@ -2419,7 +2419,7 @@ GUIStateSelKeys: inc cl jmp .done .noright -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,90 ; linux keypad up je .yesvert cmp dword[numlockptr],1 ; if numlock on, disregard numpad @@ -2428,7 +2428,7 @@ GUIStateSelKeys: cmp al,72 ; linux numpad up, non-linux num/keypad up je .yesvert .noup -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,96 ; linux keypad down je .yesvert cmp dword[numlockptr],1 ; if numlock on, disregard numpad @@ -2462,7 +2462,7 @@ GUIStateSelKeys: ; Allows you to select boxes with the arrow keys, Enter to choose GUIResetKeys: -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,92 je .yesleft cmp dword[numlockptr],1 @@ -2476,7 +2476,7 @@ GUIResetKeys: %endif mov byte[GUICResetPos],0 .noleft -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,94 je .yesright cmp dword[numlockptr],1 @@ -2522,7 +2522,7 @@ GUIResetKeys: ; Allows you to select boxes with the arrow keys, Enter to choose GUIStateKeys: -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,92 je .yesleft cmp dword[numlockptr],1 @@ -2536,7 +2536,7 @@ GUIStateKeys: %endif mov byte[GUICStatePos],0 .noleft -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,94 je .yesright cmp dword[numlockptr],1 @@ -2587,7 +2587,7 @@ GUILoadKeys: je .noright cmp dword[GUIdirentries],0 je .noright -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,92 je .yesleft cmp dword[numlockptr],1 @@ -2602,7 +2602,7 @@ GUILoadKeys: mov byte[GUILoadPos],0 xor dword[GUIcurrentfilewin],1 .noleft -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,94 je .yesright cmp dword[numlockptr],1 @@ -2625,7 +2625,7 @@ GUILoadKeys: .nextl cmp byte[ebx],':' je .donel -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp byte[ebx],'/' %else cmp byte[ebx],'\' @@ -2655,7 +2655,7 @@ GUILoadKeys: .noenter cmp dword[GUIcurrentfilewin],1 je near .dirwin -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,89 je .yeshome cmp dword[numlockptr],1 @@ -2672,7 +2672,7 @@ GUILoadKeys: mov dword[GUIcurrentviewloc],0 ret .nohome -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,95 je .yesendp cmp dword[numlockptr],1 @@ -2696,7 +2696,7 @@ GUILoadKeys: .posve ret .noendp -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,90 je .up cmp dword[numlockptr],1 @@ -2718,7 +2718,7 @@ GUILoadKeys: .noviewdec dec dword[GUIcurrentcursloc] .noup -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,96 je .yesdown cmp dword[numlockptr],1 @@ -2742,7 +2742,7 @@ GUILoadKeys: inc dword[GUIcurrentviewloc] .noviewinc .nodown -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,91 je .yespageup cmp dword[numlockptr],1 @@ -2766,7 +2766,7 @@ GUILoadKeys: mov dword[GUIcurrentcursloc],0 .posc .nopageup -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,97 je .yespagedn cmp dword[numlockptr],1 @@ -2953,7 +2953,7 @@ SECTION .bss SECTION .text .dirwin -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,89 je .yeshome2 cmp dword[numlockptr],1 @@ -2970,7 +2970,7 @@ SECTION .text mov dword[GUIcurrentdirviewloc],0 ret .nohome2 -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,95 je .yesendp2 cmp dword[numlockptr],1 @@ -2994,7 +2994,7 @@ SECTION .text .posve2 ret .noendp2 -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,90 je .yesup2 cmp dword[numlockptr],1 @@ -3016,7 +3016,7 @@ SECTION .text .noviewdec2 dec dword[GUIcurrentdircursloc] .noup2 -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,96 je .yesdown2 cmp dword[numlockptr],1 @@ -3040,7 +3040,7 @@ SECTION .text inc dword[GUIcurrentdirviewloc] .noviewinc2 .nodown2 -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,91 je .yespgup2 cmp dword[numlockptr],1 @@ -3064,7 +3064,7 @@ SECTION .text mov dword[GUIcurrentdircursloc],0 .posc2 .nopageup2 -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al,97 je .yespgdn2 cmp dword[numlockptr],1 diff --git a/zsnes/src/gui/guiload.inc b/zsnes/src/gui/guiload.inc index 87bdb9d6..264b7f8e 100644 --- a/zsnes/src/gui/guiload.inc +++ b/zsnes/src/gui/guiload.inc @@ -203,7 +203,7 @@ GUIloadfilename: mov ebx,LoadDir mov edx,LoadDrive call Get_Dir -%ifndef __LINUX__ +%ifndef __UNIXSDL__ cmp byte[cfgloadsdir],0 jne .nosdrive pushad @@ -1013,7 +1013,7 @@ SECTION .text NEWSYM GetCurDir ; get Drive/Dir -%ifndef __LINUX__ +%ifndef __UNIXSDL__ mov ebx,GUIcurrentdir+3 %else mov ebx,GUIcurrentdir @@ -1021,7 +1021,7 @@ NEWSYM GetCurDir mov edx,GUIcurrentdir call Get_Dir -%ifndef __LINUX__ +%ifndef __UNIXSDL__ add byte[GUIcurrentdir],65 mov byte[GUIcurrentdir+1],':' @@ -1285,7 +1285,7 @@ GUIGetDirs: je near .sortagain pop edi .nodirs -%ifndef __LINUX__ +%ifndef __UNIXSDL__ cmp byte[GUIloadfntype],0 je near .drive2 mov esi,[GUInumentries] @@ -1329,7 +1329,7 @@ GUIdirentries resd 1 GUIfileentries resd 0 SECTION .data -%ifdef __LINUX__ +%ifdef __UNIXSDL__ NEWSYM GUIsmcfind, db '*.[sS][mM][cC]',0 NEWSYM GUIsfcfind, db '*.[sS][fF][cC]',0 NEWSYM GUIswcfind, db '*.[sS][wW][cC]',0 @@ -1348,7 +1348,7 @@ NEWSYM GUIgd3find, db '*.GD3',0 %endif NEWSYM GUIfind058, db '*.058',0 NEWSYM GUIfind078, db '*.078',0 -%ifdef __LINUX__ +%ifdef __UNIXSDL__ NEWSYM GUIfindUSA, db '*.[uU][sS][aA]',0 NEWSYM GUIfindEUR, db '*.[eE][uU][rR]',0 NEWSYM GUIfindJAP, db '*.[jJ][aA][pP]',0 @@ -1366,7 +1366,7 @@ NEWSYM GUIfindJMA, db '*.JMA',0 NEWSYM GUIfindGZIP, db '*.GZ',0 %endif NEWSYM GUIfind1, db '*.1',0 -%ifdef __LINUX__ +%ifdef __UNIXSDL__ GUIfindDIR db '*',0 NEWSYM GUIfindall, db '*',0 %else diff --git a/zsnes/src/gui/guimouse.inc b/zsnes/src/gui/guimouse.inc index 9261a44f..fb637efb 100644 --- a/zsnes/src/gui/guimouse.inc +++ b/zsnes/src/gui/guimouse.inc @@ -225,7 +225,7 @@ ProcessMouseButtons: jb near .noclickedw cmp word[GUImouseposx],242 ja .notfound7 -%ifdef __LINUX__ +%ifdef __UNIXSDL__ jmp .clickawn %endif cmp word[GUImouseposy],8 @@ -486,7 +486,7 @@ ProcessMouseButtons: mov byte[GUIpclicked],0 mov byte[GUIHold],0 -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp byte[GUIcwinpress],1 jne .notwinpressa mov byte[GUIcwinpress],0 @@ -1178,7 +1178,7 @@ GUIWinClicked: %%noclick %endmacro -%ifndef __LINUX__ +%ifndef __UNIXSDL__ %macro GUIClickCButton2r 5 cmp eax,%1+1 jl %%noclick @@ -2376,7 +2376,7 @@ DisplayGUIVideoClick: mov bl,[cvidmode] cmp byte[GUISLVID+ebx],0 je near .nocheckboxb -%ifdef __LINUX__ +%ifdef __UNIXSDL__ GUIClickCButton4 21,119,byte[scanlines],byte[cfgscanline],1 %else GUIClickCButton4 21,114,byte[scanlines],byte[cfgscanline],1 @@ -2405,7 +2405,7 @@ DisplayGUIVideoClick: mov bl,[cvidmode] cmp byte[GUIHSVID+ebx],0 je near .nohsline -%ifdef __LINUX__ +%ifdef __UNIXSDL__ GUIClickCButton4 61,119,byte[scanlines],byte[cfgscanline],3 GUIClickCButton4 101,119,byte[scanlines],byte[cfgscanline],2 %else diff --git a/zsnes/src/gui/guiwindp.inc b/zsnes/src/gui/guiwindp.inc index 396b1a47..ee41cc56 100644 --- a/zsnes/src/gui/guiwindp.inc +++ b/zsnes/src/gui/guiwindp.inc @@ -1437,7 +1437,7 @@ DisplayGUIVideo: GUIDisplayText 5,10,92,GUIVideoTextB2 GUIDisplayText 5,10,99,GUIVideoTextB3 %endif -%ifdef __LINUX__ +%ifdef __UNIXSDL__ GUIDisplayText 5,10,106,GUIVideoTextB4 %endif @@ -1445,7 +1445,7 @@ DisplayGUIVideo: mov al,[cvidmode] cmp byte[GUISLVID+eax],0 je near .notext2 -%ifdef __LINUX__ +%ifdef __UNIXSDL__ GUIDisplayText 5,13,116,GUIVideoTextC %else GUIDisplayText 5,13,111,GUIVideoTextC @@ -1505,7 +1505,7 @@ DisplayGUIVideo: mov al,[cvidmode] cmp byte[GUISLVID+eax],0 je near .nocheckboxb -%ifdef __LINUX__ +%ifdef __UNIXSDL__ GUIDisplayCheckboxun 5,21,119,scanlines,1,GUIVideoTextC1,0 %elifdef __WIN32__ GUIDisplayCheckboxun 5,21,114,scanlines,1,GUIVideoTextC1,0 @@ -1516,12 +1516,12 @@ DisplayGUIVideo: mov al,[cvidmode] cmp byte[GUIHSVID+eax],0 je near .nocheckboxw -%ifdef __LINUX__ +%ifdef __UNIXSDL__ GUIDisplayCheckboxun 5,61,119,scanlines,3,GUIVideoTextC2,0 %elifdef __WIN32__ GUIDisplayCheckboxun 5,61,114,scanlines,3,GUIVideoTextC2,0 %endif -%ifdef __LINUX__ +%ifdef __UNIXSDL__ GUIDisplayCheckboxun 5,101,119,scanlines,2,GUIVideoTextC3,0 %elifdef __WIN32__ GUIDisplayCheckboxun 5,101,114,scanlines,2,GUIVideoTextC3,0 @@ -1576,7 +1576,7 @@ DisplayGUIVideo: GUIDisplayCheckboxu 5,11,173,Mode7HiRes16b,GUIVideoText8b,0 .nocheckboxm72 GUIDisplayCheckboxu 5,11,183,GrayscaleMode,GUIVideoText8c,0 -%ifndef __LINUX__ +%ifndef __UNIXSDL__ GUIDisplayCheckboxu 5,115,183,vsyncon,GUIVideoText9,0 %endif @@ -3063,7 +3063,7 @@ GUIGUIAboutTextA1 db 'ZSNES V',ZVERSION,' ',0 ;Need room for date GUIGUIAboutTextA2 db 'DOS VERSION',0 %elifdef __WIN32__ GUIGUIAboutTextA2 db 'WIN VERSION',0 -%elifdef __LINUX__ +%elifdef __UNIXSDL__ GUIGUIAboutTextA2 db 'SDL VERSION',0 %endif diff --git a/zsnes/src/init.asm b/zsnes/src/init.asm index 9b79989f..af54cd2d 100644 --- a/zsnes/src/init.asm +++ b/zsnes/src/init.asm @@ -63,7 +63,7 @@ EXTSYM clearmem,clearSPCRAM,PatchUsingIPS,ZOpenFileName,loadROM,SPC7110IndexSize EXTSYM SPC7PackIndexLoad,IntlEHi,C4Enable,SPC7110Enable,RTCEnable,SA1Enable EXTSYM SDD1Enable,OBCEnable,SFXEnable,BSEnable,clearvidsound,headerhack,SetupROM -%ifdef __LINUX__ +%ifdef __UNIXSDL__ EXTSYM LoadDir,popdir,pushdir %endif @@ -229,7 +229,7 @@ NEWSYM init ; as not to break any other code later on which depends ; on it being present. mov ebx,[statefileloc] -%ifdef __LINUX__ +%ifdef __UNIXSDL__ mov word[fnamest+ebx-1],'st' %else mov word[fnamest+ebx-1],'ST' @@ -2120,7 +2120,7 @@ NEWSYM printhex8 ; Search for header size first which is filesize MOD 32768 NEWSYM PatchIPS -%ifdef __LINUX__ +%ifdef __UNIXSDL__ pushad call pushdir popad @@ -2138,7 +2138,7 @@ NEWSYM PatchIPS dec eax cmp eax,fname je .failfound -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp byte[eax],'/' %else cmp byte[eax],'\' @@ -2155,7 +2155,7 @@ NEWSYM PatchIPS mov dword[eax],'.ips' mov byte[eax+4],0 push eax -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp byte [ZipSupport], 1 je .nochangedir mov ebx,LoadDir @@ -2170,7 +2170,7 @@ NEWSYM PatchIPS pop eax mov ebx,[Prevextn] mov [eax],ebx -%ifdef __LINUX__ +%ifdef __UNIXSDL__ pushad call popdir popad @@ -2269,7 +2269,7 @@ NEWSYM loadfile mov byte[TextFile], 0 call GetCurDir mov byte[InGUI],0 -%ifdef __LINUX__ +%ifdef __UNIXSDL__ mov dl,[InitDrive] mov ebx,InitDir call Change_Dir diff --git a/zsnes/src/initc.c b/zsnes/src/initc.c index 37e6e4b6..8ac0996e 100755 --- a/zsnes/src/initc.c +++ b/zsnes/src/initc.c @@ -22,7 +22,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#ifdef __LINUX__ +#ifdef __UNIXSDL__ #include "gblhdr.h" #define DIR_SLASH "/" #else diff --git a/zsnes/src/linux/sdlintrf.asm b/zsnes/src/linux/sdlintrf.asm index 6e273591..642edd08 100644 --- a/zsnes/src/linux/sdlintrf.asm +++ b/zsnes/src/linux/sdlintrf.asm @@ -81,7 +81,7 @@ NEWSYM SystemInit mov byte[cfgsoundon],1 ; Get and set the initial directory -%ifdef __LINUX__ +%ifdef __UNIXSDL__ call obtaindir mov ebx,InitDir mov edx,InitDrive @@ -901,7 +901,7 @@ NEWSYM ScanCodeListing db ' " ',' ~ ','LSH',' \ ',' Z ',' X ',' C ',' V ' db ' B ',' N ',' M ',' , ',' . ',' / ','RSH',' * ' ; 30h db 'LAL','SPC','CAP','F1 ','F2 ','F3 ','F4 ','F5 ' -%ifdef __LINUX__ +%ifdef __UNIXSDL__ db 'F6 ','F7 ','F8 ','F9 ','F10','NUM','SCR','KP7' ; 40h db 'KP8','KP9','KP-','KP4','KP5','KP6','KP+','KP1' db 'KP2','KP3','KP0','KP.',' ',' ','OEM','F11' ; 50h @@ -951,7 +951,7 @@ NEWSYM ScanCodeListing db 'J68','J69','J6A','J6B','J6C','J6D','J6E','J6F' db 'J70','J71','J72','J73','J74','J75','J76','J77' ; 170h db 'J78','J79','J7A','J7B','J7C','J7D','J7E','J7F' -%ifdef __LINUX__ +%ifdef __UNIXSDL__ ; Extra Joystick Stuff db 'J80','J81','J82','J83','J84','J85','J86','J87' ; 180h db 'J88','J89','J8A','J8B','J8C','J8D','J8E','J8F' @@ -1241,7 +1241,7 @@ NEWSYM SetInputDevice je near .input2 mov dword[eax],54 mov dword[eax+4],28 -%ifdef __LINUX__ +%ifdef __UNIXSDL__ mov dword[eax+8],90 mov dword[eax+12],96 mov dword[eax+16],92 diff --git a/zsnes/src/linux/zfilew.c b/zsnes/src/linux/zfilew.c index 47fbd045..98f78a4e 100644 --- a/zsnes/src/linux/zfilew.c +++ b/zsnes/src/linux/zfilew.c @@ -28,7 +28,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #include -#ifdef __LINUX__ +#ifdef __UNIXSDL__ #include #include #include @@ -44,7 +44,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #define DWORD unsigned int #define BYTE unsigned char -#ifdef __LINUX__ +#ifdef __UNIXSDL__ #define STUB_FUNCTION fprintf(stderr,"STUB: %s at " __FILE__ ", line %d, thread %d\n",__FUNCTION__,__LINE__,getpid()) #endif #include @@ -260,7 +260,7 @@ DWORD ZFileGetFTime() DWORD ZFileMKDir() { -#ifdef __LINUX__ +#ifdef __UNIXSDL__ return(mkdir(MKPath, (S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH))); #else return(mkdir(MKPath)); @@ -298,7 +298,7 @@ DWORD DTALocPos; int TempFind; -#ifndef __LINUX__ +#ifndef __UNIXSDL__ int FindFirstHandle; struct _finddata_t FindDataStruct; #else @@ -309,7 +309,7 @@ int globcur; DWORD ZFileFindNext() { -#ifdef __LINUX__ +#ifdef __UNIXSDL__ //STUB_FUNCTION; struct stat filetype; @@ -357,7 +357,7 @@ DWORD ZFileFindNext() DWORD ZFileFindFirst() { -#ifdef __LINUX__ +#ifdef __UNIXSDL__ //STUB_FUNCTION; struct stat filetype; @@ -405,7 +405,7 @@ DWORD ZFileFindFirst() DWORD ZFileFindEnd() // for compatibility with windows later { -#ifdef __LINUX__ +#ifdef __UNIXSDL__ //STUB_FUNCTION; if (globcur != -1) { globfree(&globbuf); @@ -461,7 +461,7 @@ DWORD GetDate() extern char SRAMDir[1024]; extern char LoadDir[512]; -#ifdef __LINUX__ +#ifdef __UNIXSDL__ char zcfgdir[1024]; #define ZCFG_DIR "/.zsnes" diff --git a/zsnes/src/net/ztcp.c b/zsnes/src/net/ztcp.c index 11846005..469ae669 100644 --- a/zsnes/src/net/ztcp.c +++ b/zsnes/src/net/ztcp.c @@ -86,7 +86,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. // only be done if the requested packet is within the past 64 packets. // In-game chat will be moved to a separate packet in TCP/IP -#ifdef __LINUX__ +#ifdef __UNIXSDL__ #include "gblhdr.h" #define closesocket(A) close(A) #define CopyMemory(A,B,C) memcpy(A,B,C) @@ -186,14 +186,14 @@ int GetLeftUDP(); int InitTCP() { -#ifndef __LINUX__ +#ifndef __UNIXSDL__ WORD versionneeded = MAKEWORD(2,2); WSADATA wsadata; #endif UDPEnable=0; -#ifndef __LINUX__ +#ifndef __UNIXSDL__ /* Startup winsock */ WSAStartup(versionneeded, &wsadata); @@ -217,7 +217,7 @@ int InitTCP() void DeInitTCP() { -#ifndef __LINUX__ +#ifndef __UNIXSDL__ WSACleanup(); #endif } @@ -337,7 +337,7 @@ int ConnectServer(char *servername, unsigned int port) if (ugamesocket == INVALID_SOCKET) { -#ifdef __LINUX__ +#ifdef __UNIXSDL__ STUB_FUNCTION; #else tcperr=WSAGetLastError(); @@ -349,7 +349,7 @@ int ConnectServer(char *servername, unsigned int port) if (userversocket == INVALID_SOCKET) { -#ifdef __LINUX__ +#ifdef __UNIXSDL__ STUB_FUNCTION; #else tcperr=WSAGetLastError(); @@ -362,7 +362,7 @@ int ConnectServer(char *servername, unsigned int port) if (bind(userversocket,(struct sockaddr*)&userveraddress,sizeof(userveraddress))== SOCKET_ERROR) { -#ifdef __LINUX__ +#ifdef __UNIXSDL__ STUB_FUNCTION; #else tcperr=WSAGetLastError(); @@ -420,7 +420,7 @@ int ConnectServer(char *servername, unsigned int port) sizeof(struct sockaddr)); if (retval == SOCKET_ERROR) { -#ifdef __LINUX__ +#ifdef __UNIXSDL__ STUB_FUNCTION; #else sprintf(blah,"Could not connect to other side"); @@ -524,7 +524,7 @@ int StartServerCycle(unsigned short port) if (userversocket == INVALID_SOCKET) { -#ifdef __LINUX__ +#ifdef __UNIXSDL__ STUB_FUNCTION; #else tcperr=WSAGetLastError(); @@ -536,7 +536,7 @@ int StartServerCycle(unsigned short port) if (bind(userversocket,(struct sockaddr*)&userveraddress,sizeof(userveraddress))== SOCKET_ERROR) { -#ifdef __LINUX__ +#ifdef __UNIXSDL__ STUB_FUNCTION; #else tcperr=WSAGetLastError(); @@ -572,7 +572,7 @@ int StartServerCycle(unsigned short port) serversocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (serversocket == INVALID_SOCKET) { -#ifndef __LINUX__ +#ifndef __UNIXSDL__ tcperr=WSAGetLastError(); #endif @@ -589,7 +589,7 @@ int StartServerCycle(unsigned short port) sizeof(struct sockaddr)); if (retval == SOCKET_ERROR) { -#ifndef __LINUX__ +#ifndef __UNIXSDL__ tcperr=WSAGetLastError(); #endif closesocket(serversocket); @@ -600,7 +600,7 @@ int StartServerCycle(unsigned short port) retval = listen(serversocket, SOMAXCONN); if (retval == SOCKET_ERROR) { -#ifndef __LINUX__ +#ifndef __UNIXSDL__ tcperr=WSAGetLastError(); #endif closesocket(serversocket); @@ -622,7 +622,7 @@ int acceptzuser() gamesocket = accept(serversocket, NULL, NULL); if (gamesocket == INVALID_SOCKET) { -#ifndef __LINUX__ +#ifndef __UNIXSDL__ tcperr=WSAGetLastError(); #endif closesocket(serversocket); @@ -668,7 +668,7 @@ int ServerCheckNewClient() if(r == -1) { -#ifndef __LINUX__ +#ifndef __UNIXSDL__ tcperr=WSAGetLastError(); #endif return(-2); @@ -1236,7 +1236,7 @@ void UDPDisableMode(){ } void WinErrorA2(void){ -#ifdef __LINUX__ +#ifdef __UNIXSDL__ STUB_FUNCTION; #else char message1[256]; @@ -1246,7 +1246,7 @@ void WinErrorA2(void){ } void WinErrorB2(void){ -#ifdef __LINUX__ +#ifdef __UNIXSDL__ STUB_FUNCTION; #else char message1[256]; @@ -1256,7 +1256,7 @@ void WinErrorB2(void){ } void WinErrorC2(void){ -#ifdef __LINUX__ +#ifdef __UNIXSDL__ STUB_FUNCTION; #else char message1[256]; diff --git a/zsnes/src/parsegen.cpp b/zsnes/src/parsegen.cpp index 3e2a81d9..2a9151e3 100644 --- a/zsnes/src/parsegen.cpp +++ b/zsnes/src/parsegen.cpp @@ -1013,7 +1013,7 @@ int main(size_t argc, const char **argv) << "\n" << "Options:\n" << "\n" - << " -Ddefine Define a processor director. Example: -D__LINUX__\n" + << " -Ddefine Define a processor director. Example: -D__UNIXSDL__\n" << " Can specify multiple defines.\n" << "\n" << " -cheader Create a C/C++ header with the following name.\n" diff --git a/zsnes/src/patch.c b/zsnes/src/patch.c index 60a31601..e141e716 100644 --- a/zsnes/src/patch.c +++ b/zsnes/src/patch.c @@ -22,7 +22,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#ifdef __LINUX__ +#ifdef __UNIXSDL__ #include "gblhdr.h" #else #include diff --git a/zsnes/src/ui.asm b/zsnes/src/ui.asm index ee2fd49d..99dd8dcc 100644 --- a/zsnes/src/ui.asm +++ b/zsnes/src/ui.asm @@ -32,7 +32,7 @@ EXTSYM vidbufferofsb,headdata,romdata,sfxramdata,setaramdata,wramdata,ram7f,vram EXTSYM sram,debugbuf,regptr,regptw,vcache2b,vcache4b,vcache8b,fname,fnames EXTSYM fnamest,filefound,vidbufferofsc,Sup48mbit,Sup16mbit,guioff -%ifdef __LINUX__ +%ifdef __UNIXSDL__ EXTSYM LinuxExit,GetFilename %endif @@ -107,7 +107,7 @@ SECTION .text ;******************************************************* NEWSYM AllocMem -%ifndef __LINUX__ +%ifndef __UNIXSDL__ mov ax,0501h mov cx,bx shr ebx,16 @@ -192,7 +192,7 @@ NEWSYM getcmdline .next2 cmp eax,edi je .nomore -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp byte[eax],'/' %else cmp byte[eax],'\' @@ -303,7 +303,7 @@ SECTION .text AllocateLDTDescriptor: -%ifndef __LINUX__ +%ifndef __UNIXSDL__ ;Get ZSNES Base mov ax,ds mov bx,ax @@ -320,7 +320,7 @@ AllocateLDTDescriptor: AllocateBlock: -%ifndef __LINUX__ +%ifndef __UNIXSDL__ mov eax,0501h mov bx,[BlockSize+2] mov cx,[BlockSize] @@ -635,7 +635,7 @@ NEWSYM makeextension .loopz dec edx mov al,[fnames+edx] -%ifdef __LINUX__ +%ifdef __UNIXSDL__ cmp al, '/' %else cmp al,'\' @@ -667,7 +667,7 @@ NEWSYM makeextension add ah,4 mov [fnames],ah mov [fnamest],ah -%ifdef __LINUX__ +%ifdef __UNIXSDL__ pushad call GetFilename popad @@ -791,7 +791,7 @@ SECTION .data SECTION .text -%ifndef __LINUX__ +%ifndef __UNIXSDL__ NEWSYM obtaindir cmp byte[cfgloadsdir],1 je .nosdriveb @@ -818,7 +818,7 @@ NEWSYM preparedir ; DS:ESI -> 64 byte buffer to receive ASCIZ pathname ; get current drive, ah = 19h, al = A=0,B=1, etc. -%ifndef __LINUX__ +%ifndef __UNIXSDL__ cmp byte[cfgloadsdir],0 je near .nosdrivec ; verify sram drive/directory exists @@ -867,7 +867,7 @@ SECTION .data NEWSYM InitDrive, db 2 NEWSYM LoadDrive, db 2 -%ifdef __LINUX__ +%ifdef __UNIXSDL__ NEWSYM gotoroot, db '/',0 %else NEWSYM gotoroot, db '\',0 @@ -882,7 +882,7 @@ SECTION .text NEWSYM DosExit ; Terminate Program %ifdef __WIN32__ call OSExit -%elifdef __LINUX__ +%elifdef __UNIXSDL__ call LinuxExit %elifdef __MSDOS__ call init18_2hz diff --git a/zsnes/src/uic.c b/zsnes/src/uic.c index 625fea2f..a52360d3 100644 --- a/zsnes/src/uic.c +++ b/zsnes/src/uic.c @@ -21,7 +21,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef __LINUX__ +#ifdef __UNIXSDL__ #include "gblhdr.h" #else #include diff --git a/zsnes/src/video/procvid.asm b/zsnes/src/video/procvid.asm index 1e65416a..fe1213d7 100644 --- a/zsnes/src/video/procvid.asm +++ b/zsnes/src/video/procvid.asm @@ -2131,7 +2131,7 @@ NEWSYM testpressed8b mov byte[pressed+77],2 .noright %ifndef __MSDOS__ -%ifdef __LINUX__ +%ifdef __UNIXSDL__ test byte[pressed+92],1 %else test byte[pressed+0CBh],1 @@ -2140,13 +2140,13 @@ NEWSYM testpressed8b cmp bl,0 je .noleft2 dec bl -%ifdef __LINUX__ +%ifdef __UNIXSDL__ mov byte[pressed+92],2 %else mov byte[pressed+0CBh],2 %endif .noleft2 -%ifdef __LINUX__ +%ifdef __UNIXSDL__ test byte[pressed+94],1 %else test byte[pressed+0CDh],1 @@ -2155,7 +2155,7 @@ NEWSYM testpressed8b cmp bl,9 je .noright2 inc bl -%ifdef __LINUX__ +%ifdef __UNIXSDL__ mov byte[pressed+94],2 %else mov byte[pressed+0CDh],2 diff --git a/zsnes/src/video/procvidc.c b/zsnes/src/video/procvidc.c index e5685dbf..73901b5e 100644 --- a/zsnes/src/video/procvidc.c +++ b/zsnes/src/video/procvidc.c @@ -22,7 +22,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#ifdef __LINUX__ +#ifdef __UNIXSDL__ #include "gblhdr.h" #define DIR_SLASH "/" #else diff --git a/zsnes/src/zip/unzip.c b/zsnes/src/zip/unzip.c index 39fa5c64..fb82a5b6 100644 --- a/zsnes/src/zip/unzip.c +++ b/zsnes/src/zip/unzip.c @@ -4,7 +4,7 @@ Read unzip.h for more info */ -#ifdef __LINUX__ +#ifdef __UNIXSDL__ #include "../gblhdr.h" #else #include diff --git a/zsnes/src/zip/zpng.c b/zsnes/src/zip/zpng.c index 87bade90..be60458c 100644 --- a/zsnes/src/zip/zpng.c +++ b/zsnes/src/zip/zpng.c @@ -18,7 +18,7 @@ #include #endif -#ifdef __LINUX__ +#ifdef __UNIXSDL__ #include "../gblhdr.h" #endif @@ -127,7 +127,7 @@ char *generate_filename(void) short i=0; struct stat buf; char *tmp = &fnames; -#ifdef __LINUX__ +#ifdef __UNIXSDL__ char *tmp2 = 0; #endif @@ -156,7 +156,7 @@ char *generate_filename(void) tmp = filename+strlen(filename); while (*tmp!='.') tmp--; -#ifdef __LINUX__ +#ifdef __UNIXSDL__ tmp2 = filename; while (tmp2 diff --git a/zsnes/src/zloader.c b/zsnes/src/zloader.c index 87bb6987..35836880 100644 --- a/zsnes/src/zloader.c +++ b/zsnes/src/zloader.c @@ -20,7 +20,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef __LINUX__ +#ifdef __UNIXSDL__ #include "gblhdr.h" #define DIR_SLASH '/' #else @@ -139,7 +139,7 @@ static void display_help() put_line(" 30 = 1280x1024 S FULL 31 = 1280x1024 DR FULL"); put_line(" 32 = 1280x1024 DS FULL"); #endif -#ifdef __LINUX__ +#ifdef __UNIXSDL__ put_line(" 0 = 256x224 R WIN 1 = 256x224 R FULL"); put_line(" 2 = 512x448 DR WIN 3 = 640x480 DS FULL"); #ifndef __OPENGL__ @@ -178,7 +178,7 @@ static void display_help() put_line(" File Formats Supported by GUI : SMC,SFC,SWC,FIG,MGD,UFO,BIN,"); put_line(" 058,078,1,USA,EUR,JAP,ZIP,JMA"); put_line(""); -#ifndef __LINUX__ +#ifndef __UNIXSDL__ put_line(" Microsoft-style options (/option) are also accepted"); #endif /* @@ -270,7 +270,7 @@ static void handle_params(int argc, char *argv[]) for (i = 1; i < argc; i++) { - #ifndef __LINUX__ + #ifndef __UNIXSDL__ if (argv[i][0] == '-' || argv[i][0] == '/') #else if (argv[i][0] == '-') @@ -587,7 +587,7 @@ int main(int zargc, char *zargv[]) argc = zargc; argv = zargv; - #ifdef __LINUX__ + #ifdef __UNIXSDL__ handle_params(zargc, zargv); #endif diff --git a/zsnes/src/zmovie.c b/zsnes/src/zmovie.c index 4d2e1248..fb666e58 100644 --- a/zsnes/src/zmovie.c +++ b/zsnes/src/zmovie.c @@ -20,7 +20,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -#ifdef __LINUX__ +#ifdef __UNIXSDL__ #include "gblhdr.h" #define DIR_SLASH "/" #else diff --git a/zsnes/src/zstate.c b/zsnes/src/zstate.c index 431d8319..d29cc3bc 100755 --- a/zsnes/src/zstate.c +++ b/zsnes/src/zstate.c @@ -22,7 +22,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -#ifdef __LINUX__ +#ifdef __UNIXSDL__ #include "gblhdr.h" #define DIR_SLASH "/" #else @@ -603,7 +603,7 @@ void statesaver() //Save State code - #ifdef __LINUX__ + #ifdef __UNIXSDL__ SRAMChdir(); #endif @@ -864,7 +864,7 @@ void stateloader (unsigned char *statename, unsigned char keycheck, unsigned cha INSERT_POSITION_NUMBER(txtrrldmsg, txtrrldnum); - #ifdef __LINUX__ + #ifdef __UNIXSDL__ SRAMChdir(); #endif