+// $Id$
+//
+// SuperTux
+// Copyright (C) 2004 Tobias Glaesser <tobi.web@gmx.de>
//
-// C Interface: type
-//
-// Description:
-//
-//
-// Author: Tobias Glaesser <tobi.web@gmx.de>, (C) 2004
-//
-// Copyright: See COPYING file that comes with this distribution
-//
+// 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.
#ifndef SUPERTUX_TYPE_H
#define SUPERTUX_TYPE_H
-#include <SDL/SDL.h>
-
-/* 'Interoperability' type */
-
-typedef struct itop_type
- {
- int* alive;
- float* x;
- float* y;
- float* width;
- float* height;
- int* updated;
- }
-itop_type;
-
-double get_frame_ratio(itop_type* pit);
-
-/* Timer type */
-typedef struct timer_type
- {
- unsigned int period;
- unsigned int time;
- }
-timer_type;
-
-void timer_init(timer_type* ptimer);
-void timer_start(timer_type* ptimer, unsigned int period);
-void timer_stop(timer_type* ptimer);
-int timer_check(timer_type* ptimer);
-int timer_started(timer_type* ptimer);
-int timer_get_left(timer_type* ptimer);
-int timer_get_gone(timer_type* ptimer);
-
-/* Texture type */
-typedef struct texture_type
- {
- SDL_Surface* sdl_surface;
- unsigned gl_texture;
- int w;
- int h;
- }
-texture_type;
-
-void texture_load(texture_type* ptexture, char * file, int use_alpha);
-void texture_from_sdl_surface(texture_type* ptexture, SDL_Surface * sdl_surf, int use_alpha);
-void texture_free(texture_type* ptexture);
-void texture_draw(texture_type* ptexture, float x, float y, int update);
-void texture_draw_bg(texture_type* ptexture, int update);
-void texture_draw_part(texture_type* ptexture, float x, float y, float w, float h, int update);
+#include "SDL.h"
+
+/* 'Base' type for game objects */
+
+struct base_type
+{
+ float x;
+ float y;
+ float xm;
+ float ym;
+ float width;
+ float height;
+};
+
+
+struct string_list_type
+{
+ int num_items;
+ int active_item;
+ char **item;
+};
+
+void string_list_init(string_list_type* pstring_list);
+char* string_list_active(string_list_type* pstring_list);
+void string_list_copy(string_list_type* pstring_list, string_list_type pstring_list_orig);
+int string_list_find(string_list_type* pstring_list, const char* str);
+void string_list_sort(string_list_type* pstring_list);
+void string_list_add_item(string_list_type* pstring_list, const char* str);
+void string_list_free(string_list_type* pstring_list);
#endif /*SUPERTUX_TYPE_H*/