├── README.md
├── source
├── mkpch.cpp
├── script.cpp
├── json
│ ├── json_spirit_value.cpp
│ ├── json_spirit.h
│ ├── json_spirit_error_position.h
│ ├── json_spirit_utils.h
│ ├── json_spirit_writer.h
│ ├── json_spirit_stream_reader.h
│ ├── json_spirit_writer.cpp
│ └── json_spirit_reader.h
├── dat_debug_view.h
├── json.h
├── extension_window.h
├── map_allocator.h
├── raw_brush.h
├── live_packets.h
├── spawn_brush.h
├── extension.h
├── rme_forward_declarations.h
├── dcbutton.h
├── creature_brush.h
├── waypoint_brush.cpp
├── mt_rand.h
├── templatemap76-74.cpp
├── materials.h
├── house_brush.h
├── house_exit_brush.cpp
├── spawn_brush.cpp
├── pugicast.h
├── live_action.h
├── waypoint_brush.h
├── house_exit_brush.h
├── container_properties_window.h
├── net_connection.h
├── outfit.h
├── live_tab.h
├── table_brush.h
├── about_window.h
├── templates.h
├── result_window.h
├── browse_tile_window.h
├── iomap.cpp
├── properties_window.h
├── carpet_brush.h
├── threads.h
├── minimap_window.h
├── live_server.h
├── copybuffer.h
├── process_com.h
├── old_properties_window.h
├── spawn.cpp
├── extension.cpp
├── positionctrl.h
├── updater.h
├── live_peer.h
├── waypoints.h
├── eraser_brush.cpp
├── creature_brush.cpp
├── numbertextctrl.h
├── map_tab.h
├── rme_net.h
├── iomap.h
├── map_tab.cpp
├── live_client.h
├── raw_brush.cpp
├── town.cpp
├── rme-install
├── waypoints.cpp
├── wall_brush.h
├── editor_tabs.h
├── creature.cpp
├── creature.h
├── process_com.cpp
├── con_vector.h
├── house_brush.cpp
├── spawn.h
├── palette_waypoints.h
├── live_socket.h
├── updater.cpp
├── ground_brush.h
├── pngfiles.h
├── iomap_otmm.h
├── town.h
├── tileset.h
├── brush_enums.h
├── creatures.h
├── ext
│ └── pugiconfig.hpp
├── dat_debug_view.cpp
├── complexitem.cpp
├── net_connection.cpp
├── selection.h
├── palette_creature.h
├── house.h
├── doodad_brush.h
├── positionctrl.cpp
├── live_action.cpp
├── mt_rand.cpp
├── application.h
├── palette_window.h
├── common.h
├── find_item_window.h
└── numbertextctrl.cpp
├── .gitattributes
├── brushes
├── eraser.png
├── no_pvp.png
├── gem_edit.png
├── gem_move.png
├── no_logout.png
├── pvp_zone.png
├── circular_1.png
├── circular_2.png
├── circular_3.png
├── circular_4.png
├── circular_5.png
├── circular_6.png
├── circular_7.png
├── door_locked.png
├── door_magic.png
├── door_normal.png
├── door_quest.png
├── eraser_small.png
├── no_pvp_small.png
├── window_hatch.png
├── icon
│ ├── rme_icon.ico
│ └── rme_icon.png
├── pvp_zone_small.png
├── rectangular_1.png
├── rectangular_2.png
├── rectangular_3.png
├── rectangular_4.png
├── rectangular_5.png
├── rectangular_6.png
├── rectangular_7.png
├── window_normal.png
├── circular_1_small.png
├── circular_2_small.png
├── circular_3_small.png
├── circular_4_small.png
├── circular_5_small.png
├── circular_6_small.png
├── circular_7_small.png
├── door_locked_small.png
├── door_magic_small.png
├── door_normal_small.png
├── door_quest_small.png
├── no_logout_small.png
├── optional_border.png
├── protection_zone.png
├── rectangular_1_small.png
├── rectangular_2_small.png
├── rectangular_3_small.png
├── rectangular_4_small.png
├── rectangular_5_small.png
├── rectangular_6_small.png
├── rectangular_7_small.png
├── window_hatch_small.png
├── window_normal_small.png
├── optional_border_small.png
└── protection_zone_small.png
└── data
├── 770
└── materials.xml
└── clients.xml
/README.md:
--------------------------------------------------------------------------------
1 | # Map Editor
2 |
--------------------------------------------------------------------------------
/source/mkpch.cpp:
--------------------------------------------------------------------------------
1 | #include "main.h"
2 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/brushes/eraser.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/eraser.png
--------------------------------------------------------------------------------
/brushes/no_pvp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/no_pvp.png
--------------------------------------------------------------------------------
/source/script.cpp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/source/script.cpp
--------------------------------------------------------------------------------
/brushes/gem_edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/gem_edit.png
--------------------------------------------------------------------------------
/brushes/gem_move.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/gem_move.png
--------------------------------------------------------------------------------
/brushes/no_logout.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/no_logout.png
--------------------------------------------------------------------------------
/brushes/pvp_zone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/pvp_zone.png
--------------------------------------------------------------------------------
/brushes/circular_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/circular_1.png
--------------------------------------------------------------------------------
/brushes/circular_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/circular_2.png
--------------------------------------------------------------------------------
/brushes/circular_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/circular_3.png
--------------------------------------------------------------------------------
/brushes/circular_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/circular_4.png
--------------------------------------------------------------------------------
/brushes/circular_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/circular_5.png
--------------------------------------------------------------------------------
/brushes/circular_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/circular_6.png
--------------------------------------------------------------------------------
/brushes/circular_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/circular_7.png
--------------------------------------------------------------------------------
/brushes/door_locked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/door_locked.png
--------------------------------------------------------------------------------
/brushes/door_magic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/door_magic.png
--------------------------------------------------------------------------------
/brushes/door_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/door_normal.png
--------------------------------------------------------------------------------
/brushes/door_quest.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/door_quest.png
--------------------------------------------------------------------------------
/brushes/eraser_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/eraser_small.png
--------------------------------------------------------------------------------
/brushes/no_pvp_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/no_pvp_small.png
--------------------------------------------------------------------------------
/brushes/window_hatch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/window_hatch.png
--------------------------------------------------------------------------------
/brushes/icon/rme_icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/icon/rme_icon.ico
--------------------------------------------------------------------------------
/brushes/icon/rme_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/icon/rme_icon.png
--------------------------------------------------------------------------------
/brushes/pvp_zone_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/pvp_zone_small.png
--------------------------------------------------------------------------------
/brushes/rectangular_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/rectangular_1.png
--------------------------------------------------------------------------------
/brushes/rectangular_2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/rectangular_2.png
--------------------------------------------------------------------------------
/brushes/rectangular_3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/rectangular_3.png
--------------------------------------------------------------------------------
/brushes/rectangular_4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/rectangular_4.png
--------------------------------------------------------------------------------
/brushes/rectangular_5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/rectangular_5.png
--------------------------------------------------------------------------------
/brushes/rectangular_6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/rectangular_6.png
--------------------------------------------------------------------------------
/brushes/rectangular_7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/rectangular_7.png
--------------------------------------------------------------------------------
/brushes/window_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/window_normal.png
--------------------------------------------------------------------------------
/brushes/circular_1_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/circular_1_small.png
--------------------------------------------------------------------------------
/brushes/circular_2_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/circular_2_small.png
--------------------------------------------------------------------------------
/brushes/circular_3_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/circular_3_small.png
--------------------------------------------------------------------------------
/brushes/circular_4_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/circular_4_small.png
--------------------------------------------------------------------------------
/brushes/circular_5_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/circular_5_small.png
--------------------------------------------------------------------------------
/brushes/circular_6_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/circular_6_small.png
--------------------------------------------------------------------------------
/brushes/circular_7_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/circular_7_small.png
--------------------------------------------------------------------------------
/brushes/door_locked_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/door_locked_small.png
--------------------------------------------------------------------------------
/brushes/door_magic_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/door_magic_small.png
--------------------------------------------------------------------------------
/brushes/door_normal_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/door_normal_small.png
--------------------------------------------------------------------------------
/brushes/door_quest_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/door_quest_small.png
--------------------------------------------------------------------------------
/brushes/no_logout_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/no_logout_small.png
--------------------------------------------------------------------------------
/brushes/optional_border.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/optional_border.png
--------------------------------------------------------------------------------
/brushes/protection_zone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/protection_zone.png
--------------------------------------------------------------------------------
/brushes/rectangular_1_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/rectangular_1_small.png
--------------------------------------------------------------------------------
/brushes/rectangular_2_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/rectangular_2_small.png
--------------------------------------------------------------------------------
/brushes/rectangular_3_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/rectangular_3_small.png
--------------------------------------------------------------------------------
/brushes/rectangular_4_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/rectangular_4_small.png
--------------------------------------------------------------------------------
/brushes/rectangular_5_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/rectangular_5_small.png
--------------------------------------------------------------------------------
/brushes/rectangular_6_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/rectangular_6_small.png
--------------------------------------------------------------------------------
/brushes/rectangular_7_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/rectangular_7_small.png
--------------------------------------------------------------------------------
/brushes/window_hatch_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/window_hatch_small.png
--------------------------------------------------------------------------------
/brushes/window_normal_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/window_normal_small.png
--------------------------------------------------------------------------------
/brushes/optional_border_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/optional_border_small.png
--------------------------------------------------------------------------------
/brushes/protection_zone_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Ezzz-dev/Map-Editor/HEAD/brushes/protection_zone_small.png
--------------------------------------------------------------------------------
/source/json/json_spirit_value.cpp:
--------------------------------------------------------------------------------
1 | /* Copyright (c) 2007 John W Wilkinson
2 |
3 | This source code can be used for any purpose as long as
4 | this comment is retained. */
5 |
6 | // json spirit version 2.00
7 |
8 | #include "json_spirit_value.h"
9 |
--------------------------------------------------------------------------------
/data/clients.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/source/dat_debug_view.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef RME_DAT_DEBUG_VIEW_H_
3 | #define RME_DAT_DEBUG_VIEW_H_
4 |
5 | class DatDebugViewListBox;
6 |
7 | class DatDebugView : wxPanel
8 | {
9 | public:
10 | DatDebugView(wxWindow* parent);
11 | ~DatDebugView();
12 |
13 | void OnTextChange(wxCommandEvent&);
14 | void OnClickList(wxCommandEvent&);
15 |
16 | protected:
17 |
18 | DatDebugViewListBox* item_list;
19 | wxTextCtrl* search_field;
20 |
21 | DECLARE_EVENT_TABLE()
22 | };
23 |
24 | #endif
25 |
--------------------------------------------------------------------------------
/source/json/json_spirit.h:
--------------------------------------------------------------------------------
1 | #ifndef JSON_SPIRIT
2 | #define JSON_SPIRIT
3 |
4 | // Copyright John W. Wilkinson 2007 - 2009.
5 | // Distributed under the MIT License, see accompanying file LICENSE.txt
6 |
7 | // json spirit version 4.03
8 |
9 | #if defined(_MSC_VER) && (_MSC_VER >= 1020)
10 | # pragma once
11 | #endif
12 |
13 | #include "json_spirit_value.h"
14 | #include "json_spirit_reader.h"
15 | #include "json_spirit_writer.h"
16 | #include "json_spirit_utils.h"
17 |
18 | #endif
19 |
--------------------------------------------------------------------------------
/source/json.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////
2 | // This file is part of Remere's Map Editor
3 | //////////////////////////////////////////////////////////////////////
4 | // $URL: https://rme.svn.sourceforge.net/svnroot/rme/trunk/source/common.h $
5 | // $Id: common.h 264 2009-10-05 06:36:21Z remere $
6 |
7 | #ifndef RME_JSON_H_
8 | #define RME_JSON_H_
9 |
10 | #include "json/json_spirit.h"
11 |
12 | namespace json {
13 | using namespace json_spirit;
14 | }
15 |
16 | #endif
17 |
18 |
--------------------------------------------------------------------------------
/data/770/materials.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/source/extension_window.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////
2 | // This file is part of Remere's Map Editor
3 | //////////////////////////////////////////////////////////////////////
4 |
5 | #ifndef RME_EXTENSION_WINDOW_H
6 | #define RME_EXTENSION_WINDOW_H
7 |
8 | class MaterialsExtension;
9 |
10 | class ExtensionsDialog : public wxDialog
11 | {
12 | public:
13 | ExtensionsDialog(wxWindow* parent);
14 | virtual ~ExtensionsDialog();
15 |
16 | void OnClickOK(wxCommandEvent& evt);
17 | void OnClickOpenFolder(wxCommandEvent& evt);
18 | void OnClickLink(wxHtmlLinkEvent& evt);
19 |
20 | DECLARE_EVENT_TABLE();
21 |
22 | private:
23 | wxString HTML() const;
24 | wxString HTMLForExtension(MaterialsExtension* me) const;
25 | };
26 |
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/source/map_allocator.h:
--------------------------------------------------------------------------------
1 | #ifndef RME_MAP_ALLOCATOR_H
2 | #define RME_MAP_ALLOCATOR_H
3 |
4 | #include "tile.h"
5 | #include "map_region.h"
6 |
7 | class BaseMap;
8 |
9 | class MapAllocator
10 | {
11 |
12 | public:
13 | MapAllocator() {}
14 | ~MapAllocator() {}
15 |
16 | // shorthands for tiles
17 | Tile* operator()(TileLocation* location) {
18 | return allocateTile(location);
19 | }
20 | // free
21 | void operator()(Tile* t) {
22 | freeTile(t);
23 | }
24 |
25 | //
26 | Tile* allocateTile(TileLocation* location) {
27 | return newd Tile(*location);
28 | }
29 | void freeTile(Tile* t) {
30 | delete t;
31 | }
32 |
33 | //
34 | Floor* allocateFloor(int x, int y, int z) {
35 | return newd Floor(x, y, z);
36 | }
37 | void freeFloor(Floor* f) {
38 | delete f;
39 | }
40 |
41 | //
42 | QTreeNode* allocateNode(BaseMap& map) {
43 | return newd QTreeNode(map);
44 | }
45 | void freeNode(QTreeNode* qt) {
46 | delete qt;
47 | }
48 | };
49 |
50 | #endif
51 |
--------------------------------------------------------------------------------
/source/raw_brush.h:
--------------------------------------------------------------------------------
1 | #ifndef RME_RAW_BRUSH_H
2 | #define RME_RAW_BRUSH_H
3 |
4 | #include "brush.h"
5 |
6 | //=============================================================================
7 | // RAWBrush, draw items like SimOne's editor
8 |
9 | class RAWBrush : public Brush {
10 | public:
11 | RAWBrush(uint16_t itemid); // Create a RAWBrush of the specified type
12 | virtual ~RAWBrush();
13 |
14 | bool isRaw() const { return true; }
15 | RAWBrush* asRaw() { return static_cast(this); }
16 |
17 | virtual bool canDraw(BaseMap* map, const Position& position) const {return true;}
18 | virtual void draw(BaseMap* map, Tile* tile, void* parameter);
19 | virtual void undraw(BaseMap* map, Tile* tile);
20 |
21 | virtual bool canDrag() const {return true;}
22 | virtual int getLookID() const;
23 | virtual std::string getName() const;
24 | ItemType* getItemType() const {return itemtype;}
25 | uint16_t getItemID() const;
26 | protected:
27 | ItemType* itemtype;
28 | };
29 |
30 | #endif
31 |
--------------------------------------------------------------------------------
/source/live_packets.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////
2 | // This file is part of Remere's Map Editor
3 | //////////////////////////////////////////////////////////////////////
4 |
5 | #ifndef LIVE_PACKETS_H
6 | #define LIVE_PACKETS_H
7 |
8 |
9 | enum LivePacketType
10 | {
11 | PACKET_HELLO_FROM_CLIENT = 0x10,
12 | PACKET_READY_CLIENT = 0x11,
13 |
14 | PACKET_REQUEST_NODES = 0x20,
15 | PACKET_CHANGE_LIST = 0x21,
16 | PACKET_ADD_HOUSE = 0x23,
17 | PACKET_EDIT_HOUSE = 0x24,
18 | PACKET_REMOVE_HOUSE = 0x25,
19 |
20 | PACKET_CLIENT_TALK = 0x30,
21 | PACKET_CLIENT_UPDATE_CURSOR = 0x31,
22 |
23 | PACKET_HELLO_FROM_SERVER = 0x80,
24 | PACKET_KICK = 0x81,
25 | PACKET_ACCEPTED_CLIENT = 0x82,
26 | PACKET_CHANGE_CLIENT_VERSION = 0x83,
27 | PACKET_SERVER_TALK = 0x84,
28 |
29 | PACKET_NODE = 0x90,
30 | PACKET_CURSOR_UPDATE = 0x91,
31 | PACKET_START_OPERATION = 0x92,
32 | PACKET_UPDATE_OPERATION = 0x93,
33 | PACKET_CHAT_MESSAGE = 0x94,
34 | };
35 |
36 | #endif
37 |
--------------------------------------------------------------------------------
/source/spawn_brush.h:
--------------------------------------------------------------------------------
1 | #ifndef RME_SPAWN_BRUSH_H
2 | #define RME_SPAWN_BRUSH_H
3 |
4 | #include "brush.h"
5 |
6 | //=============================================================================
7 | // SpawnBrush, place spawns
8 |
9 | class SpawnBrush : public Brush {
10 | public:
11 | SpawnBrush(); // Create a RAWBrush of the specified type
12 | virtual ~SpawnBrush();
13 |
14 | bool isSpawn() const { return true; }
15 | SpawnBrush* asSpawn() { return static_cast(this); }
16 |
17 | virtual bool canDraw(BaseMap* map, const Position& position) const;
18 | virtual void draw(BaseMap* map, Tile* tile, void* parameter); // parameter is brush size
19 | virtual void undraw(BaseMap* map, Tile* tile);
20 |
21 | virtual int getLookID() const; // We don't have a look, sorry!
22 | virtual std::string getName() const;
23 | virtual bool canDrag() const {return true;}
24 | virtual bool canSmear() const {return false;}
25 | virtual bool oneSizeFitsAll() const {return true;}
26 | };
27 |
28 | #endif
29 |
--------------------------------------------------------------------------------
/source/extension.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////
2 | // This file is part of Remere's Map Editor
3 | //////////////////////////////////////////////////////////////////////
4 |
5 | #ifndef RME_EXTENSION_H_
6 | #define RME_EXTENSION_H_
7 |
8 | #include "tileset.h"
9 | #include "client_version.h"
10 |
11 | class MaterialsExtension
12 | {
13 | public:
14 | MaterialsExtension(std::string name, std::string author, std::string description);
15 | ~MaterialsExtension();
16 |
17 | void addVersion(const std::string& versionString);
18 | bool isForVersion(uint16_t versionId);
19 | std::string getVersionString();
20 |
21 | std::string name;
22 | std::string url;
23 | std::string author;
24 | std::string author_url;
25 | std::string description;
26 | bool for_all_versions;
27 | ClientVersionList version_list;
28 | private:
29 | MaterialsExtension(const MaterialsExtension&);
30 | MaterialsExtension& operator=(const MaterialsExtension&);
31 | };
32 |
33 | typedef std::vector MaterialsExtensionList;
34 |
35 | #endif
36 |
--------------------------------------------------------------------------------
/source/rme_forward_declarations.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////
2 | // This file is part of Remere's Map Editor
3 | //////////////////////////////////////////////////////////////////////
4 |
5 | #ifndef RME_FORWARD_H
6 | #define RME_FORWARD_H
7 |
8 | class Map;
9 | class Tile;
10 | class TileLocation;
11 | class Item;
12 | class container;
13 | class Spawn;
14 | struct Outfit;
15 | class House;
16 | class Creature;
17 | class BaseMap;
18 | class Waypoint;
19 | class Waypoints;
20 | class Tileset;
21 | class Town;
22 | class Position;
23 | class Editor;
24 | class GUI;
25 | class Selection;
26 | class CopyBuffer;
27 | class ItemType;
28 | class Creatures;
29 | class ItemDatabase;
30 | class QTreeNode;
31 | class Floor;
32 | class Action;
33 |
34 | class Brush;
35 |
36 | #include
37 |
38 | typedef std::vector HouseExitList;
39 | typedef std::vector TileVector;
40 | typedef std::unordered_set TileSet;
41 | typedef std::vector- ItemVector;
42 | typedef std::vector BrushVector;
43 |
44 | #endif
45 |
--------------------------------------------------------------------------------
/source/dcbutton.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////
2 | // This file is part of Remere's Map Editor
3 | //////////////////////////////////////////////////////////////////////
4 |
5 | #ifndef RME_DC_BUTTON_H
6 | #define RME_DC_BUTTON_H
7 |
8 | class Sprite;
9 | class GameSprite;
10 | class EditorSprite;
11 |
12 | enum {
13 | DC_BTN_NORMAL,
14 | DC_BTN_TOGGLE,
15 | };
16 |
17 | enum RenderSize {
18 | RENDER_SIZE_16x16,
19 | RENDER_SIZE_32x32,
20 | RENDER_SIZE_64x64,
21 | };
22 |
23 | class DCButton : public wxPanel
24 | {
25 | public:
26 | DCButton();
27 | DCButton(wxWindow* parent, wxWindowID id, wxPoint pos, int type, RenderSize sz, int sprite_id);
28 | virtual ~DCButton();
29 |
30 | void SetValue(bool val);
31 | bool GetValue() const;
32 |
33 | void SetSprite(int id);
34 |
35 | void OnPaint(wxPaintEvent&);
36 | void OnClick(wxMouseEvent&);
37 | protected:
38 | void SetOverlay(Sprite* espr);
39 |
40 | int type;
41 | bool state; // pressed/unpressed
42 | RenderSize size;
43 | Sprite* sprite;
44 | Sprite* overlay;
45 |
46 | DECLARE_DYNAMIC_CLASS(DCButton)
47 | DECLARE_EVENT_TABLE()
48 | };
49 |
50 | #endif
51 |
--------------------------------------------------------------------------------
/source/creature_brush.h:
--------------------------------------------------------------------------------
1 | #ifndef RME_CREATURE_BRUSH_H
2 | #define RME_CREATURE_BRUSH_H
3 |
4 | #include "brush.h"
5 |
6 | //=============================================================================
7 | // CreatureBrush, place creatures
8 |
9 | class CreatureBrush : public Brush
10 | {
11 | public:
12 | CreatureBrush(CreatureType* type); // Create a RAWBrush of the specified type
13 | virtual ~CreatureBrush();
14 |
15 | bool isCreature() const { return true; }
16 | CreatureBrush* asCreature() { return static_cast(this); }
17 |
18 | virtual bool canDraw(BaseMap* map, const Position& position) const;
19 | virtual void draw(BaseMap* map, Tile* tile, void* parameter);
20 | virtual void undraw(BaseMap* map, Tile* tile);
21 |
22 | CreatureType* getType() const {return creature_type;}
23 |
24 | virtual int getLookID() const; // We don't have a look type, this will always return 0
25 | virtual std::string getName() const;
26 | virtual bool canDrag() const {return false;}
27 | virtual bool canSmear() const {return true;}
28 | virtual bool oneSizeFitsAll() const {return true;}
29 | protected:
30 | CreatureType* creature_type;
31 | };
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/source/waypoint_brush.cpp:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////
2 | // This file is part of Remere's Map Editor
3 | //////////////////////////////////////////////////////////////////////
4 |
5 | #include "main.h"
6 |
7 | #include "waypoint_brush.h"
8 | #include "waypoints.h"
9 | #include "basemap.h"
10 |
11 | //=============================================================================
12 | // Waypoint Brush
13 |
14 | WaypointBrush::WaypointBrush() :
15 | Brush()
16 | {
17 | ////
18 | }
19 |
20 | WaypointBrush::~WaypointBrush()
21 | {
22 | ////
23 | }
24 |
25 | void WaypointBrush::setWaypoint(Waypoint* wp)
26 | {
27 | if(wp) {
28 | waypoint_name = wp->name;
29 | } else {
30 | waypoint_name = "";
31 | }
32 | }
33 |
34 | std::string WaypointBrush::getWaypoint() const
35 | {
36 | return waypoint_name;
37 | }
38 |
39 | bool WaypointBrush::canDraw(BaseMap* map, const Position& position) const
40 | {
41 | return map->getTile(position) != nullptr;
42 | }
43 |
44 | void WaypointBrush::undraw(BaseMap* map, Tile* tile)
45 | {
46 | // Never called
47 | ASSERT(false);
48 | }
49 |
50 | void WaypointBrush::draw(BaseMap* map, Tile* tile, void* parameter)
51 | {
52 | // Never called
53 | ASSERT(false);
54 | }
55 |
--------------------------------------------------------------------------------
/source/mt_rand.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////
2 | // This file is part of Remere's Map Editor
3 | //////////////////////////////////////////////////////////////////////
4 | // This program is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with this program. If not, see .
16 | //////////////////////////////////////////////////////////////////////
17 | // $URL: http://svn.rebarp.se/svn/RME/trunk/source/mt_rand.h $
18 | // $Id: mt_rand.h 298 2010-02-23 17:09:13Z admin $
19 |
20 | #ifndef RME_MT_RAND_H_
21 | #define RME_MT_RAND_H_
22 |
23 | void mt_seed(unsigned long s);
24 | unsigned long mt_randi();
25 | double mt_randd();
26 |
27 | #endif
28 |
--------------------------------------------------------------------------------
/source/templatemap76-74.cpp:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////
2 | // This file is part of Remere's Map Editor
3 | //////////////////////////////////////////////////////////////////////
4 | // This program is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with this program. If not, see .
16 | //////////////////////////////////////////////////////////////////////
17 | // $URL: http://svn.rebarp.se/svn/RME/trunk/source/templatemap76-74.hpp $
18 | // $Id: templatemap76-74.hpp 264 2009-10-05 06:36:21Z remere $
19 |
20 | #include "main.h"
21 |
22 |
23 | #include "templates.h"
24 |
25 | ConversionMap getReplacementMapFrom760To740() {
26 | ConversionMap replacement_map;
27 | return replacement_map;
28 | }
29 |
--------------------------------------------------------------------------------
/source/materials.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////
2 | // This file is part of Remere's Map Editor
3 | //////////////////////////////////////////////////////////////////////
4 |
5 | #ifndef RME_MATERIALS_H_
6 | #define RME_MATERIALS_H_
7 |
8 | #include "extension.h"
9 |
10 | class Materials {
11 | public:
12 | Materials();
13 | ~Materials();
14 |
15 | void clear();
16 |
17 | const MaterialsExtensionList& getExtensions();
18 | MaterialsExtensionList getExtensionsByVersion(uint16_t version_id);
19 |
20 | TilesetContainer tilesets;
21 |
22 | bool loadMaterials(const FileName& identifier, wxString& error, wxArrayString& warnings);
23 | bool loadExtensions(FileName identifier, wxString& error, wxArrayString& warnings);
24 | void createOtherTileset();
25 |
26 | bool isInTileset(Item* item, std::string tileset) const;
27 | bool isInTileset(Brush* brush, std::string tileset) const;
28 |
29 | protected:
30 | bool unserializeMaterials(const FileName& filename, pugi::xml_node node, wxString& error, wxArrayString& warnings);
31 | bool unserializeTileset(pugi::xml_node node, wxArrayString& warnings);
32 |
33 | MaterialsExtensionList extensions;
34 |
35 | private:
36 | Materials(const Materials&);
37 | Materials& operator=(const Materials&);
38 | };
39 |
40 | extern Materials g_materials;
41 |
42 | #endif
43 |
--------------------------------------------------------------------------------
/source/house_brush.h:
--------------------------------------------------------------------------------
1 | #ifndef RME_HOUSE_BRUSH_H
2 | #define RME_HOUSE_BRUSH_H
3 |
4 | #include "brush.h"
5 |
6 | //=============================================================================
7 | // HouseBrush, draw house tiles
8 | // This brush is created on demand and NOT loaded, as such, the load() method is empty
9 | // Should be deleted by the owning palette
10 |
11 | // Forward declaration
12 | class HouseBrush : public Brush {
13 | public:
14 | HouseBrush();
15 | virtual ~HouseBrush();
16 |
17 | bool isHouse() const { return true; }
18 | HouseBrush* asHouse() { return static_cast(this); }
19 |
20 | // Not used
21 | virtual bool load(pugi::xml_node node, wxArrayString& warnings) {return true;}
22 |
23 | // You can always draw house tiles!
24 | virtual bool canDraw(BaseMap* map, const Position& position) const {return true;}
25 | // Draw the shit!
26 | virtual void draw(BaseMap* map, Tile* tile, void* parameter);
27 | // Undraw the shit!
28 | virtual void undraw(BaseMap* map, Tile* tile);
29 |
30 | virtual bool canDrag() const {return true;}
31 |
32 | void setHouse(House* house);
33 |
34 | uint32_t getHouseID() const;
35 | virtual int getLookID() const {return 0;} // We don't have a graphic
36 | virtual std::string getName() const {return "House Brush";}
37 | protected:
38 | House* draw_house;
39 | };
40 |
41 | #endif
42 |
--------------------------------------------------------------------------------
/source/house_exit_brush.cpp:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////
2 | // This file is part of Remere's Map Editor
3 | //////////////////////////////////////////////////////////////////////
4 |
5 | #include "main.h"
6 |
7 | #include "house_exit_brush.h"
8 | #include "house.h"
9 | #include "basemap.h"
10 |
11 | //=============================================================================
12 | // House Exit Brush
13 |
14 | HouseExitBrush::HouseExitBrush() :
15 | Brush(),
16 | draw_house(0)
17 | {
18 | ////
19 | }
20 |
21 | HouseExitBrush::~HouseExitBrush()
22 | {
23 | ////
24 | }
25 |
26 | void HouseExitBrush::setHouse(House* house)
27 | {
28 | draw_house = house->id;
29 | }
30 |
31 | uint32_t HouseExitBrush::getHouseID() const
32 | {
33 | return draw_house;
34 | }
35 |
36 |
37 | bool HouseExitBrush::canDraw(BaseMap* map, const Position& position) const
38 | {
39 | Tile* tile = map->getTile(position);
40 | if(!tile || !tile->hasGround()) {
41 | return false;
42 | }
43 | if(tile->isHouseTile() || tile->isBlocking()) {
44 | return false;
45 | }
46 | return true;
47 | }
48 |
49 | void HouseExitBrush::undraw(BaseMap* map, Tile* tile)
50 | {
51 | // Never called
52 | ASSERT(false);
53 | }
54 |
55 | void HouseExitBrush::draw(BaseMap* map, Tile* tile, void* parameter)
56 | {
57 | // Never called
58 | ASSERT(false);
59 | }
60 |
--------------------------------------------------------------------------------
/source/spawn_brush.cpp:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////
2 | // This file is part of Remere's Map Editor
3 | //////////////////////////////////////////////////////////////////////
4 |
5 | #include "main.h"
6 |
7 | #include "spawn_brush.h"
8 | #include "basemap.h"
9 | #include "spawn.h"
10 |
11 | //=============================================================================
12 | // Spawn brush
13 |
14 | SpawnBrush::SpawnBrush() :
15 | Brush()
16 | {
17 | ////
18 | }
19 |
20 | SpawnBrush::~SpawnBrush()
21 | {
22 | ////
23 | }
24 |
25 | int SpawnBrush::getLookID() const
26 | {
27 | return 0;
28 | }
29 |
30 | std::string SpawnBrush::getName() const
31 | {
32 | return "Spawn Brush";
33 | }
34 |
35 | bool SpawnBrush::canDraw(BaseMap* map, const Position& position) const
36 | {
37 | Tile* tile = map->getTile(position);
38 | if(tile) {
39 | if(tile->spawn) {
40 | return false;
41 | }
42 | }
43 | return true;
44 | }
45 |
46 | void SpawnBrush::undraw(BaseMap* map, Tile* tile)
47 | {
48 | delete tile->spawn;
49 | tile->spawn = nullptr;
50 | }
51 |
52 | void SpawnBrush::draw(BaseMap* map, Tile* tile, void* parameter)
53 | {
54 | ASSERT(tile);
55 | ASSERT(parameter); // Should contain an int which is the size of the newd spawn
56 | if(tile->spawn == nullptr) {
57 | tile->spawn = newd Spawn(max(1, *(int*)parameter));
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/source/pugicast.h:
--------------------------------------------------------------------------------
1 | /**
2 | * The Forgotten Server - a free and open-source MMORPG server emulator
3 | * Copyright (C) 2013 Mark Samman
4 | *
5 | * This program is free software; you can redistribute it and/or modify
6 | * it under the terms of the GNU General Public License as published by
7 | * the Free Software Foundation; either version 2 of the License, or
8 | * (at your option) any later version.
9 | *
10 | * This program is distributed in the hope that it will be useful,
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 | * GNU General Public License for more details.
14 | *
15 | * You should have received a copy of the GNU General Public License along
16 | * with this program; if not, write to the Free Software Foundation, Inc.,
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 | */
19 |
20 | #ifndef FS_PUGICAST_H_07810DF7954D411EB14A16C3ED2A7548
21 | #define FS_PUGICAST_H_07810DF7954D411EB14A16C3ED2A7548
22 |
23 | #include
24 |
25 | namespace pugi {
26 | template
27 | T cast(const pugi::char_t* str)
28 | {
29 | T value;
30 | try {
31 | value = boost::lexical_cast(str);
32 | } catch (boost::bad_lexical_cast&) {
33 | value = T();
34 | }
35 | return value;
36 | }
37 | }
38 |
39 | #endif
40 |
--------------------------------------------------------------------------------
/source/live_action.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////
2 | // This file is part of Remere's Map Editor
3 | //////////////////////////////////////////////////////////////////////
4 |
5 | #ifndef _RME_NETWORK_ACTION_H_
6 | #define _RME_NETWORK_ACTION_H_
7 |
8 | #include "action.h"
9 |
10 | class NetworkedActionQueue;
11 |
12 | class NetworkedAction : public Action {
13 | protected:
14 | NetworkedAction(Editor& editor, ActionIdentifier ident);
15 | ~NetworkedAction();
16 | public:
17 | uint32_t owner;
18 |
19 | friend class NetworkedActionQueue;
20 | };
21 |
22 | class NetworkedBatchAction : public BatchAction {
23 | NetworkedActionQueue& queue;
24 | protected:
25 | NetworkedBatchAction(Editor& editor, NetworkedActionQueue& queue, ActionIdentifier ident);
26 | ~NetworkedBatchAction();
27 |
28 | public:
29 | void addAndCommitAction(Action* action);
30 |
31 | protected:
32 | void commit();
33 | void undo();
34 | void redo();
35 |
36 | friend class NetworkedActionQueue;
37 | };
38 |
39 | class NetworkedActionQueue : public ActionQueue {
40 | public:
41 | NetworkedActionQueue(Editor& editor);
42 | ~NetworkedActionQueue();
43 |
44 | Action* createAction(ActionIdentifier ident);
45 | BatchAction* createBatch(ActionIdentifier ident);
46 |
47 | protected:
48 | void broadcast(DirtyList& dirty_list);
49 |
50 | friend class NetworkedBatchAction;
51 | };
52 |
53 | #endif
54 |
--------------------------------------------------------------------------------
/source/waypoint_brush.h:
--------------------------------------------------------------------------------
1 | #ifndef RME_WAYPOINT_BRUSH_H
2 | #define RME_WAYPOINT_BRUSH_H
3 |
4 | #include "brush.h"
5 |
6 | //=============================================================================
7 | // WaypointBrush, draws waypoints simply
8 | // This doesn't actually draw anything, and the draw/undraw functions will ASSERT if
9 | // you try to call them, so I strongly advice against it
10 |
11 | class WaypointBrush : public Brush {
12 | public:
13 | WaypointBrush();
14 | virtual ~WaypointBrush();
15 |
16 | bool isWaypoint() const { return true; }
17 | WaypointBrush* asWaypoint() { return static_cast(this); }
18 |
19 | // Not used
20 | virtual bool load(pugi::xml_node node, wxArrayString& warnings) {return true;}
21 |
22 | virtual bool canDraw(BaseMap* map, const Position& position) const;
23 | // Will ASSERT
24 | virtual void draw(BaseMap* map, Tile* tile, void* parameter);
25 | virtual void undraw(BaseMap* map, Tile* tile);
26 |
27 | virtual bool canDrag() const {return false;}
28 | virtual bool canSmear() const {return false;}
29 | virtual bool oneSizeFitsAll() const {return true;}
30 |
31 | std::string getWaypoint() const;
32 | void setWaypoint(Waypoint* wp);
33 | virtual int getLookID() const {return 0;} // We don't have a graphic
34 | virtual std::string getName() const {return "Waypoint Brush";}
35 | protected:
36 | std::string waypoint_name;
37 | };
38 |
39 | #endif
40 |
--------------------------------------------------------------------------------
/source/house_exit_brush.h:
--------------------------------------------------------------------------------
1 | #ifndef RME_HOUSE_EXIT_BRUSH_H
2 | #define RME_HOUSE_EXIT_BRUSH_H
3 |
4 | #include "brush.h"
5 |
6 | //=============================================================================
7 | // HouseExitBrush, draw house exit tiles
8 | // This doesn't actually draw anything, and the draw/undraw functions will ASSERT if
9 | // you try to call them, so I strongly advice against it
10 |
11 | class HouseExitBrush : public Brush {
12 | public:
13 | HouseExitBrush();
14 | virtual ~HouseExitBrush();
15 |
16 | bool isHouseExit() const { return true; }
17 | HouseExitBrush* asHouseExit() { return static_cast(this); }
18 |
19 | // Not used
20 | virtual bool load(pugi::xml_node node, wxArrayString& warnings) {return true;}
21 |
22 | virtual bool canDraw(BaseMap* map, const Position& position) const;
23 | // Will ASSERT
24 | virtual void draw(BaseMap* map, Tile* tile, void* parameter);
25 | virtual void undraw(BaseMap* map, Tile* tile);
26 |
27 | virtual bool canDrag() const {return false;}
28 | virtual bool canSmear() const {return false;}
29 | virtual bool oneSizeFitsAll() const {return true;}
30 |
31 | void setHouse(House* house);
32 |
33 | uint32_t getHouseID() const;
34 | virtual int getLookID() const {return 0;} // We don't have a graphic
35 | virtual std::string getName() const {return "House Exit Brush";} // We don't have a name
36 | protected:
37 | uint32_t draw_house;
38 | };
39 |
40 | #endif
41 |
--------------------------------------------------------------------------------
/source/container_properties_window.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////
2 | // This file is part of Remere's Map Editor
3 | //////////////////////////////////////////////////////////////////////
4 |
5 | #ifndef _RME_CONTAINER_PROPS_H_
6 | #define _RME_CONTAINER_PROPS_H_
7 |
8 | #include "common_windows.h"
9 |
10 | class Container;
11 | class ContainerItemButton;
12 |
13 | // Right-click popup menu
14 | class ContainerItemPopupMenu : public wxMenu {
15 | public:
16 | ContainerItemPopupMenu();
17 | virtual ~ContainerItemPopupMenu();
18 |
19 | void Update(ContainerItemButton* what);
20 | };
21 |
22 | // Container Item Button
23 | class ContainerItemButton : public ItemButton
24 | {
25 | DECLARE_EVENT_TABLE()
26 | public:
27 | ContainerItemButton(wxWindow* parent, bool large, int index, const Map* map, Item* item);
28 | ~ContainerItemButton();
29 |
30 | void OnMouseDoubleLeftClick(wxMouseEvent& event);
31 | void OnMouseRightRelease(wxMouseEvent& event);
32 |
33 | void OnAddItem(wxCommandEvent& event);
34 | void OnEditItem(wxCommandEvent& event);
35 | void OnRemoveItem(wxCommandEvent& event);
36 |
37 | ObjectPropertiesWindowBase* getParentContainerWindow();
38 | Container* getParentContainer();
39 |
40 | void setItem(Item* item);
41 |
42 | private:
43 | static std::unique_ptr popup_menu;
44 |
45 | const Map* edit_map;
46 | Item* edit_item;
47 |
48 | size_t index;
49 |
50 | friend class ContainerItemPopupMenu;
51 | };
52 |
53 | #endif
54 |
--------------------------------------------------------------------------------
/source/net_connection.h:
--------------------------------------------------------------------------------
1 |
2 | #ifndef _RME_NET_CONNECTION_H_
3 | #define _RME_NET_CONNECTION_H_
4 |
5 | #include "position.h"
6 |
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 |
13 | struct NetworkMessage
14 | {
15 | NetworkMessage();
16 |
17 | void clear();
18 | void expand(const size_t length);
19 |
20 | //
21 | template T read()
22 | {
23 | T& value = *reinterpret_cast(&buffer[position]);
24 | position += sizeof(T);
25 | return value;
26 | }
27 |
28 | template void write(const T& value)
29 | {
30 | expand(sizeof(T));
31 | memcpy(&buffer[position], &value, sizeof(T));
32 | position += sizeof(T);
33 | }
34 |
35 | //
36 | std::vector buffer;
37 | size_t position;
38 | size_t size;
39 | };
40 |
41 | template<> std::string NetworkMessage::read();
42 | template<> Position NetworkMessage::read();
43 | template<> void NetworkMessage::write(const std::string& value);
44 | template<> void NetworkMessage::write(const Position& value);
45 |
46 | class NetworkConnection
47 | {
48 | private:
49 | NetworkConnection();
50 | NetworkConnection(const NetworkConnection& copy) = delete;
51 |
52 | public:
53 | ~NetworkConnection();
54 |
55 | static NetworkConnection& getInstance();
56 |
57 | bool start();
58 | void stop();
59 |
60 | boost::asio::io_service& get_service();
61 |
62 | private:
63 | boost::asio::io_service* service;
64 | std::thread thread;
65 | bool stopped;
66 | };
67 |
68 | #endif
69 |
--------------------------------------------------------------------------------
/source/outfit.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////
2 | // This file is part of Remere's Map Editor
3 | //////////////////////////////////////////////////////////////////////
4 | // This program is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with this program. If not, see .
16 | //////////////////////////////////////////////////////////////////////
17 | // $URL: http://svn.rebarp.se/svn/RME/trunk/source/outfit.h $
18 | // $Id: outfit.h 298 2010-02-23 17:09:13Z admin $
19 |
20 | #ifndef RME_OUTFIT_H_
21 | #define RME_OUTFIT_H_
22 |
23 | struct Outfit {
24 | Outfit() : lookType(0), lookItem(0), lookAddon(0), lookHead(0), lookBody(0), lookLegs(0), lookFeet(0) {}
25 | ~Outfit() {}
26 | int lookType;
27 | int lookItem;
28 | int lookAddon;
29 | int lookHead;
30 | int lookBody;
31 | int lookLegs;
32 | int lookFeet;
33 |
34 | uint32_t getColorHash() const {
35 | return lookHead << 24 | lookBody << 16 | lookLegs << 8 | lookFeet;
36 | }
37 | };
38 |
39 | #endif
40 |
--------------------------------------------------------------------------------
/source/live_tab.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////
2 | // This file is part of Remere's Map Editor
3 | //////////////////////////////////////////////////////////////////////
4 |
5 |
6 | #ifndef _RME_LIVE_TAB_H_
7 | #define _RME_LIVE_TAB_H_
8 |
9 | #include "main.h"
10 |
11 | #include "editor_tabs.h"
12 | #include "application.h"
13 | #include "live_server.h"
14 |
15 | class wxGrid;
16 |
17 | class MapTabbook;
18 | class LiveSocket;
19 | class LiveServer;
20 |
21 | class LiveLogTab : public EditorTab, public wxPanel {
22 | public:
23 | LiveLogTab(MapTabbook* aui, LiveSocket* socket);
24 | ~LiveLogTab();
25 |
26 | void Message(const wxString& str);
27 | void Chat(const wxString& speaker, const wxString& str);
28 |
29 | virtual wxWindow* GetWindow() const {return (wxPanel*)this;}
30 | virtual wxString GetTitle() const;
31 |
32 | bool IsConnected() const {return socket != nullptr;}
33 | void Disconnect();
34 |
35 | LiveSocket* GetSocket() {return socket;}
36 |
37 | void UpdateClientList(const std::unordered_map& updatedClients);
38 |
39 | void OnSelectChatbox(wxFocusEvent& evt);
40 | void OnDeselectChatbox(wxFocusEvent& evt);
41 |
42 | void OnChat(wxCommandEvent& evt);
43 | void OnResizeChat(wxSizeEvent& evt);
44 | void OnResizeClientList(wxSizeEvent& evt);
45 |
46 | protected:
47 | MapTabbook* aui;
48 | LiveSocket* socket;
49 | wxGrid* log;
50 | wxTextCtrl* input;
51 | wxGrid* user_list;
52 |
53 | std::unordered_map clients;
54 |
55 | DECLARE_EVENT_TABLE();
56 | };
57 |
58 | #endif
59 |
--------------------------------------------------------------------------------
/source/table_brush.h:
--------------------------------------------------------------------------------
1 | #ifndef RME_TABLE_BRUSH_H
2 | #define RME_TABLE_BRUSH_H
3 |
4 | #include "brush.h"
5 |
6 | //=============================================================================
7 | // Tablebrush, for tables, and some things that behave like tables
8 | // and with tables I really mean counters.
9 |
10 | class TableBrush : public Brush
11 | {
12 | public:
13 | static void init();
14 |
15 | TableBrush();
16 | virtual ~TableBrush();
17 |
18 | bool isTable() const { return true; }
19 | TableBrush* asTable() { return static_cast(this); }
20 |
21 | virtual bool load(pugi::xml_node node, wxArrayString& warnings);
22 |
23 | virtual bool canDraw(BaseMap* map, const Position& position) const;
24 | virtual void draw(BaseMap* map, Tile* tile, void* parameter);
25 | virtual void undraw(BaseMap* map, Tile* tile);
26 |
27 | static void doTables(BaseMap* map, Tile* tile);
28 |
29 | virtual int getLookID() const { return look_id; }
30 |
31 | virtual std::string getName() const { return name; }
32 | virtual void setName(const std::string& newName) { name = newName; }
33 |
34 | virtual bool needBorders() const {return true;}
35 | protected:
36 | struct TableType
37 | {
38 | TableType() : chance(0), item_id(0) {}
39 | int chance;
40 | uint16_t item_id;
41 | };
42 |
43 | struct TableNode
44 | {
45 | TableNode() : total_chance(0) {}
46 | int total_chance;
47 | std::vector items;
48 | };
49 |
50 | std::string name;
51 | uint16_t look_id;
52 | TableNode table_items[7];
53 |
54 | static uint32_t table_types[256];
55 | };
56 |
57 | #endif
58 |
--------------------------------------------------------------------------------
/source/about_window.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////
2 | // This file is part of Remere's Map Editor
3 | //////////////////////////////////////////////////////////////////////
4 | // This program is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with this program. If not, see .
16 | //////////////////////////////////////////////////////////////////////
17 | // $URL: http://svn.rebarp.se/svn/RME/trunk/source/about_window.h $
18 | // $Id: about_window.h 298 2010-02-23 17:09:13Z admin $
19 |
20 | #ifndef RME_ABOUT_WINDOW_H_
21 | #define RME_ABOUT_WINDOW_H_
22 |
23 | #include "main.h"
24 |
25 | class GamePanel;
26 |
27 | class AboutWindow : public wxDialog {
28 | public:
29 | AboutWindow(wxWindow* parent);
30 | ~AboutWindow();
31 |
32 | void OnClickOK(wxCommandEvent&);
33 | void OnClickLicense(wxCommandEvent&);
34 |
35 | void OnTetris(wxCommandEvent&);
36 | void OnSnake(wxCommandEvent&);
37 | private:
38 | wxSizer* topsizer;
39 | GamePanel* game_panel;
40 |
41 | DECLARE_EVENT_TABLE()
42 | };
43 |
44 | #endif
45 |
--------------------------------------------------------------------------------
/source/templates.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////
2 | // This file is part of Remere's Map Editor
3 | //////////////////////////////////////////////////////////////////////
4 | // This program is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with this program. If not, see .
16 | //////////////////////////////////////////////////////////////////////
17 | // $URL: http://svn.rebarp.se/svn/RME/trunk/source/templates.h $
18 | // $Id: templates.h 298 2010-02-23 17:09:13Z admin $
19 |
20 | #ifndef RME_MAP_TEMPLATES_H_
21 | #define RME_MAP_TEMPLATES_H_
22 |
23 | #include "common.h"
24 |
25 | struct ConversionMap {
26 | // Many to Many
27 | typedef std::map, std::vector > MTM;
28 | // Single to Many
29 | typedef std::map > STM;
30 |
31 | MTM mtm;
32 | STM stm;
33 | };
34 |
35 | ConversionMap getReplacementMapFrom800To810();
36 | ConversionMap getReplacementMapFrom760To740();
37 | ConversionMap getReplacementMapFrom854To854();
38 | ConversionMap getReplacementMapClassic();
39 |
40 | #endif
41 |
--------------------------------------------------------------------------------
/source/result_window.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////
2 | // This file is part of Remere's Map Editor
3 | //////////////////////////////////////////////////////////////////////
4 | // This program is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with this program. If not, see .
16 | //////////////////////////////////////////////////////////////////////
17 | // $URL: http://svn.rebarp.se/svn/RME/trunk/source/result_window.h $
18 | // $Id: result_window.h 298 2010-02-23 17:09:13Z admin $
19 |
20 | #ifndef RME_RESULT_WINDOW_H_
21 | #define RME_RESULT_WINDOW_H_
22 |
23 | #include "main.h"
24 |
25 | class SearchResultWindow : public wxPanel
26 | {
27 | public:
28 | SearchResultWindow(wxWindow* parent);
29 | virtual ~SearchResultWindow();
30 |
31 | void Clear();
32 | void AddPosition(wxString description, Position pos);
33 |
34 | void OnClickResult(wxCommandEvent&);
35 | void OnClickExport(wxCommandEvent&);
36 | void OnClickClear(wxCommandEvent&);
37 |
38 | protected:
39 | wxListBox* result_list;
40 |
41 | DECLARE_EVENT_TABLE()
42 | };
43 |
44 | #endif
45 |
--------------------------------------------------------------------------------
/source/browse_tile_window.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////
2 | // This file is part of Remere's Map Editor
3 | //////////////////////////////////////////////////////////////////////
4 | // This program is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with this program. If not, see .
16 | //////////////////////////////////////////////////////////////////////
17 |
18 | #ifndef RME_BROWSE_TILE_WINDOW_H_
19 | #define RME_BROWSE_TILE_WINDOW_H_
20 |
21 | #include "main.h"
22 | #include "map.h"
23 | #include "tile.h"
24 |
25 | class BrowseTileListBox;
26 |
27 | class BrowseTileWindow : public wxDialog
28 | {
29 | public:
30 | BrowseTileWindow(wxWindow* parent, Tile* tile, wxPoint position = wxDefaultPosition);
31 | ~BrowseTileWindow();
32 |
33 | void OnClickDelete(wxCommandEvent&);
34 | void OnClickSelectRaw(wxCommandEvent&);
35 | void OnClickOK(wxCommandEvent&);
36 | void OnClickCancel(wxCommandEvent&);
37 |
38 | protected:
39 | BrowseTileListBox* item_list;
40 | wxStaticText* item_count_txt;
41 |
42 | DECLARE_EVENT_TABLE();
43 | };
44 |
45 | #endif
46 |
47 |
--------------------------------------------------------------------------------
/source/iomap.cpp:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////
2 | // This file is part of Remere's Map Editor
3 | //////////////////////////////////////////////////////////////////////
4 | // This program is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with this program. If not, see .
16 | //////////////////////////////////////////////////////////////////////
17 | // $URL: http://svn.rebarp.se/svn/RME/trunk/source/iomap.hpp $
18 | // $Id: iomap.hpp 264 2009-10-05 06:36:21Z remere $
19 |
20 | #include "main.h"
21 | #include "gui.h"
22 |
23 | void IOMap::error(const wxString format, ...)
24 | {
25 | va_list argp;
26 | va_start(argp, format);
27 | errorstr.PrintfV(format, argp);
28 | va_end(argp);
29 | };
30 |
31 | void IOMap::warning(const wxString format, ...)
32 | {
33 | wxString s;
34 | va_list argp;
35 | va_start(argp, format);
36 | s.PrintfV(format, argp);
37 | va_end(argp);
38 | warnings.push_back(s);
39 | };
40 |
41 | bool IOMap::queryUser(const wxString& title, const wxString& text)
42 | {
43 | return g_gui.PopupDialog(title, text, wxYES | wxNO) == wxID_YES;
44 | }
45 |
--------------------------------------------------------------------------------
/source/properties_window.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////
2 | // This file is part of Remere's Map Editor
3 | //////////////////////////////////////////////////////////////////////
4 |
5 | #ifndef RME_PROPERTIES_WINDOW_H_
6 | #define RME_PROPERTIES_WINDOW_H_
7 |
8 | #include "main.h"
9 |
10 | #include "common_windows.h"
11 |
12 | class ContainerItemButton;
13 | class ContainerItemPopupMenu;
14 | class ItemAttribute;
15 |
16 | class PropertiesWindow : public ObjectPropertiesWindowBase
17 | {
18 | public:
19 | PropertiesWindow(wxWindow* parent, const Map* map, const Tile* tile, Item* item, wxPoint position = wxDefaultPosition);
20 | ~PropertiesWindow();
21 |
22 | void OnClickOK(wxCommandEvent&);
23 | void OnClickCancel(wxCommandEvent&);
24 | void OnClickAddAttribute(wxCommandEvent&);
25 | void OnClickRemoveAttribute(wxCommandEvent&);
26 |
27 | void OnResize(wxSizeEvent&);
28 | void OnNotebookPageChanged(wxNotebookEvent&);
29 | void OnGridValueChanged(wxGridEvent&);
30 |
31 | void Update();
32 |
33 | protected:
34 | // Simple pane
35 | wxWindow* createGeneralPanel(wxWindow* parent);
36 | void saveGeneralPanel();
37 |
38 | // Container pane
39 | std::vector container_items;
40 | wxWindow* createContainerPanel(wxWindow* parent);
41 | void saveContainerPanel();
42 |
43 | // Advanced pane
44 | wxGrid* attributesGrid;
45 | wxWindow* createAttributesPanel(wxWindow *parent);
46 | void saveAttributesPanel();
47 | void SetGridValue(wxGrid* grid, int rowIndex, std::string name, const ItemAttribute& attr);
48 |
49 | protected:
50 | wxNotebook* notebook;
51 | wxWindow* currentPanel;
52 |
53 | DECLARE_EVENT_TABLE()
54 | };
55 |
56 | #endif
57 |
--------------------------------------------------------------------------------
/source/carpet_brush.h:
--------------------------------------------------------------------------------
1 | #ifndef RME_CARPET_BRUSH_H
2 | #define RME_CARPET_BRUSH_H
3 |
4 | #include "brush.h"
5 |
6 | //=============================================================================
7 | // Carpetbrush, for tables, and some things that behave like tables
8 | // and with tables I really mean counters.
9 |
10 | class CarpetBrush : public Brush
11 | {
12 | public:
13 | static void init();
14 |
15 | CarpetBrush();
16 | virtual ~CarpetBrush();
17 |
18 | bool isCarpet() const { return true; }
19 | CarpetBrush* asCarpet() { return static_cast(this); }
20 |
21 | virtual bool load(pugi::xml_node node, wxArrayString& warnings);
22 |
23 | virtual bool canDraw(BaseMap* map, const Position& position) const;
24 | virtual void draw(BaseMap* map, Tile* tile, void* parameter);
25 | virtual void undraw(BaseMap* map, Tile* tile);
26 |
27 | static void doCarpets(BaseMap* map, Tile* tile);
28 |
29 | virtual bool canDrag() const { return true; }
30 | virtual bool needBorders() const { return true; }
31 |
32 | virtual int getLookID() const { return look_id; }
33 |
34 | virtual std::string getName() const { return name; }
35 | virtual void setName(const std::string& newName) { name = newName; }
36 |
37 | protected:
38 | uint16_t getRandomCarpet(BorderType alignment);
39 |
40 | struct CarpetType {
41 | int32_t chance;
42 | uint16_t id;
43 | };
44 |
45 | struct CarpetNode {
46 | std::vector items;
47 | int32_t total_chance;
48 |
49 | CarpetNode() :
50 | items(), total_chance(0) {}
51 | };
52 |
53 | CarpetNode carpet_items[14];
54 | std::string name;
55 | uint16_t look_id;
56 |
57 | static uint32_t carpet_types[256];
58 | };
59 |
60 | #endif
61 |
--------------------------------------------------------------------------------
/source/threads.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////
2 | // This file is part of Remere's Map Editor
3 | //////////////////////////////////////////////////////////////////////
4 | // This program is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with this program. If not, see .
16 | //////////////////////////////////////////////////////////////////////
17 | // $URL: http://svn.rebarp.se/svn/RME/trunk/source/threads.h $
18 | // $Id: threads.h 298 2010-02-23 17:09:13Z admin $
19 |
20 | #ifndef RME_THREAD_H_
21 | #define RME_THREAD_H_
22 |
23 | #include "main.h"
24 |
25 | class Thread : public wxThread {
26 | public:
27 | Thread(wxThreadKind);
28 |
29 | void Execute(); // Calls "Create" and then "Run"
30 | };
31 |
32 | class JoinableThread : public Thread {
33 | public:
34 | JoinableThread() : Thread(wxTHREAD_JOINABLE) {}
35 | };
36 |
37 | class DetachedThread : public Thread {
38 | public:
39 | DetachedThread() : Thread(wxTHREAD_DETACHED) {}
40 | };
41 |
42 | inline Thread::Thread(wxThreadKind kind) : wxThread(kind) {}
43 |
44 | inline void Thread::Execute() {
45 | Create();
46 | Run();
47 | }
48 |
49 | #endif
50 |
--------------------------------------------------------------------------------
/source/minimap_window.h:
--------------------------------------------------------------------------------
1 | //////////////////////////////////////////////////////////////////////
2 | // This file is part of Remere's Map Editor
3 | //////////////////////////////////////////////////////////////////////
4 | // This program is free software: you can redistribute it and/or modify
5 | // it under the terms of the GNU General Public License as published by
6 | // the Free Software Foundation, either version 3 of the License, or
7 | // (at your option) any later version.
8 | //
9 | // This program is distributed in the hope that it will be useful,
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | // GNU General Public License for more details.
13 | //
14 | // You should have received a copy of the GNU General Public License
15 | // along with this program. If not, see .
16 | //////////////////////////////////////////////////////////////////////
17 | // $URL: http://svn.rebarp.se/svn/RME/trunk/source/minimap_window.h $
18 | // $Id: minimap_window.h 298 2010-02-23 17:09:13Z admin $
19 |
20 | #ifndef RME_MINIMAP_WINDOW_H_
21 | #define RME_MINIMAP_WINDOW_H_
22 |
23 | class MinimapWindow : public wxPanel {
24 | public:
25 | MinimapWindow(wxWindow* parent);
26 | virtual ~MinimapWindow();
27 |
28 | void OnPaint(wxPaintEvent&);
29 | void OnEraseBackground(wxEraseEvent&) {}
30 | void OnMouseClick(wxMouseEvent&);
31 | void OnSize(wxSizeEvent&);
32 | void OnClose(wxCloseEvent&);
33 |
34 | void DelayedUpdate();
35 | void OnDelayedUpdate(wxTimerEvent& event);
36 | void OnKey(wxKeyEvent& event);
37 | protected:
38 | wxPen* pens[256];
39 | wxTimer update_timer;
40 | int last_start_x;
41 | int last_start_y;
42 |
43 | DECLARE_EVENT_TABLE()
44 | };
45 |
46 | #endif
47 |
--------------------------------------------------------------------------------
/source/json/json_spirit_error_position.h:
--------------------------------------------------------------------------------
1 | #ifndef JSON_SPIRIT_ERROR_POSITION
2 | #define JSON_SPIRIT_ERROR_POSITION
3 |
4 | // Copyright John W. Wilkinson 2007 - 2009.
5 | // Distributed under the MIT License, see accompanying file LICENSE.txt
6 |
7 | // json spirit version 4.03
8 |
9 | #if defined(_MSC_VER) && (_MSC_VER >= 1020)
10 | # pragma once
11 | #endif
12 |
13 | #include
14 |
15 | namespace json_spirit
16 | {
17 | // An Error_position exception is thrown by the "read_or_throw" functions below on finding an error.
18 | // Note the "read_or_throw" functions are around 3 times slower than the standard functions "read"
19 | // functions that return a bool.
20 | //
21 | struct Error_position : std::runtime_error
22 | {
23 | Error_position();
24 | Error_position( unsigned int line, unsigned int column, const std::string& reason );
25 | bool operator==( const Error_position& lhs ) const;
26 | unsigned int line_;
27 | unsigned int column_;
28 | std::string reason_;
29 | };
30 |
31 | inline Error_position::Error_position()
32 | : std::runtime_error("Error_position")
33 | , line_( 0 )
34 | , column_( 0 )
35 | {
36 | }
37 |
38 | inline Error_position::Error_position( unsigned int line, unsigned int column, const std::string& reason )
39 | : std::runtime_error("Error_position")
40 | , line_( line )
41 | , column_( column )
42 | , reason_( reason )
43 | {
44 | }
45 |
46 | inline bool Error_position::operator==( const Error_position& lhs ) const
47 | {
48 | if( this == &lhs ) return true;
49 |
50 | return ( reason_ == lhs.reason_ ) &&
51 | ( line_ == lhs.line_ ) &&
52 | ( column_ == lhs.column_ );
53 | }
54 | }
55 |
56 | #endif
57 |
--------------------------------------------------------------------------------
/source/json/json_spirit_utils.h:
--------------------------------------------------------------------------------
1 | #ifndef JSON_SPIRIT_UTILS
2 | #define JSON_SPIRIT_UTILS
3 |
4 | // Copyright John W. Wilkinson 2007 - 2009.
5 | // Distributed under the MIT License, see accompanying file LICENSE.txt
6 |
7 | // json spirit version 4.03
8 |
9 | #if defined(_MSC_VER) && (_MSC_VER >= 1020)
10 | # pragma once
11 | #endif
12 |
13 | #include "json_spirit_value.h"
14 | #include