mirror of
https://github.com/RetroDECK/Supermodel.git
synced 2025-04-10 19:15:14 +00:00
- Forgot to add OSDConfig.h.
- Changed more C standard library headers to C++ versions.
This commit is contained in:
parent
d318efe58c
commit
dbc1dbb0e8
|
@ -26,8 +26,8 @@
|
||||||
* class.
|
* class.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
#include <string.h>
|
#include <cstring>
|
||||||
#include "Supermodel.h"
|
#include "Supermodel.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -29,10 +29,10 @@
|
||||||
* not sure whether any other kinds of instructions need checking.
|
* not sure whether any other kinds of instructions need checking.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
#include <string.h>
|
#include <cstring>
|
||||||
#ifdef STANDALONE
|
#ifdef STANDALONE
|
||||||
#include <stdlib.h>
|
#include <cstdlib>
|
||||||
#endif
|
#endif
|
||||||
#include "Supermodel.h"
|
#include "Supermodel.h"
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
/* IBM/Motorola PowerPC 4xx/6xx Emulator */
|
/* IBM/Motorola PowerPC 4xx/6xx Emulator */
|
||||||
|
|
||||||
#include <string.h> // memset()
|
#include <cstring> // memset()
|
||||||
#include "Supermodel.h"
|
#include "Supermodel.h"
|
||||||
#include "ppc.h"
|
#include "ppc.h"
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
#include "Supermodel.h"
|
#include "Supermodel.h"
|
||||||
|
|
||||||
|
|
||||||
const struct GameInfo Model3GameList[] =
|
const struct GameInfo g_Model3GameList[] =
|
||||||
{
|
{
|
||||||
// Sega Bass Fishing
|
// Sega Bass Fishing
|
||||||
{
|
{
|
||||||
|
|
|
@ -91,7 +91,7 @@ struct GameInfo
|
||||||
performance reasons (but the ROMs are not specified that way here).
|
performance reasons (but the ROMs are not specified that way here).
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
extern const struct GameInfo Model3GameList[];
|
extern const struct GameInfo g_Model3GameList[];
|
||||||
|
|
||||||
|
|
||||||
#endif // INCLUDED_GAMES_H
|
#endif // INCLUDED_GAMES_H
|
|
@ -48,7 +48,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <cstring>
|
||||||
#include "Supermodel.h"
|
#include "Supermodel.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@
|
||||||
* endian, pushing the responsibility onto the caller.
|
* endian, pushing the responsibility onto the caller.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <cstring>
|
||||||
#include "Supermodel.h"
|
#include "Supermodel.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
* manually reverse the data. This keeps with the convention for VRAM.
|
* manually reverse the data. This keeps with the convention for VRAM.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <string.h>
|
#include <cstring>
|
||||||
#include "Supermodel.h"
|
#include "Supermodel.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -509,7 +509,7 @@ int Supermodel(const char *zipFile, CInputs *Inputs, CINIFile *CmdLine)
|
||||||
// Initialize and load ROMs
|
// Initialize and load ROMs
|
||||||
if (OKAY != Model3->Init())
|
if (OKAY != Model3->Init())
|
||||||
return 1;
|
return 1;
|
||||||
if (OKAY != Model3->LoadROMSet(Model3GameList, zipFile))
|
if (OKAY != Model3->LoadROMSet(g_Model3GameList, zipFile))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
// Apply game-specific settings and then, lastly, command line settings
|
// Apply game-specific settings and then, lastly, command line settings
|
||||||
|
@ -797,7 +797,7 @@ static int DisassembleCROM(const char *zipFile, UINT32 addr, unsigned n)
|
||||||
Map[1].ptr = &crom[0x800000];
|
Map[1].ptr = &crom[0x800000];
|
||||||
|
|
||||||
// Load ROM set
|
// Load ROM set
|
||||||
Game = LoadROMSetFromZIPFile(Map, Model3GameList, zipFile, FALSE);
|
Game = LoadROMSetFromZIPFile(Map, g_Model3GameList, zipFile, FALSE);
|
||||||
if (NULL == Game)
|
if (NULL == Game)
|
||||||
return ErrorLog("Failed to load ROM set.");
|
return ErrorLog("Failed to load ROM set.");
|
||||||
|
|
||||||
|
@ -961,12 +961,12 @@ static void PrintGameList(void)
|
||||||
puts("");
|
puts("");
|
||||||
puts(" ROM Set Title");
|
puts(" ROM Set Title");
|
||||||
puts(" ------- -----");
|
puts(" ------- -----");
|
||||||
for (i = 0; Model3GameList[i].title != NULL; i++)
|
for (i = 0; g_Model3GameList[i].title != NULL; i++)
|
||||||
{
|
{
|
||||||
printf(" %s", Model3GameList[i].id);
|
printf(" %s", g_Model3GameList[i].id);
|
||||||
for (j = strlen(Model3GameList[i].id); j < 9; j++) // pad for alignment (no game ID is more than 9 letters)
|
for (j = strlen(g_Model3GameList[i].id); j < 9; j++) // pad for alignment (no game ID is more than 9 letters)
|
||||||
printf(" ");
|
printf(" ");
|
||||||
printf(" %s\n", Model3GameList[i].title);
|
printf(" %s\n", g_Model3GameList[i].title);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
102
Src/OSD/SDL/OSDConfig.h
Normal file
102
Src/OSD/SDL/OSDConfig.h
Normal file
|
@ -0,0 +1,102 @@
|
||||||
|
/**
|
||||||
|
** Supermodel
|
||||||
|
** A Sega Model 3 Arcade Emulator.
|
||||||
|
** Copyright 2011 Bart Trzynadlowski
|
||||||
|
**
|
||||||
|
** This file is part of Supermodel.
|
||||||
|
**
|
||||||
|
** Supermodel is free software: you can redistribute it and/or modify it under
|
||||||
|
** the terms of the GNU General Public License as published by the Free
|
||||||
|
** Software Foundation, either version 3 of the License, or (at your option)
|
||||||
|
** any later version.
|
||||||
|
**
|
||||||
|
** Supermodel is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
** ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
** FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
** more details.
|
||||||
|
**
|
||||||
|
** You should have received a copy of the GNU General Public License along
|
||||||
|
** with Supermodel. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
**/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* OSDConfig.h
|
||||||
|
*
|
||||||
|
* Header file defining the COSDConfig class: OSD configuration settings,
|
||||||
|
* inherited by CConfig.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef INCLUDED_OSDCONFIG_H
|
||||||
|
#define INCLUDED_OSDCONFIG_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include "Supermodel.h"
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* COSDConfig:
|
||||||
|
*
|
||||||
|
* Settings used by COSDConfig.
|
||||||
|
*/
|
||||||
|
class COSDConfig
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
unsigned xRes, yRes; // X and Y resolution, in pixels
|
||||||
|
bool fullScreen; // Full screen mode (if TRUE)
|
||||||
|
bool throttle; // 60 Hz frame limiting
|
||||||
|
bool showFPS; // Show frame rate
|
||||||
|
|
||||||
|
#ifdef SUPERMODEL_DEBUGGER
|
||||||
|
bool disableDebugger; // disables the debugger (not stored in the config. file)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Input system
|
||||||
|
inline void SetInputSystem(const char *inpSysName)
|
||||||
|
{
|
||||||
|
if (inpSysName == NULL)
|
||||||
|
{
|
||||||
|
inputSystem = "sdl";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (stricmp(inpSysName,"sdl")
|
||||||
|
#ifdef SUPERMODEL_WIN32
|
||||||
|
&& stricmp(inpSysName,"dinput") && stricmp(inpSysName,"xinput") && stricmp(inpSysName,"rawinput")
|
||||||
|
#endif
|
||||||
|
)
|
||||||
|
{
|
||||||
|
ErrorLog("Unknown input system (%s), defaulting to SDL.", inpSysName);
|
||||||
|
inputSystem = "sdl";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
inputSystem = inpSysName;
|
||||||
|
}
|
||||||
|
|
||||||
|
inline const char *GetInputSystem(void)
|
||||||
|
{
|
||||||
|
return inputSystem.c_str();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Defaults
|
||||||
|
COSDConfig(void)
|
||||||
|
{
|
||||||
|
xRes = 496;
|
||||||
|
yRes = 384;
|
||||||
|
fullScreen = false;
|
||||||
|
throttle = true;
|
||||||
|
showFPS = false;
|
||||||
|
#ifdef SUPERMODEL_DEBUGGER
|
||||||
|
disableDebugger = false;
|
||||||
|
#endif
|
||||||
|
inputSystem = "sdl";
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
string inputSystem;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif // INCLUDED_OSDCONFIG_H
|
|
@ -26,7 +26,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <new>
|
#include <new>
|
||||||
#include <string.h>
|
#include <cstring>
|
||||||
#include "Supermodel.h"
|
#include "Supermodel.h"
|
||||||
#include "Pkgs/unzip.h"
|
#include "Pkgs/unzip.h"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue