From ea619f554259d746a82c2abf45e5734f637ed041 Mon Sep 17 00:00:00 2001 From: jacksonmj Date: Mon, 14 Nov 2011 14:47:01 +0000 Subject: [PATCH] Some fixes for compiling with Visual Studio - void* and inline --- src/graphics.c | 2 +- src/luaconsole.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/graphics.c b/src/graphics.c index aa72139b7..b476cf1ea 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 65bda4dac..c9291ae1e 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;