super-tux-commit Mailing List for Super Tux (Page 67)
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: Ryan F. <sik...@us...> - 2004-05-16 00:01:31
|
Update of /cvsroot/super-tux/supertux/data/images/shared In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13857 Added Files: trampoline-1.png trampoline-2.png trampoline-3.png trampoline-4.png Log Message: - added Ben's trampoline images --- NEW FILE: trampoline-4.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: trampoline-1.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: trampoline-3.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: trampoline-2.png --- (This appears to be a binary file; contents omitted.) |
From: Ryan F. <sik...@us...> - 2004-05-15 22:23:06
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26560/src Modified Files: Tag: supertux_0_1_1_branch gameloop.cpp gameloop.h leveleditor.cpp leveleditor.h worldmap.cpp worldmap.h Log Message: - Created supertux_0_1_1_branch branch (bugfix branch) - Fixed level editor not scrolling all the way to end of level - Fixed problems with enums Index: worldmap.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/worldmap.h,v retrieving revision 1.28 retrieving revision 1.28.2.1 diff -u -d -r1.28 -r1.28.2.1 --- worldmap.h 27 Apr 2004 18:44:19 -0000 1.28 +++ worldmap.h 15 May 2004 22:22:54 -0000 1.28.2.1 @@ -81,7 +81,7 @@ Tile* get(int i); }; -enum Direction { NONE, WEST, EAST, NORTH, SOUTH }; +enum Direction { D_NONE, D_WEST, D_EAST, D_NORTH, D_SOUTH }; std::string direction_to_string(Direction d); Direction string_to_direction(const std::string& d); Index: leveleditor.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/leveleditor.cpp,v retrieving revision 1.109 retrieving revision 1.109.2.1 diff -u -d -r1.109 -r1.109.2.1 --- leveleditor.cpp 10 May 2004 21:59:25 -0000 1.109 +++ leveleditor.cpp 15 May 2004 22:22:54 -0000 1.109.2.1 @@ -212,8 +212,8 @@ /* 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; + if(pos_x > (le_world->get_level()->width * 32 + 2*32) - screen->w) + pos_x = (le_world->get_level()->width * 32 +2*32) - screen->w; /* draw the level */ le_drawlevel(); @@ -809,12 +809,12 @@ if(show_selections && MouseCursor::current() != mouse_select_object) { - if(le_selection_mode == CURSOR) + if(le_selection_mode == SM_CURSOR) { if(le_current.IsTile()) le_selection->draw( cursor_x - pos_x, cursor_y); } - else if(le_selection_mode == SQUARE) + else if(le_selection_mode == SM_SQUARE) { int w, h; le_highlight_selection(); @@ -860,9 +860,9 @@ le_next_level_bt->draw(); le_previous_level_bt->draw(); le_rubber_bt->draw(); - if(le_selection_mode == SQUARE) + if(le_selection_mode == SM_SQUARE) le_select_mode_one_bt->draw(); - else if(le_selection_mode == CURSOR) + else if(le_selection_mode == SM_CURSOR) le_select_mode_two_bt->draw(); le_settings_bt->draw(); le_move_right_bt->draw(); @@ -1305,17 +1305,17 @@ } - if(le_selection_mode == SQUARE) + if(le_selection_mode == SM_SQUARE) { le_select_mode_one_bt->event(event); if(le_select_mode_one_bt->get_state() == BUTTON_CLICKED) - le_selection_mode = CURSOR; + le_selection_mode = SM_CURSOR; } else { le_select_mode_two_bt->event(event); if(le_select_mode_two_bt->get_state() == BUTTON_CLICKED) - le_selection_mode = SQUARE; + le_selection_mode = SM_SQUARE; } ButtonPanelMap::iterator it; le_tilegroup_bt->event(event); @@ -1623,7 +1623,7 @@ switch(le_selection_mode) { - case CURSOR: + case SM_CURSOR: le_world->get_level()->change(x,y,tm,c); base_type cursor_base; @@ -1643,7 +1643,7 @@ } break; - case SQUARE: + case SM_SQUARE: if(selection.x1 < selection.x2) { x1 = selection.x1; @@ -1724,7 +1724,7 @@ { bool tmp_show_grid = le_show_grid; int temp_le_selection_mode = le_selection_mode; - le_selection_mode = NONE; + le_selection_mode = SM_NONE; show_selections = true; le_show_grid = false; le_help_shown = true; Index: gameloop.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/gameloop.h,v retrieving revision 1.48 retrieving revision 1.48.2.1 diff -u -d -r1.48 -r1.48.2.1 --- gameloop.h 29 Apr 2004 00:15:10 -0000 1.48 +++ gameloop.h 15 May 2004 22:22:54 -0000 1.48.2.1 @@ -73,7 +73,7 @@ std::string subset; public: - enum ExitStatus { NONE, LEVEL_FINISHED, GAME_OVER, LEVEL_ABORT }; + enum ExitStatus { ES_NONE, ES_LEVEL_FINISHED, ES_GAME_OVER, ES_LEVEL_ABORT }; private: ExitStatus exit_status; public: Index: worldmap.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/worldmap.cpp,v retrieving revision 1.68 retrieving revision 1.68.2.1 diff -u -d -r1.68 -r1.68.2.1 --- worldmap.cpp 8 May 2004 10:45:52 -0000 1.68 +++ worldmap.cpp 15 May 2004 22:22:54 -0000 1.68.2.1 @@ -36,18 +36,18 @@ { switch(direction) { - case WEST: - return EAST; - case EAST: - return WEST; - case NORTH: - return SOUTH; - case SOUTH: - return NORTH; - case NONE: - return NONE; + case D_WEST: + return D_EAST; + case D_EAST: + return D_WEST; + case D_NORTH: + return D_SOUTH; + case D_SOUTH: + return D_NORTH; + case D_NONE: + return D_NONE; } - return NONE; + return D_NONE; } std::string @@ -55,13 +55,13 @@ { switch(direction) { - case WEST: + case D_WEST: return "west"; - case EAST: + case D_EAST: return "east"; - case NORTH: + case D_NORTH: return "north"; - case SOUTH: + case D_SOUTH: return "south"; default: return "none"; @@ -72,15 +72,15 @@ string_to_direction(const std::string& directory) { if (directory == "west") - return WEST; + return D_WEST; else if (directory == "east") - return EAST; + return D_EAST; else if (directory == "north") - return NORTH; + return D_NORTH; else if (directory == "south") - return SOUTH; + return D_SOUTH; else - return NONE; + return D_NONE; } TileManager::TileManager() @@ -173,8 +173,8 @@ moving = false; tile_pos.x = 4; tile_pos.y = 5; - direction = NONE; - input_direction = NONE; + direction = D_NONE; + input_direction = D_NONE; } Tux::~Tux() @@ -214,19 +214,19 @@ switch(direction) { - case WEST: + case D_WEST: x -= offset - 32; break; - case EAST: + case D_EAST: x += offset - 32; break; - case NORTH: + case D_NORTH: y -= offset - 32; break; - case SOUTH: + case D_SOUTH: y += offset - 32; break; - case NONE: + case D_NONE: break; } @@ -237,7 +237,7 @@ Tux::stop() { offset = 0; - direction = NONE; + direction = D_NONE; moving = false; } @@ -246,7 +246,7 @@ { if (!moving) { - if (input_direction != NONE) + if (input_direction != D_NONE) { WorldMap::Level* level = worldmap->at_level(); @@ -288,18 +288,18 @@ if (worldmap->at(tile_pos)->auto_walk) { // Turn to a new direction Tile* tile = worldmap->at(tile_pos); - Direction dir = NONE; + Direction dir = D_NONE; - if (tile->north && back_direction != NORTH) - dir = NORTH; - else if (tile->south && back_direction != SOUTH) - dir = SOUTH; - else if (tile->east && back_direction != EAST) - dir = EAST; - else if (tile->west && back_direction != WEST) - dir = WEST; + if (tile->north && back_direction != D_NORTH) + dir = D_NORTH; + else if (tile->south && back_direction != D_SOUTH) + dir = D_SOUTH; + else if (tile->east && back_direction != D_EAST) + dir = D_EAST; + else if (tile->west && back_direction != D_WEST) + dir = D_WEST; - if (dir != NONE) + if (dir != D_NONE) { direction = dir; back_direction = reverse_dir(direction); @@ -352,7 +352,7 @@ leveldot_green = new Surface(datadir + "/images/worldmap/leveldot_green.png", USE_ALPHA); leveldot_red = new Surface(datadir + "/images/worldmap/leveldot_red.png", USE_ALPHA); - input_direction = NONE; + input_direction = D_NONE; enter_level = false; name = "<no file>"; @@ -493,7 +493,7 @@ WorldMap::get_input() { enter_level = false; - input_direction = NONE; + input_direction = D_NONE; SDL_Event event; while (SDL_PollEvent(&event)) @@ -529,16 +529,16 @@ if (event.jaxis.axis == joystick_keymap.x_axis) { if (event.jaxis.value < -joystick_keymap.dead_zone) - input_direction = WEST; + input_direction = D_WEST; else if (event.jaxis.value > joystick_keymap.dead_zone) - input_direction = EAST; + input_direction = D_EAST; } else if (event.jaxis.axis == joystick_keymap.y_axis) { if (event.jaxis.value > joystick_keymap.dead_zone) - input_direction = SOUTH; + input_direction = D_SOUTH; else if (event.jaxis.value < -joystick_keymap.dead_zone) - input_direction = NORTH; + input_direction = D_NORTH; } break; @@ -560,13 +560,13 @@ Uint8 *keystate = SDL_GetKeyState(NULL); if (keystate[SDLK_LEFT]) - input_direction = WEST; + input_direction = D_WEST; else if (keystate[SDLK_RIGHT]) - input_direction = EAST; + input_direction = D_EAST; else if (keystate[SDLK_UP]) - input_direction = NORTH; + input_direction = D_NORTH; else if (keystate[SDLK_DOWN]) - input_direction = SOUTH; + input_direction = D_SOUTH; } } @@ -575,19 +575,19 @@ { switch(direction) { - case WEST: + case D_WEST: pos.x -= 1; break; - case EAST: + case D_EAST: pos.x += 1; break; - case NORTH: + case D_NORTH: pos.y -= 1; break; - case SOUTH: + case D_SOUTH: pos.y += 1; break; - case NONE: + case D_NONE: break; } return pos; @@ -607,19 +607,19 @@ { // Check if we the tile allows us to go to new_pos switch(direction) { - case WEST: + case D_WEST: return (at(old_pos)->west && at(*new_pos)->east); - case EAST: + case D_EAST: return (at(old_pos)->east && at(*new_pos)->west); - case NORTH: + case D_NORTH: return (at(old_pos)->north && at(*new_pos)->south); - case SOUTH: + case D_SOUTH: return (at(old_pos)->south && at(*new_pos)->north); - case NONE: + case D_NONE: assert(!"path_ok() can't work if direction is NONE"); } return false; @@ -643,7 +643,7 @@ switch (session.run()) { - case GameSession::LEVEL_FINISHED: + case GameSession::ES_LEVEL_FINISHED: { bool old_level_state = level->solved; level->solved = true; @@ -658,20 +658,20 @@ if (old_level_state != level->solved) { // Try to detect the next direction to which we should walk // FIXME: Mostly a hack - Direction dir = NONE; + Direction dir = D_NONE; Tile* tile = at(tux->get_tile_pos()); - if (tile->north && tux->back_direction != NORTH) - dir = NORTH; - else if (tile->south && tux->back_direction != SOUTH) - dir = SOUTH; - else if (tile->east && tux->back_direction != EAST) - dir = EAST; - else if (tile->west && tux->back_direction != WEST) - dir = WEST; + if (tile->north && tux->back_direction != D_NORTH) + dir = D_NORTH; + else if (tile->south && tux->back_direction != D_SOUTH) + dir = D_SOUTH; + else if (tile->east && tux->back_direction != D_EAST) + dir = D_EAST; + else if (tile->west && tux->back_direction != D_WEST) + dir = D_WEST; - if (dir != NONE) + if (dir != D_NONE) { tux->set_direction(dir); //tux->update(delta); @@ -695,7 +695,7 @@ } break; - case GameSession::LEVEL_ABORT: + case GameSession::ES_LEVEL_ABORT: // Reseting the player_status might be a worthy // consideration, but I don't think we need it // 'cause only the bad players will use it to @@ -704,11 +704,11 @@ // then stop playing the game all together since it // is to hard) break; - case GameSession::GAME_OVER: + case GameSession::ES_GAME_OVER: quit = true; player_status.reset(); break; - case GameSession::NONE: + case GameSession::ES_NONE: // Should never be reached break; } Index: gameloop.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/gameloop.cpp,v retrieving revision 1.124 retrieving revision 1.124.2.1 diff -u -d -r1.124 -r1.124.2.1 --- gameloop.cpp 10 May 2004 21:54:22 -0000 1.124 +++ gameloop.cpp 15 May 2004 22:22:54 -0000 1.124.2.1 @@ -76,7 +76,7 @@ GameSession::restart_level() { game_pause = false; - exit_status = NONE; + exit_status = ES_NONE; end_sequence = NO_ENDSEQUENCE; fps_timer.init(true); @@ -183,7 +183,7 @@ if(st_gl_mode == ST_GL_TEST) { - exit_status = LEVEL_ABORT; + exit_status = ES_LEVEL_ABORT; } else if (!Menu::current()) { @@ -441,7 +441,7 @@ } else if(end_sequence && !endsequence_timer.check()) { - exit_status = LEVEL_FINISHED; + exit_status = ES_LEVEL_FINISHED; return; } else if(end_sequence == ENDSEQUENCE_RUNNING && endtile && endtile->data >= 1) @@ -465,7 +465,7 @@ if(st_gl_mode != ST_GL_TEST) drawendscreen(); - exit_status = GAME_OVER; + exit_status = ES_GAME_OVER; } else { // Still has lives, so reset Tux to the levelstart @@ -479,7 +479,7 @@ void GameSession::action(double frame_ratio) { - if (exit_status == NONE) + if (exit_status == ES_NONE) { // Update Tux and the World world->action(frame_ratio); @@ -529,7 +529,7 @@ break; case MNID_ABORTLEVEL: st_pause_ticks_stop(); - exit_status = LEVEL_ABORT; + exit_status = ES_LEVEL_ABORT; break; } } @@ -560,7 +560,7 @@ draw(); - while (exit_status == NONE) + while (exit_status == ES_NONE) { /* Calculate the movement-factor */ double frame_ratio = ((double)(update_time-last_update_time))/((double)FRAME_RATE); Index: leveleditor.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/leveleditor.h,v retrieving revision 1.9 retrieving revision 1.9.2.1 diff -u -d -r1.9 -r1.9.2.1 --- leveleditor.h 9 May 2004 13:55:54 -0000 1.9 +++ leveleditor.h 15 May 2004 22:22:54 -0000 1.9.2.1 @@ -30,9 +30,9 @@ /* selection modes */ enum { - CURSOR, - SQUARE, - NONE + SM_CURSOR, + SM_SQUARE, + SM_NONE }; int leveleditor(char* filename = NULL); |
From: Ricardo C. <rm...@us...> - 2004-05-15 18:28:07
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12533/src Modified Files: title.cpp Log Message: Made the menu to get back to the main menu after the slot deleting dialog. I would prefer it would get back to the load menu, but at least this is better than exiting the game... Index: title.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/title.cpp,v retrieving revision 1.83 retrieving revision 1.84 diff -u -d -r1.83 -r1.84 --- title.cpp 14 May 2004 21:49:30 -0000 1.83 +++ title.cpp 15 May 2004 18:27:57 -0000 1.84 @@ -335,6 +335,7 @@ } update_load_save_game_menu(load_game_menu); + Menu::set_current(main_menu); update_time = st_get_ticks(); } else if (process_load_game_menu()) |
From: Ricardo C. <rm...@us...> - 2004-05-15 18:26:58
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12263/src Modified Files: leveleditor.cpp Log Message: Made level editor to use the draw_bg() that Ryan added to level. This way the background bug is fixed. Index: leveleditor.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/leveleditor.cpp,v retrieving revision 1.119 retrieving revision 1.120 diff -u -d -r1.119 -r1.120 --- leveleditor.cpp 15 May 2004 11:00:32 -0000 1.119 +++ leveleditor.cpp 15 May 2004 18:26:48 -0000 1.120 @@ -642,6 +642,7 @@ { int i; i = false; + le_level_changed = true; le_world->get_level()->name = level_settings_menu->get_item_by_id(MNID_NAME).input; le_world->get_level()->author = level_settings_menu->get_item_by_id(MNID_AUTHOR).input; @@ -922,22 +923,14 @@ void le_drawlevel() { - unsigned int y,x,s; + unsigned int y,x; Uint8 a; /* Draw the real background */ - if(le_world->get_level()->bkgd_image[0] != '\0') - { - s = (int)((float)pos_x * ((float)le_world->get_level()->bkgd_speed/100.0f)) % screen->w; - le_world->get_level()->img_bkgd->draw_part(s,0,0,0, - le_world->get_level()->img_bkgd->w - s - 32, le_world->get_level()->img_bkgd->h); - le_world->get_level()->img_bkgd->draw_part(0,0,screen->w - s - 32 ,0,s, - le_world->get_level()->img_bkgd->h); - } + if (le_world->get_level()->img_bkgd) + le_world->get_level()->draw_bg(); else - { drawgradient(le_world->get_level()->bkgd_top, le_world->get_level()->bkgd_bottom); - } if(le_current.IsTile()) { |
From: Ricardo C. <rm...@us...> - 2004-05-15 14:26:47
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28299/src Modified Files: screen.cpp Log Message: Ooops, forgot to remove a comment. Index: screen.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/screen.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- screen.cpp 15 May 2004 14:19:01 -0000 1.15 +++ screen.cpp 15 May 2004 14:26:38 -0000 1.16 @@ -82,8 +82,6 @@ { #endif -//void fillrect(float x, float y, float w, float h, int r, int g, int b, int a) - for(float y = 0; y < screen->h; y += 2) fillrect(0, (int)y, screen->w, 2, (int)(((float)(top_clr.red-bot_clr.red)/(0-screen->h)) * y + top_clr.red), |
From: Ricardo C. <rm...@us...> - 2004-05-15 14:19:11
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26735/src Modified Files: screen.cpp Log Message: I allways noticed that in the SDL mode, the gradient was sometimes different than the OpenGL. But when I did the function, everything was okay and in most of the gradients it worked fine. Finally, gone to the code and corrected that. It was just a typo (screen->w was being used in green and blue calculation, instead of screen->h). Index: screen.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/screen.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- screen.cpp 15 May 2004 10:29:35 -0000 1.14 +++ screen.cpp 15 May 2004 14:19:01 -0000 1.15 @@ -82,11 +82,14 @@ { #endif +//void fillrect(float x, float y, float w, float h, int r, int g, int b, int a) + for(float y = 0; y < screen->h; y += 2) fillrect(0, (int)y, screen->w, 2, - (int)(((float)(top_clr.red-bot_clr.red)/(0-screen->h)) * y + top_clr.red), - (int)(((float)(top_clr.green-bot_clr.green)/(0-screen->w)) * y + top_clr.green), - (int)(((float)(top_clr.blue-bot_clr.blue)/(0-screen->w)) * y + top_clr.blue), 255); + (int)(((float)(top_clr.red-bot_clr.red)/(0-screen->h)) * y + top_clr.red), + (int)(((float)(top_clr.green-bot_clr.green)/(0-screen->h)) * y + top_clr.green), + (int)(((float)(top_clr.blue-bot_clr.blue)/(0-screen->h)) * y + top_clr.blue), + 255); /* calculates the color for each line, based in the generic equation for functions: y = mx + b */ #ifndef NOOPENGL |
From: Ricardo C. <rm...@us...> - 2004-05-15 14:16:24
|
Update of /cvsroot/super-tux/supertux/data/levels/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26179/data/levels/test Modified Files: level4.stl Log Message: Changed the gradient colors. This gradient caused the SDL frontend to be different than the OpenGL. Index: level4.stl =================================================================== RCS file: /cvsroot/super-tux/supertux/data/levels/test/level4.stl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- level4.stl 13 May 2004 21:02:15 -0000 1.3 +++ level4.stl 15 May 2004 14:16:15 -0000 1.4 @@ -7,12 +7,12 @@ (background "") (particle_system "") (bkgd_speed 50) - (bkgd_red_top 200) - (bkgd_green_top 200) - (bkgd_blue_top 60) - (bkgd_red_bottom 220) - (bkgd_green_bottom 140) - (bkgd_blue_bottom 120) + (bkgd_red_top 0) + (bkgd_green_top 0) + (bkgd_blue_top 255) + (bkgd_red_bottom 255) + (bkgd_green_bottom 255) + (bkgd_blue_bottom 255) (time 500) (width 50) (height 15) |
From: Ricardo C. <rm...@us...> - 2004-05-15 12:09:08
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2123/src Modified Files: world.cpp Log Message: Only do vertical scrolling when the height is higher than 19. This fixes the problem that scrolling was used in 19 Y tiles levels. Since the right number of Y tiles is 18.75, not 19. Index: world.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/world.cpp,v retrieving revision 1.90 retrieving revision 1.91 diff -u -d -r1.90 -r1.91 --- world.cpp 15 May 2004 09:59:02 -0000 1.90 +++ world.cpp 15 May 2004 12:08:57 -0000 1.91 @@ -321,10 +321,13 @@ float tux_pos_y = tux.base.y + (tux.base.height/2); - if (scroll_y < tux_pos_y - (screen->h - Y_SPACE)) - scroll_y = tux_pos_y - (screen->h - Y_SPACE); - else if (scroll_y > tux_pos_y - Y_SPACE) - scroll_y = tux_pos_y - Y_SPACE; + if(level->height > VISIBLE_TILES_Y-1) + { + if (scroll_y < tux_pos_y - (screen->h - Y_SPACE)) + scroll_y = tux_pos_y - (screen->h - Y_SPACE); + else if (scroll_y > tux_pos_y - Y_SPACE) + scroll_y = tux_pos_y - Y_SPACE; + } // this code prevent the screen to scroll before the start or after the level's end if(scroll_y > level->height * 32 - screen->h) |
From: Ricardo C. <rm...@us...> - 2004-05-15 11:29:57
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27326/src Modified Files: worldmap.cpp Log Message: Fixed Coins text position in world map. Index: worldmap.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/worldmap.cpp,v retrieving revision 1.71 retrieving revision 1.72 diff -u -d -r1.71 -r1.72 --- worldmap.cpp 14 May 2004 22:47:35 -0000 1.71 +++ worldmap.cpp 15 May 2004 11:29:47 -0000 1.72 @@ -816,7 +816,7 @@ sprintf(str, "%d", player_status.distros); white_text->draw_align("COINS", screen->w/2 - white_text->w*5, 0, A_LEFT, A_TOP); - gold_text->draw_align(str, screen->w/2, 0, A_RIGHT, A_TOP); + gold_text->draw_align(str, screen->w/2 + (white_text->w*5)/2, 0, A_RIGHT, A_TOP); white_text->draw("LIVES", screen->w - white_text->w*9, 0); if (player_status.lives >= 5) |
From: Ryan F. <sik...@us...> - 2004-05-15 11:01:00
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22128 Modified Files: leveleditor.cpp Log Message: - fixed level editor crash - some other resolution fixes in level editor - fixed level editor not scrolling all the way to end of level (last two columns were hiding behind the panel). This is in 0.1.1, too. Index: leveleditor.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/leveleditor.cpp,v retrieving revision 1.118 retrieving revision 1.119 diff -u -d -r1.118 -r1.119 --- leveleditor.cpp 15 May 2004 09:59:02 -0000 1.118 +++ leveleditor.cpp 15 May 2004 11:00:32 -0000 1.119 @@ -812,10 +812,10 @@ /* draw a grid (if selected) */ if(le_show_grid) { - for(x = 0; x < 19; x++) + for(x = 0; x < VISIBLE_TILES_X; x++) fillrect(x*32 - ((int)pos_x % 32), 0, 1, screen->h, 225, 225, 225,255); - for(y = 0; y < 16; y++) - fillrect(0, y*32 - ((int)pos_y % 32), screen->w - 32, 1, 225, 225, 225,255); + for(y = 0; y < VISIBLE_TILES_Y; y++) + fillrect(0, y*32 - ((int)pos_y % 32), screen->w, 1, 225, 225, 225,255); } } @@ -849,13 +849,13 @@ if(le_current.IsTile()) { - Tile::draw(19 * 32, 14 * 32, le_current.tile); + Tile::draw(screen->w - 32, screen->h - 32, le_current.tile); if(TileManager::instance()->get(le_current.tile)->editor_images.size() > 0) - TileManager::instance()->get(le_current.tile)->editor_images[0]->draw( 19 * 32, 14 * 32); + TileManager::instance()->get(le_current.tile)->editor_images[0]->draw( screen->w - 32, screen->h - 32); } if(le_current.IsObject() && MouseCursor::current() != mouse_select_object) { - le_current.obj->draw_on_screen(19 * 32, 14 * 32); + le_current.obj->draw_on_screen(screen->w - 32, screen->h - 32); le_current.obj->draw_on_screen(cursor_x,cursor_y); } @@ -953,7 +953,7 @@ /* clearscreen(current_level.bkgd_red, current_level.bkgd_green, current_level.bkgd_blue); */ for (y = 0; y < VISIBLE_TILES_Y && y < (unsigned)le_world->get_level()->height; ++y) - for (x = 0; x < (unsigned)VISIBLE_TILES_X-80; ++x) + for (x = 0; x < (unsigned)VISIBLE_TILES_X - 2; ++x) { if(active_tm == TM_BG) @@ -1579,8 +1579,8 @@ } /* checking if pos_x and pos_y is within the limits... */ - if(pos_x > (le_world->get_level()->width * 32) - screen->w) - pos_x = (le_world->get_level()->width * 32) - screen->w; + if(pos_x > (le_world->get_level()->width * 32 + 32*2) - screen->w) + pos_x = (le_world->get_level()->width * 32 + 32*2) - screen->w; if(pos_x < 0) pos_x = 0; |
From: Ryan F. <sik...@us...> - 2004-05-15 10:29:47
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16653 Modified Files: screen.cpp Log Message: - fixed drawgradient() function (res fix) Index: screen.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/screen.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- screen.cpp 14 May 2004 21:49:30 -0000 1.13 +++ screen.cpp 15 May 2004 10:29:35 -0000 1.14 @@ -82,11 +82,11 @@ { #endif - for(float y = 0; y < 480; y += 2) - fillrect(0, (int)y, 640, 2, - (int)(((float)(top_clr.red-bot_clr.red)/(0-480)) * y + top_clr.red), - (int)(((float)(top_clr.green-bot_clr.green)/(0-480)) * y + top_clr.green), - (int)(((float)(top_clr.blue-bot_clr.blue)/(0-480)) * y + top_clr.blue), 255); + for(float y = 0; y < screen->h; y += 2) + fillrect(0, (int)y, screen->w, 2, + (int)(((float)(top_clr.red-bot_clr.red)/(0-screen->h)) * y + top_clr.red), + (int)(((float)(top_clr.green-bot_clr.green)/(0-screen->w)) * y + top_clr.green), + (int)(((float)(top_clr.blue-bot_clr.blue)/(0-screen->w)) * y + top_clr.blue), 255); /* calculates the color for each line, based in the generic equation for functions: y = mx + b */ #ifndef NOOPENGL |
From: Ricardo C. <rm...@us...> - 2004-05-15 10:10:13
|
Update of /cvsroot/super-tux/supertux/data/levels/world1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12770/data/levels/world1 Modified Files: level10.stl level14.stl level1.stl level21.stl level22.stl level23.stl level2.stl level3.stl level4.stl level5.stl level6.stl level7.stl level8.stl level9.stl Log Message: Made levels to use arctis.jpg, instead of arctis2.jpg Index: level1.stl =================================================================== RCS file: /cvsroot/super-tux/supertux/data/levels/world1/level1.stl,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- level1.stl 1 May 2004 11:59:49 -0000 1.13 +++ level1.stl 15 May 2004 10:09:58 -0000 1.14 @@ -7,7 +7,7 @@ (height 15) (start_pos_x 100) (start_pos_y 100) - (background "arctis2.jpg") + (background "arctis.jpg") (music "Mortimers_chipdisko.mod") (bkgd_red_top 150) (bkgd_green_top 150) Index: level21.stl =================================================================== RCS file: /cvsroot/super-tux/supertux/data/levels/world1/level21.stl,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- level21.stl 9 May 2004 20:24:20 -0000 1.8 +++ level21.stl 15 May 2004 10:09:58 -0000 1.9 @@ -7,7 +7,7 @@ (height 15) (start_pos_x 100) (start_pos_y 170) - (background "arctis2.jpg") + (background "arctis.jpg") (music "Mortimers_chipdisko.mod") (bkgd_red_top 150) (bkgd_green_top 150) Index: level5.stl =================================================================== RCS file: /cvsroot/super-tux/supertux/data/levels/world1/level5.stl,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- level5.stl 1 May 2004 12:11:54 -0000 1.14 +++ level5.stl 15 May 2004 10:09:58 -0000 1.15 @@ -7,7 +7,7 @@ (height 15) (start_pos_x 100) (start_pos_y 170) - (background "arctis2.jpg") + (background "arctis.jpg") (music "Mortimers_chipdisko.mod") (bkgd_red_top 150) (bkgd_green_top 150) Index: level10.stl =================================================================== RCS file: /cvsroot/super-tux/supertux/data/levels/world1/level10.stl,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- level10.stl 8 May 2004 20:03:02 -0000 1.14 +++ level10.stl 15 May 2004 10:09:58 -0000 1.15 @@ -4,7 +4,7 @@ (name "23rd Airborne") (author "Ingo Ruhnke") (music "Mortimers_chipdisko.mod") - (background "arctis2.jpg") + (background "arctis.jpg") (particle_system "") (bkgd_speed "2") (bkgd_red_top 150) Index: level23.stl =================================================================== RCS file: /cvsroot/super-tux/supertux/data/levels/world1/level23.stl,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- level23.stl 1 May 2004 14:37:30 -0000 1.8 +++ level23.stl 15 May 2004 10:09:58 -0000 1.9 @@ -7,7 +7,7 @@ (height 15) (start_pos_x 100) (start_pos_y 170) - (background "arctis2.jpg") + (background "arctis.jpg") (music "Mortimers_chipdisko.mod") (bkgd_red_top 150) (bkgd_green_top 150) Index: level6.stl =================================================================== RCS file: /cvsroot/super-tux/supertux/data/levels/world1/level6.stl,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- level6.stl 1 May 2004 19:07:57 -0000 1.10 +++ level6.stl 15 May 2004 10:09:58 -0000 1.11 @@ -7,7 +7,7 @@ (height 15) (start_pos_x 100) (start_pos_y 170) - (background "arctis2.jpg") + (background "arctis.jpg") (music "Mortimers_chipdisko.mod") (bkgd_red_top 150) (bkgd_green_top 150) Index: level4.stl =================================================================== RCS file: /cvsroot/super-tux/supertux/data/levels/world1/level4.stl,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- level4.stl 9 May 2004 20:24:20 -0000 1.13 +++ level4.stl 15 May 2004 10:09:58 -0000 1.14 @@ -7,7 +7,7 @@ (height 15) (start_pos_x 100) (start_pos_y 170) - (background "arctis2.jpg") + (background "arctis.jpg") (music "Mortimers_chipdisko.mod") (bkgd_red_top 150) (bkgd_green_top 150) Index: level7.stl =================================================================== RCS file: /cvsroot/super-tux/supertux/data/levels/world1/level7.stl,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- level7.stl 1 May 2004 13:08:24 -0000 1.14 +++ level7.stl 15 May 2004 10:09:58 -0000 1.15 @@ -7,7 +7,7 @@ (height 15) (start_pos_x 100) (start_pos_y 170) - (background "arctis2.jpg") + (background "arctis.jpg") (music "Mortimers_chipdisko.mod") (bkgd_red_top 150) (bkgd_green_top 150) Index: level8.stl =================================================================== RCS file: /cvsroot/super-tux/supertux/data/levels/world1/level8.stl,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- level8.stl 1 May 2004 12:33:01 -0000 1.12 +++ level8.stl 15 May 2004 10:09:58 -0000 1.13 @@ -7,7 +7,7 @@ (height 15) (start_pos_x 100) (start_pos_y 170) - (background "arctis2.jpg") + (background "arctis.jpg") (music "Mortimers_chipdisko.mod") (bkgd_red_top 150) (bkgd_green_top 150) Index: level2.stl =================================================================== RCS file: /cvsroot/super-tux/supertux/data/levels/world1/level2.stl,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- level2.stl 1 May 2004 11:59:49 -0000 1.11 +++ level2.stl 15 May 2004 10:09:58 -0000 1.12 @@ -7,7 +7,7 @@ (height 15) (start_pos_x 100) (start_pos_y 100) - (background "arctis2.jpg") + (background "arctis.jpg") (music "Mortimers_chipdisko.mod") (bkgd_red_top 150) (bkgd_green_top 150) Index: level9.stl =================================================================== RCS file: /cvsroot/super-tux/supertux/data/levels/world1/level9.stl,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- level9.stl 1 May 2004 12:40:37 -0000 1.10 +++ level9.stl 15 May 2004 10:09:59 -0000 1.11 @@ -7,7 +7,7 @@ (height 15) (start_pos_x 100) (start_pos_y 170) - (background "arctis2.jpg") + (background "arctis.jpg") (music "Mortimers_chipdisko.mod") (bkgd_red_top 150) (bkgd_green_top 150) Index: level3.stl =================================================================== RCS file: /cvsroot/super-tux/supertux/data/levels/world1/level3.stl,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- level3.stl 1 May 2004 11:59:49 -0000 1.11 +++ level3.stl 15 May 2004 10:09:58 -0000 1.12 @@ -7,7 +7,7 @@ (height 15) (start_pos_x 100) (start_pos_y 170) - (background "arctis2.jpg") + (background "arctis.jpg") (music "Mortimers_chipdisko.mod") (bkgd_red_top 150) (bkgd_green_top 150) Index: level14.stl =================================================================== RCS file: /cvsroot/super-tux/supertux/data/levels/world1/level14.stl,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- level14.stl 1 May 2004 13:38:25 -0000 1.11 +++ level14.stl 15 May 2004 10:09:58 -0000 1.12 @@ -7,7 +7,7 @@ (height 15) (start_pos_x 100) (start_pos_y 170) - (background "arctis2.jpg") + (background "arctis.jpg") (music "Mortimers_chipdisko.mod") (bkgd_red_top 150) (bkgd_green_top 150) Index: level22.stl =================================================================== RCS file: /cvsroot/super-tux/supertux/data/levels/world1/level22.stl,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- level22.stl 9 May 2004 20:24:20 -0000 1.8 +++ level22.stl 15 May 2004 10:09:58 -0000 1.9 @@ -7,7 +7,7 @@ (height 15) (start_pos_x 100) (start_pos_y 170) - (background "arctis2.jpg") + (background "arctis.jpg") (music "fortress.mod") (bkgd_red_top 150) (bkgd_green_top 150) |
From: Ricardo C. <rm...@us...> - 2004-05-15 10:10:07
|
Update of /cvsroot/super-tux/supertux/data/levels/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12770/data/levels/test Modified Files: level10.stl level2.stl Log Message: Made levels to use arctis.jpg, instead of arctis2.jpg Index: level10.stl =================================================================== RCS file: /cvsroot/super-tux/supertux/data/levels/test/level10.stl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- level10.stl 11 May 2004 21:55:05 -0000 1.1 +++ level10.stl 15 May 2004 10:09:57 -0000 1.2 @@ -7,7 +7,7 @@ (height 18) (start_pos_x 100) (start_pos_y 170) - (background "arctis2.jpg") + (background "arctis.jpg") (music "Mortimers_chipdisko.mod") (bkgd_red_top 150) (bkgd_green_top 150) Index: level2.stl =================================================================== RCS file: /cvsroot/super-tux/supertux/data/levels/test/level2.stl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- level2.stl 25 Apr 2004 14:34:00 -0000 1.2 +++ level2.stl 15 May 2004 10:09:57 -0000 1.3 @@ -5,7 +5,7 @@ (author "Ingo Ruhnke") (width 100) (height 15) - (background "arctis2.jpg") + (background "arctis.jpg") (music "Mortimers_chipdisko.mod") (bkgd_red 150) (bkgd_green 200) |
From: Ricardo C. <rm...@us...> - 2004-05-15 10:10:07
|
Update of /cvsroot/super-tux/supertux/data/levels/misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12770/data/levels/misc Modified Files: menu.stl Log Message: Made levels to use arctis.jpg, instead of arctis2.jpg Index: menu.stl =================================================================== RCS file: /cvsroot/super-tux/supertux/data/levels/misc/menu.stl,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- menu.stl 8 May 2004 00:06:35 -0000 1.6 +++ menu.stl 15 May 2004 10:09:56 -0000 1.7 @@ -4,7 +4,7 @@ (name "Hello World") (author "unknown author") (music "theme.mod") - (background "arctis2.jpg") + (background "arctis.jpg") (particle_system "") (bkgd_speed "2") (bkgd_red_top 0) |
From: Ricardo C. <rm...@us...> - 2004-05-15 10:07:50
|
Update of /cvsroot/super-tux/supertux/data/images/background In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12615/data/images/background Added Files: arctis.jpg Log Message: Changed "arctis2.jpg" to "arctis.jpg". --- NEW FILE: arctis.jpg --- (This appears to be a binary file; contents omitted.) |
From: Ricardo C. <rm...@us...> - 2004-05-15 10:06:57
|
Update of /cvsroot/super-tux/supertux/data/images/background In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12348/data/images/background Removed Files: arctis2.jpg arctis.png Log Message: Moved old arctic background image into the old dir. --- arctis.png DELETED --- --- arctis2.jpg DELETED --- |
From: Ricardo C. <rm...@us...> - 2004-05-15 10:06:55
|
Update of /cvsroot/super-tux/supertux/data/images/background/old In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12348/data/images/background/old Added Files: arctis.png Log Message: Moved old arctic background image into the old dir. --- NEW FILE: arctis.png --- (This appears to be a binary file; contents omitted.) |
From: Ricardo C. <rm...@us...> - 2004-05-15 10:05:33
|
Update of /cvsroot/super-tux/supertux/data/images/background/old In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12140/data/images/background/old Log Message: Directory /cvsroot/super-tux/supertux/data/images/background/old added to the repository |
From: Ricardo C. <rm...@us...> - 2004-05-15 10:01:42
|
Update of /cvsroot/super-tux/supertux/data/images/background In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11204/data/images/background Modified Files: oiltux.jpg Log Message: Replaced this background by a 800x600 version. Ingo sent this some time ago to the mailing list. Index: oiltux.jpg =================================================================== RCS file: /cvsroot/super-tux/supertux/data/images/background/oiltux.jpg,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvsIKlGdA and /tmp/cvsAYGbf7 differ |
From: Ricardo C. <rm...@us...> - 2004-05-15 09:59:11
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10659/src Modified Files: leveleditor.cpp world.cpp Log Message: Cleanup. Also applied the same fix to leveleditor. Unfortanely, still crashes, aparentelly in the same point. Index: world.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/world.cpp,v retrieving revision 1.89 retrieving revision 1.90 diff -u -d -r1.89 -r1.90 --- world.cpp 14 May 2004 21:49:30 -0000 1.89 +++ world.cpp 15 May 2004 09:59:02 -0000 1.90 @@ -327,16 +327,10 @@ scroll_y = tux_pos_y - Y_SPACE; // this code prevent the screen to scroll before the start or after the level's end - if(scroll_y < 0) - scroll_y = 0; - else if(scroll_y > level->height * 32 - screen->h) + if(scroll_y > level->height * 32 - screen->h) scroll_y = level->height * 32 - screen->h; - - if (scroll_y < 0) - { - //std::cerr << "Level too short!!" << std::endl; + if(scroll_y < 0) scroll_y = 0; - } /* X-axis scrolling */ @@ -389,10 +383,10 @@ } // this code prevent the screen to scroll before the start or after the level's end + if(scroll_x > level->width * 32 - screen->w) + scroll_x = level->width * 32 - screen->w; if(scroll_x < 0) scroll_x = 0; - else if(scroll_x > level->width * 32 - screen->w) - scroll_x = level->width * 32 - screen->w; } void Index: leveleditor.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/leveleditor.cpp,v retrieving revision 1.117 retrieving revision 1.118 diff -u -d -r1.117 -r1.118 --- leveleditor.cpp 14 May 2004 16:02:40 -0000 1.117 +++ leveleditor.cpp 15 May 2004 09:59:02 -0000 1.118 @@ -1579,15 +1579,15 @@ } /* 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_x < 0) + pos_x = 0; - 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; + if(pos_y < 0) + pos_y = 0; } |
From: Ricardo C. <ri...@ae...> - 2004-05-14 23:13:51
|
Why did this patch fixed the crash? I mean the only thing changed was that my debug outputs were removed, performance improved (in case scroll_y < 0 you don't do the other test) and scroll_y < 0 is tested twice, one after the other... Am I missing something? Really, I am just wondering, cause the level editor is crashing due to the same problem... Ricardo Cruz Em Sexta, 14 de Maio de 2004 18:35, o Ryan Flegel escreveu: > Update of /cvsroot/super-tux/supertux/src > In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19219 > > Modified Files: > tile.cpp world.cpp > Log Message: > - fixed drawing crash > - not quite in a playable state yet :) > > Index: world.cpp > =================================================================== > RCS file: /cvsroot/super-tux/supertux/src/world.cpp,v > retrieving revision 1.86 > retrieving revision 1.87 > diff -u -d -r1.86 -r1.87 > --- world.cpp 14 May 2004 16:02:41 -0000 1.86 > +++ world.cpp 14 May 2004 17:35:30 -0000 1.87 > @@ -196,16 +196,11 @@ > (*p)->draw(scroll_x, 0, 0); > } > > -fprintf(stderr, "level->height: %i\n", level->height); > -fprintf(stderr, "scroll_x: %i\n", scroll_x); > -fprintf(stderr, "scroll_y: %i\n", scroll_y); > /* Draw background: */ > for (y = 0; y < VISIBLE_TILES_Y && y < level->height; ++y) > { > -fprintf(stderr, "drawing row: %i\n", y); > for (x = 0; x < VISIBLE_TILES_X; ++x) > { > -fprintf(stderr, "x: %i\n", x); > Tile::draw(32*x - fmodf(scroll_x, 32), y * 32 - fmodf(scroll_y, > 32), level->bg_tiles[(int)y + (int)(scroll_y / 32)][(int)x + (int)(scroll_x > / 32)]); } > @@ -340,9 +335,15 @@ > // this code prevent the screen to scroll before the start or after the > level's end if(scroll_y < 0) > scroll_y = 0; > - if(scroll_y > level->height * 32 - screen->h) > + else if(scroll_y > level->height * 32 - screen->h) > scroll_y = level->height * 32 - screen->h; > > + if (scroll_y < 0) > + { > + std::cerr << "Level too short!!" << std::endl; > + scroll_y = 0; > + } > + > /* X-axis scrolling */ > > /* Auto scrolling */ > @@ -384,8 +385,6 @@ > scroll_x += (final_scroll_x - scroll_x) > / (frame_ratio * (CHANGE_DIR_SCROLL_SPEED / 100)) > + (tux.physic.get_velocity_x() * frame_ratio + > tux.physic.get_acceleration_x() * frame_ratio * frame_ratio); - // > std::cerr << tux_pos_x << " " << final_scroll_x << " " << scroll_x << > std::endl; - > } > else > { > @@ -398,7 +397,7 @@ > // this code prevent the screen to scroll before the start or after the > level's end if(scroll_x < 0) > scroll_x = 0; > - if(scroll_x > level->width * 32 - screen->w) > + else if(scroll_x > level->width * 32 - screen->w) > scroll_x = level->width * 32 - screen->w; > } > > > Index: tile.cpp > =================================================================== > RCS file: /cvsroot/super-tux/supertux/src/tile.cpp,v > retrieving revision 1.21 > retrieving revision 1.22 > diff -u -d -r1.21 -r1.22 > --- tile.cpp 14 May 2004 16:02:41 -0000 1.21 > +++ tile.cpp 14 May 2004 17:35:30 -0000 1.22 > @@ -185,8 +185,6 @@ > void > Tile::draw(float x, float y, unsigned int c, Uint8 alpha) > { > -fprintf(stderr, "x: %i\n", x); > -fprintf(stderr, "y: %i\n", y); > if (c != 0) > { > Tile* ptile = TileManager::instance()->get(c); > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: SourceForge.net Broadband > Sign-up now for SourceForge Broadband and get the fastest > 6.0/768 connection for only $19.95/mo for the first 3 months! > http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click > _______________________________________________ > Super-tux-commit mailing list > Sup...@li... > https://lists.sourceforge.net/lists/listinfo/super-tux-commit -- One picture is worth more than ten thousand words. -- Chinese proverb |
From: Ryan F. <sik...@us...> - 2004-05-14 22:47:44
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24026 Modified Files: gameloop.cpp worldmap.cpp Log Message: - even more res fixes--we're getting there Index: worldmap.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/worldmap.cpp,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -r1.70 -r1.71 --- worldmap.cpp 12 May 2004 17:56:34 -0000 1.70 +++ worldmap.cpp 14 May 2004 22:47:35 -0000 1.71 @@ -815,20 +815,20 @@ gold_text->draw(str, 96, 0); sprintf(str, "%d", player_status.distros); - white_text->draw_align("COINS", 320-64, 0, A_LEFT, A_TOP); - gold_text->draw_align(str, 320+64, 0, A_RIGHT, A_TOP); + white_text->draw_align("COINS", screen->w/2 - white_text->w*5, 0, A_LEFT, A_TOP); + gold_text->draw_align(str, screen->w/2, 0, A_RIGHT, A_TOP); - white_text->draw("LIVES", 480, 0); + white_text->draw("LIVES", screen->w - white_text->w*9, 0); if (player_status.lives >= 5) { sprintf(str, "%dx", player_status.lives); - gold_text->draw_align(str, 617, 0, A_RIGHT, A_TOP); - tux_life->draw(565+(18*3), 0); + gold_text->draw_align(str, screen->w - gold_text->w, 0, A_RIGHT, A_TOP); + tux_life->draw(screen->w - gold_text->w, 0); } else { for(int i= 0; i < player_status.lives; ++i) - tux_life->draw(565+(18*i),0); + tux_life->draw(screen->w - tux_life->w*4 +(tux_life->w*i),0); } if (!tux->is_moving()) Index: gameloop.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/gameloop.cpp,v retrieving revision 1.127 retrieving revision 1.128 diff -u -d -r1.127 -r1.128 --- gameloop.cpp 14 May 2004 21:49:30 -0000 1.127 +++ gameloop.cpp 14 May 2004 22:47:35 -0000 1.128 @@ -683,35 +683,35 @@ } if(!time_left.check()) { - white_text->draw("TIME'S UP", 224, 0, 1); + white_text->draw("TIME'S UP", screen->w/2 - white_text->w*8, 0, 1); } else if (time_left.get_left() > TIME_WARNING || (global_frame_counter % 10) < 5) { sprintf(str, "%d", time_left.get_left() / 1000 ); - white_text->draw("TIME", 224, 0, 1); - gold_text->draw(str, 304, 0, 1); + white_text->draw("TIME", screen->w/2 - white_text->w*4, 0, 1); + gold_text->draw(str, screen->w/2 + gold_text->w, 0, 1); } sprintf(str, "%d", player_status.distros); - white_text->draw("COINS", screen->h, 0, 1); - gold_text->draw(str, 608, 0, 1); + white_text->draw("COINS", screen->w - white_text->w*9, 0, 1); + gold_text->draw(str, screen->w - gold_text->w*2, 0, 1); - white_text->draw("LIVES", 480, 20); + white_text->draw("LIVES", screen->w - white_text->w*9, 20); if (player_status.lives >= 5) { sprintf(str, "%dx", player_status.lives); - gold_text->draw_align(str, 617, 20, A_RIGHT, A_TOP); - tux_life->draw(565+(18*3), 20); + gold_text->draw_align(str, screen->w - gold_text->w, 20, A_RIGHT, A_TOP); + tux_life->draw(screen->w - gold_text->w, 20); } else { for(int i= 0; i < player_status.lives; ++i) - tux_life->draw(565+(18*i),20); + tux_life->draw(screen->w - tux_life->w*4 +(tux_life->w*i), 20); } if(show_fps) { sprintf(str, "%2.1f", fps_fps); - white_text->draw("FPS", screen->h, 40, 1); - gold_text->draw(str, screen->h + 60, 40, 1); + white_text->draw("FPS", screen->w - white_text->w*9, 40, 1); + gold_text->draw_align(str, screen->w, 40, A_RIGHT, A_TOP); } } @@ -731,7 +731,7 @@ gold_text->drawf(str, 0, 224, A_HMIDDLE, A_TOP, 1); sprintf(str, "COINS: %d", player_status.distros); - gold_text->drawf(str, 0, 256, A_HMIDDLE, A_TOP, 1); + gold_text->drawf(str, 0, screen->w - gold_text->w*2, A_HMIDDLE, A_TOP, 1); flipscreen(); |
From: Ryan F. <sik...@us...> - 2004-05-14 21:49:41
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12763 Modified Files: gameloop.cpp level.cpp level.h screen.cpp title.cpp world.cpp Log Message: - more resolution fixes Index: level.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/level.cpp,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -r1.70 -r1.71 --- level.cpp 12 May 2004 14:54:04 -0000 1.70 +++ level.cpp 14 May 2004 21:49:30 -0000 1.71 @@ -739,6 +739,16 @@ } } +void Level::draw_bg() +{ + // Tile background horizontally + int sx = (int)((float)scroll_x * ((float)bkgd_speed/100.0f)) % img_bkgd->w; + for (int i = 0; (i-1)*img_bkgd->w <= screen->w; i++) + img_bkgd->draw_part(i == 0 ? sx : 0, 0, + i == 0 ? 0 : (img_bkgd->w * i) - sx, 0, + i == 0 ? img_bkgd->w - sx : img_bkgd->w, img_bkgd->h); +} + void Level::load_song() { Index: level.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/level.h,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- level.h 11 May 2004 18:26:27 -0000 1.47 +++ level.h 14 May 2004 21:49:30 -0000 1.48 @@ -136,6 +136,9 @@ void change_width (int new_width); void change_height (int new_height); + /* Draw background */ + void draw_bg(); + /** Return the id of the tile at position x/y */ unsigned int gettileid(float x, float y) const; /** returns the id of the tile at position x,y Index: title.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/title.cpp,v retrieving revision 1.82 retrieving revision 1.83 diff -u -d -r1.82 -r1.83 --- title.cpp 14 May 2004 07:42:29 -0000 1.82 +++ title.cpp 14 May 2004 21:49:30 -0000 1.83 @@ -271,7 +271,7 @@ draw_demo(&session, frame_ratio); if (Menu::current() == main_menu) - logo->draw( 160, 30); + logo->draw(screen->w/2 - logo->w/2, 30); white_small_text->draw(" SuperTux " VERSION "\n" "Copyright (c) 2003 SuperTux Devel Team\n" Index: world.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/world.cpp,v retrieving revision 1.88 retrieving revision 1.89 diff -u -d -r1.88 -r1.89 --- world.cpp 14 May 2004 20:50:22 -0000 1.88 +++ world.cpp 14 May 2004 21:49:30 -0000 1.89 @@ -178,21 +178,10 @@ int y,x; /* Draw the real background */ + drawgradient(level->bkgd_top, level->bkgd_bottom); if(level->img_bkgd) - { - // Tile background horizontally - int sx = (int)((float)scroll_x * ((float)level->bkgd_speed/100.0f)) % level->img_bkgd->w; - for (int i = 0; (i-1)*level->img_bkgd->w <= screen->w; i++) - { - level->img_bkgd->draw_part(i == 0 ? sx : 0, 0, - i == 0 ? 0 : (level->img_bkgd->w * i) - sx, 0, - i == 0 ? level->img_bkgd->w - sx : level->img_bkgd->w, level->img_bkgd->h); - } - } - else - { - drawgradient(level->bkgd_top, level->bkgd_bottom); - } + level->draw_bg(); + /* Draw particle systems (background) */ std::vector<ParticleSystem*>::iterator p; Index: gameloop.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/gameloop.cpp,v retrieving revision 1.126 retrieving revision 1.127 diff -u -d -r1.126 -r1.127 --- gameloop.cpp 12 May 2004 17:56:33 -0000 1.126 +++ gameloop.cpp 14 May 2004 21:49:30 -0000 1.127 @@ -146,7 +146,7 @@ char str[60]; if (get_level()->img_bkgd) - get_level()->img_bkgd->draw(0, 0); + get_level()->draw_bg(); else drawgradient(get_level()->bkgd_top, get_level()->bkgd_bottom); @@ -721,7 +721,7 @@ char str[80]; if (get_level()->img_bkgd) - get_level()->img_bkgd->draw(0, 0); + get_level()->draw_bg(); else drawgradient(get_level()->bkgd_top, get_level()->bkgd_bottom); @@ -745,7 +745,7 @@ char str[80]; if (get_level()->img_bkgd) - get_level()->img_bkgd->draw(0, 0); + get_level()->draw_bg(); else drawgradient(get_level()->bkgd_top, get_level()->bkgd_bottom); Index: screen.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/screen.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- screen.cpp 1 May 2004 11:25:45 -0000 1.12 +++ screen.cpp 14 May 2004 21:49:30 -0000 1.13 @@ -72,10 +72,10 @@ glBegin(GL_QUADS); glColor3ub(top_clr.red, top_clr.green, top_clr.blue); glVertex2f(0, 0); - glVertex2f(640, 0); + glVertex2f(screen->w, 0); glColor3ub(bot_clr.red, bot_clr.green, bot_clr.blue); - glVertex2f(640, 480); - glVertex2f(0, 480); + glVertex2f(screen->w, screen->h); + glVertex2f(0, screen->h); glEnd(); } else |
From: Ryan F. <sik...@us...> - 2004-05-14 20:50:32
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv744 Modified Files: world.cpp defines.h Log Message: - some resolution fixes Index: defines.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/defines.h,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- defines.h 14 May 2004 16:02:40 -0000 1.38 +++ defines.h 14 May 2004 20:50:22 -0000 1.39 @@ -49,9 +49,10 @@ }; /* Screen-related stuff */ - -#define VISIBLE_TILES_X 25 -#define VISIBLE_TILES_Y 19 +// +1 is needed because when tiles are wrapping around the screen there +// are two partial tiles on the screen +#define VISIBLE_TILES_X 25 +1 +#define VISIBLE_TILES_Y 19 +1 /* Sizes: */ Index: world.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/world.cpp,v retrieving revision 1.87 retrieving revision 1.88 diff -u -d -r1.87 -r1.88 --- world.cpp 14 May 2004 17:35:30 -0000 1.87 +++ world.cpp 14 May 2004 20:50:22 -0000 1.88 @@ -180,9 +180,14 @@ /* Draw the real background */ if(level->img_bkgd) { - int s = (int)((float)scroll_x * ((float)level->bkgd_speed/100.0f)) % screen->w; - level->img_bkgd->draw_part(s, 0,0,0,level->img_bkgd->w - s, level->img_bkgd->h); - level->img_bkgd->draw_part(0, 0,screen->w - s ,0,s,level->img_bkgd->h); + // Tile background horizontally + int sx = (int)((float)scroll_x * ((float)level->bkgd_speed/100.0f)) % level->img_bkgd->w; + for (int i = 0; (i-1)*level->img_bkgd->w <= screen->w; i++) + { + level->img_bkgd->draw_part(i == 0 ? sx : 0, 0, + i == 0 ? 0 : (level->img_bkgd->w * i) - sx, 0, + i == 0 ? level->img_bkgd->w - sx : level->img_bkgd->w, level->img_bkgd->h); + } } else { @@ -340,7 +345,7 @@ if (scroll_y < 0) { - std::cerr << "Level too short!!" << std::endl; + //std::cerr << "Level too short!!" << std::endl; scroll_y = 0; } |
From: Marek M. <wa...@us...> - 2004-05-14 19:22:40
|
Update of /cvsroot/super-tux/supertux/data/levels/unfinished In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12736/data/levels/unfinished Log Message: Directory /cvsroot/super-tux/supertux/data/levels/unfinished added to the repository |