From c10deba2e5c0ee0131021036b6bf489bd3b13c87 Mon Sep 17 00:00:00 2001 From: Treeki Date: Sun, 29 Apr 2012 17:27:12 +0200 Subject: fixed magic platforms --- include/game.h | 6 +++--- src/magicplatform.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/game.h b/include/game.h index 3691fc7..61042bf 100755 --- a/include/game.h +++ b/include/game.h @@ -22,6 +22,7 @@ inline T clamp(T value, T one, T two) { return (value < one) ? one : ((value > t #define M_PI_2 (M_PI / 2) extern "C" { +int wcslen(const wchar_t *str); int strlen(const char *str); char *strcpy(char *dest, const char *src); int strncmp(const char *str1, const char *str2, int num); @@ -1073,7 +1074,7 @@ public: TileRenderer(); ~TileRenderer(); - TileRenderer *list1, *list2; + TileRenderer *previous, *next; u16 tileNumber; u8 unkFlag, someBool; float x, y, z; @@ -1102,8 +1103,6 @@ public: u8 getUnkByte(); - bool isInList() { return (list1 != 0); } - class List { public: u32 count; @@ -1643,6 +1642,7 @@ public: fBase_c *GetNext(); bool hasUninitialisedProcesses(); // 80162B60 + fBase_c *findNextUninitialisedProcess(); }; class dBase_c : public fBase_c { diff --git a/src/magicplatform.cpp b/src/magicplatform.cpp index ae6631d..86a6b46 100644 --- a/src/magicplatform.cpp +++ b/src/magicplatform.cpp @@ -401,12 +401,12 @@ void daEnMagicPlatform_c::setVisible(bool shown) { TileRenderer::List *list = dBgGm_c::instance->getTileRendererList(0); for (int i = 0; i < rendererCount; i++) { - if (shown) { - if (!renderers[i].isInList() && renderers[i].tileNumber > 0) + if (renderers[i].tileNumber > 0) { + if (shown) { list->add(&renderers[i]); - } else { - if (renderers[i].isInList()) + } else { list->remove(&renderers[i]); + } } } } -- cgit v1.2.3