X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fleveleditor.h;h=33b067769f7b28df79942c5fdbd72c022d5642bd;hb=06cfaca833bf5214f58fa5abe4897afb5118861f;hp=11e2bd2152062918c0228cae860dcc11247af0cd;hpb=851e98df89229af086fa86c48adce2a397bf122a;p=supertux.git diff --git a/src/leveleditor.h b/src/leveleditor.h index 11e2bd215..33b067769 100644 --- a/src/leveleditor.h +++ b/src/leveleditor.h @@ -1,30 +1,32 @@ -/*************************************************************************** - 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" +#if 0 #include #include #include "video/drawing_context.h" -#include "special/timer.h" +#include "timer.h" #include "level.h" #include "level_subset.h" @@ -32,12 +34,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 +93,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 +109,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,14 +124,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; - Timer frame_timer; Timer level_name_timer; Surface *img_background_bt, *img_foreground_bt, *img_interactive_bt; @@ -138,12 +139,17 @@ 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 + +#endif