super-tux-commit Mailing List for Super Tux (Page 60)
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: Ingo R. <gr...@us...> - 2004-05-30 15:25:15
|
Update of /cvsroot/super-tux/supertux/src/screen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14616 Modified Files: drawing_context.cpp Log Message: replaced std::sort with stable_sort to avoid sorting errors with objects in the same layer Index: drawing_context.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/screen/drawing_context.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- drawing_context.cpp 30 May 2004 13:35:56 -0000 1.2 +++ drawing_context.cpp 30 May 2004 15:25:01 -0000 1.3 @@ -263,7 +263,7 @@ void DrawingContext::do_drawing() { - std::sort(drawingrequests.begin(), drawingrequests.end()); + std::stable_sort(drawingrequests.begin(), drawingrequests.end()); for(DrawingRequests::iterator i = drawingrequests.begin(); i != drawingrequests.end(); ++i) { |
From: Matze B. <mat...@us...> - 2004-05-30 13:55:39
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv877 Modified Files: gameloop.cpp Log Message: fix so that pause text is displayed correctly Index: gameloop.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/gameloop.cpp,v retrieving revision 1.139 retrieving revision 1.140 diff -u -d -r1.139 -r1.140 --- gameloop.cpp 30 May 2004 01:08:48 -0000 1.139 +++ gameloop.cpp 30 May 2004 13:55:28 -0000 1.140 @@ -498,6 +498,9 @@ if(game_pause) { + context.push_transform(); + context.set_translation(Vector(0, 0)); + int x = screen->h / 20; for(int i = 0; i < x; ++i) { @@ -513,6 +516,8 @@ Color(rand() % 50, rand() % 50, rand() % 50, 128), LAYER_FOREGROUND1); world->context.draw_text_center(blue_text, "PAUSE - Press 'P' To Play", Vector(0, 230), LAYER_FOREGROUND1+2); + + context.pop_transform(); } if(Menu::current()) |
From: Matze B. <mat...@us...> - 2004-05-30 13:54:48
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv741 Modified Files: tilemap.cpp Log Message: fix tiles being 1 pixel off their correct position Index: tilemap.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/tilemap.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- tilemap.cpp 30 May 2004 01:08:49 -0000 1.6 +++ tilemap.cpp 30 May 2004 13:54:40 -0000 1.7 @@ -20,6 +20,7 @@ #include <assert.h> #include <algorithm> +#include <math.h> #include "screen/drawing_context.h" #include "level.h" #include "tile.h" @@ -44,8 +45,10 @@ TileMap::draw(const std::vector<unsigned int>& tiles, DrawingContext& context, int layer) { - float start_x = context.get_translation().x; - float start_y = context.get_translation().y; + /** if we don't round here, we'll have a 1 pixel gap on screen sometimes. + * I have no idea why */ + float start_x = roundf(context.get_translation().x); + float start_y = roundf(context.get_translation().y); float end_x = std::min(start_x + screen->w, float(level->width * 32)); float end_y = std::min(start_y + screen->h, float(level->height * 32)); start_x -= int(start_x) % 32; |
From: Ingo R. <gr...@us...> - 2004-05-30 13:36:04
|
Update of /cvsroot/super-tux/supertux/src/screen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29956/screen Modified Files: drawing_context.cpp Log Message: - added missing assert header Index: drawing_context.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/screen/drawing_context.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- drawing_context.cpp 30 May 2004 01:08:50 -0000 1.1 +++ drawing_context.cpp 30 May 2004 13:35:56 -0000 1.2 @@ -1,3 +1,4 @@ +#include <assert.h> #include "drawing_context.h" #include <iostream> |
From: Matze B. <mat...@us...> - 2004-05-30 12:58:07
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24019 Modified Files: tile.h Log Message: don't include polygon code yet Index: tile.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/tile.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- tile.h 30 May 2004 01:08:49 -0000 1.23 +++ tile.h 30 May 2004 12:57:56 -0000 1.24 @@ -28,7 +28,6 @@ #include "globals.h" #include "lispreader.h" #include "setup.h" -#include "polygon.h" #include "vector.h" class LispReader; |
From: Matze B. <mat...@us...> - 2004-05-30 01:09:12
|
Update of /cvsroot/super-tux/supertux/data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16159/data Modified Files: CREDITS Log Message: -Changed drawing model. Everything is handled through DrawingContext now and has an additional layer argument. So now you can paint into background/foreground as you like. The DrawingContext will queue app all commands, sort them and execute them in 1 go. Index: CREDITS =================================================================== RCS file: /cvsroot/super-tux/supertux/data/CREDITS,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- CREDITS 10 May 2004 20:24:22 -0000 1.22 +++ CREDITS 30 May 2004 01:08:32 -0000 1.23 @@ -79,14 +79,14 @@ -Contact Visit our webpage at -http://super-tux.sf.net +*http://super-tux.sf.net Or visit us directly at IRC: -#supertux at irc.freenode.net +*#supertux at irc.freenode.net Comments, ideas and suggestions go to our mailing list -su...@li... +*sup...@li... |
From: Matze B. <mat...@us...> - 2004-05-30 01:06:24
|
Update of /cvsroot/super-tux/supertux/src/screen In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16041/screen Log Message: Directory /cvsroot/super-tux/supertux/src/screen added to the repository |
From: Ryan F. <sik...@us...> - 2004-05-29 01:29:09
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31555/src Modified Files: defines.h Log Message: - small eq'n fixes Index: defines.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/defines.h,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- defines.h 25 May 2004 10:13:07 -0000 1.43 +++ defines.h 29 May 2004 01:29:00 -0000 1.44 @@ -54,8 +54,8 @@ /* Screen-related stuff */ // +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 +#define VISIBLE_TILES_X (25 +1) +#define VISIBLE_TILES_Y (19 +1) /* Sizes: */ @@ -92,8 +92,8 @@ /* Size constraints: */ -#define X_OFFSCREEN_DISTANCE screen->w/2 -#define Y_OFFSCREEN_DISTANCE screen->h/2 +#define X_OFFSCREEN_DISTANCE (screen->w/2) +#define Y_OFFSCREEN_DISTANCE (screen->h/2) #define LEVEL_WIDTH 375 |
From: Ryan F. <sik...@us...> - 2004-05-29 00:38:26
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22778 Modified Files: button.cpp Log Message: - fixed level editor crash (a hack) Index: button.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/button.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- button.cpp 24 May 2004 21:02:26 -0000 1.31 +++ button.cpp 29 May 2004 00:38:15 -0000 1.32 @@ -116,7 +116,9 @@ for(std::vector<Surface*>::iterator it = icon.begin(); it != icon.end(); ++it) delete (*it); icon.clear(); - delete drawable; + // FIXME TODO XXX: commenting this out fixes the leveleditor quit crash + // probably should be deleted somehow, though + //delete drawable; } void Button::event(SDL_Event &event) |
From: Ricardo C. <rm...@us...> - 2004-05-28 23:09:46
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8139/src Modified Files: camera.cpp Log Message: Added the 16 margin to the camera move checking as suggested by Ryan. I still prefer no value, but at least it is not as bad as 32. Index: camera.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/camera.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- camera.cpp 28 May 2004 18:41:58 -0000 1.8 +++ camera.cpp 28 May 2004 23:09:37 -0000 1.9 @@ -202,10 +202,10 @@ || (player->dir == ::RIGHT && scrollchange == LEFT)) scrollchange = NONE; // when in left 1/3rd of screen scroll left - if(player->base.x < translation.x + screen->w/3 && do_backscrolling) + if(player->base.x < translation.x + screen->w/3 - 16 && do_backscrolling) scrollchange = LEFT; // scroll right when in right 1/3rd of screen - else if(player->base.x > translation.x + screen->w/3*2) + else if(player->base.x > translation.x + screen->w/3*2 + 16) scrollchange = RIGHT; // calculate our scroll target depending on scroll mode |
From: Ricardo C. <rm...@us...> - 2004-05-28 22:57:42
|
Update of /cvsroot/super-tux/supertux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6195 Modified Files: TODO Log Message: Just retified the solution for the space issue. Index: TODO =================================================================== RCS file: /cvsroot/super-tux/supertux/TODO,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- TODO 28 May 2004 20:33:37 -0000 1.57 +++ TODO 28 May 2004 22:57:31 -0000 1.58 @@ -33,7 +33,7 @@ - Animation (need images) ? Should disable Tux's movement temporarily (1 second?) [H] Tux should fall while walking in tiles that have a space between. - - Possible solution: reduce Tux's width + - Possible solution: reduce Tux's width when checking collision with tiles [M] Save score on per-level basis to make high-score [M] Save time on per-level basis to make low-time-score |
From: Ricardo C. <rm...@us...> - 2004-05-28 22:37:59
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1018/src Modified Files: screen.cpp screen.h Log Message: Minor fix for shrink fade. Removed not working fade in (i'll work on that). Index: screen.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/screen.h,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- screen.h 28 May 2004 18:13:17 -0000 1.21 +++ screen.h 28 May 2004 22:37:48 -0000 1.22 @@ -67,8 +67,6 @@ void clearscreen(int r, int g, int b); void drawgradient(Color top_clr, Color bot_clr); void fillrect(float x, float y, float w, float h, int r, int g, int b, int a = 255); -//void black_fade(Surface* surface, int seconds, bool fade_out); -void fade(const std::string& surface, int seconds, bool fade_out); void shrink_fade(Point point, int fade_time); void updatescreen(void); void flipscreen(void); Index: screen.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/screen.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- screen.cpp 28 May 2004 18:32:58 -0000 1.18 +++ screen.cpp 28 May 2004 22:37:48 -0000 1.19 @@ -96,48 +96,6 @@ #endif } -/* --- FADE IN --- */ - -/** Fades the given surface into a black one. If fade_out is true, it will fade out, else -it will fade in */ - -void fade(Surface *surface, int seconds, bool fade_out); - -void fade(const std::string& surface, int seconds, bool fade_out) -{ -Surface* sur = new Surface(datadir + surface, IGNORE_ALPHA); -fade(sur, seconds, fade_out); -delete sur; -} - -void fade(Surface *surface, int seconds, bool fade_out) -{ -float alpha; -if (fade_out) - alpha = 0; -else - alpha = 255; - - int cur_time, old_time; - cur_time = SDL_GetTicks(); - - while(alpha >= 0 && alpha < 256) - { - surface->draw(0,0,(int)alpha); - flipscreen(); - - old_time = cur_time; - cur_time = SDL_GetTicks(); - - /* Calculate the next alpha value */ - float calc = (float) ((cur_time - old_time) / seconds); - if(fade_out) - alpha += 255 * calc; - else - alpha -= 255 * calc; - } -} - /** This fade shrinks to the given point */ #define LOOP_DELAY 20 @@ -161,7 +119,7 @@ fillrect(0, 0, left_cor, screen->h, 0,0,0); // left side fillrect(screen->w - right_cor, 0, right_cor, screen->h, 0,0,0); // right side fillrect(0, 0, screen->w, up_cor, 0,0,0); // up side - fillrect(0, screen->h - down_cor, screen->w, down_cor, 0,0,0); // down side + fillrect(0, screen->h - down_cor, screen->w, down_cor+1, 0,0,0); // down side flipscreen(); SDL_Delay(LOOP_DELAY); |
From: Ryan F. <sik...@us...> - 2004-05-28 22:35:15
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32691 Modified Files: leveleditor.cpp Log Message: - fixed some resolution related leveditor bugs Index: leveleditor.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/leveleditor.cpp,v retrieving revision 1.126 retrieving revision 1.127 diff -u -d -r1.126 -r1.127 --- leveleditor.cpp 24 May 2004 21:02:27 -0000 1.126 +++ leveleditor.cpp 28 May 2004 22:35:05 -0000 1.127 @@ -785,9 +785,9 @@ int left_offset = (screen->w - 64 - le_world->get_level()->width*mini_tile_width) / 2; int mini_tile_height; - if(screen->h - 64 > le_world->get_level()->height * 4) + if(screen->h > le_world->get_level()->height * 4) mini_tile_height = 4; - else if(screen->h - 64 > le_world->get_level()->height * 2) + else if(screen->h > le_world->get_level()->height * 2) mini_tile_height = 2; else mini_tile_height = 1; @@ -797,24 +797,33 @@ for (int x = 0; x < le_world->get_level()->width; ++x) { - Tile::draw_stretched(left_offset + mini_tile_width*x, y * 4, - mini_tile_width , 4, level->bg_tiles[y * level->width + x]); + Tile::draw_stretched(left_offset + mini_tile_width*x, y * mini_tile_height, + mini_tile_width , mini_tile_height, level->bg_tiles[y * level->width + x]); - Tile::draw_stretched(left_offset + mini_tile_width*x, y * 4, - mini_tile_width , 4, level->ia_tiles[y * level->width + x]); + Tile::draw_stretched(left_offset + mini_tile_width*x, y * mini_tile_height, + mini_tile_width , mini_tile_height, level->ia_tiles[y * level->width + x]); - Tile::draw_stretched(left_offset + mini_tile_width*x, y * 4, - mini_tile_width , 4, level->fg_tiles[y + level->width + x]); + Tile::draw_stretched(left_offset + mini_tile_width*x, y * mini_tile_height, + mini_tile_width , mini_tile_height, level->fg_tiles[y + level->width + x]); } - 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, 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); + fillrect(left_offset, 0, + le_world->get_level()->width*mini_tile_width, le_world->get_level()->height*mini_tile_height, + 200, 200, 200, 96); + fillrect(left_offset + (pos_x/32)*mini_tile_width, (pos_y/32)*mini_tile_height, + (VISIBLE_TILES_X-3)*mini_tile_width, 2, + 200, 200, 200, 200); + fillrect(left_offset + (pos_x/32)*mini_tile_width, (pos_y/32)*mini_tile_height, + 2, (VISIBLE_TILES_Y-1)*mini_tile_height, + 200, 200, 200, 200); + fillrect(left_offset + (pos_x/32)*mini_tile_width + (VISIBLE_TILES_X-3)*mini_tile_width - 2, (pos_y/32)*mini_tile_height, + 2, (VISIBLE_TILES_Y-1)*mini_tile_height, + 200, 200, 200, 200); + fillrect(left_offset + (pos_x/32)*mini_tile_width, (pos_y/32)*mini_tile_height + (VISIBLE_TILES_Y-1)*mini_tile_height - 2, + (VISIBLE_TILES_X-3)*mini_tile_width, 2, + 200, 200, 200, 200); } void le_drawinterface() @@ -1538,6 +1547,9 @@ { show_minimap = false; + if (event.type == SDL_KEYDOWN && event.key.keysym.sym == SDLK_TAB) + show_minimap = true; + le_move_left_bt->event(event); le_move_right_bt->event(event); le_move_up_bt->event(event); @@ -1610,19 +1622,17 @@ break; } - /* checking if pos_x and pos_y is within the limits... */ - 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; - - 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; + /* checking if pos_x and pos_y is within the limits... */ + 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; + 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; } - } void le_highlight_selection() |
From: Ryan F. <sik...@us...> - 2004-05-28 20:33:47
|
Update of /cvsroot/super-tux/supertux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8691 Modified Files: TODO Log Message: - fixed 'When you jump into the roof or a bonus and fall back down you collide with badguys twice' Index: TODO =================================================================== RCS file: /cvsroot/super-tux/supertux/TODO,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- TODO 28 May 2004 14:57:58 -0000 1.56 +++ TODO 28 May 2004 20:33:37 -0000 1.57 @@ -34,8 +34,6 @@ ? Should disable Tux's movement temporarily (1 second?) [H] Tux should fall while walking in tiles that have a space between. - Possible solution: reduce Tux's width -[H] When you jump into the roof or a bonus and fall back down you collide with - the badguys twice. Noticable with iceblocks. (level 15) [M] Save score on per-level basis to make high-score [M] Save time on per-level basis to make low-time-score |
From: Ryan F. <sik...@us...> - 2004-05-28 20:33:47
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8691/src Modified Files: player.cpp Log Message: - fixed 'When you jump into the roof or a bonus and fall back down you collide with badguys twice' Index: player.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/player.cpp,v retrieving revision 1.128 retrieving revision 1.129 diff -u -d -r1.128 -r1.129 --- player.cpp 28 May 2004 07:31:25 -0000 1.128 +++ player.cpp 28 May 2004 20:33:37 -0000 1.129 @@ -239,6 +239,7 @@ // fall down physic.set_velocity_y(0); jumped_in_solid = true; + jumping = false; } } else |
From: Ryan F. <sik...@us...> - 2004-05-28 19:47:25
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31774 Modified Files: badguy.cpp badguy.h Log Message: - made bombs explode instantly when they run into an exploding bomb (from Ricardo) - only flip death animations when y-velocity is negative Index: badguy.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/badguy.h,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- badguy.h 25 May 2004 21:21:22 -0000 1.49 +++ badguy.h 28 May 2004 19:47:16 -0000 1.50 @@ -163,7 +163,8 @@ /** let the player jump a bit (used when you hit a badguy) */ void make_player_jump(Player* player); - void explode(); + /** Turn enemy into a bomb. To explode right way pass true */ + void explode(bool right_away); /** check if we're running left or right in a wall and eventually change * direction Index: badguy.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/badguy.cpp,v retrieving revision 1.96 retrieving revision 1.97 diff -u -d -r1.96 -r1.97 --- badguy.cpp 27 May 2004 23:54:31 -0000 1.96 +++ badguy.cpp 28 May 2004 19:47:16 -0000 1.97 @@ -996,7 +996,7 @@ } Sprite* sprite = (dir == LEFT) ? sprite_left : sprite_right; - if(dying == DYING_FALLING) + if(dying == DYING_FALLING && physic.get_velocity_y() < 0) sprite->draw(viewport.world2screen(Vector(base.x, base.y)), SD_VERTICAL_FLIP); else sprite->draw(viewport.world2screen(Vector(base.x, base.y))); @@ -1080,7 +1080,7 @@ if(kind == BAD_MRBOMB) { // mrbomb transforms into a bomb now - explode(); + explode(false); make_player_jump(player); World::current()->add_score(Vector(base.x, base.y), @@ -1206,9 +1206,15 @@ } void -BadGuy::explode() +BadGuy::explode(bool right_way) { - World::current()->add_bad_guy(base.x, base.y, BAD_BOMB); + BadGuy *badguy = World::current()->add_bad_guy(base.x, base.y, BAD_BOMB); + if(right_way) + { + badguy->timer.start(0); + badguy->mode = BOMB_TICKING; + } + remove_me(); } @@ -1279,7 +1285,7 @@ if (pbad_c->kind == BAD_MRBOMB) { // mrbomb transforms into a bomb now - pbad_c->explode(); + pbad_c->explode(true); return; } else if (pbad_c->kind != BAD_MRBOMB) @@ -1294,7 +1300,7 @@ if (pbad_c->kind == BAD_MRBOMB) { // mrbomb transforms into a bomb now - pbad_c->explode(); + pbad_c->explode(false); return; } else |
From: Ricardo C. <rm...@us...> - 2004-05-28 18:42:07
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18658/src Modified Files: camera.cpp Log Message: Just removed a part of the applied patch. IMO it is so much better when player changes direction. Didn't touch the speed. Index: camera.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/camera.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- camera.cpp 25 May 2004 23:53:43 -0000 1.7 +++ camera.cpp 28 May 2004 18:41:58 -0000 1.8 @@ -202,10 +202,10 @@ || (player->dir == ::RIGHT && scrollchange == LEFT)) scrollchange = NONE; // when in left 1/3rd of screen scroll left - if(player->base.x < translation.x + screen->w/3 - 32 && do_backscrolling) + if(player->base.x < translation.x + screen->w/3 && do_backscrolling) scrollchange = LEFT; // scroll right when in right 1/3rd of screen - else if(player->base.x > translation.x + screen->w/3*2 + 32) + else if(player->base.x > translation.x + screen->w/3*2) scrollchange = RIGHT; // calculate our scroll target depending on scroll mode |
From: Ricardo C. <rm...@us...> - 2004-05-28 18:35:36
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17280/src Modified Files: setup.cpp Log Message: Just reduced fading time when slot is chosen. Index: setup.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/setup.cpp,v retrieving revision 1.85 retrieving revision 1.86 diff -u -d -r1.85 -r1.86 --- setup.cpp 28 May 2004 18:32:58 -0000 1.85 +++ setup.cpp 28 May 2004 18:35:20 -0000 1.86 @@ -505,7 +505,7 @@ draw_intro(); } - shrink_fade(Point((screen->w/2),(screen->h/2)), 2000); + shrink_fade(Point((screen->w/2),(screen->h/2)), 1000); fadeout(); WorldMapNS::WorldMap worldmap; |
From: Ricardo C. <rm...@us...> - 2004-05-28 18:33:09
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16634/src Modified Files: intro.cpp screen.cpp setup.cpp worldmap.cpp Log Message: Fixed the fade func problem. Just a simple mistake. Also applied fade when choosing a slot. Index: screen.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/screen.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- screen.cpp 28 May 2004 18:13:12 -0000 1.17 +++ screen.cpp 28 May 2004 18:32:58 -0000 1.18 @@ -150,8 +150,8 @@ float left_cor = 0, right_cor = 0, up_cor = 0, down_cor = 0; -while(left_cor < screen->w - point.x && right_cor < screen->w - point.x && - up_cor < screen->h - point.y && down_cor < screen->h - point.y) +while(left_cor < point.x && right_cor < screen->w - point.x && + up_cor < point.y && down_cor < screen->h - point.y) { left_cor += left_inc; right_cor += right_inc; Index: worldmap.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/worldmap.cpp,v retrieving revision 1.76 retrieving revision 1.77 diff -u -d -r1.76 -r1.77 --- worldmap.cpp 28 May 2004 18:13:17 -0000 1.76 +++ worldmap.cpp 28 May 2004 18:32:58 -0000 1.77 @@ -642,7 +642,7 @@ std::cout << "Enter the current level: " << level->name << std::endl; // do a shriking fade to the level - shrink_fade(Point((level->x*32 + 16 + offset.x),(level->y*32 + 16 + offset.y)), 3000); + shrink_fade(Point((level->x*32 + 16 + offset.x),(level->y*32 + 16 + offset.y)), 2000); GameSession session(datadir + "/levels/" + level->name, 1, ST_GL_LOAD_LEVEL_FILE); Index: intro.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/intro.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- intro.cpp 28 May 2004 18:13:11 -0000 1.23 +++ intro.cpp 28 May 2004 18:32:58 -0000 1.24 @@ -35,7 +35,6 @@ void draw_intro() { -shrink_fade(Point((screen->w/2),(screen->h/2)), 2000); display_text_file("intro.txt", "/images/background/arctis.jpg", SCROLL_SPEED_MESSAGE); } Index: setup.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/setup.cpp,v retrieving revision 1.84 retrieving revision 1.85 diff -u -d -r1.84 -r1.85 --- setup.cpp 16 May 2004 17:56:58 -0000 1.84 +++ setup.cpp 28 May 2004 18:32:58 -0000 1.85 @@ -505,6 +505,7 @@ draw_intro(); } + shrink_fade(Point((screen->w/2),(screen->h/2)), 2000); fadeout(); WorldMapNS::WorldMap worldmap; |
From: Ricardo C. <rm...@us...> - 2004-05-28 18:13:27
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13031/src Modified Files: intro.cpp screen.cpp screen.h worldmap.cpp worldmap.h Log Message: Fade when entering a level. Sometimes doesn't work, i'll have a look at the fade func later. Index: intro.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/intro.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- intro.cpp 17 May 2004 10:12:19 -0000 1.22 +++ intro.cpp 28 May 2004 18:13:11 -0000 1.23 @@ -35,8 +35,7 @@ void draw_intro() { -if(debug_mode) - fade("/images/background/arctis.jpg", 30, false); +shrink_fade(Point((screen->w/2),(screen->h/2)), 2000); display_text_file("intro.txt", "/images/background/arctis.jpg", SCROLL_SPEED_MESSAGE); } Index: worldmap.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/worldmap.cpp,v retrieving revision 1.75 retrieving revision 1.76 diff -u -d -r1.75 -r1.76 --- worldmap.cpp 17 May 2004 10:15:01 -0000 1.75 +++ worldmap.cpp 28 May 2004 18:13:17 -0000 1.76 @@ -640,7 +640,9 @@ { PlayerStatus old_player_status = player_status; - std::cout << "Enter the current level: " << level->name << std::endl;; + std::cout << "Enter the current level: " << level->name << std::endl; + // do a shriking fade to the level + shrink_fade(Point((level->x*32 + 16 + offset.x),(level->y*32 + 16 + offset.y)), 3000); GameSession session(datadir + "/levels/" + level->name, 1, ST_GL_LOAD_LEVEL_FILE); Index: screen.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/screen.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- screen.h 1 May 2004 10:59:52 -0000 1.20 +++ screen.h 28 May 2004 18:13:17 -0000 1.21 @@ -44,12 +44,32 @@ int red, green, blue; }; +struct Point +{ + Point() : x(0), y(0) {} + + Point(const Point& pos) + : x(pos.x), y(pos.y) {} + + Point& operator=(const Point& pos) + { x = pos.x; + y = pos.y; + return *this; } + + Point(int x_, int y_) + : x(x_), y(y_) {} + + int x; + int y; +}; + void drawline(int x1, int y1, int x2, int y2, int r, int g, int b, int a); void clearscreen(int r, int g, int b); void drawgradient(Color top_clr, Color bot_clr); -void fillrect(float x, float y, float w, float h, int r, int g, int b, int a); +void fillrect(float x, float y, float w, float h, int r, int g, int b, int a = 255); //void black_fade(Surface* surface, int seconds, bool fade_out); void fade(const std::string& surface, int seconds, bool fade_out); +void shrink_fade(Point point, int fade_time); void updatescreen(void); void flipscreen(void); void update_rect(SDL_Surface *scr, Sint32 x, Sint32 y, Sint32 w, Sint32 h); Index: worldmap.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/worldmap.h,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- worldmap.h 12 May 2004 15:36:15 -0000 1.29 +++ worldmap.h 28 May 2004 18:13:17 -0000 1.30 @@ -24,28 +24,10 @@ #include <string> #include "musicref.h" +#include "screen.h" namespace WorldMapNS { -struct Point -{ - Point() : x(0), y(0) {} - - Point(const Point& pos) - : x(pos.x), y(pos.y) {} - - Point& operator=(const Point& pos) - { x = pos.x; - y = pos.y; - return *this; } - - Point(int x_, int y_) - : x(x_), y(y_) {} - - int x; - int y; -}; - class Tile { public: Index: screen.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/screen.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- screen.cpp 15 May 2004 14:26:38 -0000 1.16 +++ screen.cpp 28 May 2004 18:13:12 -0000 1.17 @@ -138,6 +138,36 @@ } } +/** This fade shrinks to the given point */ + +#define LOOP_DELAY 20 +void shrink_fade(Point point, int fade_time) +{ +float left_inc = (float)point.x / ((float)fade_time / LOOP_DELAY); +float right_inc = ((float)screen->w - point.x) / ((float)fade_time / LOOP_DELAY); +float up_inc = (float)point.y / ((float)fade_time / LOOP_DELAY); +float down_inc = ((float)screen->h - point.y) / ((float)fade_time / LOOP_DELAY); + +float left_cor = 0, right_cor = 0, up_cor = 0, down_cor = 0; + +while(left_cor < screen->w - point.x && right_cor < screen->w - point.x && + up_cor < screen->h - point.y && down_cor < screen->h - point.y) + { + left_cor += left_inc; + right_cor += right_inc; + up_cor += up_inc; + down_cor += down_inc; + + fillrect(0, 0, left_cor, screen->h, 0,0,0); // left side + fillrect(screen->w - right_cor, 0, right_cor, screen->h, 0,0,0); // right side + fillrect(0, 0, screen->w, up_cor, 0,0,0); // up side + fillrect(0, screen->h - down_cor, screen->w, down_cor, 0,0,0); // down side + + flipscreen(); + SDL_Delay(LOOP_DELAY); + } +} + /* 'Stolen' from the SDL documentation. * Set the pixel at (x, y) to the given value * NOTE: The surface must be locked before calling this! |
From: Ricardo C. <ri...@ae...> - 2004-05-28 15:27:03
|
Can we undo this patch? IMO the camera movement is so much better without this change. Ricardo Em Quarta, 26 de Maio de 2004 00:53, o Ryan Flegel escreveu: > Update of /cvsroot/super-tux/supertux/src > In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25374 > > Modified Files: > camera.cpp > Log Message: > - added David's camera patch > > Index: camera.cpp > =================================================================== > RCS file: /cvsroot/super-tux/supertux/src/camera.cpp,v > retrieving revision 1.6 > retrieving revision 1.7 > diff -u -d -r1.6 -r1.7 > --- camera.cpp 25 May 2004 00:28:24 -0000 1.6 > +++ camera.cpp 25 May 2004 23:53:43 -0000 1.7 > @@ -202,10 +202,10 @@ > > || (player->dir == ::RIGHT && scrollchange == LEFT)) > > scrollchange = NONE; > // when in left 1/3rd of screen scroll left > - if(player->base.x < translation.x + screen->w/3 && do_backscrolling) > + if(player->base.x < translation.x + screen->w/3 - 32 && > do_backscrolling) scrollchange = LEFT; > // scroll right when in right 1/3rd of screen > - else if(player->base.x > translation.x + screen->w/3*2) > + else if(player->base.x > translation.x + screen->w/3*2 + 32) > scrollchange = RIGHT; > > // calculate our scroll target depending on scroll mode > @@ -220,10 +220,10 @@ > // that's the distance we would have to travel to reach target_x > float delta_x = translation.x - target_x; > // the speed we'd need to travel to reach target_x in this frame > - float speed_x = delta_x / elapsed_time; > + float speed_x = 1.3 * delta_x / elapsed_time; > > // limit our speed > - float maxv = 1 + fabsf(player->physic.get_velocity_x() * 1.3); > + float maxv = 1.3 * (1 + fabsf(player->physic.get_velocity_x() * 1.3)); > if(speed_x > maxv) > speed_x = maxv; > else if(speed_x < -maxv) > > > -- An apple a day makes 365 apples a year. |
From: Ricardo C. <rm...@us...> - 2004-05-28 14:58:09
|
Update of /cvsroot/super-tux/supertux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7251 Modified Files: TODO Log Message: Just removed upside down thing. Done. Index: TODO =================================================================== RCS file: /cvsroot/super-tux/supertux/TODO,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- TODO 27 May 2004 03:04:12 -0000 1.55 +++ TODO 28 May 2004 14:57:58 -0000 1.56 @@ -25,6 +25,7 @@ [H] Change resolution to 800x600 - Levels need to be updated to resolution + (half of the levels have been already updated) [H] Buttjump related things ? Right now only breaks bricks beneath tux - what else should it break - Breaks 1 box too much at the left when tux is facing left. @@ -33,8 +34,6 @@ ? Should disable Tux's movement temporarily (1 second?) [H] Tux should fall while walking in tiles that have a space between. - Possible solution: reduce Tux's width -[H] Enemies should turn upside down after being hit by a kicked iceblock, - fireball or bomb [H] When you jump into the roof or a bonus and fall back down you collide with the badguys twice. Noticable with iceblocks. (level 15) |
From: Ricardo C. <ri...@ae...> - 2004-05-28 14:55:38
|
Could you export it to an image format or PDF? Ricardo Em Sexta, 28 de Maio de 2004 10:41, o Matze Braun escreveu: > Update of /cvsroot/super-tux/supertux/docs > In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10948/docs > > Added Files: > gameobjects.dia > Log Message: > added inheritance diagram for the gameobjects > > --- NEW FILE: gameobjects.dia --- > (This appears to be a binary file; contents omitted.) > > -- I hear the sound that the machines make, and feel my heart break, just for a moment. |
From: Ricardo C. <rm...@us...> - 2004-05-28 14:52:12
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6050/src Modified Files: texture.cpp texture.h Log Message: Removed vertical flipping drawing hacks. Anyway, can we remove the update argument from the drawing functions? It is not used anywhere and OpenGL doesn't support it. Index: texture.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/texture.h,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- texture.h 27 May 2004 14:18:00 -0000 1.25 +++ texture.h 28 May 2004 14:51:56 -0000 1.26 @@ -95,9 +95,9 @@ void resize(int w_, int h_); /// conveniance function - void draw(const Vector& pos, Uint8 alpha = 255, bool update = false) + void draw(const Vector& pos, Uint8 alpha = 255, bool upside_down = false, bool update = false) { - draw(pos.x, pos.y, alpha, update); + draw(pos.x, pos.y, alpha, upside_down, update); } }; @@ -117,7 +117,7 @@ virtual ~SurfaceImpl(); /** Return 0 on success, -2 if surface needs to be reloaded */ - virtual int draw(float x, float y, Uint8 alpha, bool update) = 0; + virtual int draw(float x, float y, Uint8 alpha, bool upside_down, bool update) = 0; virtual int draw_bg(Uint8 alpha, bool update) = 0; virtual int draw_part(float sx, float sy, float x, float y, float w, float h, Uint8 alpha, bool update) = 0; virtual int draw_stretched(float x, float y, int w, int h, Uint8 alpha, bool update) = 0; @@ -134,7 +134,7 @@ SurfaceSDL(const std::string& file, int x, int y, int w, int h, int use_alpha); virtual ~SurfaceSDL(); - int draw(float x, float y, Uint8 alpha, bool update); + int draw(float x, float y, Uint8 alpha, bool upside_down, bool update); int draw_bg(Uint8 alpha, bool update); int draw_part(float sx, float sy, float x, float y, float w, float h, Uint8 alpha, bool update); int draw_stretched(float x, float y, int w, int h, Uint8 alpha, bool update); @@ -152,7 +152,7 @@ SurfaceOpenGL(const std::string& file, int x, int y, int w, int h, int use_alpha); virtual ~SurfaceOpenGL(); - int draw(float x, float y, Uint8 alpha, bool update); + int draw(float x, float y, Uint8 alpha, bool upside_down, bool update); int draw_bg(Uint8 alpha, bool update); int draw_part(float sx, float sy, float x, float y, float w, float h, Uint8 alpha, bool update); int draw_stretched(float x, float y, int w, int h, Uint8 alpha, bool update); Index: texture.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/texture.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- texture.cpp 27 May 2004 14:18:00 -0000 1.26 +++ texture.cpp 28 May 2004 14:51:56 -0000 1.27 @@ -211,11 +211,7 @@ { if (impl) { - if(upside_down) // FIXME: this should be done by the SDL and OpenGL draw() - for(float sy = 0; sy < h; sy++) - impl->draw_part(0, sy, x, y+(h-sy), w, 1, alpha, update); - - else if (impl->draw(x, y, alpha, update) == -2) + if (impl->draw(x, y, alpha, upside_down, update) == -2) reload(); } } @@ -539,7 +535,7 @@ } int -SurfaceOpenGL::draw(float x, float y, Uint8 alpha, bool update) +SurfaceOpenGL::draw(float x, float y, Uint8 alpha, bool upside_down, bool update) { float pw = power_of_two(w); float ph = power_of_two(h); @@ -553,13 +549,34 @@ glBindTexture(GL_TEXTURE_2D, gl_texture); glBegin(GL_QUADS); - glTexCoord2f(0, 0); - glVertex2f(x, y); - glTexCoord2f((float)w / pw, 0); - glVertex2f((float)w+x, y); - glTexCoord2f((float)w / pw, (float)h / ph); glVertex2f((float)w+x, (float)h+y); - glTexCoord2f(0, (float)h / ph); - glVertex2f(x, (float)h+y); + if(upside_down) + { + glTexCoord2f(0, 0); + glVertex2f(x, (float)h+y); + + glTexCoord2f((float)w / pw, 0); + glVertex2f((float)w+x, (float)h+y); + + glTexCoord2f((float)w / pw, (float)h / ph); + glVertex2f((float)w+x, y); + + glTexCoord2f(0, (float)h / ph); + glVertex2f(x, y); + } + else + { + glTexCoord2f(0, 0); + glVertex2f(x, y); + + glTexCoord2f((float)w / pw, 0); + glVertex2f((float)w+x, y); + + glTexCoord2f((float)w / pw, (float)h / ph); + glVertex2f((float)w+x, (float)h+y); + + glTexCoord2f(0, (float)h / ph); + glVertex2f(x, (float)h+y); + } glEnd(); glDisable(GL_TEXTURE_2D); @@ -691,7 +708,7 @@ } int -SurfaceSDL::draw(float x, float y, Uint8 alpha, bool update) +SurfaceSDL::draw(float x, float y, Uint8 alpha, bool upside_down, bool update) { SDL_Rect dest; @@ -700,6 +717,14 @@ dest.w = w; dest.h = h; + if(upside_down) // FIXME: feel free to replace this hack + { + for(float sy = 0; sy < h; sy++) + if(draw_part(0, sy, x, y+(h-sy), w, 1, alpha, update) == -2) + return -2; + return 0; + } + if(alpha != 255) { /* Create a Surface, make it using colorkey, blit surface into temp, apply alpha |
From: Matze B. <mat...@us...> - 2004-05-28 14:46:30
|
Update of /cvsroot/super-tux/supertux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4981 Modified Files: README Log Message: mention how to configure sound&video in SDL Index: README =================================================================== RCS file: /cvsroot/super-tux/supertux/README,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- README 4 May 2004 00:32:25 -0000 1.6 +++ README 28 May 2004 14:46:16 -0000 1.7 @@ -125,6 +125,13 @@ You can also score by shooting at the enemies. Don't forget to get the iceflower in order to get the ability to fire. +VIDEO/AUDIO CONFIGURATION +------------------------- + +We're using SDL for the low-level audio and video output. Configuring SDL is +explained here: + + http://sdldoc.csn.ul.ie/sdlenvvars.php OPTIONS FILE ------------ |