summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-04-29 17:27:12 +0200
committerTreeki <treeki@gmail.com>2012-04-29 17:27:12 +0200
commitc10deba2e5c0ee0131021036b6bf489bd3b13c87 (patch)
treeb6595318ad0cfdd054fcebb8b65114f9f6d300bd
parente859131e73055ef78871e417849669766fe700c1 (diff)
downloadkamek-c10deba2e5c0ee0131021036b6bf489bd3b13c87.tar.gz
kamek-c10deba2e5c0ee0131021036b6bf489bd3b13c87.zip
fixed magic platforms
-rwxr-xr-xinclude/game.h6
-rw-r--r--src/magicplatform.cpp8
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]);
+ }
}
}
}