8 #include "unix-netplay.h"
12 CFGSTRUCT DriverConfig[]={
36 //-fshack x Set the environment variable SDL_VIDEODRIVER to \"x\" when
37 // entering full screen mode and x is not \"0\".
40 "-xres x Set horizontal resolution to x for full screen mode.\n\
41 -yres x Set vertical resolution to x for full screen mode.\n\
42 -xscale(fs) x Multiply width by x.\n\
43 -yscale(fs) x Multiply height by x.\n\
44 -efx(fs) x Enable scanlines effect if x is non zero. yscale must be >=2\n\
45 and preferably a multiple of 2.\n\
46 -fs x Select full screen mode if x is non zero.\n\
47 -joyx y Use joystick y as virtual joystick x.\n\
50 Otherwise, x = playback rate.\n\
53 "-f8bit x Force 8-bit sound.\n\
58 "-lbufsize x Internal FCE Ultra sound buffer size. Size = 2^x samples.\n\
59 -ebufsize x External SDL sound buffer size. Size = 2^x samples.\n\
62 "-connect s Connect to server 's' for TCP/IP network play.\n\
63 -server Be a host/server for TCP/IP network play.\n\
64 -netport x Use TCP/IP port x for network play.";
66 //static int docheckie[2]={0,0};
67 ARGPSTRUCT DriverArgs[]={
68 {"-joy1",0,&joy[0],0},{"-joy2",0,&joy[1],0},
69 {"-joy3",0,&joy[2],0},{"-joy4",0,&joy[3],0},
70 {"-xscale",0,&_xscale,0},
71 {"-yscale",0,&_yscale,0},
73 {"-xscalefs",0,&_xscalefs,0},
74 {"-yscalefs",0,&_yscalefs,0},
75 {"-efxfs",0,&_efxfs,0},
78 {"-fs",0,&_fullscreen,0},
79 //{"-fshack",0,&_fshack,0x4001},
80 {"-sound",0,&_sound,0},
82 {"-f8bit",0,&_f8bit,0},
84 {"-lbufsize",0,&_lbufsize,0},
85 {"-ebufsize",0,&_ebufsize,0},
88 {"-connect",&docheckie[0],&netplayhost,0x4001},
89 {"-server",&docheckie[1],0,0},
90 {"-netport",0,&Port,0},
95 static void SetDefaults(void)
107 _xscale=_yscale=_xscalefs=_yscalefs=1;
109 //_fshack=_fshacksave=0;
110 memset(joy,0,sizeof(joy));
113 void DoDriverArgs(void)
132 else if(docheckie[1])
136 FCEUI_SetNetworkPlay(netplay);
142 memset(joyBMap[x],0,sizeof(joyBMap[0]));
143 memset(joyAMap[x],0,sizeof(joyAMap[0]));
150 void KillMouse(void){}
151 void GetMouseData(uint32 *d)
156 t=SDL_GetMouseState(&x,&y);
167 int InitKeyboard(void)
172 int UpdateKeyboard(void)
177 void KillKeyboard(void)
182 char *GetKeyboard(void)
185 return (char *)SDL_GetKeyState(0);
187 #include "unix-basedir.h"
189 int CLImain(int argc, char *argv[]);
190 int main(int argc, char *argv[])
192 puts("\nStarting FCE Ultra "VERSION_STRING"...\n");
195 printf("Could not initialize SDL: %s.\n", SDL_GetError());
201 if(getenv("SDL_VIDEODRIVER"))
203 if((_fshacksave=malloc(strlen(getenv("SDL_VIDEODRIVER"))+1)))
204 strcpy(_fshacksave,getenv("SDL_VIDEODRIVER"));
211 int ret=CLImain(argc,argv);