[Scummvm-git-logs] scummvm master -> 70761c707bb45ad8edb8273588f96b31b84ecf6c

dreammaster paulfgilbert at gmail.com
Thu Apr 18 16:25:08 CEST 2019


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
70761c707b GLK: GLULXE: More compilation fixes


Commit: 70761c707bb45ad8edb8273588f96b31b84ecf6c
    https://github.com/scummvm/scummvm/commit/70761c707bb45ad8edb8273588f96b31b84ecf6c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2019-04-18T07:24:46-07:00

Commit Message:
GLK: GLULXE: More compilation fixes

Changed paths:
    engines/glk/glulxe/glulxe.h
    engines/glk/glulxe/glulxe_types.h


diff --git a/engines/glk/glulxe/glulxe.h b/engines/glk/glulxe/glulxe.h
index 358563f..81095dc 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 d57600e..45596bc 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.)





More information about the Scummvm-git-logs mailing list