summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2011-11-14 14:47:01 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-01-25 13:25:44 (GMT)
commitea619f554259d746a82c2abf45e5734f637ed041 (patch)
treec5c0edcebfe013a51eaaf505023b0020c7f876c1 /src
parentff55050b9ba7dfdcdf83457f90a94f37c7e1c907 (diff)
downloadpowder-ea619f554259d746a82c2abf45e5734f637ed041.zip
powder-ea619f554259d746a82c2abf45e5734f637ed041.tar.gz
Some fixes for compiling with Visual Studio - void* and inline
Diffstat (limited to 'src')
-rw-r--r--src/graphics.c2
-rw-r--r--src/luaconsole.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/graphics.c b/src/graphics.c
index aa72139..b476cf1 100644
--- a/src/graphics.c
+++ b/src/graphics.c
@@ -888,7 +888,7 @@ inline int drawchar(pixel *vid, int x, int y, int c, int r, int g, int b, int a)
}
#if defined(WIN32) && !defined(__GNUC__)
-_inline int addchar(pixel *vid, int x, int y, int c, int r, int g, int b, int a)
+int addchar(pixel *vid, int x, int y, int c, int r, int g, int b, int a)
#else
inline int addchar(pixel *vid, int x, int y, int c, int r, int g, int b, int a)
#endif
diff --git a/src/luaconsole.c b/src/luaconsole.c
index 65bda4d..c9291ae 100644
--- a/src/luaconsole.c
+++ b/src/luaconsole.c
@@ -1168,9 +1168,9 @@ int luatpt_set_property(lua_State* l)
}
i = r>>8;
if(format==2){
- *((float*)(((void*)&parts[i])+offset)) = f;
+ *((float*)(((char*)&parts[i])+offset)) = f;
} else {
- *((int*)(((void*)&parts[i])+offset)) = t;
+ *((int*)(((char*)&parts[i])+offset)) = t;
}
}
} else {
@@ -1192,9 +1192,9 @@ int luatpt_set_property(lua_State* l)
if (partsel && partsel != parts[i].type)
return 0;
if(format==2){
- *((float*)(((void*)&parts[i])+offset)) = f;
+ *((float*)(((char*)&parts[i])+offset)) = f;
} else {
- *((int*)(((void*)&parts[i])+offset)) = t;
+ *((int*)(((char*)&parts[i])+offset)) = t;
}
}
return 0;