fceugx/source/ngc/fceuconfig.cpp

92 lines
3.1 KiB
C++
Raw Normal View History

2008-09-02 03:57:21 +02:00
/****************************************************************************
* FCE Ultra 0.98.12
* Nintendo Wii/Gamecube Port
*
2009-03-28 18:23:08 +01:00
* Tantric 2008-2009
2008-09-02 03:57:21 +02:00
*
2009-03-28 18:23:08 +01:00
* fceuconfig.cpp
2008-09-02 03:57:21 +02:00
*
* Configuration parameters
****************************************************************************/
#include <gccore.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "common.h"
#include "fceugx.h"
#include "pad.h"
2008-09-02 03:57:21 +02:00
struct SGCSettings GCSettings;
2009-03-28 18:23:08 +01:00
/****************************************************************************
* FixInvalidSettings
*
* Attempts to correct at least some invalid settings - the ones that
* might cause crashes
***************************************************************************/
void FixInvalidSettings()
{
if(!(GCSettings.ZoomLevel > 0.5 && GCSettings.ZoomLevel < 1.5))
GCSettings.ZoomLevel = 1.0;
if(!(GCSettings.xshift > -50 && GCSettings.xshift < 50))
GCSettings.xshift = 0;
if(!(GCSettings.yshift > -50 && GCSettings.yshift < 50))
GCSettings.yshift = 0;
if(!(GCSettings.MusicVolume >= 0 && GCSettings.MusicVolume <= 100))
GCSettings.MusicVolume = 40;
if(!(GCSettings.SFXVolume >= 0 && GCSettings.SFXVolume <= 100))
GCSettings.SFXVolume = 40;
2009-03-28 20:33:14 +01:00
if(GCSettings.Controller > CTRL_PAD4 || GCSettings.Controller < CTRL_ZAPPER)
GCSettings.Controller = CTRL_PAD2;
2009-03-28 18:23:08 +01:00
}
/****************************************************************************
* DefaultSettings
*
* Sets all the defaults!
***************************************************************************/
2008-09-02 03:57:21 +02:00
void
DefaultSettings ()
{
ResetControls(); // controller button mappings
2008-09-02 03:57:21 +02:00
GCSettings.currpal = 0;
GCSettings.timing = 0; // 0 - NTSC, 1 - PAL
2009-03-28 18:23:08 +01:00
GCSettings.Controller = CTRL_PAD2; // NES pad, Four Score, Zapper
GCSettings.crosshair = 1;
2008-10-24 07:38:46 +02:00
GCSettings.ZoomLevel = 1.0; // zoom amount
GCSettings.render = 2; // Unfiltered
GCSettings.widescreen = 0; // no aspect ratio correction
2008-11-10 04:36:21 +01:00
GCSettings.hideoverscan = 2; // hide both horizontal and vertical
2008-09-02 03:57:21 +02:00
2009-03-28 18:23:08 +01:00
GCSettings.xshift = 0; // horizontal video shift
GCSettings.yshift = 0; // vertical video shift
GCSettings.WiimoteOrientation = 0;
GCSettings.ExitAction = 0;
GCSettings.MusicVolume = 40;
GCSettings.SFXVolume = 40;
2009-01-26 08:10:20 +01:00
2008-09-02 03:57:21 +02:00
GCSettings.LoadMethod = METHOD_AUTO; // Auto, SD, DVD, USB, Network (SMB)
GCSettings.SaveMethod = METHOD_AUTO; // Auto, SD, Memory Card Slot A, Memory Card Slot B, USB, Network (SMB)
sprintf (GCSettings.LoadFolder,"fceugx/roms"); // Path to game files
sprintf (GCSettings.SaveFolder,"fceugx/saves"); // Path to save files
sprintf (GCSettings.CheatFolder,"fceugx/cheats"); // Path to cheat files
GCSettings.AutoLoad = 1; // Auto Load RAM
GCSettings.AutoSave = 1; // Auto Save RAM
2008-09-02 03:57:21 +02:00
// custom SMB settings
strncpy (GCSettings.smbip, "", 15); // IP Address of share server
strncpy (GCSettings.smbuser, "", 19); // Your share user
strncpy (GCSettings.smbpwd, "", 19); // Your share user password
strncpy (GCSettings.smbshare, "", 19); // Share name on server
GCSettings.smbip[15] = 0;
GCSettings.smbuser[19] = 0;
GCSettings.smbpwd[19] = 0;
GCSettings.smbshare[19] = 0;
2008-09-02 03:57:21 +02:00
}