From: vortex Date: Sun, 21 Jul 2013 22:04:34 +0000 (+0000) Subject: Fix C++ typecast/linkage specification errors. X-Git-Tag: xonotic-v0.8.0~96^2~66 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=90d40131f6af428615cd0c0531c3e94f3c1cb792;p=xonotic%2Fdarkplaces.git Fix C++ typecast/linkage specification errors. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11974 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/sys.h b/sys.h index e5247d35..9dfdf620 100644 --- a/sys.h +++ b/sys.h @@ -83,6 +83,9 @@ void Sys_Quit (int returnvalue); * profiling to certain areas of the code, such as ingame performance without * regard for loading/shutdown performance (-profilegameonly on commandline) */ +#ifdef __cplusplus +extern "C" +#endif void Sys_AllowProfiling (qboolean enable); typedef struct sys_cleantime_s diff --git a/vid_sdl.c b/vid_sdl.c index ab754107..3211eaa1 100644 --- a/vid_sdl.c +++ b/vid_sdl.c @@ -769,7 +769,7 @@ void VID_BuildJoyState(vid_joystate_t *joystate) if (skip != 11) \ VID_TouchscreenArea( 0, 0, 0, 0, 0, NULL , 0.0f, NULL, NULL, &buttons[11], (keynum_t)'b', NULL, 0, 0, 0, false); \ if (skip != 12) \ - VID_TouchscreenArea( 0, 0, 0, 0, 0, NULL , 0.0f, NULL, NULL, &buttons[12], 'q', NULL, 0, 0, 0, false); \ + VID_TouchscreenArea( 0, 0, 0, 0, 0, NULL , 0.0f, NULL, NULL, &buttons[12], (keynum_t)'q', NULL, 0, 0, 0, false); \ if (skip != 13) \ VID_TouchscreenArea( 0, 0, 0, 0, 0, NULL , 0.0f, NULL, NULL, &buttons[13], (keynum_t)'`', NULL, 0, 0, 0, false); \ if (skip != 14) \ @@ -852,10 +852,10 @@ static void IN_Move_TouchScreen_SteelStorm(void) { VID_TouchscreenCursor(0, 0, 0, 0, &buttons[0], K_MOUSE1); - VID_TouchscreenArea( 2,16*xscale,-240*yscale, 224*xscale, 224*yscale, "gfx/gui/touch_l_thumb_dpad.tga", 0.0f, NULL, move, &buttons[1], 0, NULL, 0.15, 112*xscale, 112*yscale, false); + VID_TouchscreenArea( 2,16*xscale,-240*yscale, 224*xscale, 224*yscale, "gfx/gui/touch_l_thumb_dpad.tga", 0.0f, NULL, move, &buttons[1], (keynum_t)0, NULL, 0.15, 112*xscale, 112*yscale, false); - VID_TouchscreenArea( 3,-240*xscale,-160*yscale, 224*xscale, 128*yscale, "gfx/gui/touch_r_thumb_turn_n_shoot.tga" , 0.0f, NULL, NULL, 0, 0, NULL, 0, 56*xscale, 0, false); - VID_TouchscreenArea( 3,-240*xscale,-256*yscale, 224*xscale, 224*yscale, NULL , 0.0f, NULL, aim, &buttons[2], 0, NULL, 0.2, 56*xscale, 0, false); + VID_TouchscreenArea( 3,-240*xscale,-160*yscale, 224*xscale, 128*yscale, "gfx/gui/touch_r_thumb_turn_n_shoot.tga" , 0.0f, NULL, NULL, 0, (keynum_t)0, NULL, 0, 56*xscale, 0, false); + VID_TouchscreenArea( 3,-240*xscale,-256*yscale, 224*xscale, 224*yscale, NULL , 0.0f, NULL, aim, &buttons[2], (keynum_t)0, NULL, 0.2, 56*xscale, 0, false); VID_TouchscreenArea( 2, (vid_conwidth.value / 2) - 128,-80, 256, 80, NULL, 0.0f, NULL, NULL, &buttons[3], K_SHIFT, NULL, 0, 0, 0, true); @@ -864,7 +864,7 @@ static void IN_Move_TouchScreen_SteelStorm(void) VID_TouchscreenArea( 1,-100, 0, 100, 100, NULL , 0.0f, NULL, NULL, &buttons[10], (keynum_t)'m', NULL, 0, 0, 0, true); VID_TouchscreenArea( 1,-100, 120, 100, 100, NULL , 0.0f, NULL, NULL, &buttons[11], (keynum_t)'b', NULL, 0, 0, 0, true); - VID_TouchscreenArea( 0, 0, 0, 64, 64, NULL , 0.0f, NULL, NULL, &buttons[12], 'q', NULL, 0, 0, 0, true); + VID_TouchscreenArea( 0, 0, 0, 64, 64, NULL , 0.0f, NULL, NULL, &buttons[12], (keynum_t)'q', NULL, 0, 0, 0, true); if (developer.integer) VID_TouchscreenArea( 0, 0, 96, 64, 64, NULL , 0.0f, NULL, NULL, &buttons[13], (keynum_t)'`', NULL, 0, 0, 0, true); else