aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/glk/glulxe/glulxe.h12
-rw-r--r--engines/glk/glulxe/glulxe_types.h10
2 files changed, 16 insertions, 6 deletions
diff --git a/engines/glk/glulxe/glulxe.h b/engines/glk/glulxe/glulxe.h
index 358563f00b..81095dc0b5 100644
--- a/engines/glk/glulxe/glulxe.h
+++ b/engines/glk/glulxe/glulxe.h
@@ -831,7 +831,7 @@ public:
#if VM_DEBUGGER
unsigned long debugger_opcount;
-#define debugger_tick() (debugger_opcount++)
+ void debugger_tick() { debugger_opcount++ }
int debugger_load_info_stream(strid_t stream);
int debugger_load_info_chunk(strid_t stream, uint pos, uint len);
void debugger_track_cpu(int flag);
@@ -848,11 +848,11 @@ public:
void debugger_handle_crash(char *msg);
void debugger_handle_quit();
#else /* VM_DEBUGGER */
-#define debugger_tick() (0)
-#define debugger_check_story_file() (0)
-#define debugger_setup_start_state() (0)
-#define debugger_check_func_breakpoint(addr) (0)
-#define debugger_handle_crash(msg) (0)
+ void debugger_tick() {}
+ void debugger_check_story_file() {}
+ void debugger_setup_start_state() {}
+ void debugger_check_func_breakpoint(uint addr) {}
+ void debugger_handle_crash(const char *msg) {}
#endif /* VM_DEBUGGER */
/**@}*/
diff --git a/engines/glk/glulxe/glulxe_types.h b/engines/glk/glulxe/glulxe_types.h
index d57600edb7..45596bc009 100644
--- a/engines/glk/glulxe/glulxe_types.h
+++ b/engines/glk/glulxe/glulxe_types.h
@@ -96,6 +96,16 @@ class Glulxe;
#define MemW2(adr, vl) (VerifyW(adr, 2), Write2(memmap+(adr), (vl)))
#define MemW4(adr, vl) (VerifyW(adr, 4), Write4(memmap+(adr), (vl)))
+#ifndef _HUGE_ENUF
+#define _HUGE_ENUF 1e+300 // _HUGE_ENUF*_HUGE_ENUF must overflow
+#endif
+#ifndef INFINITY
+#define INFINITY ((float)(_HUGE_ENUF * _HUGE_ENUF))
+#endif
+#ifndef NAN
+#define NAN ((float)(INFINITY * 0.0F))
+#endif
+
/**
* Macros to access values on the stack. These *must* be used with proper alignment!
* (That is, Stk4 and StkW4 must take addresses which are multiples of four, etc.)