From 0baaa2b25dfdcd0232b396995ded1843d2605995 Mon Sep 17 00:00:00 2001 From: jbo_85 <> Date: Mon, 13 Jun 2005 13:53:38 +0000 Subject: [PATCH] Removed more warnings and optimized the asm code a bit. --- zsnes/src/cfgload.c | 5 +++-- zsnes/src/linux/sdlintrf.asm | 28 ++++++---------------------- zsnes/src/win/winintrf.asm | 28 ++++++---------------------- zsnes/src/win/winlink.cpp | 2 +- 4 files changed, 16 insertions(+), 47 deletions(-) diff --git a/zsnes/src/cfgload.c b/zsnes/src/cfgload.c index 455d57ca..a00e4b49 100644 --- a/zsnes/src/cfgload.c +++ b/zsnes/src/cfgload.c @@ -25,6 +25,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #ifdef __LINUX__ #include "gblhdr.h" #else +#include #include #include #endif @@ -187,7 +188,7 @@ unsigned char cfgreinittime = 30; void ConvertJoyMap1() { - int bl; + unsigned int bl; // Convert if 2,4,6, or sidewinder if (pl1contrl == 2) { @@ -248,7 +249,7 @@ void ConvertJoyMap1() void ConvertJoyMap2() { - int bl; + unsigned int bl; // mov al,[pl2contrl] // Convert if 2,4,6, or sidewinder //If pl1contrl=2 and pl2contrl=2, then set pl2 buttons to 3 & 4 diff --git a/zsnes/src/linux/sdlintrf.asm b/zsnes/src/linux/sdlintrf.asm index aa69a1a8..a5f8fdfd 100644 --- a/zsnes/src/linux/sdlintrf.asm +++ b/zsnes/src/linux/sdlintrf.asm @@ -65,29 +65,13 @@ NEWSYM SystemInit mov byte[cfgcvidmode],2 mov byte[cvidmode],2 call getcmdline - mov byte[esi],'z' - mov byte[esi+1],'s' - mov byte[esi+2],'n' - mov byte[esi+3],'e' - mov byte[esi+4],'s' - mov byte[esi+5],'l' - mov byte[esi+6],'.' - mov byte[esi+7],'c' - mov byte[esi+8],'f' - mov byte[esi+9],'g' + mov dword[esi],'zsne' + mov dword[esi+4],'sl.c' + mov word[esi+8],'fg' mov byte[esi+10],0 - mov byte[esi+256],'z' - mov byte[esi+1+256],'g' - mov byte[esi+2+256],'u' - mov byte[esi+3+256],'i' - mov byte[esi+4+256],'c' - mov byte[esi+5+256],'f' - mov byte[esi+6+256],'g' - mov byte[esi+7+256],'l' - mov byte[esi+8+256],'.' - mov byte[esi+9+256],'d' - mov byte[esi+10+256],'a' - mov byte[esi+11+256],'t' + mov dword[esi+256],'zgui' + mov dword[esi+4+256],'cfgl' + mov dword[esi+8+256],'.dat' mov byte[esi+12+256],0 mov byte[spcon],1 diff --git a/zsnes/src/win/winintrf.asm b/zsnes/src/win/winintrf.asm index 8ce6341f..f82c8f02 100644 --- a/zsnes/src/win/winintrf.asm +++ b/zsnes/src/win/winintrf.asm @@ -70,29 +70,13 @@ NEWSYM SystemInit mov byte[cvidmode],3 call getcmdline - mov byte[esi],'z' - mov byte[esi+1],'s' - mov byte[esi+2],'n' - mov byte[esi+3],'e' - mov byte[esi+4],'s' - mov byte[esi+5],'w' - mov byte[esi+6],'.' - mov byte[esi+7],'c' - mov byte[esi+8],'f' - mov byte[esi+9],'g' + mov dword[esi],'zsne' + mov dword[esi+4],'sw.c' + mov word[esi+8],'fg' mov byte[esi+10],0 - mov byte[esi+256],'z' - mov byte[esi+1+256],'g' - mov byte[esi+2+256],'u' - mov byte[esi+3+256],'i' - mov byte[esi+4+256],'c' - mov byte[esi+5+256],'f' - mov byte[esi+6+256],'g' - mov byte[esi+7+256],'w' - mov byte[esi+8+256],'.' - mov byte[esi+9+256],'d' - mov byte[esi+10+256],'a' - mov byte[esi+11+256],'t' + mov dword[esi+256],'zgui' + mov dword[esi+4+256],'cfgw' + mov dword[esi+8+256],'.dat' mov byte[esi+12+256],0 mov byte[spcon],1 diff --git a/zsnes/src/win/winlink.cpp b/zsnes/src/win/winlink.cpp index 079aafa1..0be35aa2 100644 --- a/zsnes/src/win/winlink.cpp +++ b/zsnes/src/win/winlink.cpp @@ -552,7 +552,7 @@ LRESULT CALLBACK Main_Proc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { static bool shiftpr; bool accept; - int vkeyval=0; + int vkeyval = 0; switch (uMsg) {