mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-28 05:24:21 +01:00
fixed the option to disable the aiming crosshair, fixed support for
128kb backup files (thanks Tanooki16!)
This commit is contained in:
parent
5bff07b305
commit
8aa8e4ce74
@ -24,6 +24,10 @@
|
|||||||
#include "netplay.h"
|
#include "netplay.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef GEKKO
|
||||||
|
#include "snes9xgx.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
#define NONE (-2)
|
#define NONE (-2)
|
||||||
@ -3202,6 +3206,9 @@ void S9xControlEOF (void)
|
|||||||
DoGunLatch(superscope.x, superscope.y);
|
DoGunLatch(superscope.x, superscope.y);
|
||||||
|
|
||||||
c = &superscope.crosshair;
|
c = &superscope.crosshair;
|
||||||
|
#ifdef GEKKO
|
||||||
|
if(GCSettings.crosshair)
|
||||||
|
#endif
|
||||||
if (IPPU.RenderThisFrame)
|
if (IPPU.RenderThisFrame)
|
||||||
S9xDrawCrosshair(S9xGetCrosshair(c->img), c->fg, c->bg, superscope.x, superscope.y);
|
S9xDrawCrosshair(S9xGetCrosshair(c->img), c->fg, c->bg, superscope.x, superscope.y);
|
||||||
}
|
}
|
||||||
@ -3212,6 +3219,9 @@ void S9xControlEOF (void)
|
|||||||
if (n == 1 && !justifier.offscreen[1])
|
if (n == 1 && !justifier.offscreen[1])
|
||||||
{
|
{
|
||||||
c = &justifier.crosshair[1];
|
c = &justifier.crosshair[1];
|
||||||
|
#ifdef GEKKO
|
||||||
|
if(GCSettings.crosshair)
|
||||||
|
#endif
|
||||||
if (IPPU.RenderThisFrame)
|
if (IPPU.RenderThisFrame)
|
||||||
S9xDrawCrosshair(S9xGetCrosshair(c->img), c->fg, c->bg, justifier.x[1], justifier.y[1]);
|
S9xDrawCrosshair(S9xGetCrosshair(c->img), c->fg, c->bg, justifier.x[1], justifier.y[1]);
|
||||||
}
|
}
|
||||||
@ -3231,6 +3241,9 @@ void S9xControlEOF (void)
|
|||||||
if (!justifier.offscreen[0])
|
if (!justifier.offscreen[0])
|
||||||
{
|
{
|
||||||
c = &justifier.crosshair[0];
|
c = &justifier.crosshair[0];
|
||||||
|
#ifdef GEKKO
|
||||||
|
if(GCSettings.crosshair)
|
||||||
|
#endif
|
||||||
if (IPPU.RenderThisFrame)
|
if (IPPU.RenderThisFrame)
|
||||||
S9xDrawCrosshair(S9xGetCrosshair(c->img), c->fg, c->bg, justifier.x[0], justifier.y[0]);
|
S9xDrawCrosshair(S9xGetCrosshair(c->img), c->fg, c->bg, justifier.x[0], justifier.y[0]);
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,9 @@
|
|||||||
#include "snes9x/memmap.h"
|
#include "snes9x/memmap.h"
|
||||||
#include "snes9x/srtc.h"
|
#include "snes9x/srtc.h"
|
||||||
|
|
||||||
|
bool HiROM;
|
||||||
|
bool LoROM;
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Load SRAM
|
* Load SRAM
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
@ -41,12 +44,14 @@ LoadSRAM (char * filepath, bool silent)
|
|||||||
|
|
||||||
int size = Memory.SRAMSize ? (1 << (Memory.SRAMSize + 3)) * 128 : 0;
|
int size = Memory.SRAMSize ? (1 << (Memory.SRAMSize + 3)) * 128 : 0;
|
||||||
|
|
||||||
if (size > 0x20000)
|
if (LoROM)
|
||||||
size = 0x20000;
|
size = size < 0x70000 ? size : 0x70000;
|
||||||
|
else if (HiROM)
|
||||||
|
size = size < 0x40000 ? size : 0x40000;
|
||||||
|
|
||||||
if (size)
|
if (size)
|
||||||
{
|
{
|
||||||
len = LoadFile((char *)Memory.SRAM, filepath, 0, 0x20000, silent);
|
len = LoadFile((char *)Memory.SRAM, filepath, 0, size, silent);
|
||||||
|
|
||||||
if (len > 0)
|
if (len > 0)
|
||||||
{
|
{
|
||||||
@ -120,8 +125,10 @@ SaveSRAM (char * filepath, bool silent)
|
|||||||
// determine SRAM size
|
// determine SRAM size
|
||||||
int size = Memory.SRAMSize ? (1 << (Memory.SRAMSize + 3)) * 128 : 0;
|
int size = Memory.SRAMSize ? (1 << (Memory.SRAMSize + 3)) * 128 : 0;
|
||||||
|
|
||||||
if (size > 0x20000)
|
if (LoROM)
|
||||||
size = 0x20000;
|
size = size < 0x70000 ? size : 0x70000;
|
||||||
|
else if (HiROM)
|
||||||
|
size = size < 0x40000 ? size : 0x40000;
|
||||||
|
|
||||||
if (size > 0)
|
if (size > 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user