mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-01 00:15:14 +01:00
Renaming files
This commit is contained in:
parent
56ac399948
commit
023b0e4f3b
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* Snes9x 1.50
|
||||
* Snes9x 1.50
|
||||
*
|
||||
* Nintendo Gamecube Audio
|
||||
*
|
||||
@ -26,7 +26,7 @@
|
||||
#include "controls.h"
|
||||
|
||||
#include "video.h"
|
||||
#include "ftfont.h"
|
||||
#include "menudraw.h"
|
||||
|
||||
/*** Double buffered audio ***/
|
||||
#define AUDIOBUFFER 2048
|
||||
@ -65,8 +65,8 @@ AudioThread (void *arg)
|
||||
}
|
||||
|
||||
/**
|
||||
* MixSamples
|
||||
* This continually calls S9xMixSamples On each DMA Completion
|
||||
* MixSamples
|
||||
* This continually calls S9xMixSamples On each DMA Completion
|
||||
*/
|
||||
static void
|
||||
GCMixSamples ()
|
||||
|
@ -11,9 +11,9 @@
|
||||
|
||||
#include "snes9xGx.h"
|
||||
#include "memmap.h"
|
||||
#include "sdload.h"
|
||||
#include "fileop.h"
|
||||
#include "cheats.h"
|
||||
|
||||
|
||||
extern SCheatData Cheat;
|
||||
|
||||
/****************************************************************************
|
||||
@ -34,10 +34,10 @@ SetupCheats()
|
||||
sprintf (cheatFile, "%s/snes9x/cheats/%s.cht", ROOTSDDIR, Memory.ROMFilename);
|
||||
else if(GCSettings.SaveMethod == METHOD_USB)
|
||||
sprintf (cheatFile, "%s/snes9x/cheats/%s.cht", ROOTUSBDIR, Memory.ROMFilename);
|
||||
|
||||
|
||||
// load cheat file if present
|
||||
if(strlen(cheatFile) > 0)
|
||||
{
|
||||
{
|
||||
if(S9xLoadCheatFile (cheatFile))
|
||||
{
|
||||
// disable all cheats loaded from the file
|
||||
|
@ -5,19 +5,19 @@
|
||||
* softdev July 2006
|
||||
* crunchy2 May 2007
|
||||
*
|
||||
* sdload.cpp
|
||||
* fileop.cpp
|
||||
*
|
||||
* Load ROMS from FAT
|
||||
* File operations
|
||||
****************************************************************************/
|
||||
#include <gccore.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <ogcsys.h>
|
||||
#include "sdload.h"
|
||||
#include "fileop.h"
|
||||
#include "unzip.h"
|
||||
#include "memmap.h"
|
||||
#include "video.h"
|
||||
#include "ftfont.h"
|
||||
#include "menudraw.h"
|
||||
#include "dvd.h"
|
||||
#include "filesel.h"
|
||||
#include "sram.h"
|
||||
@ -54,7 +54,7 @@ bool fat_is_mounted(PARTITION_INTERFACE partition) {
|
||||
/****************************************************************************
|
||||
* fat_enable_readahead_all
|
||||
****************************************************************************/
|
||||
|
||||
|
||||
void fat_enable_readahead_all() {
|
||||
int i;
|
||||
for (i=1; i <= 4; ++i) {
|
||||
@ -181,7 +181,7 @@ int updateFATdirname(int method)
|
||||
/***************************************************************************
|
||||
* Browse FAT subdirectories
|
||||
***************************************************************************/
|
||||
int parseFATdirectory(int method)
|
||||
int parseFATdirectory(int method)
|
||||
{
|
||||
int nbfiles = 0;
|
||||
DIR_ITER *fatdir;
|
||||
@ -198,16 +198,16 @@ int parseFATdirectory(int method)
|
||||
{
|
||||
sprintf(msg, "Error opening %s", currFATdir);
|
||||
WaitPrompt(msg);
|
||||
|
||||
|
||||
// if we can't open the previous dir, open root dir
|
||||
if(method == METHOD_SD)
|
||||
sprintf(currFATdir,"%s",ROOTSDDIR);
|
||||
else
|
||||
sprintf(currFATdir,"%s",ROOTUSBDIR);
|
||||
|
||||
|
||||
fatdir = diropen(currFATdir);
|
||||
|
||||
if (fatdir == NULL)
|
||||
|
||||
if (fatdir == NULL)
|
||||
{
|
||||
sprintf(msg, "Error opening %s", currFATdir);
|
||||
WaitPrompt(msg);
|
@ -5,13 +5,13 @@
|
||||
* softdev July 2006
|
||||
* crunchy2 May 2007
|
||||
*
|
||||
* sdload.cpp
|
||||
* fileop.h
|
||||
*
|
||||
* Load ROMS from SD Card
|
||||
* File operations
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _LOADFROMSDC_
|
||||
#define _LOADFROMSDC_
|
||||
#ifndef _FATFILESC_
|
||||
#define _FATFILESC_
|
||||
#include <gccore.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
@ -30,13 +30,13 @@
|
||||
|
||||
#include "snes9xGx.h"
|
||||
#include "dvd.h"
|
||||
#include "ftfont.h"
|
||||
#include "menudraw.h"
|
||||
#include "video.h"
|
||||
#include "aram.h"
|
||||
#include "unzip.h"
|
||||
#include "filesel.h"
|
||||
#include "smbload.h"
|
||||
#include "sdload.h"
|
||||
#include "fileload.h"
|
||||
#include "mcsave.h"
|
||||
|
||||
#define PAGESIZE 17
|
||||
@ -67,38 +67,38 @@ int autoSaveMethod()
|
||||
{
|
||||
return METHOD_SD;
|
||||
int method = -1;
|
||||
|
||||
|
||||
while(method < 0)
|
||||
{
|
||||
WaitPrompt((char*) "Checking SD");
|
||||
|
||||
|
||||
if(diropen(ROOTSDDIR))
|
||||
{
|
||||
WaitPrompt((char*) "Found SD!");
|
||||
method = METHOD_SD;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
WaitPrompt((char*) "Checking USB");
|
||||
|
||||
|
||||
if(diropen(ROOTUSBDIR))
|
||||
{
|
||||
WaitPrompt((char*) "Found USB!");
|
||||
method = METHOD_USB;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
WaitPrompt((char*) "Checking Slot A");
|
||||
|
||||
|
||||
// check Memory Card Slot A
|
||||
if(MountCard(CARD_SLOTA, SILENT) == 0)
|
||||
{
|
||||
WaitPrompt((char*) "Found Memory Card A!");
|
||||
method = METHOD_MC_SLOTA;
|
||||
break;
|
||||
}
|
||||
}
|
||||
WaitPrompt((char*) "Checking Slot B");
|
||||
|
||||
|
||||
// check Memory Card Slot B
|
||||
if(MountCard(CARD_SLOTB, SILENT) == 0)
|
||||
{
|
||||
@ -106,7 +106,7 @@ int autoSaveMethod()
|
||||
method = METHOD_MC_SLOTB;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// no method found
|
||||
WaitPrompt((char*) "Error: Could not determine save method.");
|
||||
method = 0;
|
||||
@ -123,7 +123,7 @@ int autoSaveMethod()
|
||||
void StripExt(char* returnstring, char * inputstring)
|
||||
{
|
||||
char* loc_dot;
|
||||
|
||||
|
||||
strcpy (returnstring, inputstring);
|
||||
loc_dot = strrchr(returnstring,'.');
|
||||
if (loc_dot != NULL)
|
||||
@ -147,10 +147,10 @@ ShowFiles (int offset, int selection)
|
||||
int w;
|
||||
|
||||
clearscreen ();
|
||||
|
||||
|
||||
setfontsize (28);
|
||||
DrawText (-1, 60, (char*)"Choose Game");
|
||||
|
||||
|
||||
setfontsize(18);
|
||||
|
||||
ypos = (screenheight - ((PAGESIZE - 1) * 20)) >> 1;
|
||||
@ -307,8 +307,8 @@ FileSelector (int method)
|
||||
{
|
||||
rootdir = filelist[selection].offset;
|
||||
rootdirlength = filelist[selection].length;
|
||||
|
||||
// store the filename (used for sram/freeze naming)
|
||||
|
||||
// store the filename (used for sram/freeze naming)
|
||||
StripExt(Memory.ROMFilename, filelist[selection].filename); // store stripped filename in Memory.ROMFilename
|
||||
|
||||
switch (method)
|
||||
@ -321,12 +321,12 @@ FileSelector (int method)
|
||||
ARAM_ROMSIZE = LoadFATFile (filelist[selection].filename,
|
||||
filelist[selection].length);
|
||||
break;
|
||||
|
||||
|
||||
case METHOD_DVD:
|
||||
/*** Now load the DVD file to it's offset ***/
|
||||
ARAM_ROMSIZE = LoadDVDFile (Memory.ROM);
|
||||
break;
|
||||
|
||||
|
||||
case METHOD_SMB:
|
||||
/*** Load from SMB ***/
|
||||
ARAM_ROMSIZE =
|
||||
@ -527,7 +527,7 @@ int
|
||||
OpenFAT (int method)
|
||||
{
|
||||
char msg[80];
|
||||
|
||||
|
||||
//if (haveFATdir == 0)
|
||||
//{
|
||||
/* don't mess with DVD entries */
|
||||
@ -569,7 +569,7 @@ int
|
||||
OpenROM (int method)
|
||||
{
|
||||
int loadROM = 0;
|
||||
|
||||
|
||||
if(method == METHOD_AUTO)
|
||||
method = autoLoadMethod();
|
||||
|
||||
@ -588,7 +588,7 @@ OpenROM (int method)
|
||||
loadROM = OpenSMB (method);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return loadROM;
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
#include "snes9xGX.h"
|
||||
#include "video.h"
|
||||
#include "ftfont.h"
|
||||
#include "menudraw.h"
|
||||
#include "s9xconfig.h"
|
||||
#include "audio.h"
|
||||
#include "menu.h"
|
||||
@ -115,7 +115,7 @@ int MountCard(int cslot, bool8 silent)
|
||||
while ( tries < 5 && ret == CARD_ERROR_NOCARD )
|
||||
{
|
||||
EXI_ProbeReset ();
|
||||
|
||||
|
||||
if(!silent)
|
||||
ShowAction ((char*) "Mounting card...");
|
||||
CARD_Unmount (cslot);
|
||||
@ -130,7 +130,7 @@ int MountCard(int cslot, bool8 silent)
|
||||
while ( tries < 5 && ret == CARD_ERROR_UNLOCKED )
|
||||
{
|
||||
EXI_ProbeReset ();
|
||||
|
||||
|
||||
if(!silent)
|
||||
ShowAction ((char*) "Waiting for unlock...");
|
||||
usleep(500000); // wait half second
|
||||
|
@ -28,9 +28,9 @@
|
||||
|
||||
#include "Snes9xGx.h"
|
||||
#include "filesel.h"
|
||||
#include "ftfont.h"
|
||||
#include "menudraw.h"
|
||||
#include "smbload.h"
|
||||
#include "sdload.h"
|
||||
#include "fileop.h"
|
||||
#include "mcsave.h"
|
||||
|
||||
extern "C"
|
||||
|
@ -26,14 +26,13 @@
|
||||
#include "spc7110.h"
|
||||
#include "controls.h"
|
||||
#include "aram.h"
|
||||
#include "ftfont.h"
|
||||
#include "video.h"
|
||||
#include "mcsave.h"
|
||||
#include "filesel.h"
|
||||
#include "unzip.h"
|
||||
#include "smbload.h"
|
||||
#include "mcsave.h"
|
||||
#include "sdload.h"
|
||||
#include "fileop.h"
|
||||
#include "memfile.h"
|
||||
#include "dvd.h"
|
||||
#include "s9xconfig.h"
|
||||
@ -41,8 +40,7 @@
|
||||
#include "preferences.h"
|
||||
|
||||
#include "button_mapping.h"
|
||||
#include "ftfont.h"
|
||||
|
||||
#include "menudraw.h"
|
||||
#include "cheats.h"
|
||||
#include "cheatmgr.h"
|
||||
|
||||
@ -88,7 +86,7 @@ LoadManager ()
|
||||
quickLoadSRAM ( SILENT );
|
||||
else if ( GCSettings.AutoLoad == 2 )
|
||||
quickLoadFreeze ( SILENT );
|
||||
|
||||
|
||||
// setup cheats
|
||||
SetupCheats();
|
||||
}
|
||||
@ -132,7 +130,7 @@ PreferencesMenu ()
|
||||
while (quit == 0)
|
||||
{
|
||||
// some load/save methods are not implemented - here's where we skip them
|
||||
|
||||
|
||||
#ifndef HW_RVL // GameCube mode
|
||||
if(GCSettings.LoadMethod == METHOD_USB)
|
||||
GCSettings.LoadMethod++;
|
||||
@ -142,22 +140,22 @@ PreferencesMenu ()
|
||||
if(GCSettings.LoadMethod == METHOD_DVD)
|
||||
GCSettings.LoadMethod++;
|
||||
#endif
|
||||
|
||||
|
||||
if(GCSettings.SaveMethod == METHOD_DVD) // saving to DVD is impossible
|
||||
GCSettings.SaveMethod++;
|
||||
|
||||
|
||||
if(GCSettings.SaveMethod == METHOD_SMB) // disable SMB - network saving needs some work
|
||||
GCSettings.SaveMethod++;
|
||||
|
||||
|
||||
if(GCSettings.LoadMethod == METHOD_SMB) // disable SMB - network loading needs some work
|
||||
GCSettings.LoadMethod++;
|
||||
|
||||
|
||||
// correct load/save methods out of bounds
|
||||
if(GCSettings.LoadMethod > 4)
|
||||
GCSettings.LoadMethod = 0;
|
||||
if(GCSettings.SaveMethod > 6)
|
||||
GCSettings.SaveMethod = 0;
|
||||
|
||||
|
||||
if (GCSettings.LoadMethod == METHOD_AUTO) sprintf (prefmenu[0],"Load Method AUTO");
|
||||
else if (GCSettings.LoadMethod == METHOD_SD) sprintf (prefmenu[0],"Load Method SD");
|
||||
else if (GCSettings.LoadMethod == METHOD_USB) sprintf (prefmenu[0],"Load Method USB");
|
||||
@ -172,9 +170,9 @@ PreferencesMenu ()
|
||||
else if (GCSettings.SaveMethod == METHOD_SMB) sprintf (prefmenu[2],"Save Method Network");
|
||||
else if (GCSettings.SaveMethod == METHOD_MC_SLOTA) sprintf (prefmenu[2],"Save Method MC Slot A");
|
||||
else if (GCSettings.SaveMethod == METHOD_MC_SLOTB) sprintf (prefmenu[2],"Save Method MC Slot B");
|
||||
|
||||
|
||||
sprintf (prefmenu[3], "Save Folder %s", GCSettings.SaveFolder);
|
||||
|
||||
|
||||
// disable changing load/save directories for now
|
||||
prefmenu[1][0] = '\0';
|
||||
prefmenu[3][0] = '\0';
|
||||
@ -205,10 +203,10 @@ PreferencesMenu ()
|
||||
|
||||
sprintf (prefmenu[11], "C-Stick Zoom %s",
|
||||
GCSettings.NGCZoom == true ? " ON" : "OFF");
|
||||
|
||||
|
||||
sprintf (prefmenu[12], "Video Filtering %s",
|
||||
GCSettings.render == true ? " ON" : "OFF");
|
||||
|
||||
|
||||
ret = RunMenu (prefmenu, prefmenuCount, (char*)"Preferences", 16);
|
||||
|
||||
switch (ret)
|
||||
@ -216,23 +214,23 @@ PreferencesMenu ()
|
||||
case 0:
|
||||
GCSettings.LoadMethod ++;
|
||||
break;
|
||||
|
||||
|
||||
case 1:
|
||||
break;
|
||||
|
||||
|
||||
case 2:
|
||||
GCSettings.SaveMethod ++;
|
||||
break;
|
||||
|
||||
|
||||
case 3:
|
||||
break;
|
||||
|
||||
|
||||
case 4:
|
||||
GCSettings.AutoLoad ++;
|
||||
if (GCSettings.AutoLoad > 2)
|
||||
GCSettings.AutoLoad = 0;
|
||||
break;
|
||||
|
||||
|
||||
case 5:
|
||||
GCSettings.AutoSave ++;
|
||||
if (GCSettings.AutoSave > 3)
|
||||
@ -262,7 +260,7 @@ PreferencesMenu ()
|
||||
case 11:
|
||||
GCSettings.NGCZoom ^= 1;
|
||||
break;
|
||||
|
||||
|
||||
case 12:
|
||||
GCSettings.render ^= 1;
|
||||
break;
|
||||
@ -286,19 +284,19 @@ PreferencesMenu ()
|
||||
****************************************************************************/
|
||||
static int cheatmenuCount = 0;
|
||||
static char cheatmenu[MAX_CHEATS][50];
|
||||
|
||||
|
||||
void CheatMenu()
|
||||
{
|
||||
int ret = -1;
|
||||
int oldmenu = menu;
|
||||
menu = 0;
|
||||
|
||||
|
||||
if(Cheat.num_cheats > 0)
|
||||
{
|
||||
cheatmenuCount = Cheat.num_cheats + 1;
|
||||
|
||||
|
||||
sprintf (cheatmenu[cheatmenuCount-1], "Back to Game Menu");
|
||||
|
||||
|
||||
while(ret != cheatmenuCount-1)
|
||||
{
|
||||
if(ret >= 0)
|
||||
@ -308,10 +306,10 @@ void CheatMenu()
|
||||
else
|
||||
S9xEnableCheat(ret);
|
||||
}
|
||||
|
||||
|
||||
for(uint16 i=0; i < Cheat.num_cheats; i++)
|
||||
sprintf (cheatmenu[i], "%s %s", Cheat.c[i].name, Cheat.c[i].enabled == true ? " ON" : "OFF");
|
||||
|
||||
|
||||
ret = RunMenu (cheatmenu, cheatmenuCount, (char*)"Cheats", 16);
|
||||
}
|
||||
}
|
||||
@ -343,7 +341,7 @@ GameMenu ()
|
||||
int quit = 0;
|
||||
int oldmenu = menu;
|
||||
menu = 0;
|
||||
|
||||
|
||||
while (quit == 0)
|
||||
{
|
||||
ret = RunMenu (gamemenu, gamemenuCount, (char*)"Game Options");
|
||||
@ -393,7 +391,7 @@ GameMenu ()
|
||||
}
|
||||
|
||||
menu = oldmenu;
|
||||
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
@ -649,10 +647,10 @@ ConfigureControllers ()
|
||||
while (quit == 0)
|
||||
{
|
||||
sprintf (ctlrmenu[0], "MultiTap %s", Settings.MultiPlayer5Master == true ? " ON" : "OFF");
|
||||
|
||||
|
||||
if (GCSettings.Superscope > 0)
|
||||
sprintf (ctlrmenu[1], "Superscope: Pad %d", GCSettings.Superscope);
|
||||
else
|
||||
else
|
||||
sprintf (ctlrmenu[1], "Superscope OFF");
|
||||
|
||||
/*** Controller Config Menu ***/
|
||||
@ -806,7 +804,7 @@ mainmenu (int selectedMenu)
|
||||
#endif
|
||||
|
||||
ReInitGCVideo(); // update video after reading settings
|
||||
|
||||
|
||||
Settings.SuperScopeMaster = (GCSettings.Superscope > 0 ? true : false); // update superscope settings
|
||||
// update mouse/justifier info?
|
||||
SetControllers();
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
#include "video.h"
|
||||
#include "ftfont.h"
|
||||
#include "menudraw.h"
|
||||
#include "dkpro.h"
|
||||
#include "snes9xGX.h"
|
||||
|
||||
@ -281,12 +281,12 @@ void
|
||||
Credits ()
|
||||
{
|
||||
clearscreen ();
|
||||
|
||||
|
||||
setfontcolour (0x00, 0x00, 0x00);
|
||||
|
||||
|
||||
setfontsize (28);
|
||||
DrawText (-1, 60, (char*)"Credits");
|
||||
|
||||
DrawText (-1, 60, (char*)"Credits");
|
||||
|
||||
int ypos = 25;
|
||||
|
||||
if (screenheight == 480)
|
||||
@ -296,7 +296,7 @@ Credits ()
|
||||
|
||||
setfontsize (18);
|
||||
DrawText (-1, ypos += 30, (char*)"Technical");
|
||||
|
||||
|
||||
setfontsize (14);
|
||||
DrawText (-1, ypos += 22, (char*)"Snes9x v1.5.1 - Snes9x Team");
|
||||
DrawText (-1, ypos += 18, (char*)"GameCube Port 2.0 WIP6 and earlier - SoftDev");
|
||||
@ -308,16 +308,16 @@ Credits ()
|
||||
|
||||
setfontsize (18);
|
||||
DrawText (-1, ypos += 30, (char*)"Testing");
|
||||
|
||||
|
||||
setfontsize (14);
|
||||
DrawText (-1, ypos += 22, (char*)"crunchy2 / tehskeen users / others");
|
||||
|
||||
setfontsize (18);
|
||||
DrawText (-1, ypos += 30, (char*)"Documentation");
|
||||
|
||||
|
||||
setfontsize (14);
|
||||
DrawText (-1, ypos += 22, (char*)"brakken, crunchy2, michniewski");
|
||||
|
||||
|
||||
setfontsize (12);
|
||||
DrawText (-1, ypos += 50, (char*)"Snes9x - Copyright (c) Snes9x Team 1996 - 2006");
|
||||
DrawText (-1, ypos += 15, (char*)"This software is open source and may be copied, distributed, or modified");
|
@ -17,9 +17,9 @@
|
||||
#include "snes9xGx.h"
|
||||
#include "memmap.h"
|
||||
#include "srtc.h"
|
||||
#include "ftfont.h"
|
||||
#include "menudraw.h"
|
||||
#include "mcsave.h"
|
||||
#include "sdload.h"
|
||||
#include "fileop.h"
|
||||
#include "smbload.h"
|
||||
#include "filesel.h"
|
||||
|
||||
|
@ -21,7 +21,7 @@ extern "C"
|
||||
#include "unzip.h"
|
||||
#include "memmap.h"
|
||||
#include "video.h"
|
||||
#include "ftfont.h"
|
||||
#include "menudraw.h"
|
||||
#include "dvd.h"
|
||||
#include "filesel.h"
|
||||
#include "sram.h"
|
||||
|
@ -181,7 +181,7 @@
|
||||
#include "snes9xGX.h"
|
||||
#include "dvd.h"
|
||||
#include "video.h"
|
||||
#include "ftfont.h"
|
||||
#include "menudraw.h"
|
||||
#include "s9xconfig.h"
|
||||
#include "audio.h"
|
||||
#include "menu.h"
|
||||
@ -190,7 +190,7 @@
|
||||
#include "preferences.h"
|
||||
#include "gctime.h"
|
||||
#include "button_mapping.h"
|
||||
#include "sdload.h"
|
||||
#include "fileop.h"
|
||||
|
||||
unsigned long ARAM_ROMSIZE = 0;
|
||||
int ConfigRequested = 0;
|
||||
@ -260,9 +260,9 @@ unsigned int wmscopemap[] = { WPAD_BUTTON_MINUS, WPAD_BUTTON_B,
|
||||
};
|
||||
|
||||
void UpdateCursorPosition (int pad, int &pos_x, int &pos_y)
|
||||
{
|
||||
{
|
||||
// gc left joystick
|
||||
signed char pad_x = PAD_StickX (pad);
|
||||
signed char pad_x = PAD_StickX (pad);
|
||||
signed char pad_y = PAD_StickY (pad);
|
||||
int SCOPEPADCAL = 30;
|
||||
#ifdef HW_RVL
|
||||
@ -278,16 +278,16 @@ void UpdateCursorPosition (int pad, int &pos_x, int &pos_y)
|
||||
pos_x -=4;
|
||||
if (pos_x < 0) pos_x = 0;
|
||||
}
|
||||
|
||||
|
||||
if (pad_y < -SCOPEPADCAL){
|
||||
pos_y +=4;
|
||||
if (pos_y > 224) pos_y = 224;
|
||||
}
|
||||
if (pad_y > SCOPEPADCAL){
|
||||
pos_y -=4;
|
||||
if (pos_y < 0) pos_y = 0;
|
||||
if (pos_y < 0) pos_y = 0;
|
||||
}
|
||||
|
||||
|
||||
#ifdef HW_RVL
|
||||
// read wiimote IR
|
||||
WPAD_IR(pad, &ir);
|
||||
@ -392,10 +392,10 @@ decodepad (int pad)
|
||||
if ( mag>JOY_THRESHOLD && (ang>220 && ang<320) )
|
||||
wp |= WPAD_CLASSIC_BUTTON_LEFT;
|
||||
if ( mag>JOY_THRESHOLD && (ang>40 && ang<140) )
|
||||
wp |= WPAD_CLASSIC_BUTTON_RIGHT;
|
||||
wp |= WPAD_CLASSIC_BUTTON_RIGHT;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*** Fix offset to pad ***/
|
||||
offset = ((pad + 1) << 4);
|
||||
|
||||
@ -413,7 +413,7 @@ decodepad (int pad)
|
||||
else
|
||||
S9xReportButton (offset + i, false);
|
||||
}
|
||||
|
||||
|
||||
/*** Superscope ***/
|
||||
if (pad == GCSettings.Superscope-1) // report only once
|
||||
{
|
||||
@ -421,7 +421,7 @@ decodepad (int pad)
|
||||
offset = 0x50;
|
||||
for (i = 0; i < 6; i++)
|
||||
{
|
||||
if ( jp & gcscopemap[i]
|
||||
if ( jp & gcscopemap[i]
|
||||
#ifdef HW_RVL
|
||||
|| wp & wmscopemap[i]
|
||||
#endif
|
||||
@ -438,7 +438,7 @@ decodepad (int pad)
|
||||
}
|
||||
/****************************************************************************
|
||||
* setFrameTimerMethod()
|
||||
* change frametimer method depending on whether ROM is NTSC or PAL
|
||||
* change frametimer method depending on whether ROM is NTSC or PAL
|
||||
****************************************************************************/
|
||||
extern u8 vmode_60hz;
|
||||
int timerstyle;
|
||||
@ -446,8 +446,8 @@ int timerstyle;
|
||||
void setFrameTimerMethod()
|
||||
{
|
||||
/*
|
||||
Set frametimer method
|
||||
(timerstyle: 0=NTSC vblank, 1=PAL int timer)
|
||||
Set frametimer method
|
||||
(timerstyle: 0=NTSC vblank, 1=PAL int timer)
|
||||
*/
|
||||
if ( Settings.PAL ) {
|
||||
if(vmode_60hz == 1)
|
||||
@ -466,7 +466,7 @@ void setFrameTimerMethod()
|
||||
}
|
||||
/****************************************************************************
|
||||
* NGCReportButtons
|
||||
* Called on each rendered frame
|
||||
* Called on each rendered frame
|
||||
****************************************************************************/
|
||||
void
|
||||
NGCReportButtons ()
|
||||
@ -482,7 +482,7 @@ NGCReportButtons ()
|
||||
u32 wm_pb = WPAD_ButtonsHeld (0); // wiimote / expansion button info
|
||||
wpad_get_analogues(0, &mag1, &ang1, &mag2, &ang2); // get joystick info from wii expansions
|
||||
#endif
|
||||
|
||||
|
||||
/*** Check for video zoom ***/
|
||||
if (GCSettings.NGCZoom)
|
||||
{
|
||||
@ -496,15 +496,15 @@ NGCReportButtons ()
|
||||
#endif
|
||||
}
|
||||
|
||||
Settings.TurboMode = ( (gc_px > 70)
|
||||
Settings.TurboMode = ( (gc_px > 70)
|
||||
#ifdef HW_RVL
|
||||
|| (mag2>JOY_THRESHOLD && ang2>75 && ang2<115)
|
||||
|| (mag2>JOY_THRESHOLD && ang2>75 && ang2<115)
|
||||
#endif
|
||||
); // RIGHT on c-stick and on classic ctrlr right joystick
|
||||
|
||||
/*** Check for menu:
|
||||
CStick left
|
||||
OR "L+R+X+Y" (eg. Hombrew/Adapted SNES controllers)
|
||||
OR "L+R+X+Y" (eg. Hombrew/Adapted SNES controllers)
|
||||
OR "Home" on the wiimote or classic controller ***/
|
||||
|
||||
if ((gc_px < -70) ||
|
||||
@ -519,9 +519,9 @@ NGCReportButtons ()
|
||||
)
|
||||
{
|
||||
ConfigRequested = 1;
|
||||
|
||||
|
||||
VIDEO_WaitVSync ();
|
||||
|
||||
|
||||
if ( GCSettings.AutoSave == 1 )
|
||||
{
|
||||
quickSaveSRAM ( SILENT );
|
||||
@ -539,16 +539,16 @@ NGCReportButtons ()
|
||||
quickSaveFreeze ( SILENT );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
mainmenu (3); // go to game menu
|
||||
FrameTimer = 0;
|
||||
ConfigRequested = 0;
|
||||
|
||||
|
||||
setFrameTimerMethod(); // set frametimer method every time a ROM is loaded
|
||||
|
||||
|
||||
S9xReportControllers(); // FIX
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -562,7 +562,7 @@ NGCReportButtons ()
|
||||
* wpad_get_analogues()
|
||||
*
|
||||
* gets the analogue stick magnitude and angle values (
|
||||
* from classic or nunchuk expansions)
|
||||
* from classic or nunchuk expansions)
|
||||
****************************************************************************/
|
||||
u32 wpad_get_analogues(int pad, float* mag1, u16* ang1, float* mag2, u16* ang2)
|
||||
{
|
||||
@ -571,7 +571,7 @@ u32 wpad_get_analogues(int pad, float* mag1, u16* ang1, float* mag2, u16* ang2)
|
||||
#ifdef HW_RVL
|
||||
struct expansion_t exp;
|
||||
memset( &exp, 0, sizeof(exp) );
|
||||
|
||||
|
||||
if ( WPAD_Probe( pad, &exp_type) == 0) // check wiimote and expansion status (first if wiimote is connected & no errors)
|
||||
{
|
||||
WPAD_Expansion(pad, &exp); // expansion connected. get info
|
||||
@ -596,14 +596,14 @@ void SetControllers ()
|
||||
{
|
||||
if (Settings.MultiPlayer5Master == true)
|
||||
{
|
||||
|
||||
|
||||
S9xSetController (0, CTL_JOYPAD, 0, 0, 0, 0);
|
||||
S9xSetController (1, CTL_MP5, 1, 2, 3, -1);
|
||||
}
|
||||
else if (Settings.SuperScopeMaster == true)
|
||||
{
|
||||
S9xSetController (0, CTL_JOYPAD, 0, 0, 0, 0);
|
||||
S9xSetController (1, CTL_SUPERSCOPE, 1, 0, 0, 0);
|
||||
S9xSetController (1, CTL_SUPERSCOPE, 1, 0, 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -681,7 +681,7 @@ SetDefaultButtonMap ()
|
||||
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad4 Down");
|
||||
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad4 Left");
|
||||
ASSIGN_BUTTON_FALSE (maxcode++, "Joypad4 Right");
|
||||
|
||||
|
||||
maxcode = 0x50;
|
||||
/*** Superscope ***/
|
||||
ASSIGN_BUTTON_FALSE (maxcode++, "Superscope AimOffscreen");
|
||||
@ -689,11 +689,11 @@ SetDefaultButtonMap ()
|
||||
ASSIGN_BUTTON_FALSE (maxcode++, "Superscope Cursor");
|
||||
ASSIGN_BUTTON_FALSE (maxcode++, "Superscope ToggleTurbo");
|
||||
ASSIGN_BUTTON_FALSE (maxcode++, "Superscope Pause");
|
||||
|
||||
|
||||
maxcode = 0x60;
|
||||
S9xMapPointer( maxcode++, S9xGetCommandT("Pointer Superscope"), false);
|
||||
// add mouses here
|
||||
|
||||
|
||||
SetControllers ();
|
||||
|
||||
}
|
||||
@ -757,7 +757,7 @@ main ()
|
||||
fatInitDefault();
|
||||
//fatInit(8192, false);
|
||||
//fat_enable_readahead_all();
|
||||
|
||||
|
||||
/*** Initialize DVD subsystem ***/
|
||||
DVD_Init ();
|
||||
|
||||
|
@ -17,9 +17,9 @@
|
||||
#include "snes9xGx.h"
|
||||
#include "memmap.h"
|
||||
#include "srtc.h"
|
||||
#include "ftfont.h"
|
||||
#include "menudraw.h"
|
||||
#include "mcsave.h"
|
||||
#include "sdload.h"
|
||||
#include "fileop.h"
|
||||
#include "smbload.h"
|
||||
#include "filesel.h"
|
||||
|
||||
@ -254,7 +254,7 @@ LoadSRAM (int method, bool silent)
|
||||
sprintf (filepath, "%s/%s/%s.srm", ROOTSDDIR, GCSettings.SaveFolder, Memory.ROMFilename);
|
||||
else
|
||||
sprintf (filepath, "%s/%s/%s.srm", ROOTUSBDIR, GCSettings.SaveFolder, Memory.ROMFilename);
|
||||
|
||||
|
||||
offset = LoadBufferFromFAT (filepath, silent);
|
||||
}
|
||||
else if(method == METHOD_SMB)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* Snes9x 1.50
|
||||
* Snes9x 1.50
|
||||
*
|
||||
* Nintendo Gamecube Unzip - borrowed from the GPP
|
||||
*
|
||||
@ -12,7 +12,7 @@
|
||||
#include <zlib.h>
|
||||
#include "dvd.h"
|
||||
#include "video.h"
|
||||
#include "ftfont.h"
|
||||
#include "menudraw.h"
|
||||
#include "unzip.h"
|
||||
|
||||
/*
|
||||
@ -100,7 +100,7 @@ UnZipBuffer (unsigned char *outbuffer, u64 discoffset, short where, FILE* fileha
|
||||
memcpy (&pkzip, readbuffer, sizeof (PKZIPHEADER));
|
||||
|
||||
pkzip.uncompressedSize = FLIP32 (pkzip.uncompressedSize);
|
||||
|
||||
|
||||
sprintf (msg, "Unzipping %d bytes ... Wait",
|
||||
pkzip.uncompressedSize);
|
||||
ShowAction (msg);
|
||||
@ -157,7 +157,7 @@ UnZipBuffer (unsigned char *outbuffer, u64 discoffset, short where, FILE* fileha
|
||||
/*** Readup the next 2k block ***/
|
||||
zipoffset = 0;
|
||||
zipchunk = ZIPCHUNK;
|
||||
|
||||
|
||||
switch (where) {
|
||||
case 0: // SD Card
|
||||
fread (readbuffer, 1, 2048, filehandle); break;
|
||||
@ -165,7 +165,7 @@ UnZipBuffer (unsigned char *outbuffer, u64 discoffset, short where, FILE* fileha
|
||||
discoffset += 2048;
|
||||
dvd_read (readbuffer, 2048, discoffset); break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
while (res != Z_STREAM_END);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user