super-tux-commit Mailing List for Super Tux (Page 12)
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: Matze B. <mat...@us...> - 2004-12-02 01:42:10
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv539/src Modified Files: worldmap.cpp Log Message: Made lispfiles translatable. This time the translations are stored externally in .po files in the same directory as the lisp files. So you can have translation files for complete level subsets now. Because Ricardo added a hacked solution before and because people already used that, someone has to go over all the maps now, extract the translations and put them into separate files, I'm too lazy to do that now, I just translated some files for testing. Translation-Patches are always welcome ;-) Index: worldmap.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/worldmap.cpp,v retrieving revision 1.137 retrieving revision 1.138 diff -u -d -r1.137 -r1.138 --- worldmap.cpp 2 Dec 2004 00:25:27 -0000 1.137 +++ worldmap.cpp 2 Dec 2004 01:41:57 -0000 1.138 @@ -368,11 +368,7 @@ void WorldMap::load_map() { - std::string::size_type p = map_filename.find_last_of('/'); - if(p == std::string::npos) - levels_path = ""; - else - levels_path = map_filename.substr(0, p+1); + levels_path = FileSystem::dirname(map_filename); try { lisp::Parser parser; |
From: Matze B. <mat...@us...> - 2004-12-02 01:42:09
|
Update of /cvsroot/super-tux/supertux/data/levels/world2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv539/data/levels/world2 Modified Files: castle.stl forest1-grumbel.stl Log Message: Made lispfiles translatable. This time the translations are stored externally in .po files in the same directory as the lisp files. So you can have translation files for complete level subsets now. Because Ricardo added a hacked solution before and because people already used that, someone has to go over all the maps now, extract the translations and put them into separate files, I'm too lazy to do that now, I just translated some files for testing. Translation-Patches are always welcome ;-) Index: castle.stl =================================================================== RCS file: /cvsroot/super-tux/supertux/data/levels/world2/castle.stl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- castle.stl 23 Nov 2004 13:41:22 -0000 1.2 +++ castle.stl 2 Dec 2004 01:41:56 -0000 1.3 @@ -2,7 +2,7 @@ (supertux-level (version 1) (author "SuperTux Team") - (name "Iceberg Fortress") + (name (_ "Iceberg Fortress")) (width 550) (height 105) (start_pos_x 100) Index: forest1-grumbel.stl =================================================================== RCS file: /cvsroot/super-tux/supertux/data/levels/world2/forest1-grumbel.stl,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- forest1-grumbel.stl 23 Nov 2004 16:51:05 -0000 1.4 +++ forest1-grumbel.stl 2 Dec 2004 01:41:57 -0000 1.5 @@ -1,7 +1,7 @@ ;; Generated by Flexlay Editor (supertux-level (version 2) - (name "Forest Level 1") + (name (_ "Forest Level 1")) (author "SuperTux Team") (time 999) (sector |
From: Matze B. <mat...@us...> - 2004-12-02 01:42:08
|
Update of /cvsroot/super-tux/supertux/lib/app In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv539/lib/app Modified Files: setup.cpp setup.h Log Message: Made lispfiles translatable. This time the translations are stored externally in .po files in the same directory as the lisp files. So you can have translation files for complete level subsets now. Because Ricardo added a hacked solution before and because people already used that, someone has to go over all the maps now, extract the translations and put them into separate files, I'm too lazy to do that now, I just translated some files for testing. Translation-Patches are always welcome ;-) Index: setup.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/lib/app/setup.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- setup.cpp 2 Dec 2004 00:25:27 -0000 1.22 +++ setup.cpp 2 Dec 2004 01:41:57 -0000 1.23 @@ -252,6 +252,15 @@ return sdirs; } +std::string FileSystem::dirname(const std::string& filename) +{ + std::string::size_type p = filename.find_last_of('/'); + if(p == std::string::npos) + return ""; + + return filename.substr(0, p+1); +} + void Setup::init(const std::string& _package_name, const std::string& _package_symbol_name, const std::string& _package_version) Index: setup.h =================================================================== RCS file: /cvsroot/super-tux/supertux/lib/app/setup.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- setup.h 2 Dec 2004 00:25:27 -0000 1.12 +++ setup.h 2 Dec 2004 01:41:57 -0000 1.13 @@ -35,6 +35,8 @@ static std::set<std::string> read_directory(const std::string& pathname); static std::set<std::string> dsubdirs(const std::string& rel_path, const std::string& expected_file); static std::set<std::string> dfiles(const std::string& rel_path, const std::string& glob, const std::string& exception_str); + + static std::string dirname(const std::string& filename); }; /// All you need to get an application up and running |
From: Matze B. <mat...@us...> - 2004-12-02 01:42:08
|
Update of /cvsroot/super-tux/supertux/lib/lisp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv539/lib/lisp Modified Files: parser.cpp parser.h Log Message: Made lispfiles translatable. This time the translations are stored externally in .po files in the same directory as the lisp files. So you can have translation files for complete level subsets now. Because Ricardo added a hacked solution before and because people already used that, someone has to go over all the maps now, extract the translations and put them into separate files, I'm too lazy to do that now, I just translated some files for testing. Translation-Patches are always welcome ;-) Index: parser.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/lib/lisp/parser.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- parser.cpp 29 Nov 2004 14:46:36 -0000 1.2 +++ parser.cpp 2 Dec 2004 01:41:57 -0000 1.3 @@ -23,21 +23,28 @@ #include <stdexcept> #include <fstream> #include <cassert> +#include <iostream> +#include "app/setup.h" +#include "app/tinygettext.h" #include "parser.h" #include "lisp.h" namespace lisp { -Parser::Parser() - : lexer(0) +Parser::Parser(bool translate) + : lexer(0), dictionary_manager(0), dictionary(0) { + if(translate) { + dictionary_manager = new TinyGetText::DictionaryManager(); + } } Parser::~Parser() { delete lexer; + delete dictionary_manager; } Lisp* @@ -49,6 +56,12 @@ msg << "Parser problem: Couldn't open file '" << filename << "'."; throw std::runtime_error(msg.str()); } + + if(dictionary_manager) { + dictionary_manager->add_directory(SuperTux::FileSystem::dirname(filename)); + dictionary = & (dictionary_manager->get_dictionary()); + } + return parse(in); } @@ -96,6 +109,31 @@ break; } + if(token == Lexer::TOKEN_SYMBOL && + strcmp(lexer->getString(), "_") == 0) { + // evaluate translation function (_ str) in place here + token = lexer->getNextToken(); + if(token != Lexer::TOKEN_STRING) + throw new std::runtime_error("Expected string after '(_'"); + + result = new Lisp(Lisp::TYPE_STRING); + if(dictionary) { + std::string translation = dictionary->translate(lexer->getString()); + std::cout << "Translated '" << lexer->getString() << "' -> '" + << translation << "'\n"; + result->v.string = new char[translation.size()+1]; + memcpy(result->v.string, translation.c_str(), translation.size()+1); + } else { + size_t len = strlen(lexer->getString()) + 1; + result->v.string = new char[len]; + memcpy(result->v.string, lexer->getString(), len); + } + token = lexer->getNextToken(); + if(token != Lexer::TOKEN_CLOSE_PAREN) + throw new std::runtime_error("Expected ')' after '(_ string'"); + break; + } + Lisp* cur = result; do { cur->v.cons.car = read(); Index: parser.h =================================================================== RCS file: /cvsroot/super-tux/supertux/lib/lisp/parser.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- parser.h 28 Nov 2004 14:57:45 -0000 1.1 +++ parser.h 2 Dec 2004 01:41:57 -0000 1.2 @@ -23,6 +23,11 @@ #include <string> #include "lexer.h" +namespace TinyGetText { +class Dictionary; +class DictionaryManager; +} + namespace lisp { @@ -31,7 +36,7 @@ class Parser { public: - Parser(); + Parser(bool translate = true); ~Parser(); Lisp* parse(const std::string& filename); @@ -41,6 +46,8 @@ Lisp* read(); Lexer* lexer; + TinyGetText::DictionaryManager* dictionary_manager; + TinyGetText::Dictionary* dictionary; Lexer::TokenType token; }; |
From: Matze B. <mat...@us...> - 2004-12-02 01:42:07
|
Update of /cvsroot/super-tux/supertux/data/levels/world1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv539/data/levels/world1 Modified Files: level1.stl level2.stl level3.stl Added Files: de.po Log Message: Made lispfiles translatable. This time the translations are stored externally in .po files in the same directory as the lisp files. So you can have translation files for complete level subsets now. Because Ricardo added a hacked solution before and because people already used that, someone has to go over all the maps now, extract the translations and put them into separate files, I'm too lazy to do that now, I just translated some files for testing. Translation-Patches are always welcome ;-) Index: level1.stl =================================================================== RCS file: /cvsroot/super-tux/supertux/data/levels/world1/level1.stl,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- level1.stl 23 Nov 2004 13:41:16 -0000 1.21 +++ level1.stl 2 Dec 2004 01:41:55 -0000 1.22 @@ -2,7 +2,7 @@ (supertux-level (version 1) (author "SuperTux Team") - (name "Welcome to Antarctica") + (name (_ "Welcome to Antarctica")) (name-pt_PT "Bem-vindo à Antártida") (name-de "Willkommen in Antarctica") (name-es "Bienvenido a la Antártida") Index: level3.stl =================================================================== RCS file: /cvsroot/super-tux/supertux/data/levels/world1/level3.stl,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- level3.stl 23 Nov 2004 13:41:20 -0000 1.20 +++ level3.stl 2 Dec 2004 01:41:56 -0000 1.21 @@ -2,7 +2,7 @@ (supertux-level (version 1) (author "SuperTux Team") - (name "Via Nostalgica") + (name (_ "Via Nostalgica")) (width 390) (height 19) (start_pos_x 100) --- NEW FILE: de.po --- # German translations for world package # German messages for world. # Copyright (C) 2004 THE world'S COPYRIGHT HOLDER # This file is distributed under the same license as the world package. # <ma...@br...>, 2004. # msgid "" msgstr "" "Project-Id-Version: world 1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2004-12-02 02:10+0100\n" "PO-Revision-Date: 2004-12-02 02:25+0100\n" "Last-Translator: <ma...@br...>\n" "Language-Team: German <de...@li...>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=ISO-8859-1\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: data/levels/world1/level1.stl:5 msgid "Welcome to Antarctica" msgstr "Willkommen in Antarktika" #: data/levels/world1/level2.stl:5 msgid "The Journey Begins" msgstr "Die Reise Beginnt" Index: level2.stl =================================================================== RCS file: /cvsroot/super-tux/supertux/data/levels/world1/level2.stl,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- level2.stl 23 Nov 2004 13:41:19 -0000 1.19 +++ level2.stl 2 Dec 2004 01:41:56 -0000 1.20 @@ -2,7 +2,7 @@ (supertux-level (version 1) (author "SuperTux Team") - (name "The Journey Begins") + (name (_ "The Journey Begins")) (name-pt_PT "A Aventura Começa") (name-de "Das Abenteuer beginnt") (name-es "La aventura comienza") |
From: Matze B. <mat...@us...> - 2004-12-02 00:25:40
|
Update of /cvsroot/super-tux/supertux/lib/app In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15164/lib/app Modified Files: setup.cpp setup.h Log Message: changed worldmap to be stored inside the same directory as the levelsubset, fixed badguys writing out their current position instead of their startposition when saving levelfile Index: setup.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/lib/app/setup.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- setup.cpp 25 Nov 2004 19:48:24 -0000 1.21 +++ setup.cpp 2 Dec 2004 00:25:27 -0000 1.22 @@ -67,7 +67,7 @@ void usage(char * prog, int ret); /* Does the given file exist and is it accessible? */ -int FileSystem::faccessible(const std::string& filename) +bool FileSystem::faccessible(const std::string& filename) { struct stat filestat; if (stat(filename.c_str(), &filestat) == -1) @@ -84,7 +84,7 @@ } /* Can we write to this location? */ -int FileSystem::fwriteable(const std::string& filename) +bool FileSystem::fwriteable(const std::string& filename) { FILE* fi; fi = fopen(filename.c_str(), "wa"); @@ -97,7 +97,7 @@ } /* Makes sure a directory is created in either the SuperTux home directory or the SuperTux base directory.*/ -int FileSystem::fcreatedir(const std::string& relative_dir) +bool FileSystem::fcreatedir(const std::string& relative_dir) { std::string path = st_dir + "/" + relative_dir + "/"; if(mkdir(path.c_str(),0755) != 0) Index: setup.h =================================================================== RCS file: /cvsroot/super-tux/supertux/lib/app/setup.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- setup.h 23 Nov 2004 22:21:50 -0000 1.11 +++ setup.h 2 Dec 2004 00:25:27 -0000 1.12 @@ -29,9 +29,9 @@ /// File system utility functions struct FileSystem { - static int faccessible(const std::string& filename); - static int fcreatedir(const std::string& relative_dir); - static int fwriteable(const std::string& filename); + static bool faccessible(const std::string& filename); + static bool fcreatedir(const std::string& relative_dir); + static bool fwriteable(const std::string& filename); static std::set<std::string> read_directory(const std::string& pathname); static std::set<std::string> dsubdirs(const std::string& rel_path, const std::string& expected_file); static std::set<std::string> dfiles(const std::string& rel_path, const std::string& glob, const std::string& exception_str); |
From: Matze B. <mat...@us...> - 2004-12-02 00:25:39
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15164/src Modified Files: gameloop.cpp level_subset.cpp level_subset.h title.cpp worldmap.cpp worldmap.h Log Message: changed worldmap to be stored inside the same directory as the levelsubset, fixed badguys writing out their current position instead of their startposition when saving levelfile Index: level_subset.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/level_subset.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- level_subset.cpp 28 Nov 2004 14:56:49 -0000 1.19 +++ level_subset.cpp 2 Dec 2004 00:25:27 -0000 1.20 @@ -102,6 +102,14 @@ throw new std::runtime_error(msg.str()); } + // test is a worldmap exists + has_worldmap = false; + std::string worldmap = get_resource_filename( + std::string("levels/") + subset + "/worldmap.stwm"); + if(worldmap != "") { + has_worldmap = true; + } + if (levels.empty()) { // Level info file doesn't define any levels, so read the // directory to see what we can find @@ -175,6 +183,12 @@ return levels[num]; } +std::string +LevelSubset::get_worldmap_filename() +{ + return std::string("/levels/" + name + "/worldmap.stwm"); +} + int LevelSubset::get_num_levels() const { Index: level_subset.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/level_subset.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- level_subset.h 28 Nov 2004 14:56:49 -0000 1.9 +++ level_subset.h 2 Dec 2004 00:25:27 -0000 1.10 @@ -46,12 +46,14 @@ void add_level(const std::string& name); std::string get_level_filename(unsigned int i); + std::string get_worldmap_filename(); int get_num_levels() const; std::string name; std::string title; std::string description; bool hide_from_contribs; + bool has_worldmap; private: void read_info_file(const std::string& info_file); Index: title.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/title.cpp,v retrieving revision 1.135 retrieving revision 1.136 diff -u -d -r1.135 -r1.136 --- title.cpp 28 Nov 2004 14:56:50 -0000 1.135 +++ title.cpp 2 Dec 2004 00:25:27 -0000 1.136 @@ -75,9 +75,6 @@ static std::vector<LevelSubset*> contrib_subsets; static LevelSubset* current_contrib_subset = 0; -static int first_level_index; - -static std::set<std::string> worldmap_list; static FrameRate frame_rate(100); @@ -126,28 +123,17 @@ contrib_menu->additem(MN_LABEL,_("Contrib Levels"),0,0); contrib_menu->additem(MN_HL,"",0,0); + int i = 0; - - for(std::set<std::string>::iterator it = worldmap_list.begin(); - it != worldmap_list.end(); ++it) { - WorldMapNS::WorldMap worldmap; - worldmap.loadmap((*it).c_str()); - contrib_menu->additem(MN_ACTION, worldmap.get_world_title(),0,0, i); - ++i; - } - - contrib_menu->additem(MN_HL,"",0,0); - - first_level_index = i; - for (std::set<std::string>::iterator it = level_subsets.begin(); it != level_subsets.end(); ++it) + for (std::set<std::string>::iterator it = level_subsets.begin(); + it != level_subsets.end(); ++it) { LevelSubset* subset = new LevelSubset(); subset->load(*it); - if(subset->hide_from_contribs) - { + if(subset->hide_from_contribs) { delete subset; continue; - } + } contrib_menu->additem(MN_GOTO, subset->title, 0, contrib_subset_menu, i); contrib_subsets.push_back(subset); ++i; @@ -186,68 +172,52 @@ if (index == -1) return; - if((unsigned)index < worldmap_list.size()) - { + LevelSubset& subset = * (contrib_subsets[index]); + + if(subset.has_worldmap) { WorldMapNS::WorldMap worldmap; - std::set<std::string>::iterator it = worldmap_list.begin(); - for(int i = index; i > 0; --i) - ++it; - - std::string map_filename = *it; + worldmap.set_map_filename(subset.get_worldmap_filename()); // some fading fadeout(256); DrawingContext context; - context.draw_text(white_text, "Loading...", - Vector(screen->w/2, screen->h/2), CENTER_ALLIGN, LAYER_FOREGROUND1); - context.do_drawing(); - - worldmap.set_map_filename(map_filename); - - // hack to erase the extension - unsigned int ext_pos = it->find_last_of("."); - if(ext_pos != std::string::npos) - map_filename.erase(ext_pos, map_filename.size() - ext_pos); + context.draw_text(white_text, "Loading...", + Vector(screen->w/2, screen->h/2), CENTER_ALLIGN, LAYER_FOREGROUND1); + context.do_drawing(); // TODO: slots should be available for contrib maps - worldmap.loadgame(st_save_dir + "/" + map_filename + "-slot1.stsg"); + worldmap.loadgame(st_save_dir + "/" + subset.name + "-slot1.stsg"); worldmap.display(); // run the map Menu::set_current(main_menu); resume_demo(); - } - else if (index < (int)contrib_subsets.size() + first_level_index) - { - index -= first_level_index; - if (current_subset != index) - { - current_subset = index; - // FIXME: This shouln't be busy looping - LevelSubset& subset = * (contrib_subsets[index]); + } else if (current_subset != index) { + current_subset = index; + // FIXME: This shouln't be busy looping + LevelSubset& subset = * (contrib_subsets[index]); - current_contrib_subset = ⊂ + current_contrib_subset = ⊂ - contrib_subset_menu->clear(); + contrib_subset_menu->clear(); - contrib_subset_menu->additem(MN_LABEL, subset.title, 0,0); - contrib_subset_menu->additem(MN_HL,"",0,0); + contrib_subset_menu->additem(MN_LABEL, subset.title, 0,0); + contrib_subset_menu->additem(MN_HL,"",0,0); - for (int i = 0; i < subset.get_num_levels(); ++i) - { - /** get level's title */ - std::string filename = subset.get_level_filename(i); - std::string title = get_level_name(filename); - contrib_subset_menu->additem(MN_ACTION, title, 0, 0, i); - } + for (int i = 0; i < subset.get_num_levels(); ++i) + { + /** get level's title */ + std::string filename = subset.get_level_filename(i); + std::string title = get_level_name(filename); + contrib_subset_menu->additem(MN_ACTION, title, 0, 0, i); + } - contrib_subset_menu->additem(MN_HL,"",0,0); - contrib_subset_menu->additem(MN_BACK, _("Back"), 0, 0); + contrib_subset_menu->additem(MN_HL,"",0,0); + contrib_subset_menu->additem(MN_BACK, _("Back"), 0, 0); - titlesession->get_current_sector()->activate(); - titlesession->set_current(); - } - } + titlesession->get_current_sector()->activate(); + titlesession->set_current(); + } } void check_contrib_subset_menu() @@ -327,9 +297,6 @@ logo = new Surface(datadir + "/images/title/logo.png", true); img_choose_subset = new Surface(datadir + "/images/status/choose-level-subset.png", true); - /* Generating contrib maps by only using a string_list */ - worldmap_list = FileSystem::dfiles("levels/worldmap", "", "icyisland.stwm"); - titlesession->get_current_sector()->activate(); titlesession->set_current(); @@ -474,7 +441,6 @@ /* Free surfaces: */ free_contrib_menu(); - worldmap_list.clear(); delete titlesession; delete bkg_title; delete logo; Index: worldmap.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/worldmap.cpp,v retrieving revision 1.136 retrieving revision 1.137 diff -u -d -r1.136 -r1.137 --- worldmap.cpp 28 Nov 2004 14:56:50 -0000 1.136 +++ worldmap.cpp 2 Dec 2004 00:25:27 -0000 1.137 @@ -368,17 +368,22 @@ void WorldMap::load_map() { + std::string::size_type p = map_filename.find_last_of('/'); + if(p == std::string::npos) + levels_path = ""; + else + levels_path = map_filename.substr(0, p+1); + try { lisp::Parser parser; - std::string filename - = get_resource_filename("/levels/worldmap/" + map_filename); + std::string filename = get_resource_filename(map_filename); std::auto_ptr<lisp::Lisp> root (parser.parse(filename)); const lisp::Lisp* lisp = root->get_lisp("supertux-worldmap"); if(!lisp) throw new std::runtime_error("file isn't a supertux-worldmap file."); - lisp::ListIterator iter(lisp->get_cdr()); + lisp::ListIterator iter(lisp); while(iter.next()) { if(iter.item() == "tilemap") { if(tilemap.size() > 0) @@ -498,7 +503,7 @@ try { lisp::Parser parser; std::auto_ptr<lisp::Lisp> root ( - parser.parse(get_resource_filename("levels/" + level.name))); + parser.parse(get_resource_filename(levels_path + level.name))); const lisp::Lisp* level_lisp = root->get_lisp("supertux-level"); if(!level_lisp) @@ -718,8 +723,7 @@ // do a shriking fade to the level shrink_fade(Vector((level->pos.x*32 + 16 + offset.x), (level->pos.y*32 + 16 + offset.y)), 500); - GameSession session( - get_resource_filename(std::string("levels/" + level->name)), + GameSession session(get_resource_filename(levels_path + level->name), ST_GL_LOAD_LEVEL_FILE, &level->statistics); switch (session.run()) Index: gameloop.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/gameloop.cpp,v retrieving revision 1.209 retrieving revision 1.210 diff -u -d -r1.209 -r1.210 --- gameloop.cpp 1 Dec 2004 15:58:38 -0000 1.209 +++ gameloop.cpp 2 Dec 2004 00:25:27 -0000 1.210 @@ -978,7 +978,7 @@ WorldMapNS::WorldMap worldmap; - worldmap.set_map_filename("icyisland.stwm"); + worldmap.set_map_filename("/levels/world1/worldmap.stwm"); // Load the game or at least set the savegame_file variable worldmap.loadgame(slotfile); Index: worldmap.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/worldmap.h,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- worldmap.h 28 Nov 2004 14:56:50 -0000 1.52 +++ worldmap.h 2 Dec 2004 00:25:27 -0000 1.53 @@ -185,6 +185,7 @@ private: std::string map_filename; + std::string levels_path; typedef std::vector<SpecialTile> SpecialTiles; SpecialTiles special_tiles; |
Update of /cvsroot/super-tux/supertux/src/badguy In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15164/src/badguy Modified Files: bouncing_snowball.cpp dispenser.cpp jumpy.cpp mrbomb.cpp mriceblock.cpp nolok_01.cpp snowball.cpp spiky.cpp Log Message: changed worldmap to be stored inside the same directory as the levelsubset, fixed badguys writing out their current position instead of their startposition when saving levelfile Index: dispenser.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/badguy/dispenser.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- dispenser.cpp 28 Nov 2004 14:56:50 -0000 1.9 +++ dispenser.cpp 2 Dec 2004 00:25:27 -0000 1.10 @@ -22,8 +22,8 @@ { writer.start_list("dispenser"); - writer.write_float("x", get_pos().x); - writer.write_float("y", get_pos().y); + writer.write_float("x", start_position.x); + writer.write_float("y", start_position.y); writer.write_float("cycle", cycle); writer.write_string("badguy", badguy); Index: mrbomb.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/badguy/mrbomb.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- mrbomb.cpp 1 Dec 2004 15:58:38 -0000 1.9 +++ mrbomb.cpp 2 Dec 2004 00:25:27 -0000 1.10 @@ -29,8 +29,8 @@ { writer.start_list("mrbomb"); - writer.write_float("x", get_pos().x); - writer.write_float("y", get_pos().y); + writer.write_float("x", start_position.x); + writer.write_float("y", start_position.y); writer.end_list("mrbomb"); } Index: mriceblock.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/badguy/mriceblock.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- mriceblock.cpp 29 Nov 2004 00:12:24 -0000 1.6 +++ mriceblock.cpp 2 Dec 2004 00:25:27 -0000 1.7 @@ -33,8 +33,8 @@ { writer.start_list("mriceblock"); - writer.write_float("x", get_pos().x); - writer.write_float("y", get_pos().y); + writer.write_float("x", start_position.x); + writer.write_float("y", start_position.y); writer.end_list("mriceblock"); } Index: snowball.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/badguy/snowball.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- snowball.cpp 29 Nov 2004 00:12:24 -0000 1.7 +++ snowball.cpp 2 Dec 2004 00:25:27 -0000 1.8 @@ -28,8 +28,8 @@ { writer.start_list("snowball"); - writer.write_float("x", get_pos().x); - writer.write_float("y", get_pos().y); + writer.write_float("x", start_position.x); + writer.write_float("y", start_position.y); writer.end_list("snowball"); } Index: jumpy.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/badguy/jumpy.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- jumpy.cpp 29 Nov 2004 00:12:24 -0000 1.5 +++ jumpy.cpp 2 Dec 2004 00:25:27 -0000 1.6 @@ -17,8 +17,8 @@ { writer.start_list("jumpy"); - writer.write_float("x", get_pos().x); - writer.write_float("y", get_pos().y); + writer.write_float("x", start_position.x); + writer.write_float("y", start_position.y); writer.end_list("jumpy"); } Index: nolok_01.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/badguy/nolok_01.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- nolok_01.cpp 28 Nov 2004 14:56:51 -0000 1.7 +++ nolok_01.cpp 2 Dec 2004 00:25:27 -0000 1.8 @@ -33,8 +33,8 @@ { writer.start_list("nolok01"); - writer.write_float("x", get_pos().x); - writer.write_float("y", get_pos().y); + writer.write_float("x", start_position.x); + writer.write_float("y", start_position.y); writer.end_list("nolok01"); } Index: bouncing_snowball.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/badguy/bouncing_snowball.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- bouncing_snowball.cpp 29 Nov 2004 00:12:24 -0000 1.7 +++ bouncing_snowball.cpp 2 Dec 2004 00:25:27 -0000 1.8 @@ -29,8 +29,8 @@ { writer.start_list("bouncingsnowball"); - writer.write_float("x", get_pos().x); - writer.write_float("y", get_pos().y); + writer.write_float("x", start_position.x); + writer.write_float("y", start_position.y); writer.end_list("bouncingsnowball"); } Index: spiky.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/badguy/spiky.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- spiky.cpp 29 Nov 2004 00:12:24 -0000 1.5 +++ spiky.cpp 2 Dec 2004 00:25:27 -0000 1.6 @@ -17,8 +17,8 @@ { writer.start_list("spiky"); - writer.write_float("x", get_pos().x); - writer.write_float("y", get_pos().y); + writer.write_float("x", start_position.x); + writer.write_float("y", start_position.y); writer.end_list("spiky"); } |
From: Matze B. <mat...@us...> - 2004-12-02 00:25:38
|
Update of /cvsroot/super-tux/supertux/data/levels/worldmap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15164/data/levels/worldmap Removed Files: bonusisland1.stwm icyisland.stwm Log Message: changed worldmap to be stored inside the same directory as the levelsubset, fixed badguys writing out their current position instead of their startposition when saving levelfile --- bonusisland1.stwm DELETED --- --- icyisland.stwm DELETED --- |
From: Matze B. <mat...@us...> - 2004-12-02 00:25:37
|
Update of /cvsroot/super-tux/supertux/lib/video In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15164/lib/video Modified Files: font.cpp Log Message: changed worldmap to be stored inside the same directory as the levelsubset, fixed badguys writing out their current position instead of their startposition when saving levelfile Index: font.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/lib/video/font.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- font.cpp 28 Nov 2004 14:56:48 -0000 1.16 +++ font.cpp 2 Dec 2004 00:25:27 -0000 1.17 @@ -223,6 +223,8 @@ if(!text_lisp->get("text", text)) throw std::runtime_error("file doesn't contain a text field"); + if(!text_lisp->get("background", background_file)) + throw std::runtime_error("file doesn't contain a background file"); } catch(std::exception& e) { std::cerr << "Couldn't load file '" << filename << "': " << e.what() << "\n"; |
From: Matze B. <mat...@us...> - 2004-12-02 00:25:36
|
Update of /cvsroot/super-tux/supertux/data/levels/world1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15164/data/levels/world1 Added Files: worldmap.stwm Log Message: changed worldmap to be stored inside the same directory as the levelsubset, fixed badguys writing out their current position instead of their startposition when saving levelfile --- NEW FILE: worldmap.stwm --- ;; Generated with Flexlay Editor (supertux-worldmap (properties (name "Icyisland") (name-pt_PT "Ilha Gelada") (name-de "Eisige Insel") (name-es "Isla de hielo") (music "salcon.mod") (start_pos_x 4) (start_pos_y 5)) (tilemap (width 40) (height 30) (data 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 12 11 16 16 16 16 12 9 9 9 9 11 16 16 12 9 9 14 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 16 16 22 19 17 15 24 25 25 26 23 16 12 9 9 14 18 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 22 58 19 19 20 18 13 15 31 32 32 34 26 19 23 16 12 9 9 9 9 9 9 11 16 16 16 16 12 9 9 9 9 9 9 9 9 9 9 15 19 59 19 20 13 9 9 15 31 35 29 29 28 19 19 60 23 16 12 9 9 9 11 22 19 24 25 26 23 12 11 16 16 12 9 9 9 9 9 15 19 47 19 17 11 16 16 22 30 28 19 48 40 40 39 19 20 18 13 9 9 11 22 19 19 30 36 34 26 23 22 19 19 23 12 9 9 9 9 15 19 47 19 23 22 19 19 19 19 24 26 47 24 26 47 19 23 16 16 16 16 22 48 40 40 39 31 32 34 25 25 25 25 26 17 9 9 9 9 15 19 37 39 19 48 40 40 40 39 30 28 47 30 28 37 40 40 40 40 40 40 40 42 19 19 47 30 29 29 29 29 29 36 27 17 9 9 9 9 15 19 19 47 19 47 24 25 26 37 40 40 42 24 25 25 26 20 18 18 18 21 24 25 25 26 37 40 40 40 40 40 39 31 27 23 12 9 9 9 14 18 21 47 19 47 30 29 28 19 24 25 25 33 35 29 28 17 9 9 9 15 30 29 36 27 19 19 19 19 19 60 47 31 34 26 17 9 9 9 9 9 15 37 40 42 19 19 24 25 33 35 29 29 28 20 18 13 9 9 9 14 18 21 31 27 48 40 40 40 40 40 42 30 36 27 17 9 9 9 9 9 15 19 19 24 25 25 33 32 35 28 20 18 18 13 9 9 9 9 9 9 9 15 31 27 47 24 25 25 25 26 19 19 30 28 17 9 9 9 9 9 14 21 19 31 32 32 32 35 28 20 13 9 9 11 16 12 9 9 9 9 9 15 30 28 47 30 36 32 35 28 20 21 19 20 13 9 9 9 11 12 9 14 21 30 29 29 29 28 20 13 9 11 16 22 20 13 9 9 9 9 9 14 21 19 37 39 31 32 27 20 13 14 21 17 9 9 9 9 14 13 11 12 14 18 18 18 18 18 13 9 9 14 18 18 13 9 9 9 9 9 9 9 14 21 19 47 30 36 27 17 9 9 14 13 9 9 9 9 9 9 14 13 9 9 9 9 11 16 16 16 12 9 9 11 16 12 9 9 9 9 9 9 9 14 21 47 19 31 27 17 9 9 9 9 9 9 9 9 9 9 9 11 16 16 16 16 22 24 25 26 23 16 16 22 19 23 16 16 12 9 9 9 9 9 15 47 19 30 28 17 9 9 9 9 9 9 9 9 9 11 16 22 49 50 51 24 26 30 36 34 25 26 19 24 25 25 25 26 23 16 16 16 16 16 22 47 20 18 18 13 9 9 9 9 9 9 9 9 9 15 24 26 52 53 54 30 28 19 30 29 29 28 19 30 29 29 36 34 25 26 24 26 48 40 40 42 17 9 9 9 9 9 9 9 9 9 9 9 9 15 31 27 55 56 57 39 19 48 40 40 39 19 48 40 40 39 30 29 29 28 30 28 47 20 18 18 13 9 9 9 9 9 9 9 9 9 9 9 9 15 31 34 25 26 19 47 19 47 24 26 47 19 47 24 26 47 19 24 26 48 40 40 42 23 12 9 9 9 9 11 12 9 9 9 9 9 9 9 9 15 30 29 29 28 19 37 40 42 31 27 47 19 47 30 28 47 19 30 28 47 19 19 24 26 17 9 9 9 9 14 13 9 9 9 9 9 9 9 9 14 18 18 18 18 21 24 26 19 30 28 47 60 47 19 48 42 24 26 48 42 24 25 33 27 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 30 28 24 25 26 37 40 42 19 47 19 30 28 47 19 30 29 36 27 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 12 9 9 9 14 18 21 30 36 34 25 26 19 19 37 40 40 40 42 19 20 21 30 28 17 9 9 11 16 16 12 9 9 9 9 9 9 9 9 14 13 9 9 9 9 9 14 21 31 32 32 34 25 25 25 25 26 19 19 20 13 14 18 18 13 9 9 14 21 60 23 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 30 29 29 29 29 29 29 29 28 19 20 13 11 12 9 9 9 9 9 9 14 18 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 18 18 18 18 18 18 18 18 18 13 9 14 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 )) (special-tiles (level (x 4) (y 6) (name "level1.stl")) (level (x 4) (y 8) (name "level2.stl")) (level (x 5) (y 11) (name "level3.stl")) (level (x 7) (y 11) (name "level4.stl")) (level (x 7) (y 8) (name "level5.stl")) (level (x 11) (y 9) (name "level6.stl")) (level (x 14) (y 9) (name "level7.stl")) (level (x 17) (y 6) (name "level8.stl")) (level (x 14) (y 6) (name "level9.stl")) (level (x 21) (y 8) (name "level10.stl")) (level (x 26) (y 7) (name "level11.stl")) (level (x 28) (y 9) (name "level12.stl")) (level (x 31) (y 9) (name "level13.stl")) (level (x 34) (y 11) (name "level14.stl")) (level (x 29) (y 11) (name "level15.stl")) (level (x 28) (y 13) (name "level16.stl")) (level (x 29) (y 16) (name "level17.stl")) (level (x 27) (y 19) (name "level18.stl")) (level (x 23) (y 22) (name "level19.stl")) (level (x 20) (y 25) (name "level20.stl")) (level (x 18) (y 23) (name "level21.stl")) (level (x 19) (y 20) (name "level22.stl")) (level (x 14) (y 24) (name "level23.stl")) (level (x 14) (y 20) (name "level24.stl")) (level (x 10) (y 22) (name "level25.stl")) (level (x 7) (y 20) (extro-filename "extro.txt") (name "level26.stl") (quit-worldmap #t)) ; In the future, do this to go to another world: ; (next-worldmap "forest.stwt) ) ) |
From: Matze B. <mat...@us...> - 2004-12-02 00:25:36
|
Update of /cvsroot/super-tux/supertux/data/levels/bonus1 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15164/data/levels/bonus1 Modified Files: info Added Files: worldmap.stwm Log Message: changed worldmap to be stored inside the same directory as the levelsubset, fixed badguys writing out their current position instead of their startposition when saving levelfile Index: info =================================================================== RCS file: /cvsroot/super-tux/supertux/data/levels/bonus1/info,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- info 9 Oct 2004 21:26:10 -0000 1.1 +++ info 2 Dec 2004 00:25:26 -0000 1.2 @@ -1,14 +1,5 @@ ;SuperTux-Level-Subset (supertux-level-subset - (title "Bonus World 1 levels") + (title "Bonus World 1") (description "Levels from the Bonus World 1") - (levels "abednego-level1.stl" "abednego-level2.stl" "abednego-level3.stl" - "abednego-level4.stl" "bonus-level1.stl" "bonus-level2.stl" - "bonus-level3.stl" "bonus-level4.stl" "bonus-level5.stl" - "matr1x-level1.stl" "matr1x-level2.stl" "matr1x-level3.stl" - "thompson-level1.stl" "thompson-level2.stl" "torfi-level1.stl" - "torfi-level2.stl" "torfi-level3.stl" "wansti-level1.stl" - "wansti-level2.stl" "wansti-level3.stl" "wansti-level4.stl" - "wansti-level5.stl") - (hide-from-contribs #t) - ) \ No newline at end of file +) --- NEW FILE: worldmap.stwm --- ;; Generated with Flexlay Editor (supertux-worldmap (properties (name "Bonus Island I") (start_pos_x 35) (start_pos_y 2)) (tilemap (width 70) (height 50) (data 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 16 16 16 16 16 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 24 25 26 58 24 26 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 30 29 28 59 31 27 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 22 19 19 19 47 30 28 19 23 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 19 19 19 60 47 60 19 19 19 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 48 40 43 40 45 40 43 40 39 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 47 19 47 19 47 19 47 19 47 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 47 19 47 19 47 19 47 19 47 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 68 19 68 19 68 19 68 19 68 19 17 9 9 9 9 9 9 9 9 11 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 18 18 18 18 18 18 18 18 18 18 13 9 9 9 9 9 9 9 9 15 58 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 12 9 9 9 9 9 9 11 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 22 59 23 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 13 9 9 9 9 9 9 15 23 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 12 9 9 9 9 15 60 47 60 17 9 9 9 9 11 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 12 9 9 15 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 17 9 9 9 9 14 21 47 20 13 9 9 11 16 22 23 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 58 17 9 9 14 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 23 12 9 9 11 16 22 47 23 16 12 9 14 21 20 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 16 22 59 23 16 16 16 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 18 13 9 9 15 19 19 47 19 19 17 9 9 14 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 19 19 47 19 19 48 40 39 17 9 9 9 11 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 21 19 37 40 39 23 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 21 19 47 19 19 47 19 47 17 9 9 9 14 13 9 11 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 19 19 47 19 20 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 21 37 40 40 42 19 47 17 9 9 9 9 9 9 15 58 17 9 9 9 9 9 9 9 9 9 11 16 16 16 22 19 19 19 47 19 23 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 22 19 60 19 19 19 47 17 9 9 9 9 11 16 22 59 23 16 12 9 9 9 9 9 9 9 15 48 40 40 40 40 39 19 37 40 39 23 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 22 19 19 19 19 19 19 19 47 17 9 9 9 9 15 19 19 47 19 19 23 12 9 9 9 9 9 9 15 47 19 19 19 19 47 19 19 19 47 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 12 9 15 48 40 40 40 40 40 40 40 42 17 9 9 9 9 14 21 19 37 40 40 39 17 9 9 9 9 9 9 15 47 19 19 19 19 37 40 40 40 42 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 17 9 15 47 19 19 19 19 20 21 19 20 13 9 9 9 9 9 14 21 19 19 19 47 17 9 9 9 9 9 9 15 37 40 39 19 19 19 19 19 19 19 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 13 9 15 37 40 39 19 20 13 14 18 13 9 9 9 9 9 9 9 15 19 19 19 47 17 9 9 9 9 9 9 15 19 19 37 40 40 40 40 40 39 19 20 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 21 47 20 13 9 9 9 9 9 9 9 9 9 9 9 15 19 48 40 42 23 12 9 9 9 9 9 14 21 19 19 19 20 18 18 21 47 20 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 68 17 9 9 9 9 9 9 9 9 9 9 9 9 14 21 47 19 19 19 17 9 9 9 9 9 9 14 18 18 18 13 9 9 15 47 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 15 47 20 18 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 15 68 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 12 9 9 9 9 9 9 9 9 9 9 9 9 11 16 16 12 9 9 9 9 9 9 15 68 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 21 17 9 9 9 9 9 9 9 9 9 9 9 9 14 21 20 13 9 9 9 9 9 9 14 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 13 9 9 9 9 9 9 9 9 9 9 9 9 9 14 13 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 12 9 9 9 9 9 9 9 15 19 19 23 12 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 20 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 12 9 15 58 17 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 17 9 9 9 9 9 9 9 15 19 19 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 22 19 23 12 15 59 23 16 16 12 9 9 9 9 9 9 9 9 9 9 14 18 13 9 9 9 9 9 9 9 14 21 19 20 13 9 9 9 9 9 9 9 9 9 9 11 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 19 19 23 22 47 48 40 39 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 17 9 9 9 9 9 9 9 9 9 9 9 15 58 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 48 40 40 40 42 47 19 47 17 9 9 9 11 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 13 9 9 9 9 9 9 9 9 9 9 11 22 59 23 16 16 16 16 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 21 47 19 19 60 19 47 19 47 23 12 9 9 14 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 22 19 37 40 40 40 39 19 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 37 40 40 40 40 42 19 47 19 17 9 9 9 9 9 9 9 9 9 9 11 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 24 25 25 26 19 19 19 47 19 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 19 19 19 24 25 26 47 19 17 9 9 9 9 9 9 9 9 9 9 15 58 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 31 32 32 27 48 40 40 42 19 20 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 19 19 19 30 29 28 47 20 13 9 9 9 9 9 9 9 9 9 9 15 59 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 30 29 29 28 47 19 19 20 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 21 48 40 40 40 40 40 42 17 9 9 9 9 9 9 11 16 16 16 16 22 47 17 9 9 9 9 9 9 9 9 9 11 16 16 12 9 9 9 9 9 14 18 21 19 19 47 19 19 23 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 16 22 47 19 19 19 19 19 19 17 9 9 9 9 9 9 15 69 40 40 40 40 61 64 63 63 63 63 63 63 63 63 63 62 67 19 23 12 9 9 9 9 9 9 14 21 19 47 19 19 19 23 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 19 19 37 40 40 40 40 40 39 17 9 9 9 9 9 9 14 18 18 18 18 21 47 17 9 9 9 9 9 9 9 9 9 15 19 19 19 17 9 9 9 9 9 9 9 15 19 37 40 40 39 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 21 19 19 19 19 19 19 19 47 23 12 9 9 9 9 9 9 9 9 9 9 15 47 17 9 9 9 9 9 9 9 9 9 14 18 18 18 13 9 9 9 9 9 9 9 15 19 19 19 19 47 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 18 18 18 18 18 21 47 20 13 9 9 9 9 9 9 9 11 16 16 22 47 23 16 16 12 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 18 18 21 47 20 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 68 17 9 9 9 9 9 9 9 9 15 19 19 19 37 40 39 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 15 68 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 13 9 9 9 9 9 11 16 12 15 19 19 49 50 51 47 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 11 22 20 13 15 60 19 52 53 54 47 60 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 21 17 9 15 19 19 55 56 57 42 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 13 9 15 19 19 19 19 19 19 19 17 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 14 18 18 18 18 18 18 18 13 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 9 )) (special-tiles (level (name "bonus-level1.stl") (x 35) (y 4)) (level (name "bonus-level2.stl") (x 32) (y 41)) (level (name "/bonus-level3.stl") (x 30) (y 39)) (level (name "/bonus-level4.stl") (extro-filelevel "extro-bonus.txt") (x 32) (y 46)) (level (name "bonus-level5.stl") (x 44) (y 39)) (level (name "abednego-level1.stl") (x 12) (y 33)) (level (name "abednego-level2.stl") (x 15) (y 35)) (level (name "abednego-level3.stl") (x 18) (y 36)) (level (name "abednego-level4.stl") (x 16) (y 40)) (level (name "matr1x-level1.stl") (x 21) (y 17)) (level (name "matr1x-level2.stl") (x 25) (y 18)) (level (name "matr1x-level3.stl") (x 20) (y 20)) (level (name "thompson-level1.stl") (x 35) (y 20)) (level (name "thompson-level2.stl") (x 37) (y 22)) (level (name "torfi-level1.stl") (x 58) (y 34)) (level (name "torfi-level2.stl") (x 57) (y 38)) (level (name "torfi-level3.stl") (x 59) (y 40)) (level (name "wansti-level1.stl") (x 51) (y 14)) (level (name "wansti-level2.stl") (x 53) (y 16)) (level (name "wansti-level3.stl") (x 52) (y 20)) (level (name "wansti-level4.stl") (x 47) (y 18)) (level (name "wansti-level5.stl") (x 50) (y 22)) (special-tile (map-message "You found a secret place!") (x 33) (y 39) (passive-message #t) (apply-to-direction "west-north-south")) (special-tile (map-message "Hint: Use igloos to get back here.") (x 35) (y 5) (passive-message #t) (apply-to-direction "north")) (special-tile (x 33) (y 8) (map-message "Warp to Matr1x' Sector") (teleport-to-x 20) (teleport-to-y 14)) (special-tile (x 31) (y 8) (map-message "Warp to Thompson's Domain") (teleport-to-x 34) (teleport-to-y 18)) (special-tile (x 35) (y 8) (map-message "Warp to the SuperTux Team Island") (teleport-to-x 51) (teleport-to-y 10)) (special-tile (x 37) (y 8) (map-message "Warp to Abednego's Area") (teleport-to-x 15) (teleport-to-y 31)) (special-tile (x 39) (y 8) (map-message "Warp to Torfi's Territory") (teleport-to-x 56) (teleport-to-y 33)) (special-tile (x 19) (y 24) (map-message "Leave Matrix' Sector") (teleport-to-x 32) (teleport-to-y 37)) (special-tile (x 35) (y 26) (map-message "Leave Thompson's Domain") (teleport-to-x 35) (teleport-to-y 2)) (special-tile (x 54) (y 25) (map-message "Leave SuperTux Team Island") (teleport-to-x 35) (teleport-to-y 2)) (special-tile (x 18) (y 43) (map-message "Leave Abednego's Area") (teleport-to-x 35) (teleport-to-y 2)) (special-tile (x 60) (y 43) (map-message "Leave Torfi's Territory") (teleport-to-x 35) (teleport-to-y 2)) ;;Back from Castle (special-tile (x 27) (y 39) (map-message "Warp home") (teleport-to-x 35) (teleport-to-y 2)) ;;Back from Abednego (special-tile (x 15) (y 31) (invisible-tile #t) (teleport-to-x 35) (teleport-to-y 2)) ;; Back from Thompson (special-tile (x 34) (y 18) (invisible-tile #t) (teleport-to-x 35) (teleport-to-y 2)) ;; Back from Matr1x (special-tile (x 20) (y 14) (invisible-tile #t) (teleport-to-x 35) (teleport-to-y 2)) ;; Back from Wansti (special-tile (x 51) (y 10) (invisible-tile #t) (teleport-to-x 35) (teleport-to-y 2)) ;; Back from Torfi (special-tile (x 56) (y 33) (invisible-tile #t) (teleport-to-x 35) (teleport-to-y 2)) ) ) |
From: Matze B. <mat...@us...> - 2004-12-01 23:26:48
|
Update of /cvsroot/super-tux/supertux/src/trigger In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32264/src/trigger Modified Files: secretarea_trigger.cpp secretarea_trigger.h Log Message: fix secretarea and sequencetrigger loading bugs Index: secretarea_trigger.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/trigger/secretarea_trigger.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- secretarea_trigger.h 28 Nov 2004 14:56:52 -0000 1.6 +++ secretarea_trigger.h 1 Dec 2004 23:26:31 -0000 1.7 @@ -12,7 +12,7 @@ { public: SecretAreaTrigger(const lisp::Lisp& reader); - SecretAreaTrigger(const Vector& pos); + SecretAreaTrigger(const Rectangle& area); ~SecretAreaTrigger(); void write(lisp::Writer& writer); Index: secretarea_trigger.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/trigger/secretarea_trigger.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- secretarea_trigger.cpp 28 Nov 2004 14:56:52 -0000 1.6 +++ secretarea_trigger.cpp 1 Dec 2004 23:26:31 -0000 1.7 @@ -12,16 +12,18 @@ { reader.get("x", bbox.p1.x); reader.get("y", bbox.p1.y); - bbox.set_size(32, 32); + float w = 32, h = 32; + reader.get("width", w); + reader.get("height", h); + bbox.set_size(w, h); reader.get("message", message); message_displayed = false; } -SecretAreaTrigger::SecretAreaTrigger(const Vector& pos) +SecretAreaTrigger::SecretAreaTrigger(const Rectangle& area) { - bbox.set_pos(pos); - bbox.set_size(32, 32); + bbox = area; message = "You found a secret area!"; message_displayed = false; } |
From: Matze B. <mat...@us...> - 2004-12-01 23:26:47
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32264/src Modified Files: sector.cpp Log Message: fix secretarea and sequencetrigger loading bugs Index: sector.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/sector.cpp,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- sector.cpp 29 Nov 2004 16:03:31 -0000 1.57 +++ sector.cpp 1 Dec 2004 23:26:30 -0000 1.58 @@ -121,6 +121,8 @@ return new Door(reader); } else if(name == "secretarea") { return new SecretAreaTrigger(reader); + } else if(name == "sequencetrigger") { + return new SequenceTrigger(reader); } else if(name == "platform") { return new Platform(reader); } else if(name == "jumpy" || name == "money") { |
From: Ingo R. <gr...@us...> - 2004-12-01 23:23:24
|
Update of /cvsroot/super-tux/supertux/data/images/shared In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31392/shared Added Files: secretarea.png sequencetrigger.png spawnpoint.png Log Message: - graphics for secret area and stuff, are used in flexlay --- NEW FILE: spawnpoint.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: sequencetrigger.png --- (This appears to be a binary file; contents omitted.) --- NEW FILE: secretarea.png --- (This appears to be a binary file; contents omitted.) |
From: Matze B. <mat...@us...> - 2004-12-01 19:49:16
|
Update of /cvsroot/super-tux/supertux/lib/lisp In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10379/lib/lisp Modified Files: lexer.cpp Log Message: don't use istream::readsome Index: lexer.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/lib/lisp/lexer.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- lexer.cpp 28 Nov 2004 14:57:45 -0000 1.1 +++ lexer.cpp 1 Dec 2004 19:49:08 -0000 1.2 @@ -20,6 +20,7 @@ #include <sstream> #include <stdexcept> +#include <iostream> #include "lexer.h" @@ -36,7 +37,7 @@ try { // trigger a refill of the buffer c = 0; - bufend = c + 1; + bufend = 0; nextChar(); } catch(EOFException& e) { } @@ -53,15 +54,16 @@ if(c >= bufend) { if(eof) throw EOFException(); - std::streamsize n = stream.readsome(buffer, BUFFER_SIZE); - + stream.read(buffer, BUFFER_SIZE); + size_t bytes_read = stream.gcount(); + c = buffer; - bufend = buffer + n; + bufend = buffer + bytes_read; // the following is a hack that appends an additional ' ' at the end of // the file to avoid problems when parsing symbols/elements and a sudden // EOF. This is faster than relying on unget and IMO also nicer. - if(n == 0 || stream.eof()) { + if(bytes_read == 0 || stream.eof()) { eof = true; *bufend = ' '; ++bufend; @@ -85,7 +87,7 @@ switch(*c) { case ';': // comment - while(!stream.eof()) { + while(true) { nextChar(); if(*c == '\n') { ++linenumber; @@ -103,12 +105,6 @@ int startline = linenumber; try { while(1) { - if(stream.eof()) { - std::stringstream msg; - msg << "Parse Error in line " << startline << ": " - << "Couldn't find end of string."; - throw std::runtime_error(msg.str()); - } nextChar(); if(*c == '"') break; |
From: Matze B. <mat...@us...> - 2004-12-01 15:58:49
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19458/src Modified Files: collision_grid.h gameloop.cpp Log Message: incorporated another patch from Ondra Hosek which fixes tux not getting killed on timeup, and adds sound to bomb again. Additionally fixed mrbomb not getting squishsound when jumped on and ticking bombs already killing enemies Index: collision_grid.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/collision_grid.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- collision_grid.h 29 Nov 2004 16:03:31 -0000 1.1 +++ collision_grid.h 1 Dec 2004 15:58:38 -0000 1.2 @@ -6,6 +6,8 @@ using namespace SuperTux; +class CollisionGridIterator; + /** * A rectangular grid to keep track of all moving game objects. It allows fast * queries for all objects in a rectangular area. Index: gameloop.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/gameloop.cpp,v retrieving revision 1.208 retrieving revision 1.209 diff -u -d -r1.208 -r1.209 --- gameloop.cpp 29 Nov 2004 16:24:09 -0000 1.208 +++ gameloop.cpp 1 Dec 2004 15:58:38 -0000 1.209 @@ -765,12 +765,11 @@ //frame_rate.update(); /* Handle time: */ - if (time_left.check() && currentsector->player->dying == DYING_NOT - && !end_sequence) + if (time_left.check() && !end_sequence) currentsector->player->kill(Player::KILL); /* Handle music: */ - if(currentsector->player->invincible_timer.started() && !end_sequence) + if (currentsector->player->invincible_timer.started() && !end_sequence) { currentsector->play_music(HERRING_MUSIC); } @@ -850,7 +849,7 @@ LEFT_ALLIGN, LAYER_FOREGROUND1); } - if(time_left.check()) { + if(time_left.get_timeleft() < 0) { context.draw_text(white_text, _("TIME's UP"), Vector(screen->w/2, 0), CENTER_ALLIGN, LAYER_FOREGROUND1); } else if (time_left.get_timeleft() > TIME_WARNING |
From: Matze B. <mat...@us...> - 2004-12-01 15:58:48
|
Update of /cvsroot/super-tux/supertux/src/object In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19458/src/object Modified Files: camera.cpp Log Message: incorporated another patch from Ondra Hosek which fixes tux not getting killed on timeup, and adds sound to bomb again. Additionally fixed mrbomb not getting squishsound when jumped on and ticking bombs already killing enemies Index: camera.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/object/camera.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- camera.cpp 28 Nov 2004 14:56:51 -0000 1.2 +++ camera.cpp 1 Dec 2004 15:58:38 -0000 1.3 @@ -64,6 +64,7 @@ do_backscrolling = true; reader.get("backscrolling", do_backscrolling); } else if(modename == "autoscroll") { + printf("autoscroll.\n"); mode = AUTOSCROLL; const lisp::Lisp* path_lisp = reader.get_lisp("path"); |
From: Matze B. <mat...@us...> - 2004-12-01 15:58:47
|
Update of /cvsroot/super-tux/supertux/src/badguy In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19458/src/badguy Modified Files: bomb.cpp mrbomb.cpp Log Message: incorporated another patch from Ondra Hosek which fixes tux not getting killed on timeup, and adds sound to bomb again. Additionally fixed mrbomb not getting squishsound when jumped on and ticking bombs already killing enemies Index: bomb.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/badguy/bomb.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- bomb.cpp 29 Nov 2004 00:12:24 -0000 1.5 +++ bomb.cpp 1 Dec 2004 15:58:38 -0000 1.6 @@ -44,7 +44,8 @@ HitResponse Bomb::collision_badguy(BadGuy& badguy, const CollisionHit& ) { - badguy.kill_fall(); + if(state == 1) + badguy.kill_fall(); return ABORT_MOVE; } @@ -56,6 +57,8 @@ if(timer.check()) { state = 1; sprite->set_action("explosion"); + SoundManager::get()->play_sound(IDToSound(SND_EXPLODE), get_pos(), + Sector::current()->player->get_pos()); timer.start(EXPLOSIONTIME); } break; Index: mrbomb.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/badguy/mrbomb.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- mrbomb.cpp 29 Nov 2004 00:12:24 -0000 1.8 +++ mrbomb.cpp 1 Dec 2004 15:58:38 -0000 1.9 @@ -48,7 +48,7 @@ { remove_me(); Sector::current()->add_object(new Bomb(get_pos(), dir)); - player.bounce(*this); + kill_squished(player); return true; } |
From: Matze B. <mat...@us...> - 2004-11-30 16:13:55
|
Update of /cvsroot/super-tux/supertux/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20260/lib Modified Files: SConscript Log Message: fix for sconsfiles Index: SConscript =================================================================== RCS file: /cvsroot/super-tux/supertux/lib/SConscript,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- SConscript 21 Nov 2004 03:21:23 -0000 1.3 +++ SConscript 30 Nov 2004 16:13:46 -0000 1.4 @@ -6,7 +6,8 @@ + Glob("math/*.cpp") \ + Glob("special/*.cpp") \ + Glob("utils/*.cpp") \ - + Glob("video/*.cpp") + + Glob("video/*.cpp") \ + + Glob("lisp/*.cpp") lib = env.Library( target="supertux", |
From: Matze B. <mat...@us...> - 2004-11-29 18:50:01
|
Update of /cvsroot/super-tux/supertux/data/levels/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25925/data/levels/test Modified Files: autoscroll.stl Log Message: convert autoscoll test map to level format 2 Index: autoscroll.stl =================================================================== RCS file: /cvsroot/super-tux/supertux/data/levels/test/autoscroll.stl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- autoscroll.stl 25 Nov 2004 18:06:08 -0000 1.1 +++ autoscroll.stl 29 Nov 2004 18:49:51 -0000 1.2 @@ -1,36 +1,39 @@ ;; Generated by Flexlay Editor (supertux-level - (version 1) + (version 2) (author "Ricardo Cruz") (name "Autoscroll Test (Above the Arctic Skies)") - (width 290) - (height 15) - (start_pos_x 100) - (start_pos_y 170) - (background "arctis.jpg") - (music "Mortimers_chipdisko.mod") - (bkgd_red_top 100) - (bkgd_green_top 150) - (bkgd_blue_top 255) - (bkgd_red_bottom 255) - (bkgd_green_bottom 255) - (bkgd_blue_bottom 255) - (time 200) - (gravity 10.0) - (particle_system "clouds") - (theme "antarctica") - (camera - (mode "autoscroll") - (path - (point (x 0) (y 0) (speed 0.5)) - (point (x 500) (y 0) (speed 2)) - (point (x 1200) (y 0) (speed 1)) - (point (x 3000) (y 0) (speed 1)) - (point (x 1500) (y 0) (speed 1.4)) - (point (x 99999) (y 0)) + (time 200) + (sector + (name "main") + (gravity 10) + (music "supertux-2.ogg") + (background + (image "arctis.jpg") + (speed 0.5) ) - ) - (interactive-tm + (spawnpoint + (name "main") + (x 100) + (y 170) + ) + (camera + (mode "autoscroll") + (path + (point (x 0) (y 0) (speed 50)) + (point (x 500) (y 0) (speed 200)) + (point (x 1200) (y 0) (speed 100)) + (point (x 3000) (y 0) (speed 100)) + (point (x 1500) (y 0) (speed 140)) + (point (x 99999) (y 0)) + ) + ) + (tilemap + (layer "interactive") + (solid #t) + (width 290) + (height 15) + (tiles 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 133 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 132 132 0 0 0 0 0 @@ -47,8 +50,12 @@ 8 8 8 8 8 8 8 8 8 8 9 0 0 0 0 13 14 14 14 14 14 15 0 0 0 0 79 0 0 79 0 0 0 0 0 0 79 0 0 79 0 0 0 79 0 0 0 79 0 0 0 79 0 0 0 79 0 0 0 0 79 0 0 0 0 79 0 0 0 79 0 0 0 0 0 79 0 0 0 0 0 79 0 0 79 0 0 0 79 0 0 79 0 0 0 0 0 79 0 0 0 0 79 0 0 79 0 79 0 79 0 0 79 0 79 79 0 79 0 0 79 0 0 79 0 0 79 0 0 79 0 79 0 0 79 0 0 79 0 79 0 79 0 0 0 79 0 79 0 0 79 0 0 0 79 0 0 0 0 0 0 79 0 0 0 0 0 0 79 0 0 79 0 0 0 0 0 79 0 0 79 0 0 0 0 79 0 0 79 0 0 0 79 7 8 8 8 8 8 8 8 8 8 8 9 79 0 79 0 79 0 10 21 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 22 11 11 11 12 0 0 0 0 0 0 0 6 10 12 6 0 0 0 0 0 10 12 0 0 0 0 0 0 0 0 0 0 10 12 0 0 0 0 0 0 0 0 0 10 12 0 0 0 14 14 14 14 14 14 14 14 14 14 15 0 0 0 0 10 11 11 11 11 11 12 0 0 0 0 79 0 0 79 0 0 0 0 0 0 79 0 0 79 0 0 0 79 0 0 0 79 0 0 0 79 0 0 0 79 0 0 0 0 79 0 0 0 0 79 0 0 0 79 0 0 0 0 0 79 0 0 0 0 0 79 0 0 79 0 0 0 79 0 0 79 0 0 0 0 0 79 0 0 0 0 79 0 0 79 0 79 0 79 0 0 79 0 79 79 0 79 0 0 79 0 0 79 0 0 79 0 0 79 0 79 0 0 79 0 0 79 0 79 0 79 0 0 0 79 0 79 0 0 79 0 0 0 79 0 0 0 0 0 0 79 0 0 0 0 0 0 79 0 0 79 0 0 0 0 0 79 0 0 79 0 0 0 0 79 0 0 79 0 0 0 79 13 14 14 14 14 14 14 14 14 14 14 15 79 0 79 0 79 0 10 20 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 23 11 11 11 12 0 0 0 0 0 0 0 6 10 12 6 0 0 0 0 0 10 12 0 0 0 0 0 0 0 0 0 0 10 12 0 0 0 0 0 0 0 0 0 10 12 0 0 0 ) - - (background-tm + ) + (tilemap + (layer "background") + (width 290) + (height 15) + (tiles 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 @@ -65,8 +72,12 @@ 0 0 0 25 0 8 8 109 110 111 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 124 125 0 0 0 0 0 122 123 0 124 125 0 122 123 0 0 0 0 0 0 0 0 0 122 123 0 124 125 0 0 0 124 125 0 124 125 0 0 122 123 0 124 125 0 122 123 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 124 125 0 124 125 0 124 125 0 0 0 0 0 0 0 0 0 0 0 122 123 0 124 125 0 124 125 0 124 125 0 124 125 0 0 0 0 0 122 123 0 124 125 0 0 0 0 0 124 125 0 124 125 0 0 0 0 0 0 0 0 0 122 123 0 124 125 0 0 0 0 122 123 0 0 0 0 0 0 0 0 0 124 125 0 124 125 0 0 0 0 0 0 0 0 0 122 123 0 0 0 24 0 0 0 0 0 0 25 0 0 0 0 0 0 0 0 0 0 0 0 0 109 110 111 0 0 0 0 25 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 124 125 0 0 0 0 0 124 125 0 124 125 0 124 125 0 0 0 0 0 0 0 0 0 124 125 0 124 125 0 0 0 124 125 0 124 125 0 0 124 125 0 124 125 0 124 125 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 124 125 0 124 125 0 124 125 0 0 0 0 0 0 0 0 0 0 0 124 125 0 124 125 0 124 125 0 124 125 0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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ) - - (reset-points - (point (x 4384) (y 251)) - ) - (objects - (money (x 1952) (y 32)) - (money (x 3424) (y 64)) - (money (x 3680) (y 64)) - (money (x 3936) (y 64)) - (money (x 4608) (y 64)) - (money (x 3648) (y 96)) - (money (x 3904) (y 96)) - (money (x 4249) (y 97)) - (money (x 4576) (y 96)) - (money (x 5152) (y 96)) + ) + (money (x 1952) (y 32)) + (money (x 3424) (y 64)) + (money (x 3680) (y 64)) + (money (x 3936) (y 64)) + (money (x 4608) (y 64)) + (money (x 3648) (y 96)) + (money (x 3904) (y 96)) + (money (x 4249) (y 97)) + (money (x 4576) (y 96)) + (money (x 5152) (y 96)) (money (x 4217) (y 129)) (snowball (x 2304) (y 160)) (snowball (x 1632) (y 192)) @@ -141,7 +148,4 @@ (snowball (x 2664) (y 339)) (snowball (x 2708) (y 339)) ) - ) - - -;; EOF ;; +) |
From: Matze B. <mat...@us...> - 2004-11-29 16:24:31
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23066/src Modified Files: gameloop.cpp Log Message: fix for star not changing music, thanks to Ondra Hosek for the patch Index: gameloop.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/gameloop.cpp,v retrieving revision 1.207 retrieving revision 1.208 diff -u -d -r1.207 -r1.208 --- gameloop.cpp 28 Nov 2004 14:56:49 -0000 1.207 +++ gameloop.cpp 29 Nov 2004 16:24:09 -0000 1.208 @@ -770,7 +770,7 @@ currentsector->player->kill(Player::KILL); /* Handle music: */ - if(currentsector->player->invincible_timer.check() && !end_sequence) + if(currentsector->player->invincible_timer.started() && !end_sequence) { currentsector->play_music(HERRING_MUSIC); } |
From: Matze B. <mat...@us...> - 2004-11-29 16:24:21
|
Update of /cvsroot/super-tux/supertux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23066 Modified Files: TODO Log Message: fix for star not changing music, thanks to Ondra Hosek for the patch Index: TODO =================================================================== RCS file: /cvsroot/super-tux/supertux/TODO,v retrieving revision 1.97 retrieving revision 1.98 diff -u -d -r1.97 -r1.98 --- TODO 29 Nov 2004 16:03:25 -0000 1.97 +++ TODO 29 Nov 2004 16:24:09 -0000 1.98 @@ -117,8 +117,6 @@ - New forest tileset - Badguy sprites - Tux's buttjump animation -[M] after picking up a star the salcon music isn't played anymore, but the - levelmusic restarts. [M] Save score on per-level basis to make high-score [M] Save time on per-level basis to make low-time-score |
From: Matze B. <mat...@us...> - 2004-11-29 16:04:29
|
Update of /cvsroot/super-tux/supertux/src/object In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18135/src/object Modified Files: oneup.cpp Log Message: started work on a collision grid class to speedup collision detection. Doesn't work for moving objects yet, but brings speed in area42 from 5fps back to 100fps on my box (still I get 300-400fps in other levels) Index: oneup.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/object/oneup.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- oneup.cpp 23 Nov 2004 16:47:26 -0000 1.2 +++ oneup.cpp 29 Nov 2004 16:03:33 -0000 1.3 @@ -4,6 +4,7 @@ #include "resources.h" #include "player.h" #include "scene.h" +#include "sector.h" #include "special/sprite_manager.h" #include "video/drawing_context.h" @@ -23,6 +24,9 @@ void OneUp::action(float elapsed_time) { + if(!Sector::current()->inside(bbox)) + remove_me(); + movement = physic.get_movement(elapsed_time); } |
From: Matze B. <mat...@us...> - 2004-11-29 16:04:27
|
Update of /cvsroot/super-tux/supertux/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18135/src Modified Files: sector.cpp sector.h Added Files: collision_grid.cpp collision_grid.h Log Message: started work on a collision grid class to speedup collision detection. Doesn't work for moving objects yet, but brings speed in area42 from 5fps back to 100fps on my box (still I get 300-400fps in other levels) --- NEW FILE: collision_grid.cpp --- #include <config.h> #include <iostream> #include "collision_grid.h" #include "special/collision.h" #include "sector.h" static const float DELTA = .001; CollisionGrid::CollisionGrid(float newwidth, float newheight) : width(newwidth), height(newheight), cell_width(128), cell_height(128) { cells_x = size_t(width / cell_width) + 1; cells_y = size_t(height / cell_height) + 1; grid.resize(cells_x * cells_y); } CollisionGrid::~CollisionGrid() { for(GridEntries::iterator i = grid.begin(); i != grid.end(); ++i) { GridEntry* entry = *i; while(entry) { GridEntry* nextentry = entry->next; delete entry; entry = nextentry; } } } void CollisionGrid::add_object(MovingObject* object) { #ifdef DEBUG // make sure the object isn't already in the grid for(Objects::iterator i = objects.begin(); i != objects.end(); ++i) { ObjectWrapper* wrapper = *i; if(wrapper->object == object) assert(false); } assert(object != 0); #endif ObjectWrapper* wrapper = new ObjectWrapper; wrapper->object = object; wrapper->timestamp = 0; wrapper->dest = object->bbox; objects.push_back(wrapper); wrapper->id = objects.size()-1; const Rectangle& bbox = object->bbox; for(float y = bbox.p1.y; y < bbox.p2.y; y += cell_height) { for(float x = bbox.p1.x; x < bbox.p2.x; x += cell_width) { int gridx = int(x / cell_width); int gridy = int(y / cell_height); if(gridx < 0 || gridy < 0 || gridx >= int(cells_x) || gridy >= int(cells_y)) { std::cerr << "Object out of range: " << gridx << ", " << gridy << "\n"; continue; } GridEntry* entry = new GridEntry; entry->object_wrapper = wrapper; entry->next = grid[gridy*cells_x + gridx]; grid[gridy*cells_x + gridx] = entry; } } } void CollisionGrid::remove_object(MovingObject* object) { ObjectWrapper* wrapper = 0; for(Objects::iterator i = objects.begin(); i != objects.end(); ++i) { if((*i)->object == object) { wrapper = *i; objects.erase(i); break; } } assert(wrapper != 0); const Rectangle& bbox = wrapper->dest; for(float y = bbox.p1.y; y < bbox.p2.y; y += cell_height) { for(float x = bbox.p1.x; x < bbox.p2.x; x += cell_width) { int gridx = int(x / cell_width); int gridy = int(y / cell_height); if(gridx < 0 || gridy < 0 || gridx >= int(cells_x) || gridy >= int(cells_y)) { std::cerr << "Object out of range: " << gridx << ", " << gridy << "\n"; continue; } remove_object_from_gridcell(gridy*cells_x + gridx, object); } } delete wrapper; } void CollisionGrid::move_object(MovingObject* object) { const Rectangle& bbox = object->bbox; for(float y = bbox.p1.y; y < bbox.p2.y; y += cell_height) { for(float x = bbox.p1.x; x < bbox.p2.x; x += cell_width) { int gridx = int(x / cell_width); int gridy = int(y / cell_height); if(gridx < 0 || gridy < 0 || gridx >= int(cells_x) || gridy >= int(cells_y)) { std::cerr << "Object out of range: " << gridx << ", " << gridy << "\n"; continue; } // TODO } } } void CollisionGrid::check_collisions() { for(Objects::iterator i = objects.begin(); i != objects.end(); ++i) { ObjectWrapper* wrapper = *i; MovingObject* object = wrapper->object; if(!object->is_valid()) continue; if(object->get_flags() & GameObject::FLAG_NO_COLLDET) { object->bbox.move(object->movement); object->movement = Vector(0, 0); continue; } // hack for now... Sector::current()->collision_tilemap(object, 0); collide_object(wrapper); object->bbox.move(object->get_movement()); object->movement = Vector(0, 0); } } void CollisionGrid::collide_object(ObjectWrapper* wrapper) { static int timestamp = 0; timestamp++; const Rectangle& bbox = wrapper->object->bbox; for(float y = bbox.p1.y; y < bbox.p2.y; y += cell_height) { for(float x = bbox.p1.x; x < bbox.p2.x; x += cell_width) { int gridx = int(x / cell_width); int gridy = int(y / cell_height); if(gridx < 0 || gridy < 0 || gridx >= int(cells_x) || gridy >= int(cells_y)) { std::cerr << "Object out of range: " << gridx << ", " << gridy << "\n"; continue; } for(GridEntry* entry = grid[gridy*cells_x + gridx]; entry; entry = entry->next) { ObjectWrapper* wrapper2 = entry->object_wrapper; // only check each object once (even if it is in multiple cells) if(wrapper2->timestamp == timestamp) continue; // don't collide with objects we already collided with if(wrapper2->id <= wrapper->id) continue; wrapper->timestamp = timestamp; collide_object_object(wrapper, wrapper2); } } } } void CollisionGrid::collide_object_object(ObjectWrapper* wrapper, ObjectWrapper* wrapper2) { CollisionHit hit; MovingObject* object1 = wrapper->object; MovingObject* object2 = wrapper2->object; Rectangle dest1 = object1->get_bbox(); dest1.move(object1->get_movement()); Rectangle dest2 = object2->get_bbox(); dest2.move(object2->get_movement()); Vector movement = object1->get_movement() - object2->get_movement(); if(Collision::rectangle_rectangle(hit, dest1, movement, dest2)) { HitResponse response1 = object1->collision(*object2, hit); hit.normal *= -1; HitResponse response2 = object2->collision(*object1, hit); if(response1 != CONTINUE) { if(response1 == ABORT_MOVE) object1->movement = Vector(0, 0); if(response2 == CONTINUE) object2->movement += hit.normal * (hit.depth + DELTA); } else if(response2 != CONTINUE) { if(response2 == ABORT_MOVE) object2->movement = Vector(0, 0); if(response1 == CONTINUE) object1->movement += -hit.normal * (hit.depth + DELTA); } else { object1->movement += -hit.normal * (hit.depth/2 + DELTA); object2->movement += hit.normal * (hit.depth/2 + DELTA); } } } void CollisionGrid::remove_object_from_gridcell(int gridcell, MovingObject* object) { GridEntry* lastentry = 0; GridEntry* entry = grid[gridcell]; while(entry) { if(entry->object_wrapper->object == object) { if(lastentry == 0) { grid[gridcell] = entry->next; } else { lastentry->next = entry->next; } delete entry; return; } lastentry = entry; entry = entry->next; }; std::cerr << "Couldn't find object in cell.\n"; } Index: sector.h =================================================================== RCS file: /cvsroot/super-tux/supertux/src/sector.h,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- sector.h 28 Nov 2004 14:56:49 -0000 1.28 +++ sector.h 29 Nov 2004 16:03:32 -0000 1.29 @@ -40,19 +40,11 @@ class Writer; } -class InteractiveObject; -class Background; class Player; class Camera; -class Trampoline; -class FlyingPlatform; class TileMap; -class Upgrade; class Bullet; -class SmokeCloud; -class Particles; -class BadGuy; -class Tile; +class CollisionGrid; struct SpawnPoint { @@ -115,8 +107,10 @@ /** Get total number of badguys */ int get_total_badguys(); -private: + // make this private again soon void collision_tilemap(MovingObject* object, int depth); + +private: void collision_object(MovingObject* object1, MovingObject* object2); void load_music(); @@ -142,8 +136,6 @@ std::vector<Bullet*> bullets; public: // TODO make this private again - typedef std::vector<InteractiveObject*> InteractiveObjects; - InteractiveObjects interactive_objects; typedef std::vector<GameObject*> GameObjects; GameObjects gameobjects; @@ -157,6 +149,8 @@ SpawnPoints spawnpoints; int currentmusic; + + CollisionGrid* grid; }; #endif Index: sector.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/src/sector.cpp,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- sector.cpp 28 Nov 2004 17:19:25 -0000 1.56 +++ sector.cpp 29 Nov 2004 16:03:31 -0000 1.57 @@ -42,6 +42,7 @@ #include "gameloop.h" #include "resources.h" #include "statistics.h" +#include "collision_grid.h" #include "special/collision.h" #include "math/rectangle.h" #include "math/aatriangle.h" @@ -73,6 +74,8 @@ song_title = "Mortimers_chipdisko.mod"; player = new Player(); add_object(player); + + grid = new CollisionGrid(32000, 32000); } Sector::~Sector() @@ -80,6 +83,8 @@ update_game_objects(); assert(gameobjects_new.size() == 0); + delete grid; + for(GameObjects::iterator i = gameobjects.begin(); i != gameobjects.end(); ++i) { delete *i; @@ -485,29 +490,42 @@ /** cleanup marked objects */ for(std::vector<GameObject*>::iterator i = gameobjects.begin(); i != gameobjects.end(); /* nothing */) { - if((*i)->is_valid() == false) { - Bullet* bullet = dynamic_cast<Bullet*> (*i); - if(bullet) { - bullets.erase( - std::remove(bullets.begin(), bullets.end(), bullet), - bullets.end()); - } - delete *i; - i = gameobjects.erase(i); - } else { + GameObject* object = *i; + + if(object->is_valid()) { ++i; + continue; + } + + Bullet* bullet = dynamic_cast<Bullet*> (object); + if(bullet) { + bullets.erase( + std::remove(bullets.begin(), bullets.end(), bullet), + bullets.end()); } + MovingObject* movingobject = dynamic_cast<MovingObject*> (object); + if(movingobject) { + grid->remove_object(movingobject); + } + delete *i; + i = gameobjects.erase(i); } /* add newly created objects */ for(std::vector<GameObject*>::iterator i = gameobjects_new.begin(); i != gameobjects_new.end(); ++i) { - Bullet* bullet = dynamic_cast<Bullet*> (*i); + GameObject* object = *i; + + Bullet* bullet = dynamic_cast<Bullet*> (object); if(bullet) bullets.push_back(bullet); - TileMap* tilemap = dynamic_cast<TileMap*> (*i); + MovingObject* movingobject = dynamic_cast<MovingObject*> (object); + if(movingobject) + grid->add_object(movingobject); + + TileMap* tilemap = dynamic_cast<TileMap*> (object); if(tilemap && tilemap->is_solid()) { if(solids == 0) { solids = tilemap; @@ -516,7 +534,7 @@ } } - Camera* camera = dynamic_cast<Camera*> (*i); + Camera* camera = dynamic_cast<Camera*> (object); if(camera) { if(this->camera != 0) { std::cerr << "Warning: Multiple cameras added. Ignoring."; @@ -525,7 +543,7 @@ this->camera = camera; } - gameobjects.push_back(*i); + gameobjects.push_back(object); } gameobjects_new.clear(); } @@ -674,6 +692,9 @@ void Sector::collision_handler() { +#if 0 + grid->check_collisions(); +#else for(std::vector<GameObject*>::iterator i = gameobjects.begin(); i != gameobjects.end(); ++i) { GameObject* gameobject = *i; @@ -709,6 +730,7 @@ movingobject->bbox.move(movingobject->get_movement()); movingobject->movement = Vector(0, 0); } +#endif } bool --- NEW FILE: collision_grid.h --- #ifndef __COLLISION_GRID_H__ #define __COLLISION_GRID_H__ #include <vector> #include "special/moving_object.h" using namespace SuperTux; /** * A rectangular grid to keep track of all moving game objects. It allows fast * queries for all objects in a rectangular area. */ class CollisionGrid { public: CollisionGrid(float width, float height); ~CollisionGrid(); void add_object(MovingObject* object); void remove_object(MovingObject* object); void move_object(MovingObject* object); void check_collisions(); private: struct ObjectWrapper { MovingObject* object; Rectangle dest; /** (pseudo) timestamp. When reading from the grid the timestamp is * changed so that you can easily avoid reading an object multiple times * when it is in several cells that you check. */ int timestamp; /// index in the objects vector int id; }; /** Element for the single linked list in each grid cell */ struct GridEntry { GridEntry* next; ObjectWrapper* object_wrapper; }; void remove_object_from_gridcell(int gridcell, MovingObject* object); void collide_object(ObjectWrapper* wrapper); void collide_object_object(ObjectWrapper* wrapper, ObjectWrapper* wrapper2); typedef std::vector<GridEntry*> GridEntries; GridEntries grid; typedef std::vector<ObjectWrapper*> Objects; Objects objects; size_t cells_x, cells_y; float width; float height; float cell_width; float cell_height; }; extern CollisionGrid* bla; #endif |