[Super-tux-commit] supertux/src badguy.h,1.8,1.9 bitmask.h,1.2,1.3 button.h,1.9,1.10 gameloop.cpp,1.
Brought to you by:
wkendrick
From: Ingo R. <gr...@us...> - 2004-03-23 17:36:03
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10841 Modified Files: badguy.h bitmask.h button.h gameloop.cpp level.h leveleditor.h menu.h physic.h player.h special.h text.h texture.h timer.h type.h world.h Log Message: - removed unneded typedef's for structs Index: world.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/world.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- world.h 24 Feb 2004 14:43:27 -0000 1.7 +++ world.h 23 Mar 2004 17:25:15 -0000 1.8 @@ -21,11 +21,10 @@ #define NO_BOUNCE 0 #define BOUNCE 1 -typedef struct bouncy_distro_type /*It is easier to read the sources IMHO, if we don't write something like int a,b,c; */ - { - base_type base; - } -bouncy_distro_type; +struct bouncy_distro_type +{ + base_type base; +}; extern texture_type img_distro[4]; @@ -37,37 +36,34 @@ #define BOUNCY_BRICK_MAX_OFFSET 8 #define BOUNCY_BRICK_SPEED 0.9 -typedef struct broken_brick_type - { - base_type base; - timer_type timer; - } -broken_brick_type; +struct broken_brick_type +{ + base_type base; + timer_type timer; +}; void broken_brick_init(broken_brick_type* pbroken_brick, float x, float y, float xm, float ym); void broken_brick_action(broken_brick_type* pbroken_brick); void broken_brick_draw(broken_brick_type* pbroken_brick); -typedef struct bouncy_brick_type - { - float offset; - float offset_m; - int shape; - base_type base; - } -bouncy_brick_type; +struct bouncy_brick_type +{ + float offset; + float offset_m; + int shape; + base_type base; +}; void bouncy_brick_init(bouncy_brick_type* pbouncy_brick, float x, float y); void bouncy_brick_action(bouncy_brick_type* pbouncy_brick); void bouncy_brick_draw(bouncy_brick_type* pbouncy_brick); -typedef struct floating_score_type - { - int value; - timer_type timer; - base_type base; - } -floating_score_type; +struct floating_score_type +{ + int value; + timer_type timer; + base_type base; +}; void floating_score_init(floating_score_type* pfloating_score, float x, float y, int s); void floating_score_action(floating_score_type* pfloating_score); Index: timer.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/timer.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- timer.h 22 Mar 2004 15:47:31 -0000 1.7 +++ timer.h 23 Mar 2004 17:25:15 -0000 1.8 @@ -14,13 +14,12 @@ #define SUPERTUX_TIMER_H /* Timer type */ -typedef struct timer_type - { - unsigned int period; - unsigned int time; - unsigned int (*get_ticks) (void); - } -timer_type; +struct timer_type +{ + unsigned int period; + unsigned int time; + unsigned int (*get_ticks) (void); +}; extern unsigned int st_pause_ticks, st_pause_count; Index: player.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/player.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- player.h 23 Mar 2004 01:30:16 -0000 1.15 +++ player.h 23 Mar 2004 17:25:15 -0000 1.16 @@ -58,7 +58,7 @@ void player_input_init(player_input_type* pplayer_input); -typedef struct player_type +struct player_type { player_input_type input; player_keymap_type keymap; @@ -82,8 +82,7 @@ timer_type frame_timer; physic_type vphysic; physic_type hphysic; -} -player_type; +}; extern texture_type tux_life, tux_right[3], tux_left[3], Index: button.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/button.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- button.h 22 Mar 2004 15:47:30 -0000 1.9 +++ button.h 23 Mar 2004 17:25:15 -0000 1.10 @@ -22,21 +22,20 @@ BUTTON_HOVER }; -typedef struct button_type - { - texture_type icon; - texture_type* bkgd; - char *info; - SDLKey shortcut; - int x; - int y; - int w; - int h; - bool show_info; - ButtonState state; - int tag; - } -button_type; +struct button_type +{ + texture_type icon; + texture_type* bkgd; + char *info; + SDLKey shortcut; + int x; + int y; + int w; + int h; + bool show_info; + ButtonState state; + int tag; +}; void button_load(button_type* pbutton,char* icon_file, char* info, SDLKey shortcut, int x, int y); button_type* button_create(char* icon_file, char* info, SDLKey shortcut, int x, int y); @@ -46,15 +45,14 @@ void button_event(button_type* pbutton, SDL_Event* event); int button_get_state(button_type* pbutton); -typedef struct button_panel_type - { - int num_items; - int hidden; - int x,y; - int w,h; - button_type* item; - } -button_panel_type; +struct button_panel_type +{ + int num_items; + int hidden; + int x,y; + int w,h; + button_type* item; +}; void button_panel_init(button_panel_type* pbutton_panel, int x, int y, int w, int h); void button_panel_free(button_panel_type* pbutton_panel); Index: bitmask.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/bitmask.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- bitmask.h 24 Feb 2004 14:43:26 -0000 1.2 +++ bitmask.h 23 Mar 2004 17:25:15 -0000 1.3 @@ -84,11 +84,11 @@ #define BITW_MASK 31 #define BITN(n) ((BITW)1 << (n)) -typedef struct bitmask +struct bitmask { int w,h; BITW *bits; -} bitmask; +}; /* Creates a bitmask of width w and height h. * The mask is automatically cleared when created. Index: gameloop.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/gameloop.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- gameloop.cpp 23 Mar 2004 01:30:16 -0000 1.14 +++ gameloop.cpp 23 Mar 2004 17:25:15 -0000 1.15 @@ -1326,7 +1326,6 @@ texture_draw(&img_solid[3], x, y); else if (c == '$') { - z = (frame / 2) % 6; if (z < 4) Index: special.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/special.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- special.h 14 Mar 2004 22:45:36 -0000 1.9 +++ special.h 23 Mar 2004 17:25:15 -0000 1.10 @@ -31,20 +31,18 @@ UPGRADE_HERRING }; -typedef struct upgrade_type - { - int kind; - base_type base; - base_type old_base; - } -upgrade_type; +struct upgrade_type +{ + int kind; + base_type base; + base_type old_base; +}; -typedef struct bullet_type - { - base_type base; - base_type old_base; - } -bullet_type; +struct bullet_type +{ + base_type base; + base_type old_base; +}; extern texture_type img_bullet; extern bitmask* bm_bullet; Index: physic.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/physic.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- physic.h 24 Feb 2004 14:43:27 -0000 1.5 +++ physic.h 23 Mar 2004 17:25:15 -0000 1.6 @@ -22,15 +22,14 @@ /* Physic type: */ -typedef struct physic_type +struct physic_type { - int state; - float start_vy; - float start_vx; - float acceleration; - unsigned int start_time; - } -physic_type; + int state; + float start_vy; + float start_vx; + float acceleration; + unsigned int start_time; +}; /* global variables. */ extern float gravity; Index: text.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/text.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- text.h 21 Mar 2004 23:36:28 -0000 1.7 +++ text.h 23 Mar 2004 17:25:15 -0000 1.8 @@ -16,15 +16,14 @@ #include "texture.h" /* Text type */ -typedef struct text_type - { - texture_type chars; - texture_type shadow_chars; - int kind; - int w; - int h; - } -text_type; +struct text_type +{ + texture_type chars; + texture_type shadow_chars; + int kind; + int w; + int h; +}; /* Kinds of texts. */ enum { Index: level.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/level.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- level.h 22 Mar 2004 13:55:11 -0000 1.12 +++ level.h 23 Mar 2004 17:25:15 -0000 1.13 @@ -40,7 +40,7 @@ #define LEVEL_NAME_MAX 20 -typedef struct st_level +struct st_level { std::string name; std::string theme; @@ -53,8 +53,7 @@ int bkgd_blue; int width; float gravity; -} -st_level; +}; extern texture_type img_bkgd, img_bkgd_tile[2][4], img_solid[4], img_brick[2]; Index: badguy.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/badguy.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- badguy.h 22 Mar 2004 15:47:30 -0000 1.8 +++ badguy.h 23 Mar 2004 17:25:15 -0000 1.9 @@ -30,20 +30,19 @@ /* Badguy type: */ -typedef struct bad_guy_type - { - int mode; - DyingType dying; - int kind; - bool seen; - int dir; - int frame; - base_type base; - base_type old_base; - timer_type timer; - physic_type physic; - } -bad_guy_type; +struct bad_guy_type +{ + int mode; + DyingType dying; + int kind; + bool seen; + int dir; + int frame; + base_type base; + base_type old_base; + timer_type timer; + physic_type physic; +}; /* Bad guy kinds: */ Index: leveleditor.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/leveleditor.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- leveleditor.h 15 Mar 2004 17:45:29 -0000 1.5 +++ leveleditor.h 23 Mar 2004 17:25:15 -0000 1.6 @@ -16,11 +16,10 @@ #ifndef SUPERTUX_LEVELEDITOR_H #define SUPERTUX_LEVELEDITOR_H -typedef struct square - { - int x1, y1, x2, y2; - } -square; +struct square +{ + int x1, y1, x2, y2; +}; /* selection modes */ enum { Index: type.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/type.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- type.h 21 Mar 2004 22:13:04 -0000 1.11 +++ type.h 23 Mar 2004 17:25:15 -0000 1.12 @@ -17,25 +17,22 @@ /* 'Base' type for game objects */ -typedef struct base_type - { - float x; - float y; - float xm; - float ym; - float width; - float height; - } -base_type; - +struct base_type +{ + float x; + float y; + float xm; + float ym; + float width; + float height; +}; -typedef struct string_list_type +struct string_list_type { - int num_items; - int active_item; - char **item; - } -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); Index: texture.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/texture.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- texture.h 22 Mar 2004 10:33:16 -0000 1.10 +++ texture.h 23 Mar 2004 17:25:15 -0000 1.11 @@ -22,13 +22,13 @@ #include "screen.h" /* Texture type */ -typedef struct texture_type - { - SDL_Surface* sdl_surface; - unsigned gl_texture; - int w; - int h; - } texture_type; +struct texture_type +{ + SDL_Surface* sdl_surface; + unsigned gl_texture; + int w; + int h; +}; void texture_setup(void); extern void (*texture_load) (texture_type* ptexture, const std::string& file, int use_alpha); Index: menu.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/menu.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- menu.h 22 Mar 2004 15:47:31 -0000 1.18 +++ menu.h 23 Mar 2004 17:25:15 -0000 1.19 @@ -32,7 +32,7 @@ MN_HL /* horizontal line */ }; -typedef struct menu_item_type +struct menu_item_type { MenuItemKind kind; int toggled; @@ -40,14 +40,13 @@ char *input; string_list_type* list; void* target_menu; - } -menu_item_type; +}; menu_item_type* menu_item_create(MenuItemKind kind, char *text, int init_toggle, void* target_menu); void menu_item_change_text (menu_item_type* pmenu_item, const char *text); void menu_item_change_input(menu_item_type* pmenu_item, const char *text); -typedef struct menu_type +struct menu_type { // center of the menu on the screen int x; @@ -58,8 +57,7 @@ int arrange_left; menu_item_type *item; timer_type effect; -} -menu_type; +}; void menu_init (menu_type* pmenu); void menu_free (menu_type* pmenu); |