Removed the unnecessary VControl abstraction layer.

VControl already directly depends on other UQM libraries, so this buys 
nothing.


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2685 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
mcmartin
2007-01-30 02:36:36 +00:00
parent 68aa444425
commit 882e9354d6
3 changed files with 14 additions and 34 deletions
+1
View File
@@ -1,4 +1,5 @@
Changes towards version 0.7: Changes towards version 0.7:
- Remove the unnecessary VControl memory abstraction layer - Michael
- Fix compilation without Netplay support - SvdB - Fix compilation without Netplay support - SvdB
- Added limited AIFF sound file decoder for playing 3DO originals; - Added limited AIFF sound file decoder for playing 3DO originals;
SDX2 decoder by SvdB - Alex SDX2 decoder by SvdB - Alex
+13 -13
View File
@@ -20,7 +20,7 @@
#include <string.h> #include <string.h>
#include <ctype.h> #include <ctype.h>
#include "vcontrol.h" #include "vcontrol.h"
#include "vcontrol_malloc.h" #include "misc.h"
#include "keynames.h" #include "keynames.h"
#include "libs/log.h" #include "libs/log.h"
#include "libs/reslib.h" #include "libs/reslib.h"
@@ -89,7 +89,7 @@ static SDL_Event last_interesting;
static keypool * static keypool *
allocate_key_chunk (void) allocate_key_chunk (void)
{ {
keypool *x = vctrl_malloc (sizeof (keypool)); keypool *x = HMalloc (sizeof (keypool));
if (x) if (x)
{ {
int i; int i;
@@ -111,7 +111,7 @@ free_key_pool (keypool *x)
if (x) if (x)
{ {
free_key_pool (x->next); free_key_pool (x->next);
vctrl_free (x); HFree (x);
} }
} }
@@ -145,9 +145,9 @@ create_joystick (int index)
x->numaxes = axes; x->numaxes = axes;
x->numbuttons = buttons; x->numbuttons = buttons;
x->numhats = hats; x->numhats = hats;
x->axes = vctrl_malloc (sizeof (axis_type) * axes); x->axes = HMalloc (sizeof (axis_type) * axes);
x->buttons = vctrl_malloc (sizeof (keybinding *) * buttons); x->buttons = HMalloc (sizeof (keybinding *) * buttons);
x->hats = vctrl_malloc (sizeof (hat_type) * hats); x->hats = HMalloc (sizeof (hat_type) * hats);
for (j = 0; j < axes; j++) for (j = 0; j < axes; j++)
{ {
x->axes[j].neg = x->axes[j].pos = NULL; x->axes[j].neg = x->axes[j].pos = NULL;
@@ -178,9 +178,9 @@ destroy_joystick (int index)
{ {
SDL_JoystickClose (stick); SDL_JoystickClose (stick);
joysticks[index].stick = NULL; joysticks[index].stick = NULL;
vctrl_free (joysticks[index].axes); HFree (joysticks[index].axes);
vctrl_free (joysticks[index].buttons); HFree (joysticks[index].buttons);
vctrl_free (joysticks[index].hats); HFree (joysticks[index].hats);
joysticks[index].numaxes = joysticks[index].numbuttons = 0; joysticks[index].numaxes = joysticks[index].numbuttons = 0;
joysticks[index].axes = NULL; joysticks[index].axes = NULL;
joysticks[index].buttons = NULL; joysticks[index].buttons = NULL;
@@ -196,7 +196,7 @@ key_init (void)
int i; int i;
pool = allocate_key_chunk (); pool = allocate_key_chunk ();
(void)SDL_GetKeyState (&num_sdl_keys); (void)SDL_GetKeyState (&num_sdl_keys);
bindings = (keybinding **) vctrl_malloc (sizeof (keybinding *) * num_sdl_keys); bindings = (keybinding **) HMalloc (sizeof (keybinding *) * num_sdl_keys);
for (i = 0; i < num_sdl_keys; i++) for (i = 0; i < num_sdl_keys; i++)
bindings[i] = NULL; bindings[i] = NULL;
@@ -207,7 +207,7 @@ key_init (void)
joycount = SDL_NumJoysticks (); joycount = SDL_NumJoysticks ();
if (joycount) if (joycount)
{ {
joysticks = vctrl_malloc (sizeof (joystick) * joycount); joysticks = HMalloc (sizeof (joystick) * joycount);
for (i = 0; i < joycount; i++) for (i = 0; i < joycount; i++)
{ {
joysticks[i].stick = NULL; joysticks[i].stick = NULL;
@@ -232,13 +232,13 @@ key_uninit (void)
free_key_pool (pool); free_key_pool (pool);
for (i = 0; i < num_sdl_keys; i++) for (i = 0; i < num_sdl_keys; i++)
bindings[i] = NULL; bindings[i] = NULL;
vctrl_free (bindings); HFree (bindings);
pool = NULL; pool = NULL;
#ifdef HAVE_JOYSTICK #ifdef HAVE_JOYSTICK
for (i = 0; i < joycount; i++) for (i = 0; i < joycount; i++)
destroy_joystick (i); destroy_joystick (i);
vctrl_free (joysticks); HFree (joysticks);
#endif /* HAVE_JOYSTICK */ #endif /* HAVE_JOYSTICK */
} }
@@ -1,21 +0,0 @@
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/* re-#define these to use your own allocators. */
#include "misc.h"
#define vctrl_malloc HMalloc
#define vctrl_free HFree