super-tux-commit Mailing List for Super Tux (Page 69)
Brought to you by:
wkendrick
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
(94) |
Apr
(500) |
May
(531) |
Jun
(196) |
Jul
(224) |
Aug
(193) |
Sep
(117) |
Oct
(115) |
Nov
(319) |
Dec
(97) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(19) |
Feb
|
Mar
(105) |
Apr
(41) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
2007 |
Jan
(1) |
Feb
(2) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(4) |
Jul
|
Aug
|
Sep
(7) |
Oct
(12) |
Nov
(26) |
Dec
(39) |
2009 |
Jan
(6) |
Feb
(15) |
Mar
(10) |
Apr
(25) |
May
(29) |
Jun
(21) |
Jul
(26) |
Aug
(8) |
Sep
(3) |
Oct
|
Nov
|
Dec
(10) |
2010 |
Jan
(5) |
Feb
(5) |
Mar
(2) |
Apr
|
May
(5) |
Jun
|
Jul
(1) |
Aug
(2) |
Sep
(2) |
Oct
(2) |
Nov
|
Dec
|
From: Ricardo C. <rm...@us...> - 2004-05-13 10:03:33
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27635/src Modified Files: world.cpp Log Message: Made some checking before the scrolling code, in order to avoid code duplication. Index: world.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/world.cpp,v retrieving revision 1.84 retrieving revision 1.85 diff -u -d -r1.84 -r1.85 --- world.cpp 12 May 2004 19:43:08 -0000 1.84 +++ world.cpp 13 May 2004 10:03:17 -0000 1.85 @@ -354,20 +354,27 @@ if(tux.old_dir != tux.dir && level->back_scrolling) scrolling_timer.start(CHANGE_DIR_SCROLL_SPEED); + bool right = false; + bool left = false; + if (tux.physic.get_velocity_x() > 0) + right = true; + else if (tux.physic.get_velocity_x() < 0) + left = true; + else + { + if (tux.dir == RIGHT) + right = true; + else + left = true; + } + if(scrolling_timer.check()) { float final_scroll_x; - if (tux.physic.get_velocity_x() > 0) + if (right) final_scroll_x = tux_pos_x - (screen->w - X_SPACE); - else if (tux.physic.get_velocity_x() < 0) - final_scroll_x = tux_pos_x - X_SPACE; else - { - if (tux.dir == RIGHT) - final_scroll_x = tux_pos_x - (screen->w - X_SPACE); - else if (tux.dir == LEFT && level->back_scrolling) - final_scroll_x = tux_pos_x - X_SPACE; - } + final_scroll_x = tux_pos_x - X_SPACE; scroll_x += (final_scroll_x - scroll_x) / (frame_ratio * (CHANGE_DIR_SCROLL_SPEED / 100)) @@ -377,17 +384,10 @@ } else { - if (tux.physic.get_velocity_x() > 0 && scroll_x < tux_pos_x - (screen->w - X_SPACE)) + if (right && scroll_x < tux_pos_x - (screen->w - X_SPACE)) scroll_x = tux_pos_x - (screen->w - X_SPACE); - else if (tux.physic.get_velocity_x() < 0 && scroll_x > tux_pos_x - X_SPACE && level->back_scrolling) + else if (left && scroll_x > tux_pos_x - X_SPACE && level->back_scrolling) scroll_x = tux_pos_x - X_SPACE; - else - { - if (tux.dir == RIGHT && scroll_x < tux_pos_x - (screen->w - X_SPACE)) - scroll_x = tux_pos_x - (screen->w - X_SPACE); - else if (tux.dir == LEFT && scroll_x > tux_pos_x - X_SPACE && level->back_scrolling) - scroll_x = tux_pos_x - X_SPACE; - } } // this code prevent the screen to scroll before the start or after the level's end |
From: Ricardo C. <rm...@us...> - 2004-05-13 09:53:25
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25541/src Modified Files: leveleditor.cpp Log Message: Fixed crash. Also made map to work with height > 15. But the rectangle in the map, still doesn't show precisely the Y visible area. Index: leveleditor.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/leveleditor.cpp,v retrieving revision 1.113 retrieving revision 1.114 diff -u -d -r1.113 -r1.114 --- leveleditor.cpp 13 May 2004 09:13:33 -0000 1.113 +++ leveleditor.cpp 13 May 2004 09:52:59 -0000 1.114 @@ -772,7 +772,15 @@ mini_tile_width = 1; int left_offset = (screen->w - 64 - le_world->get_level()->width*mini_tile_width) / 2; - for (int y = 0; y < 15; ++y) + int mini_tile_height; + if(screen->h - 64 > le_world->get_level()->height * 4) + mini_tile_height = 4; + else if(screen->h - 64 > le_world->get_level()->height * 2) + mini_tile_height = 2; + else + mini_tile_height = 1; + + for (int y = 0; y < le_world->get_level()->height; ++y) for (int x = 0; x < le_world->get_level()->width; ++x) { @@ -784,12 +792,12 @@ } - fillrect(left_offset, 0, le_world->get_level()->width*mini_tile_width, 15*4, 200, 200, 200, 128); + fillrect(left_offset, 0, le_world->get_level()->width*mini_tile_width, le_world->get_level()->height*mini_tile_height, 200, 200, 200, 128); fillrect(left_offset + (pos_x/32)*mini_tile_width, 0, 19*mini_tile_width, 2, 200, 200, 200, 200); - fillrect(left_offset + (pos_x/32)*mini_tile_width, 0, 2, 15*4, 200, 200, 200, 200); - fillrect(left_offset + (pos_x/32)*mini_tile_width + 19*mini_tile_width - 2, 0, 2, 15*4, 200, 200, 200, 200); - fillrect(left_offset + (pos_x/32)*mini_tile_width, 15*4-2, 19*mini_tile_width, 2, 200, 200, 200, 200); + fillrect(left_offset + (pos_x/32)*mini_tile_width, 0, 2, le_world->get_level()->height*mini_tile_height, 200, 200, 200, 200); + fillrect(left_offset + (pos_x/32)*mini_tile_width + 19*mini_tile_width - 2, 0, 2, le_world->get_level()->height*mini_tile_height, 200, 200, 200, 200); + fillrect(left_offset + (pos_x/32)*mini_tile_width, le_world->get_level()->height*mini_tile_height-2, 19*mini_tile_width, 2, 200, 200, 200, 200); } @@ -805,7 +813,7 @@ { for(x = 0; x < 19; x++) fillrect(x*32 - ((int)pos_x % 32), 0, 1, screen->h, 225, 225, 225,255); - for(y = 0; y < 15; y++) + for(y = 0; y < 16; y++) fillrect(0, y*32 - ((int)pos_y % 32), screen->w - 32, 1, 225, 225, 225,255); } } @@ -943,7 +951,7 @@ /* clearscreen(current_level.bkgd_red, current_level.bkgd_green, current_level.bkgd_blue); */ - for (y = 0; y < 15; ++y) + for (y = 0; y < 16 && y < (unsigned)le_world->get_level()->height; ++y) for (x = 0; x < 20; ++x) { @@ -970,7 +978,7 @@ /* draw whats inside stuff when cursor is selecting those */ /* (draw them all the time - is this the right behaviour?) */ - Tile* edit_image = TileManager::instance()->get(le_world->get_level()->ia_tiles[y + (int)(pos_x / 32)][x + (int)(pos_x / 32)]); + Tile* edit_image = TileManager::instance()->get(le_world->get_level()->ia_tiles[y + (int)(pos_y / 32)][x + (int)(pos_x / 32)]); if(edit_image && !edit_image->editor_images.empty()) edit_image->editor_images[0]->draw( x * 32 - ((int)pos_x % 32), y*32 - ((int)pos_y % 32)); |
From: Ricardo C. <rm...@us...> - 2004-05-13 09:41:15
|
Update of /cvsroot/super-tux/supertux/data/images/tilesets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23501/data/images/tilesets Modified Files: supertux.stgt Added Files: grasslands1.png grasslands2.png grasslands3.png grasslands4.png Log Message: Committed Matrix tiles. But they should allow repetition! --- NEW FILE: grasslands1.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: grasslands2.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: grasslands3.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: grasslands4.png --- (This appears to be a binary file; contents omitted.) Index: supertux.stgt =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/tilesets/supertux.stgt,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- supertux.stgt 13 May 2004 08:44:08 -0000 1.32 +++ supertux.stgt 13 May 2004 09:41:05 -0000 1.33 @@ -16,6 +16,7 @@ (tilegroup (name "Pipe") (tiles 53 54 55 56 57 58 59 60)) (tilegroup (name "Grey") (tiles 64 65 66 67 68 69)) (tilegroup (name "Signs") (tiles 136 137 138 139 141 142 143 144)) + (tilegroup (name "Grasslands") (tiles 145 146 147 148)) (tile (id 0) (images "notile.png")) @@ -518,5 +519,15 @@ (solid #f) (images "sign_right4.png")) +; Grasslands + + (tile (id 145) + (images "grasslands1.png")) + (tile (id 146) + (images "grasslands2.png")) + (tile (id 147) + (images "grasslands3.png")) + (tile (id 148) + (images "grasslands4.png")) ) |
From: Ricardo C. <rm...@us...> - 2004-05-13 09:13:45
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18149/src Modified Files: leveleditor.cpp Log Message: Added vertical scrolling for the level editor. Unfortanely, it crashes after scrolling a bit. (hint: use the right mouse button to scroll... it will stay a bit longer without crashing :/) Index: leveleditor.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/leveleditor.cpp,v retrieving revision 1.112 retrieving revision 1.113 diff -u -d -r1.112 -r1.113 --- leveleditor.cpp 12 May 2004 14:57:16 -0000 1.112 +++ leveleditor.cpp 13 May 2004 09:13:33 -0000 1.113 @@ -107,7 +107,7 @@ static bool show_minimap; static bool show_selections; static bool le_help_shown; -static int pos_x, cursor_x, cursor_y, fire; +static int pos_x, pos_y, cursor_x, cursor_y; static int le_level; static World* le_world; static LevelSubset* le_level_subset; @@ -125,6 +125,8 @@ static Button* le_previous_level_bt; static Button* le_move_right_bt; static Button* le_move_left_bt; +static Button* le_move_up_bt; +static Button* le_move_down_bt; static Button* le_rubber_bt; static Button* le_select_mode_one_bt; static Button* le_select_mode_two_bt; @@ -210,10 +212,6 @@ if(le_world != NULL) { /* making events results to be in order */ - if(pos_x < 0) - pos_x = 0; - if(pos_x > (le_world->get_level()->width * 32) - screen->w) - pos_x = (le_world->get_level()->width * 32) - screen->w; /* draw the level */ le_drawlevel(); @@ -529,7 +527,6 @@ show_selections = true; scroll_x = 0; - fire = DOWN; done = 0; le_frame = 0; /* support for frames in some tiles, like waves and bad guys */ le_level_changed = false; @@ -550,15 +547,17 @@ /* Load buttons */ le_save_level_bt = new Button("/images/icons/save.png","Save level", SDLK_F6,screen->w-64,32); le_exit_bt = new Button("/images/icons/exit.png","Exit", SDLK_F10,screen->w-32,32); - le_next_level_bt = new Button("/images/icons/up.png","Next level", SDLK_PAGEUP,screen->w-64,0); - le_previous_level_bt = new Button("/images/icons/down.png","Previous level",SDLK_PAGEDOWN,screen->w-32,0); + le_next_level_bt = new Button("/images/icons/next.png","Next level", SDLK_PAGEUP,screen->w-64,0); + le_previous_level_bt = new Button("/images/icons/previous.png","Previous level",SDLK_PAGEDOWN,screen->w-32,0); le_rubber_bt = new Button("/images/icons/rubber.png","Rubber",SDLK_DELETE,screen->w-32,48); le_select_mode_one_bt = new Button ("/images/icons/select-mode1.png","Select single tile",SDLK_F3,screen->w-64,48); le_select_mode_two_bt = new Button("/images/icons/select-mode2.png","Select multiple tiles",SDLK_F3,screen->w-64,48); le_test_level_bt = new Button("/images/icons/test-level.png","Test level",SDLK_F4,screen->w-64,screen->h - 64); le_settings_bt = new Button("/images/icons/settings.png","Level settings",SDLK_F5,screen->w-32,screen->h - 64); - le_move_left_bt = new Button("/images/icons/left.png","Move left",SDLK_LEFT,0,0); + le_move_left_bt = new Button("/images/icons/left.png","Move left",SDLK_LEFT,screen->w-80-16,0); le_move_right_bt = new Button("/images/icons/right.png","Move right",SDLK_RIGHT,screen->w-80,0); + le_move_up_bt = new Button("/images/icons/up.png","Move up",SDLK_UP,screen->w-80,16); + le_move_down_bt = new Button("/images/icons/down.png","Move down",SDLK_DOWN,screen->w-80,32); le_tilegroup_bt = new Button("/images/icons/tilegroup.png","Select Tilegroup", SDLK_F7,screen->w-64,64); le_objects_bt = new Button("/images/icons/objects.png","Select Objects", SDLK_F8,screen->w-64,80); le_object_select_bt = new Button("/images/icons/select-one.png","Select an Object", SDLK_s, screen->w - 64, screen->h-98); @@ -731,6 +730,8 @@ delete le_previous_level_bt; delete le_move_right_bt; delete le_move_left_bt; + delete le_move_up_bt; + delete le_move_down_bt; delete le_rubber_bt; delete le_select_mode_one_bt; delete le_select_mode_two_bt; @@ -805,7 +806,7 @@ for(x = 0; x < 19; x++) fillrect(x*32 - ((int)pos_x % 32), 0, 1, screen->h, 225, 225, 225,255); for(y = 0; y < 15; y++) - fillrect(0, y*32, screen->w - 32, 1, 225, 225, 225,255); + fillrect(0, y*32 - ((int)pos_y % 32), screen->w - 32, 1, 225, 225, 225,255); } } @@ -817,7 +818,7 @@ if(le_selection_mode == CURSOR) { if(le_current.IsTile()) - le_selection->draw( cursor_x - pos_x, cursor_y); + le_selection->draw(cursor_x - pos_x, cursor_y - pos_y); } else if(le_selection_mode == SQUARE) { @@ -826,10 +827,10 @@ /* draw current selection */ w = selection.x2 - selection.x1; h = selection.y2 - selection.y1; - fillrect(selection.x1 - pos_x, selection.y1, w, SELECT_W, SELECT_CLR); - fillrect(selection.x1 - pos_x + w, selection.y1, SELECT_W, h, SELECT_CLR); - fillrect(selection.x1 - pos_x, selection.y1 + h, w, SELECT_W, SELECT_CLR); - fillrect(selection.x1 - pos_x, selection.y1, SELECT_W, h, SELECT_CLR); + fillrect(selection.x1 - pos_x, selection.y1 - pos_y, w, SELECT_W, SELECT_CLR); + fillrect(selection.x1 - pos_x + w, selection.y1 - pos_y, SELECT_W, h, SELECT_CLR); + fillrect(selection.x1 - pos_x, selection.y1 - pos_y + h, w, SELECT_W, SELECT_CLR); + fillrect(selection.x1 - pos_x, selection.y1 - pos_y, SELECT_W, h, SELECT_CLR); } } @@ -851,10 +852,10 @@ if(mouse_select_object && selected_game_object != NULL) { - fillrect(selected_game_object->base.x-pos_x,selected_game_object->base.y,selected_game_object->base.width,3,255,0,0,255); - fillrect(selected_game_object->base.x-pos_x,selected_game_object->base.y,3,selected_game_object->base.height,255,0,0,255); - fillrect(selected_game_object->base.x-pos_x,selected_game_object->base.y+selected_game_object->base.height,selected_game_object->base.width,3,255,0,0,255); - fillrect(selected_game_object->base.x-pos_x+selected_game_object->base.width,selected_game_object->base.y,3,selected_game_object->base.height,255,0,0,255); + fillrect(selected_game_object->base.x-pos_x,selected_game_object->base.y-pos_y,selected_game_object->base.width,3,255,0,0,255); + fillrect(selected_game_object->base.x-pos_x,selected_game_object->base.y-pos_y,3,selected_game_object->base.height,255,0,0,255); + fillrect(selected_game_object->base.x-pos_x,selected_game_object->base.y-pos_y+selected_game_object->base.height,selected_game_object->base.width,3,255,0,0,255); + fillrect(selected_game_object->base.x-pos_x+selected_game_object->base.width,selected_game_object->base.y-pos_y,3,selected_game_object->base.height,255,0,0,255); } if(le_world != NULL) @@ -872,6 +873,8 @@ le_settings_bt->draw(); le_move_right_bt->draw(); le_move_left_bt->draw(); + le_move_up_bt->draw(); + le_move_down_bt->draw(); le_tilegroup_bt->draw(); le_objects_bt->draw(); if(!cur_tilegroup.empty()) @@ -929,9 +932,9 @@ if(le_current.IsTile()) { - Tile::draw(cursor_x-pos_x, cursor_y,le_current.tile,128); + Tile::draw(cursor_x-pos_x, cursor_y-pos_y,le_current.tile,128); if(!TileManager::instance()->get(le_current.tile)->images.empty()) - fillrect(cursor_x-pos_x,cursor_y,TileManager::instance()->get(le_current.tile)->images[0]->w,TileManager::instance()->get(le_current.tile)->images[0]->h,50,50,50,50); + fillrect(cursor_x-pos_x,cursor_y-pos_y,TileManager::instance()->get(le_current.tile)->images[0]->w,TileManager::instance()->get(le_current.tile)->images[0]->h,50,50,50,50); } if(le_current.IsObject()) { @@ -949,27 +952,27 @@ else a = 128; - Tile::draw(32*x - fmodf(pos_x, 32), y * 32, le_world->get_level()->bg_tiles[y][x + (int)(pos_x / 32)],a); + Tile::draw(32*x - fmodf(pos_x, 32), y*32 - fmodf(pos_y, 32), le_world->get_level()->bg_tiles[y + (int)(pos_y / 32)][x + (int)(pos_x / 32)],a); if(active_tm == TM_IA) a = 255; else a = 128; - Tile::draw(32*x - fmodf(pos_x, 32), y * 32, le_world->get_level()->ia_tiles[y][x + (int)(pos_x / 32)],a); + Tile::draw(32*x - fmodf(pos_x, 32), y*32 - fmodf(pos_y, 32), le_world->get_level()->ia_tiles[y + (int)(pos_y / 32)][x + (int)(pos_x / 32)],a); if(active_tm == TM_FG) a = 255; else a = 128; - Tile::draw(32*x - fmodf(pos_x, 32), y * 32, le_world->get_level()->fg_tiles[y][x + (int)(pos_x / 32)],a); + Tile::draw(32*x - fmodf(pos_x, 32), y*32 - fmodf(pos_y, 32), le_world->get_level()->fg_tiles[y + (int)(pos_y / 32)][x + (int)(pos_x / 32)],a); /* draw whats inside stuff when cursor is selecting those */ /* (draw them all the time - is this the right behaviour?) */ - Tile* edit_image = TileManager::instance()->get(le_world->get_level()->ia_tiles[y][x + (int)(pos_x / 32)]); + Tile* edit_image = TileManager::instance()->get(le_world->get_level()->ia_tiles[y + (int)(pos_x / 32)][x + (int)(pos_x / 32)]); if(edit_image && !edit_image->editor_images.empty()) - edit_image->editor_images[0]->draw( x * 32 - ((int)pos_x % 32), y*32); + edit_image->editor_images[0]->draw( x * 32 - ((int)pos_x % 32), y*32 - ((int)pos_y % 32)); } @@ -979,13 +982,14 @@ /* to support frames: img_bsod_left[(frame / 5) % 4] */ scroll_x = pos_x; + scroll_y = pos_y; (*it)->draw(); } /* Draw the player: */ /* for now, the position is fixed at (100, 240) */ - largetux.walk_right->draw( 100 - pos_x, 240); + largetux.walk_right->draw( 100 - pos_x, 240 - pos_y); } void le_change_object_properties(GameObject *pobj) @@ -1104,47 +1108,6 @@ case SDLK_ESCAPE: Menu::set_current(leveleditor_menu); break; - case SDLK_LEFT: - if(fire == DOWN) - cursor_x -= KEY_CURSOR_SPEED; - else - cursor_x -= KEY_CURSOR_FASTSPEED; - - if(cursor_x < pos_x + MOUSE_LEFT_MARGIN) - pos_x = cursor_x - MOUSE_LEFT_MARGIN; - - break; - case SDLK_RIGHT: - if(fire == DOWN) - cursor_x += KEY_CURSOR_SPEED; - else - cursor_x += KEY_CURSOR_FASTSPEED; - - if(cursor_x > pos_x + MOUSE_RIGHT_MARGIN-32) - pos_x = cursor_x - MOUSE_RIGHT_MARGIN+32; - - break; - case SDLK_UP: - if(fire == DOWN) - cursor_y -= KEY_CURSOR_SPEED; - else - cursor_y -= KEY_CURSOR_FASTSPEED; - - if(cursor_y < 0) - cursor_y = 0; - break; - case SDLK_DOWN: - if(fire == DOWN) - cursor_y += KEY_CURSOR_SPEED; - else - cursor_y += KEY_CURSOR_FASTSPEED; - - if(cursor_y > screen->h-32) - cursor_y = screen->h-32; - break; - case SDLK_LCTRL: - fire =UP; - break; case SDLK_F1: if(le_world != NULL) le_showhelp(); @@ -1164,25 +1127,15 @@ break; } break; - case SDL_KEYUP: /* key released */ - switch(event.key.keysym.sym) - { - case SDLK_LCTRL: - fire = DOWN; - break; - default: - break; - } - break; case SDL_MOUSEBUTTONDOWN: if(event.button.button == SDL_BUTTON_LEFT) { le_mouse_pressed[LEFT] = true; selection.x1 = event.motion.x + pos_x; - selection.y1 = event.motion.y; + selection.y1 = event.motion.y + pos_y; selection.x2 = event.motion.x + pos_x; - selection.y2 = event.motion.y; + selection.y2 = event.motion.y + pos_y; } else if(event.button.button == SDL_BUTTON_RIGHT) { @@ -1211,7 +1164,7 @@ if(le_current.IsTile()) { cursor_x = ((int)(pos_x + x) / 32) * 32; - cursor_y = ((int) y / 32) * 32; + cursor_y = ((int)(pos_y + y) / 32) * 32; } else { @@ -1222,12 +1175,13 @@ if(le_mouse_pressed[LEFT]) { selection.x2 = x + pos_x; - selection.y2 = y; + selection.y2 = y + pos_y; } if(le_mouse_pressed[RIGHT]) { pos_x += -1 * event.motion.xrel; + pos_y += -1 * event.motion.yrel; } } break; @@ -1493,7 +1447,7 @@ else if(le_current.IsObject()) { cursor_base.x = cursor_x + pos_x; - cursor_base.y = cursor_y + pos_x; + cursor_base.y = cursor_y + pos_y; } cursor_base.width = 32; cursor_base.height = 32; @@ -1545,6 +1499,8 @@ le_move_left_bt->event(event); le_move_right_bt->event(event); + le_move_up_bt->event(event); + le_move_down_bt->event(event); switch(le_move_left_bt->get_state()) { case BUTTON_PRESSED: @@ -1579,6 +1535,51 @@ break; } + switch(le_move_up_bt->get_state()) + { + case BUTTON_PRESSED: + pos_y += 192; + show_minimap = true; + break; + case BUTTON_HOVER: + pos_y += 32; + show_minimap = true; + break; + case BUTTON_CLICKED: + show_minimap = true; + break; + default: + break; + } + + switch(le_move_down_bt->get_state()) + { + case BUTTON_PRESSED: + pos_y -= 192; + show_minimap = true; + break; + case BUTTON_HOVER: + pos_y -= 32; + show_minimap = true; + break; + case BUTTON_CLICKED: + show_minimap = true; + break; + default: + break; + } + + /* checking if pos_x and pos_y is within the limits... */ + if(pos_x < 0) + pos_x = 0; + if(pos_x > (le_world->get_level()->width * 32) - screen->w) + pos_x = (le_world->get_level()->width * 32) - screen->w; + + if(pos_y < 0) + pos_y = 0; + if(pos_y > (le_world->get_level()->height * 32) - screen->h) + pos_y = (le_world->get_level()->height * 32) - screen->h; + } } @@ -1613,7 +1614,7 @@ y1 /= 32; y2 /= 32; - fillrect(x1*32-pos_x, y1*32,32* (x2 - x1 + 1),32 * (y2 - y1 + 1),173,234,177,103); + fillrect(x1*32-pos_x, y1*32-pos_y,32* (x2 - x1 + 1),32 * (y2 - y1 + 1),173,234,177,103); } void le_change(float x, float y, int tm, unsigned int c) |
From: Ricardo C. <rm...@us...> - 2004-05-13 09:12:17
|
Update of /cvsroot/super-tux/supertux/data/images/icons In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17930/data/images/icons Modified Files: down.png up.png Added Files: next.png previous.png Log Message: Changed up and down to previous and next. And added up and down icons. --- NEW FILE: next.png --- (This appears to be a binary file; contents omitted.) Index: down.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/icons/down.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsChi9B8 and /tmp/cvsjeGsd4 differ --- NEW FILE: previous.png --- (This appears to be a binary file; contents omitted.) Index: up.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/icons/up.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsucRTyN and /tmp/cvsH1dIIJ differ |
From: Ricardo C. <rm...@us...> - 2004-05-13 08:44:19
|
Update of /cvsroot/super-tux/supertux/data/images/tilesets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12387/data/images/tilesets Modified Files: supertux.stgt Log Message: Id 400 was already given. Fixes iceflower bonus bug. Index: supertux.stgt =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/tilesets/supertux.stgt,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- supertux.stgt 13 May 2004 02:58:45 -0000 1.31 +++ supertux.stgt 13 May 2004 08:44:08 -0000 1.32 @@ -15,7 +15,7 @@ (tilegroup (name "Misc") (tiles 75 76 79 80 126 127 129 130 134 135 81)) (tilegroup (name "Pipe") (tiles 53 54 55 56 57 58 59 60)) (tilegroup (name "Grey") (tiles 64 65 66 67 68 69)) - (tilegroup (name "Signs") (tiles 136 137 138 139 140 141 142 143)) + (tilegroup (name "Signs") (tiles 136 137 138 139 141 142 143 144)) (tile (id 0) (images "notile.png")) @@ -505,16 +505,16 @@ (tile (id 139) (solid #f) (images "run4.png")) -(tile (id 140) +(tile (id 141) (solid #f) (images "sign_right1.png")) -(tile (id 141) +(tile (id 142) (solid #f) (images "sign_right2.png")) -(tile (id 142) +(tile (id 143) (solid #f) (images "sign_right3.png")) -(tile (id 143) +(tile (id 144) (solid #f) (images "sign_right4.png")) |
From: Ricardo C. <rm...@us...> - 2004-05-13 08:35:49
|
Update of /cvsroot/super-tux/supertux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10621 Modified Files: TODO Log Message: Replaced backscrolling bug by camera one. Index: TODO =================================================================== RCS file: /cvsroot/super-tux/supertux/TODO,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- TODO 12 May 2004 14:59:39 -0000 1.44 +++ TODO 13 May 2004 08:35:39 -0000 1.45 @@ -18,11 +18,12 @@ [M] When jumping into a brick and there is a powerup, it should change direction or not, depending where the collision was. It currently sucks. [M] Tux should fall while walking in tiles that have a space between. +[M] Camera movement shouldn't be so fast at the beggining, it takes the focus from + the game. [L] time runs while being in in-game menu, at least a bit (jump, go to menu, wait a bit, leave menu, Tux will 'flip' to the ground, instead of fall, pause mode doesn't seem to have this problem, only menu) -[L] Backscroll is really messed up right now :) [L] change lispreader to throw exceptions instead of simply assert() on syntax error [L] fadein/out for intro/extro would be nice |
From: Ryan F. <sik...@us...> - 2004-05-13 02:58:54
|
Update of /cvsroot/super-tux/supertux/data/images/tilesets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17915 Modified Files: supertux.stgt Added Files: sign_right1.png sign_right2.png sign_right3.png sign_right4.png Log Message: - added new sign (from Benjamin) --- NEW FILE: sign_right1.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: sign_right2.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: sign_right3.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: sign_right4.png --- (This appears to be a binary file; contents omitted.) Index: supertux.stgt =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/tilesets/supertux.stgt,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- supertux.stgt 12 May 2004 18:31:38 -0000 1.30 +++ supertux.stgt 13 May 2004 02:58:45 -0000 1.31 @@ -5,16 +5,17 @@ (id 0)) ;; Zero tile (tilegroup (name "Snow") (tiles 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 30 31)) - (tilegroup (name "More-Snow") (tiles 122 123 124 125 113 114 115 116 117 118)) + (tilegroup (name "Snow (More)") (tiles 122 123 124 125 113 114 115 116 117 118)) (tilegroup (name "Darksnow") (tiles 32 33 34 35 36 37 38 39 40 41 42 43)) (tilegroup (name "Block") (tiles 27 28 29 47 48 49 50 51 52 61 62 77 78)) (tilegroup (name "Background") (tiles 24 25 63 70 71 72 73 74 106 107 108 109 110 111)) (tilegroup (name "Classic-Bg") (tiles 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101)) (tilegroup (name "Points") (tiles 132 133)) (tilegroup (name "Bonus") (tiles 44 83 84 102 140 103 104 105 112 128)) - (tilegroup (name "Misc") (tiles 75 76 79 80 126 127 129 130 134 135 136 137 138 139 81)) + (tilegroup (name "Misc") (tiles 75 76 79 80 126 127 129 130 134 135 81)) (tilegroup (name "Pipe") (tiles 53 54 55 56 57 58 59 60)) (tilegroup (name "Grey") (tiles 64 65 66 67 68 69)) + (tilegroup (name "Signs") (tiles 136 137 138 139 140 141 142 143)) (tile (id 0) (images "notile.png")) @@ -491,6 +492,7 @@ (solid #f) (images "nolok2.png")) +; Signs (tile (id 136) (solid #f) (images "run1.png")) @@ -503,5 +505,18 @@ (tile (id 139) (solid #f) (images "run4.png")) +(tile (id 140) + (solid #f) + (images "sign_right1.png")) +(tile (id 141) + (solid #f) + (images "sign_right2.png")) +(tile (id 142) + (solid #f) + (images "sign_right3.png")) +(tile (id 143) + (solid #f) + (images "sign_right4.png")) + ) |
From: Ryan F. <sik...@us...> - 2004-05-13 02:50:23
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16568 Modified Files: menu.cpp Log Message: - fixed a warning Index: menu.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/menu.cpp,v retrieving revision 1.68 retrieving revision 1.69 diff -u -d -r1.68 -r1.69 --- menu.cpp 13 May 2004 02:40:10 -0000 1.68 +++ menu.cpp 13 May 2004 02:50:13 -0000 1.69 @@ -481,7 +481,7 @@ menuaction = MENU_ACTION_NONE; - if (active_item >= item.size()) + if (active_item >= int(item.size())) active_item = int(item.size()) - 1; } |
From: Ryan F. <sik...@us...> - 2004-05-13 02:40:19
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14525 Modified Files: menu.cpp Log Message: - fixed potential crash Index: menu.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/menu.cpp,v retrieving revision 1.67 retrieving revision 1.68 diff -u -d -r1.67 -r1.68 --- menu.cpp 9 May 2004 18:08:01 -0000 1.67 +++ menu.cpp 13 May 2004 02:40:10 -0000 1.68 @@ -480,6 +480,9 @@ } menuaction = MENU_ACTION_NONE; + + if (active_item >= item.size()) + active_item = int(item.size()) - 1; } int |
From: Ryan F. <sik...@us...> - 2004-05-12 20:02:56
|
Update of /cvsroot/super-tux/supertux/data/images/shared In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29260/data/images/shared Modified Files: icebullet-1.png Log Message: - 'nicer' icebullet Index: icebullet-1.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/icebullet-1.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsmsfuVt and /tmp/cvsIoQrhL differ |
From: Ryan F. <sik...@us...> - 2004-05-12 19:43:21
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24809 Modified Files: world.cpp Log Message: - fixed crash when hitting badguy with bullet Index: world.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/world.cpp,v retrieving revision 1.83 retrieving revision 1.84 diff -u -d -r1.83 -r1.84 --- world.cpp 12 May 2004 18:28:37 -0000 1.83 +++ world.cpp 12 May 2004 19:43:08 -0000 1.84 @@ -310,7 +310,7 @@ } } -/* the space that it takes for the screen to start scrolling, regarding +/* the space that it takes for the screen to start scrolling, regarding */ /* screen bounds (in pixels) */ // should be higher than screen->w/2 (320) #define X_SPACE (400-16) @@ -414,7 +414,7 @@ // collision functions of the collided objects. // collide with bad_guy first, since bullet_collision will // delete the bullet - (*j)->collision(0, CO_BULLET); + (*j)->collision(&bullets[i], CO_BULLET); bullets[i].collision(CO_BADGUY); break; // bullet is invalid now, so break } |
From: Ryan F. <sik...@us...> - 2004-05-12 19:22:41
|
Update of /cvsroot/super-tux/supertux/data/images/shared In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19444 Added Files: iceflower-1.png iceflower-2.png iceflower-3.png Log Message: - added old iceflower images --- NEW FILE: iceflower-3.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: iceflower-2.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: iceflower-1.png --- (This appears to be a binary file; contents omitted.) |
Update of /cvsroot/super-tux/supertux/data/images/shared In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18411/data/images/shared Modified Files: icetux-duck-left.png icetux-duck-right.png icetux-grab-left-0.png icetux-grab-right-0.png icetux-jump-left-0.png icetux-jump-right-0.png icetux-kick-left-0.png icetux-kick-right-0.png icetux-skid-left.png icetux-skid-right.png icetux-stand-left.png icetux-stand-right.png icetux-walk-left-0.png icetux-walk-left-1.png icetux-walk-left-2.png icetux-walk-left-3.png icetux-walk-left-4.png icetux-walk-left-5.png icetux-walk-right-0.png icetux-walk-right-1.png icetux-walk-right-2.png icetux-walk-right-3.png icetux-walk-right-4.png icetux-walk-right-5.png Log Message: Benjamin has been kind enough to make us Icy Tux images :) Index: icetux-walk-left-3.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/icetux-walk-left-3.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsWlspaR and /tmp/cvsS7MPdw differ Index: icetux-walk-left-4.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/icetux-walk-left-4.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsrkFSxe and /tmp/cvsacTyQT differ Index: icetux-kick-right-0.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/icetux-kick-right-0.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvshzDCKi and /tmp/cvsyqgB7X differ Index: icetux-walk-right-5.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/icetux-walk-right-5.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvspI08uP and /tmp/cvsbsrxdv differ Index: icetux-walk-right-0.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/icetux-walk-right-0.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvs7dwBh0 and /tmp/cvsPzss5F differ Index: icetux-stand-right.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/icetux-stand-right.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsruQBzY and /tmp/cvseQJAsE differ Index: icetux-walk-left-2.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/icetux-walk-left-2.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvswlvXn7 and /tmp/cvsyameoN differ Index: icetux-stand-left.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/icetux-stand-left.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsH53pxl and /tmp/cvsORmXG1 differ Index: icetux-walk-left-0.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/icetux-walk-left-0.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsc5XcAb and /tmp/cvsWOTpmS differ Index: icetux-walk-left-1.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/icetux-walk-left-1.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsXdxGjC and /tmp/cvsJ30Roj differ Index: icetux-walk-left-5.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/icetux-walk-left-5.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsJCnI1U and /tmp/cvsysHWkC differ Index: icetux-walk-right-4.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/icetux-walk-right-4.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsmovH2d and /tmp/cvsqkBeBV differ Index: icetux-grab-right-0.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/icetux-grab-right-0.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsbNxVNF and /tmp/cvsS474Fn differ Index: icetux-jump-right-0.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/icetux-jump-right-0.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsxUU6Kr and /tmp/cvsZFGida differ Index: icetux-walk-right-1.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/icetux-walk-right-1.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsXahLXB and /tmp/cvsPYq8xk differ Index: icetux-walk-right-2.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/icetux-walk-right-2.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvstJakzb and /tmp/cvs2AQKP5 differ Index: icetux-walk-right-3.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/icetux-walk-right-3.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsru0L4V and /tmp/cvsbEOgUQ differ Index: icetux-jump-left-0.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/icetux-jump-left-0.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsKy0of5 and /tmp/cvsR5GEi0 differ Index: icetux-grab-left-0.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/icetux-grab-left-0.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvs5Ccn1j and /tmp/cvsw1FsXf differ Index: icetux-duck-right.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/icetux-duck-right.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsWlLHTp and /tmp/cvsju99Ul differ Index: icetux-kick-left-0.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/icetux-kick-left-0.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsZtESIw and /tmp/cvsBV8OOs differ Index: icetux-duck-left.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/icetux-duck-left.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsQtGAF0 and /tmp/cvsguMw3W differ Index: icetux-skid-left.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/icetux-skid-left.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsHAOV4D and /tmp/cvsFvrn0A differ Index: icetux-skid-right.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/icetux-skid-right.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsVvnLOb and /tmp/cvsdR1Va9 differ |
From: Ryan F. <sik...@us...> - 2004-05-12 19:00:32
|
Update of /cvsroot/super-tux/supertux/data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13310 Modified Files: supertux.strf Log Message: - reverted to old iceflower Index: supertux.strf =================================================================== RCS file: /cvsroot/super-tux/supertux/data/supertux.strf,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- supertux.strf 12 May 2004 18:32:03 -0000 1.30 +++ supertux.strf 12 May 2004 19:00:09 -0000 1.31 @@ -565,7 +565,9 @@ "shared/fireflower-2.png" "shared/fireflower-1.png")) (sprite (name "iceflower") - (images "shared/iceflower.png")) + (images "shared/iceflower-1.png" + "shared/iceflower-2.png" + "shared/iceflower-3.png")) (sprite (name "firebullet") (x-hotspot 12) |
From: Ryan F. <sik...@us...> - 2004-05-12 19:00:19
|
Update of /cvsroot/super-tux/supertux/data/images/shared In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13310/images/shared Removed Files: iceflower.png Log Message: - reverted to old iceflower --- iceflower.png DELETED --- |
From: Ricardo C. <rm...@us...> - 2004-05-12 18:32:18
|
Update of /cvsroot/super-tux/supertux/data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6609/data Modified Files: supertux.strf Log Message: Added a few entries. Index: supertux.strf =================================================================== RCS file: /cvsroot/super-tux/supertux/data/supertux.strf,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- supertux.strf 12 May 2004 17:59:49 -0000 1.29 +++ supertux.strf 12 May 2004 18:32:03 -0000 1.30 @@ -565,12 +565,7 @@ "shared/fireflower-2.png" "shared/fireflower-1.png")) (sprite (name "iceflower") - (images "shared/iceflower.png" - "shared/iceflower-1.png" - "shared/iceflower-2.png" - "shared/iceflower-3.png" - "shared/iceflower-2.png" - "shared/iceflower-1.png")) + (images "shared/iceflower.png")) (sprite (name "firebullet") (x-hotspot 12) |
From: Ricardo C. <rm...@us...> - 2004-05-12 18:31:48
|
Update of /cvsroot/super-tux/supertux/data/images/tilesets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6465/data/images/tilesets Modified Files: supertux.stgt Log Message: Added ice flower entry. Index: supertux.stgt =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/tilesets/supertux.stgt,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- supertux.stgt 11 May 2004 17:53:47 -0000 1.29 +++ supertux.stgt 12 May 2004 18:31:38 -0000 1.30 @@ -11,7 +11,7 @@ (tilegroup (name "Background") (tiles 24 25 63 70 71 72 73 74 106 107 108 109 110 111)) (tilegroup (name "Classic-Bg") (tiles 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101)) (tilegroup (name "Points") (tiles 132 133)) - (tilegroup (name "Bonus") (tiles 44 83 84 102 103 104 105 112 128)) + (tilegroup (name "Bonus") (tiles 44 83 84 102 140 103 104 105 112 128)) (tilegroup (name "Misc") (tiles 75 76 79 80 126 127 129 130 134 135 136 137 138 139 81)) (tilegroup (name "Pipe") (tiles 53 54 55 56 57 58 59 60)) (tilegroup (name "Grey") (tiles 64 65 66 67 68 69)) @@ -315,11 +315,20 @@ (images "bonus2-1.png" "bonus2-2.png" "bonus2-3.png" "bonus2-4.png" "bonus2-5.png" "bonus2-4.png" "bonus2-3.png" "bonus2-2.png" "bonus2-1.png" "bonus2-1.png" "bonus2-1.png") (anim-speed 50) - (editor-images "bonus-flower.png") + (editor-images "bonus-fireflower.png") (solid #t) (fullbox #t) (data 2) (next-tile 84)) + (tile (id 140) + (images "bonus2-1.png" "bonus2-2.png" "bonus2-3.png" "bonus2-4.png" "bonus2-5.png" "bonus2-4.png" + "bonus2-3.png" "bonus2-2.png" "bonus2-1.png" "bonus2-1.png" "bonus2-1.png") + (anim-speed 50) + (editor-images "bonus-iceflower.png") + (solid #t) + (fullbox #t) + (data 5) + (next-tile 84)) (tile (id 103) (images "bonus2-1.png" "bonus2-2.png" "bonus2-3.png" "bonus2-4.png" "bonus2-5.png" "bonus2-4.png" "bonus2-3.png" "bonus2-2.png" "bonus2-1.png" "bonus2-1.png" "bonus2-1.png") |
From: Ricardo C. <rm...@us...> - 2004-05-12 18:31:25
|
Update of /cvsroot/super-tux/supertux/data/images/tilesets In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6394/data/images/tilesets Added Files: bonus-fireflower.png bonus-iceflower.png Removed Files: bonus-flower.png Log Message: Added bonus ice and fire flower, used by the level editor. --- bonus-flower.png DELETED --- --- NEW FILE: bonus-fireflower.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: bonus-iceflower.png --- (This appears to be a binary file; contents omitted.) |
From: Ricardo C. <rm...@us...> - 2004-05-12 18:29:46
|
Update of /cvsroot/super-tux/supertux/data/images/shared In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5956/data/images/shared Modified Files: iceflower.png Removed Files: iceflower-1.png iceflower-2.png iceflower-3.png Log Message: Added a very bad drawn ice flower. Index: iceflower.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/iceflower.png,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 Binary files /tmp/cvsf7OPEP and /tmp/cvseh6wFs differ --- iceflower-3.png DELETED --- --- iceflower-2.png DELETED --- --- iceflower-1.png DELETED --- |
From: Ricardo C. <rm...@us...> - 2004-05-12 18:28:50
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5709/src Modified Files: special.cpp world.cpp Log Message: Fire should be working again. Unfortanely, both ice and fire shots crash the game when colliding with a badguy. Index: world.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/world.cpp,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- world.cpp 12 May 2004 17:56:34 -0000 1.82 +++ world.cpp 12 May 2004 18:28:37 -0000 1.83 @@ -671,7 +671,15 @@ player_status.distros++; break; - case 2: // Add an upgrade! + case 2: // Add a fire flower upgrade! + if (tux.size == SMALL) /* Tux is small, add mints! */ + add_upgrade(posx, posy, col_side, UPGRADE_GROWUP); + else /* Tux is big, add a fireflower: */ + add_upgrade(posx, posy, col_side, UPGRADE_FIREFLOWER); + play_sound(sounds[SND_UPGRADE], SOUND_CENTER_SPEAKER); + break; + + case 5: // Add an ice flower upgrade! if (tux.size == SMALL) /* Tux is small, add mints! */ add_upgrade(posx, posy, col_side, UPGRADE_GROWUP); else /* Tux is big, add an iceflower: */ Index: special.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/special.cpp,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- special.cpp 12 May 2004 17:56:34 -0000 1.43 +++ special.cpp 12 May 2004 18:28:37 -0000 1.44 @@ -36,6 +36,7 @@ Sprite* img_star; Sprite* img_growup; Sprite* img_iceflower; +Sprite* img_fireflower; Sprite* img_1up; #define GROWUP_SPEED 1.0f @@ -107,7 +108,7 @@ if(kind == FIRE_BULLET) base.ym = base.ym + 0.5 * frame_ratio; - else if(kind == FIRE_BULLET) + else if(kind == ICE_BULLET) base.ym = 0; if (base.x < scroll_x || @@ -130,7 +131,7 @@ { if(kind == FIRE_BULLET) img_firebullet->draw(base.x, base.y); - else if(kind == FIRE_BULLET) + else if(kind == ICE_BULLET) img_icebullet->draw(base.x, base.y); } } @@ -162,7 +163,7 @@ physic.set_velocity(dir == LEFT ? -1 : 1, 4); physic.enable_gravity(true); base.height = 32; - } else if (kind == UPGRADE_ICEFLOWER) { + } else if (kind == UPGRADE_ICEFLOWER || kind == UPGRADE_FIREFLOWER) { // nothing } else if (kind == UPGRADE_GROWUP) { physic.set_velocity(dir == LEFT ? -GROWUP_SPEED : GROWUP_SPEED, 0); @@ -189,7 +190,8 @@ void Upgrade::action(double frame_ratio) { - if (kind == UPGRADE_ICEFLOWER || kind == UPGRADE_GROWUP) { + if (kind == UPGRADE_ICEFLOWER || kind == UPGRADE_FIREFLOWER + || kind == UPGRADE_GROWUP) { if (base.height < 32) { /* Rise up! */ base.height = base.height + 0.7 * frame_ratio; @@ -270,6 +272,8 @@ img_growup->draw_part(0,0,dest.x,dest.y,dest.w,dest.h); else if (kind == UPGRADE_ICEFLOWER) img_iceflower->draw_part(0,0,dest.x,dest.y,dest.w,dest.h); + else if (kind == UPGRADE_FIREFLOWER) + img_fireflower->draw_part(0,0,dest.x,dest.y,dest.w,dest.h); else if (kind == UPGRADE_HERRING) img_star->draw_part(0,0,dest.x,dest.y,dest.w,dest.h); else if (kind == UPGRADE_1UP) @@ -287,6 +291,11 @@ img_iceflower->draw( base.x, base.y); } + else if (kind == UPGRADE_FIREFLOWER) + { + img_fireflower->draw( + base.x, base.y); + } else if (kind == UPGRADE_HERRING) { img_star->draw( @@ -353,6 +362,12 @@ pplayer->grow(); pplayer->got_power = pplayer->ICE_POWER; } + else if (kind == UPGRADE_FIREFLOWER) + { + play_sound(sounds[SND_COFFEE], SOUND_CENTER_SPEAKER); + pplayer->grow(); + pplayer->got_power = pplayer->FIRE_POWER; + } else if (kind == UPGRADE_HERRING) { play_sound(sounds[SND_HERRING], SOUND_CENTER_SPEAKER); @@ -376,6 +391,7 @@ { img_growup = sprite_manager->load("egg"); img_iceflower = sprite_manager->load("iceflower"); + img_fireflower = sprite_manager->load("fireflower"); img_star = sprite_manager->load("star"); img_1up = sprite_manager->load("1up"); |
From: Ricardo C. <rm...@us...> - 2004-05-12 18:00:03
|
Update of /cvsroot/super-tux/supertux/data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31408/data Modified Files: supertux.strf Log Message: Added the new ice power images entries. Index: supertux.strf =================================================================== RCS file: /cvsroot/super-tux/supertux/data/supertux.strf,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- supertux.strf 12 May 2004 15:51:35 -0000 1.28 +++ supertux.strf 12 May 2004 17:59:49 -0000 1.29 @@ -188,6 +188,86 @@ "shared/largetux-star-2.png" )) + ;; Icetux + (sprite (name "icetux-walk-left") + (x-hotspot 6) + (y-hotspot 2) + (images "shared/icetux-walk-left-0.png" + "shared/icetux-walk-left-1.png" + "shared/icetux-walk-left-2.png" + "shared/icetux-walk-left-3.png" + "shared/icetux-walk-left-4.png" + "shared/icetux-walk-left-5.png")) + + (sprite (name "icetux-walk-right") + (x-hotspot 6) + (y-hotspot 2) + (images "shared/icetux-walk-right-0.png" + "shared/icetux-walk-right-1.png" + "shared/icetux-walk-right-2.png" + "shared/icetux-walk-right-3.png" + "shared/icetux-walk-right-4.png" + "shared/icetux-walk-right-5.png")) + + (sprite (name "icetux-skid-right") + (x-hotspot 8) + (y-hotspot 3) + (images "shared/icetux-skid-right.png")) + + (sprite (name "icetux-skid-left") + (x-hotspot 8) + (y-hotspot 3) + (images "shared/icetux-skid-left.png")) + + (sprite (name "icetux-stand-left") + (x-hotspot 5) + (y-hotspot 1) + (images "shared/icetux-stand-left.png")) + + (sprite (name "icetux-stand-right") + (x-hotspot 5) + (y-hotspot 1) + (images "shared/icetux-stand-right.png")) + + (sprite (name "icetux-jump-left") + (x-hotspot 9) + (y-hotspot 2) + (images "shared/icetux-jump-left-0.png")) + (sprite (name "icetux-jump-right") + (x-hotspot 9) + (y-hotspot 2) + (images "shared/icetux-jump-right-0.png")) + + (sprite (name "icetux-duck-left") + (x-hotspot 6) + (y-hotspot 6) + (images "shared/icetux-duck-left.png")) + (sprite (name "icetux-duck-right") + (x-hotspot 6) + (y-hotspot 6) + (images "shared/icetux-duck-right.png")) + + + (sprite (name "icetux-kick-left") + (x-hotspot 5) + (y-hotspot 1) + (images "shared/icetux-kick-left-0.png")) + + (sprite (name "icetux-kick-right") + (x-hotspot 5) + (y-hotspot 1) + (images "shared/icetux-kick-right-0.png")) + + (sprite (name "icetux-grab-left") + (x-hotspot 5) + (y-hotspot 1) + (images "shared/icetux-grab-left-0.png")) + + (sprite (name "icetux-grab-right") + (x-hotspot 5) + (y-hotspot 1) + (images "shared/icetux-grab-right-0.png")) + ;; Firetux (sprite (name "firetux-walk-left") (x-hotspot 6) @@ -477,6 +557,13 @@ "shared/star-3.png" "shared/star-2.png" "shared/star-1.png")) + (sprite (name "fireflower") + (images "shared/fireflower.png" + "shared/fireflower-1.png" + "shared/fireflower-2.png" + "shared/fireflower-3.png" + "shared/fireflower-2.png" + "shared/fireflower-1.png")) (sprite (name "iceflower") (images "shared/iceflower.png" "shared/iceflower-1.png" @@ -485,14 +572,19 @@ "shared/iceflower-2.png" "shared/iceflower-1.png")) - (sprite (name "bullet") + (sprite (name "firebullet") (x-hotspot 12) (x-hotspot 12) (fps 20) - (images "shared/bullet-1.png" - "shared/bullet-2.png" - "shared/bullet-3.png" - "shared/bullet-4.png")) + (images "shared/firebullet-1.png" + "shared/firebullet-2.png" + "shared/firebullet-3.png" + "shared/firebullet-4.png")) + (sprite (name "icebullet") + (x-hotspot 12) + (x-hotspot 12) + (fps 20) + (images "shared/icebullet-1.png")) ) ;; EOF ;; |
Update of /cvsroot/super-tux/supertux/data/images/shared In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31140/data/images/shared Added Files: firebullet-1.png firebullet-2.png firebullet-3.png firebullet-4.png fireflower-1.png fireflower-2.png fireflower-3.png fireflower.png icebullet-1.png icetux-duck-left.png icetux-duck-right.png icetux-grab-left-0.png icetux-grab-right-0.png icetux-jump-left-0.png icetux-jump-right-0.png icetux-kick-left-0.png icetux-kick-right-0.png icetux-skid-left.png icetux-skid-right.png icetux-stand-left.png icetux-stand-right.png icetux-walk-left-0.png icetux-walk-left-1.png icetux-walk-left-2.png icetux-walk-left-3.png icetux-walk-left-4.png icetux-walk-left-5.png icetux-walk-right-0.png icetux-walk-right-1.png icetux-walk-right-2.png icetux-walk-right-3.png icetux-walk-right-4.png icetux-walk-right-5.png Removed Files: bullet-1.png bullet-2.png bullet-3.png bullet-4.png Log Message: Added ice power related images. Artist, now it's your time! --- NEW FILE: fireflower.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icetux-walk-left-3.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: firebullet-1.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: firebullet-3.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icetux-walk-left-4.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icetux-kick-right-0.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icetux-walk-right-5.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icetux-walk-right-0.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: fireflower-2.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icetux-stand-right.png --- (This appears to be a binary file; contents omitted.) --- bullet-1.png DELETED --- --- bullet-2.png DELETED --- --- NEW FILE: icebullet-1.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icetux-walk-left-2.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icetux-stand-left.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icetux-walk-left-0.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icetux-walk-left-1.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: fireflower-1.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: firebullet-2.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: fireflower-3.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icetux-walk-left-5.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icetux-walk-right-4.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icetux-grab-right-0.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icetux-jump-right-0.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: firebullet-4.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icetux-walk-right-1.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icetux-walk-right-2.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icetux-walk-right-3.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icetux-jump-left-0.png --- (This appears to be a binary file; contents omitted.) --- bullet-3.png DELETED --- --- NEW FILE: icetux-grab-left-0.png --- (This appears to be a binary file; contents omitted.) --- bullet-4.png DELETED --- --- NEW FILE: icetux-duck-right.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icetux-kick-left-0.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icetux-duck-left.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icetux-skid-left.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: icetux-skid-right.png --- (This appears to be a binary file; contents omitted.) |
From: Ricardo C. <rm...@us...> - 2004-05-12 17:56:46
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30577/src Modified Files: badguy.cpp badguy.h defines.h gameloop.cpp player.cpp player.h resources.cpp special.cpp special.h world.cpp worldmap.cpp Log Message: First implementation of the ice power. Index: player.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/player.h,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- player.h 11 May 2004 17:50:48 -0000 1.54 +++ player.h 12 May 2004 17:56:34 -0000 1.55 @@ -103,14 +103,16 @@ extern PlayerSprite smalltux; extern PlayerSprite largetux; extern PlayerSprite firetux; +extern PlayerSprite icetux; class Player : public GameObject { public: enum HurtMode { KILL, SHRINK }; + enum Power { NONE_POWER, FIRE_POWER, ICE_POWER }; player_input_type input; - bool got_coffee; + int got_power; int size; bool duck; bool holding_something; Index: special.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/special.cpp,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- special.cpp 12 May 2004 01:16:33 -0000 1.42 +++ special.cpp 12 May 2004 17:56:34 -0000 1.43 @@ -31,7 +31,8 @@ #include "sprite_manager.h" #include "resources.h" -Sprite* img_bullet; +Sprite* img_firebullet; +Sprite* img_icebullet; Sprite* img_star; Sprite* img_growup; Sprite* img_iceflower; @@ -43,7 +44,7 @@ #define BULLET_XM 6 void -Bullet::init(float x, float y, float xm, Direction dir) +Bullet::init(float x, float y, float xm, Direction dir, int kind_) { life_count = 3; base.width = 4; @@ -63,6 +64,7 @@ base.y = y; base.ym = BULLET_STARTING_YM; old_base = base; + kind = kind_; } void @@ -103,7 +105,10 @@ life_count -= 1; } - base.ym = base.ym + 0.5 * frame_ratio; + if(kind == FIRE_BULLET) + base.ym = base.ym + 0.5 * frame_ratio; + else if(kind == FIRE_BULLET) + base.ym = 0; if (base.x < scroll_x || base.x > scroll_x + screen->w || @@ -123,7 +128,10 @@ if (base.x >= scroll_x - base.width && base.x <= scroll_x + screen->w) { - img_bullet->draw(base.x, base.y); + if(kind == FIRE_BULLET) + img_firebullet->draw(base.x, base.y); + else if(kind == FIRE_BULLET) + img_icebullet->draw(base.x, base.y); } } @@ -333,11 +341,17 @@ play_sound(sounds[SND_EXCELLENT], SOUND_CENTER_SPEAKER); pplayer->grow(); } + else if (kind == UPGRADE_FIREFLOWER) + { + play_sound(sounds[SND_COFFEE], SOUND_CENTER_SPEAKER); + pplayer->grow(); + pplayer->got_power = pplayer->FIRE_POWER; + } else if (kind == UPGRADE_ICEFLOWER) { play_sound(sounds[SND_COFFEE], SOUND_CENTER_SPEAKER); pplayer->grow(); - pplayer->got_coffee = true; + pplayer->got_power = pplayer->ICE_POWER; } else if (kind == UPGRADE_HERRING) { @@ -365,7 +379,8 @@ img_star = sprite_manager->load("star"); img_1up = sprite_manager->load("1up"); - img_bullet = sprite_manager->load("bullet"); + img_firebullet = sprite_manager->load("firebullet"); + img_icebullet = sprite_manager->load("icebullet"); } void free_special_gfx() Index: worldmap.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/worldmap.cpp,v retrieving revision 1.69 retrieving revision 1.70 diff -u -d -r1.69 -r1.70 --- worldmap.cpp 12 May 2004 15:36:15 -0000 1.69 +++ worldmap.cpp 12 May 2004 17:56:34 -0000 1.70 @@ -648,7 +648,8 @@ bool old_level_state = level->solved; level->solved = true; - if (session.get_world()->get_tux()->got_coffee) + if (session.get_world()->get_tux()->got_power != + session.get_world()->get_tux()->NONE_POWER) player_status.bonus = PlayerStatus::FLOWER_BONUS; else if (session.get_world()->get_tux()->size == BIG) player_status.bonus = PlayerStatus::GROWUP_BONUS; Index: gameloop.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/gameloop.cpp,v retrieving revision 1.125 retrieving revision 1.126 diff -u -d -r1.125 -r1.126 --- gameloop.cpp 12 May 2004 15:36:15 -0000 1.125 +++ gameloop.cpp 12 May 2004 17:56:33 -0000 1.126 @@ -343,7 +343,11 @@ break; case SDLK_DELETE: if(debug_mode) - tux.got_coffee = 1; + tux.got_power = tux.FIRE_POWER; + break; + case SDLK_HOME: + if(debug_mode) + tux.got_power = tux.ICE_POWER; break; case SDLK_INSERT: if(debug_mode) Index: special.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/special.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- special.h 2 May 2004 21:28:32 -0000 1.20 +++ special.h 12 May 2004 17:56:34 -0000 1.21 @@ -32,6 +32,7 @@ enum UpgradeKind { UPGRADE_GROWUP, + UPGRADE_FIREFLOWER, UPGRADE_ICEFLOWER, UPGRADE_HERRING, UPGRADE_1UP @@ -65,14 +66,21 @@ void bump(Player* player); }; +enum BulletsKind { + FIRE_BULLET, + ICE_BULLET +}; + class Bullet : public GameObject { public: int life_count; base_type base; base_type old_base; + + int kind; - void init(float x, float y, float xm, Direction dir); + void init(float x, float y, float xm, Direction dir, int kind_); void action(double frame_ratio); void draw(); void collision(int c_object); Index: player.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/player.cpp,v retrieving revision 1.92 retrieving revision 1.93 diff -u -d -r1.92 -r1.93 --- player.cpp 11 May 2004 23:15:45 -0000 1.92 +++ player.cpp 12 May 2004 17:56:33 -0000 1.93 @@ -37,6 +37,7 @@ PlayerSprite smalltux; PlayerSprite largetux; +PlayerSprite icetux; PlayerSprite firetux; PlayerKeymap keymap; @@ -72,7 +73,7 @@ base.height = 32; size = SMALL; - got_coffee = false; + got_power = NONE_POWER; base.x = plevel->start_pos_x; base.y = plevel->start_pos_y; @@ -453,7 +454,7 @@ /* Shoot! */ - if (input.fire == DOWN && input.old_fire == UP && got_coffee) + if (input.fire == DOWN && input.old_fire == UP && got_power != NONE_POWER) { World::current()->add_bullet(base.x, base.y, physic.get_velocity_x(), dir); input.old_fire = DOWN; @@ -559,8 +560,10 @@ if (size == SMALL) sprite = &smalltux; - else if (got_coffee) + else if (got_power == FIRE_POWER) sprite = &firetux; + else if (got_power == ICE_POWER) + sprite = &icetux; else sprite = &largetux; @@ -709,9 +712,9 @@ if (mode == SHRINK && size == BIG) { - if (got_coffee) + if (got_power != NONE_POWER) { - got_coffee = false; + got_power = NONE_POWER; } else { @@ -751,7 +754,7 @@ void Player::remove_powerups() { - got_coffee = false; + got_power = NONE_POWER; size = SMALL; base.height = 32; } Index: defines.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/defines.h,v retrieving revision 1.36 retrieving revision 1.37 diff -u -d -r1.36 -r1.37 --- defines.h 10 May 2004 20:39:42 -0000 1.36 +++ defines.h 12 May 2004 17:56:33 -0000 1.37 @@ -69,7 +69,9 @@ #define START_LIVES 4 -#define MAX_BULLETS 2 +#define MAX_FIRE_BULLETS 2 +#define MAX_ICE_BULLETS 1 +#define FROZEN_TIME 3000 #define YM_FOR_JUMP 6.0 #define WALK_ACCELERATION_X 0.03 Index: badguy.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/badguy.h,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- badguy.h 8 May 2004 23:46:43 -0000 1.38 +++ badguy.h 12 May 2004 17:56:33 -0000 1.39 @@ -96,6 +96,7 @@ bool removable; bool seen; int squishcount; /// number of times this enemy was squiched + Timer frozen_timer; // gets frozen when a ice shot hits it Timer timer; Physic physic; Index: badguy.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/badguy.cpp,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -r1.70 -r1.71 --- badguy.cpp 11 May 2004 23:15:43 -0000 1.70 +++ badguy.cpp 12 May 2004 17:56:33 -0000 1.71 @@ -151,6 +151,7 @@ old_base = base; dir = LEFT; seen = false; + frozen_timer.init(true); animation_offset = 0; sprite_left = sprite_right = 0; physic.reset(); @@ -683,6 +684,9 @@ if(!seen) return; + if(frozen_timer.check()) + return; + switch (kind) { case BAD_MRICEBLOCK: @@ -939,6 +943,7 @@ BadGuy::collision(void *p_c_object, int c_object, CollisionType type) { BadGuy* pbad_c = NULL; + Bullet* pbullet_c = NULL; if(type == COLLISION_BUMP) { bump(); @@ -955,7 +960,12 @@ switch (c_object) { case CO_BULLET: - kill_me(10); + pbullet_c = (Bullet*) p_c_object; + + if(pbullet_c->kind == FIRE_BULLET) + kill_me(10); + else if(pbullet_c->kind == ICE_BULLET) + frozen_timer.start(FROZEN_TIME); break; case CO_BADGUY: Index: world.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/world.cpp,v retrieving revision 1.81 retrieving revision 1.82 diff -u -d -r1.81 -r1.82 --- world.cpp 12 May 2004 12:40:46 -0000 1.81 +++ world.cpp 12 May 2004 17:56:34 -0000 1.82 @@ -89,7 +89,7 @@ break; case PlayerStatus::FLOWER_BONUS: - tux.got_coffee = true; + tux.got_power = tux.FIRE_POWER; // FIXME: add ice power to here // fall through case PlayerStatus::GROWUP_BONUS: @@ -546,11 +546,22 @@ void World::add_bullet(float x, float y, float xm, Direction dir) { - if(bullets.size() > MAX_BULLETS-1) - return; + if(tux.got_power == tux.FIRE_POWER) + { + if(bullets.size() > MAX_FIRE_BULLETS-1) + return; + } + else if(tux.got_power == tux.ICE_POWER) + { + if(bullets.size() > MAX_ICE_BULLETS-1) + return; + } Bullet new_bullet; - new_bullet.init(x,y,xm,dir); + if(tux.got_power == tux.FIRE_POWER) + new_bullet.init(x,y,xm,dir, FIRE_BULLET); + else if(tux.got_power == tux.ICE_POWER) + new_bullet.init(x,y,xm,dir, ICE_BULLET); bullets.push_back(new_bullet); play_sound(sounds[SND_SHOOT], SOUND_CENTER_SPEAKER); Index: resources.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/resources.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- resources.cpp 29 Apr 2004 15:18:27 -0000 1.30 +++ resources.cpp 12 May 2004 17:56:34 -0000 1.31 @@ -97,6 +97,22 @@ firetux.duck_left = sprite_manager->load("firetux-duck-left"); firetux.duck_right = sprite_manager->load("firetux-duck-right"); + icetux.stand_left = sprite_manager->load("icetux-stand-left"); + icetux.stand_right = sprite_manager->load("icetux-stand-right"); + icetux.walk_left = sprite_manager->load("icetux-walk-left"); + icetux.walk_right = sprite_manager->load("icetux-walk-right"); + icetux.jump_left = sprite_manager->load("icetux-jump-left"); + icetux.jump_right = sprite_manager->load("icetux-jump-right"); + icetux.kick_left = sprite_manager->load("icetux-kick-left"); + icetux.kick_right = sprite_manager->load("icetux-kick-right"); + icetux.skid_right = sprite_manager->load("icetux-skid-right"); + icetux.skid_left = sprite_manager->load("icetux-skid-left"); + icetux.grab_left = sprite_manager->load("icetux-grab-left"); + icetux.grab_right = sprite_manager->load("icetux-grab-right"); + icetux.duck_left = sprite_manager->load("icetux-duck-left"); + icetux.duck_right = sprite_manager->load("icetux-duck-right"); + + /* Water: */ img_water = new Surface(datadir + "/images/shared/water.png", IGNORE_ALPHA); |
From: Ryan F. <sik...@us...> - 2004-05-12 17:20:40
|
Update of /cvsroot/super-tux/supertux/data/images/shared In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22095 Modified Files: largetux-jump-left-0.png largetux-jump-right-0.png Log Message: - fixed largetux jump frames (from Benjamin) Index: largetux-jump-right-0.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/largetux-jump-right-0.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsVvhTJR and /tmp/cvsu6R9Ky differ Index: largetux-jump-left-0.png =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/shared/largetux-jump-left-0.png,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsEiyELx and /tmp/cvsNPKp5f differ |