X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fleveleditor.h;h=16ac9dafa7b6bf619adac38d6ca25a933379d273;hb=c0093d25093395cb62fc2526ab42be65a9f015b8;hp=32099a202b8a60074c5a7abf7ce38323476802d3;hpb=00fb759c2385ff08caf38e916c2d0ba8cafc8a41;p=supertux.git diff --git a/src/leveleditor.h b/src/leveleditor.h index 32099a202..16ac9dafa 100644 --- a/src/leveleditor.h +++ b/src/leveleditor.h @@ -1,25 +1,26 @@ -/*************************************************************************** - leveleditor.h - built'in level editor - ------------------- - begin : June, 23 2004 - copyright : (C) 2004 by Ricardo Cruz - email : rick2@aeiou.pt - ***************************************************************************/ - -/*************************************************************************** - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ +// $Id$ +// +// SuperTux +// Copyright (C) 2005 Matthias Braun +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +// 02111-1307, USA. #ifndef SUPERTUX_LEVELEDITOR_H #define SUPERTUX_LEVELEDITOR_H -#include "SDL.h" - #include #include @@ -32,12 +33,12 @@ using namespace SuperTux; namespace SuperTux { class ButtonGroup; -class Menu; -class Surface; } +class Menu; class Sector; class TileMap; +class Surface; enum { MN_ID_RETURN, @@ -91,8 +92,7 @@ private: void load_level_subset(std::string filename); void load_level(std::string filename); void load_level(int nb); - void load_sector(std::string name); - void load_sector(Sector* sector); + void load_sector(size_t num); void save_level(); void test_level(); @@ -108,6 +108,7 @@ private: Level* level; std::string level_filename; + size_t sectornum; // number of current sector Sector* sector; // current sector TileMap *solids, *foregrounds, *backgrounds; std::string sector_name; @@ -122,13 +123,13 @@ private: Menu* settings_menu; bool left_button, middle_button, mouse_moved; + int mouse_x, mouse_y; bool done; bool show_grid; Vector scroll; float zoom; - SDL_Event event; Timer2 level_name_timer; Surface *img_background_bt, *img_foreground_bt, *img_interactive_bt; @@ -137,12 +138,15 @@ private: Surface *img_previous_level_bt, *img_next_level_bt, *img_previous_sector_bt, *img_next_sector_bt; ButtonGroup *tiles_board, *tiles_layer, *level_options; - int cur_layer; + int gameobjs_first_id, cur_layer; std::vector > selection; Vector selection_ini, selection_end; bool level_changed; + +private: + Sector* create_sector(const std::string& name, size_t width, size_t height); }; #endif