From 606092c9b5c452832968b2038bcd4289ea2256c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Ko=C5=82odziejski?= Date: Sat, 28 Jan 2012 10:51:34 +0100 Subject: [PATCH] GRIM: rename TARGET_64BITS to SCUMM_64BITS --- engines/grim/lua/lrestore.cpp | 6 +++--- engines/grim/lua/lsave.cpp | 4 ++-- engines/grim/lua/lstring.cpp | 6 +++--- engines/grim/lua/ltable.cpp | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/engines/grim/lua/lrestore.cpp b/engines/grim/lua/lrestore.cpp index e84db9a7b86..54b82297505 100644 --- a/engines/grim/lua/lrestore.cpp +++ b/engines/grim/lua/lrestore.cpp @@ -111,7 +111,7 @@ struct ArrayIDObj { }; static int sortCallback(const void *id1, const void *id2) { -#ifdef TARGET_64BITS +#ifdef SCUMM_64BITS uint64 p1 = ((ArrayIDObj *)id1)->idObj.low | ((uint64)(((ArrayIDObj *)id1)->idObj.hi)) << 32; uint64 p2 = ((ArrayIDObj *)id2)->idObj.low | ((uint64)(((ArrayIDObj *)id2)->idObj.hi)) << 32; if (p1 > p2) { @@ -144,7 +144,7 @@ static bool arraysAllreadySort = false; static void recreateObj(TObject *obj) { if (obj->ttype == LUA_T_CPROTO) { -#ifdef TARGET_64BITS +#ifdef SCUMM_64BITS uint64 id = ((uint64)(obj->value.f)) >> 16; #else uint32 id = ((uint32)(obj->value.f)) >> 16; @@ -157,7 +157,7 @@ static void recreateObj(TObject *obj) { list = list->next; } -#ifdef TARGET_64BITS +#ifdef SCUMM_64BITS int32 numberFunc = (uint64)(obj->value.f) & 0xffff; #else int32 numberFunc = (uint32)(obj->value.f) & 0xffff; diff --git a/engines/grim/lua/lsave.cpp b/engines/grim/lua/lsave.cpp index 158d7a1cc3b..673fed2f87f 100644 --- a/engines/grim/lua/lsave.cpp +++ b/engines/grim/lua/lsave.cpp @@ -22,7 +22,7 @@ namespace Grim { PointerId makeIdFromPointer(void *ptr) { PointerId pointer; -#ifdef TARGET_64BITS +#ifdef SCUMM_64BITS uint64 v = (uint64)ptr; pointer.low = v & 0xffffffff; pointer.hi = v >> 32; @@ -37,7 +37,7 @@ PointerId makeIdFromPointer(void *ptr) { void *makePointerFromId(PointerId ptr) { void *pointer; -#ifdef TARGET_64BITS +#ifdef SCUMM_64BITS uint64 v = ptr.low | ((uint64)ptr.hi << 32); pointer = (void *)v; #else diff --git a/engines/grim/lua/lstring.cpp b/engines/grim/lua/lstring.cpp index 1b93c06d5f0..fe5c7c34f07 100644 --- a/engines/grim/lua/lstring.cpp +++ b/engines/grim/lua/lstring.cpp @@ -33,7 +33,7 @@ void luaS_init() { static uint32 hash(const char *s, int32 tag) { uint32 h; if (tag != LUA_T_STRING) { -#ifdef TARGET_64BITS +#ifdef SCUMM_64BITS h = (uint64)s; #else h = (uint32)s; @@ -121,7 +121,7 @@ static TaggedString *insert(const char *buff, int32 tag, stringtable *tb) { } TaggedString *luaS_createudata(void *udata, int32 tag) { -#ifdef TARGET_64BITS +#ifdef SCUMM_64BITS return insert((char *)udata, tag, &string_root[(uint64)udata % NUM_HASHS]); #else return insert((char *)udata, tag, &string_root[(uint32)udata % NUM_HASHS]); @@ -129,7 +129,7 @@ TaggedString *luaS_createudata(void *udata, int32 tag) { } TaggedString *luaS_new(const char *str) { -#ifdef TARGET_64BITS +#ifdef SCUMM_64BITS return insert(str, LUA_T_STRING, &string_root[(uint64)str[0] % NUM_HASHS]); #else return insert(str, LUA_T_STRING, &string_root[(uint32)str[0] % NUM_HASHS]); diff --git a/engines/grim/lua/ltable.cpp b/engines/grim/lua/ltable.cpp index 2a4ed8be547..bbc5d5202c4 100644 --- a/engines/grim/lua/ltable.cpp +++ b/engines/grim/lua/ltable.cpp @@ -21,7 +21,7 @@ namespace Grim { #define REHASH_LIMIT 0.70 // avoid more than this % full #define TagDefault LUA_T_ARRAY; -#ifdef TARGET_64BITS +#ifdef SCUMM_64BITS static int64 hashindex(TObject *ref) { int64 h;