summaryrefslogtreecommitdiff
path: root/gme
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-08-05 20:56:19 +0200
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-08-05 20:56:19 +0200
commit8f749dbc5721172d1e5cf9742955fb429fa0062a (patch)
tree2736c4e4700e7e1ed87c39e425e7d2787acc73c1 /gme
parentebacbd95aee9ab9693b0518f700ae64e9106512d (diff)
fixed clicking triangle channel in gme
Diffstat (limited to 'gme')
-rw-r--r--gme/Hes_Cpu.h3
-rw-r--r--gme/Jamfile1
-rw-r--r--gme/blargg_common.h6
3 files changed, 6 insertions, 4 deletions
diff --git a/gme/Hes_Cpu.h b/gme/Hes_Cpu.h
index c49570d0..437d0908 100644
--- a/gme/Hes_Cpu.h
+++ b/gme/Hes_Cpu.h
@@ -5,10 +5,11 @@
#define HES_CPU_H
#include "blargg_common.h"
+#include <limits.h>
typedef blargg_long hes_time_t; // clock cycle count
typedef unsigned hes_addr_t; // 16-bit address
-#define future_hes_time (LONG_MAX / 2 + 1)
+enum { future_hes_time = LONG_MAX / 2 + 1 };
class Hes_Cpu {
public:
diff --git a/gme/Jamfile b/gme/Jamfile
index 2413c50d..69d69ace 100644
--- a/gme/Jamfile
+++ b/gme/Jamfile
@@ -1,4 +1,5 @@
SubDir ROOT gme ;
+C++FLAGS += -DHAVE_STDINT_H ;
Library libgme : Ay_Apu.cpp Gb_Apu.cpp Hes_Emu.cpp Nes_Fme7_Apu.cpp Sms_Apu.cpp
Ay_Cpu.cpp Gb_Cpu.cpp Kss_Cpu.cpp Nes_Namco_Apu.cpp Snes_Spc.cpp
diff --git a/gme/blargg_common.h b/gme/blargg_common.h
index 56ef653d..493c231a 100644
--- a/gme/blargg_common.h
+++ b/gme/blargg_common.h
@@ -15,9 +15,6 @@
#ifndef BLARGG_COMMON_H
#define BLARGG_COMMON_H
-#undef LONG_MAX
-#define LONG_MAX 0x7fffffff
-
// STATIC_CAST(T,expr): Used in place of static_cast<T> (expr)
#ifndef STATIC_CAST
#define STATIC_CAST(T,expr) ((T) (expr))
@@ -115,11 +112,14 @@ public:
// blargg_long/blargg_ulong = at least 32 bits, int if it's big enough
#include <limits.h>
+#if 0
#if INT_MAX >= 0x7FFFFFFF
typedef int blargg_long;
#else
typedef long blargg_long;
#endif
+#endif
+typedef int64_t blargg_long;
#if UINT_MAX >= 0xFFFFFFFF
typedef unsigned blargg_ulong;