Permalink
Browse files

Remove old map editor

Removes the old map editor and files that only it depended on.
  • Loading branch information...
TheCycoONE committed Feb 10, 2016
1 parent 6ad4cad commit 1156f4054bb94efee05728b5f58db7793b40aff1
View
@@ -15,7 +15,6 @@ CorsixTH/Bitmap/flag_travel_east.bmp -text
CorsixTH/Bitmap/flag_travel_north.bmp -text
CorsixTH/Bitmap/flag_travel_south.bmp -text
CorsixTH/Bitmap/flag_travel_west.bmp -text
CorsixTH/Bitmap/flags32.png -text
CorsixTH/Bitmap/fullscreen_border_bottom.bmp -text
CorsixTH/Bitmap/fullscreen_border_bottomleft.bmp -text
CorsixTH/Bitmap/fullscreen_border_bottomright.bmp -text
@@ -32,33 +31,20 @@ CorsixTH/Bitmap/map_cell_outline_east.bmp -text
CorsixTH/Bitmap/map_cell_outline_north.bmp -text
CorsixTH/Bitmap/map_cell_outline_south.bmp -text
CorsixTH/Bitmap/map_cell_outline_west.bmp -text
CorsixTH/Bitmap/new32.png -text svneol=unset#image/png
CorsixTH/Bitmap/open32.png -text svneol=unset#image/png
CorsixTH/Bitmap/parcels32.png -text
CorsixTH/Bitmap/positions32.png -text
CorsixTH/Bitmap/redo32.png -text
CorsixTH/Bitmap/save32.png -text svneol=unset#image/png
CorsixTH/Bitmap/transparent_walls32.png -text
CorsixTH/Bitmap/tree_collapsed.bmp -text
CorsixTH/Bitmap/tree_ctrl.dat -text
CorsixTH/Bitmap/tree_ctrl.pal -text
CorsixTH/Bitmap/tree_ctrl.tab -text
CorsixTH/Bitmap/tree_expanded.bmp -text
CorsixTH/Bitmap/tree_leaf.bmp -text
CorsixTH/Bitmap/tree_level.bmp -text
CorsixTH/Bitmap/undo32.png -text
CorsixTH/CorsixTH.ico -text
CorsixTH/Icon.icns -text
CorsixTH/Levels/Example.map -text
CorsixTH/Levels/avatar.map -text
CorsixTH/Levels/confined_v5.map -text
CorsixTH/Levels/finisham.map -text
CorsixTH/Levels/original08.level -text
CorsixTH/Lua/command.lua -text
CorsixTH/Lua/command_stack.lua -text
CorsixTH/Lua/commands/compound.lua -text
CorsixTH/Lua/commands/set_map_cell.lua -text
CorsixTH/Lua/commands/set_map_cell_flags.lua -text
CorsixTH/Lua/dialogs/resizables/customise.lua -text
CorsixTH/Lua/dialogs/resizables/folder_settings.lua -text
CorsixTH/Lua/dialogs/resizables/update.lua -text
@@ -104,7 +90,4 @@ LevelEdit/src/icon256.png -text
LevelEdit/src/icon32.png -text
LevelEdit/src/icon48.png -text
LevelEdit/src/icon64.png -text
MapEdit/Icon.icns -text
MapEdit/MapEdit.ico -text
MapEdit/RequiredResources.txt -text
WindowsInstaller/welcome.bmp -text
View
@@ -7,7 +7,6 @@
# - WITH_FREETYPE2
# - WITH_MOVIES : Activate movies (requires Sound)
# - BUILD_ANIMVIEWER
# - BUILD_MAPEDITOR
# - WITH_LUAJIT : Whether to use LuaJIT 2 instead of Lua51 (default is LuaJIT 2)
# - WITH_LIBAV : Whether to use LibAV (as opposed to FFMEPG) when building movies
# - WITH_VLD : Build with Visual Leak Detector (requires Visual Studio)
@@ -37,7 +36,6 @@ OPTION(WITH_FREETYPE2 "Enhanced Font Support" ON)
OPTION(WITH_LUAJIT "Use LuaJIT instead of Lua" OFF)
OPTION(WITH_LIBAV "Use LibAV instead of FFmpeg" OFF)
OPTION(BUILD_ANIMVIEWER "Build the animation viewer as part of the build process" OFF)
OPTION(BUILD_MAPEDITOR "Build the map editor as part of the build process" OFF)
IF(MSVC)
OPTION(WITH_VLD "Build with Visual Leak Detector for Visual Studio" OFF)
ENDIF(MSVC)
@@ -107,15 +105,6 @@ IF(BUILD_ANIMVIEWER)
add_subdirectory(AnimView)
ENDIF(BUILD_ANIMVIEWER)
IF(BUILD_MAPEDITOR)
IF(WITH_OPENGL)
message("Building MapEdit")
add_subdirectory(MapEdit)
ELSE(WITH_OPENGL)
message(FATAL_ERROR "The map editor can only be built when using OpenGL as renderer")
ENDIF(WITH_OPENGL)
ENDIF(BUILD_MAPEDITOR)
# Documentation generation, construct 'doc' target (or a message it is disabled).
# Try to find 'lua'
@@ -172,14 +161,6 @@ IF (DOXYGEN_FOUND)
add_dependencies(doc doc_leveledit)
add_custom_target(doc_mapedit
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/DoxyGen/mapedit.doxygen
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc
COMMENT "Generating API documentation for MapEdit" VERBATIM
)
add_dependencies(doc doc_mapedit)
add_custom_target(doc_corsixth_engine
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/DoxyGen/corsixth_engine.doxygen
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc
@@ -223,7 +204,6 @@ IF (DOXYGEN_FOUND)
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/doc/index.html "<ul>\n")
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/doc/index.html " <li><a href=\"animview/html/index.html\">Animation viewer documentation</a>\n")
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/doc/index.html " <li><a href=\"leveledit/html/index.html\">Level editor documentation</a>\n")
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/doc/index.html " <li><a href=\"mapedit/html/index.html\">Map editor documentation</a>\n")
ENDIF (DOXYGEN_FOUND)
IF (DOXYGEN_FOUND OR LUA_PROGRAM_FOUND)
View
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
View
@@ -1,29 +0,0 @@
--[[ Copyright (c) 2013 Alan Woolley
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. --]]
class "Command"
---@type Command
local Command = _G["Command"]
function Command:Command(can_undo)
self.can_undo = can_undo
end
@@ -1,61 +0,0 @@
--[[ Copyright (c) 2013 Alan Woolley
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. --]]
class "CommandStack"
---@type CommandStack
local CommandStack = _G["CommandStack"]
function CommandStack:CommandStack()
self.undo_stack = {}
self.redo_stack = {}
end
function CommandStack:redo()
if (#self.redo_stack == 0) then
print "Nothing left to redo!"
return
end
local cmd = self.redo_stack[#self.redo_stack]
table.remove(self.redo_stack, #self.redo_stack)
table.insert(self.undo_stack, #self.undo_stack + 1, cmd)
cmd:perform()
return #self.redo_stack == 0
end
function CommandStack:undo()
if (#self.undo_stack == 0) then
print "Nothing left to undo!"
return
end
local cmd = self.undo_stack[#self.undo_stack]
table.remove(self.undo_stack, #self.undo_stack)
table.insert(self.redo_stack, #self.redo_stack + 1, cmd)
cmd:undo()
return #self.undo_stack == 0
end
function CommandStack:add(cmd)
if not cmd.can_undo then
self.undo_stack = {}
end
self.redo_stack = {}
table.insert(self.undo_stack, #self.undo_stack + 1, cmd)
end
@@ -1,48 +0,0 @@
--[[ Copyright (c) 2013 Alan Woolley
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. --]]
class "CompoundCommand" (Command)
---@type CompoundCommand
local CompoundCommand = _G["CompoundCommand"]
function CompoundCommand:CompoundCommand()
self:Command(true)
self.command_list = {}
end
function CompoundCommand:addCommand(cmd)
table.insert(self.command_list, #self.command_list + 1, cmd)
end
function CompoundCommand:perform()
for i = 1 , #self.command_list do
local cmd = self.command_list[i]
cmd:perform()
end
end
function CompoundCommand:undo()
for i = #self.command_list, 1, -1 do
local cmd = self.command_list[i]
cmd:undo()
end
end
@@ -1,50 +0,0 @@
--[[ Copyright (c) 2013 Alan Woolley
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. --]]
class "SetMapCellCommand" (Command)
---@type SetMapCellCommand
local SetMapCellCommand = _G["SetMapCellCommand"]
function SetMapCellCommand:SetMapCellCommand(map)
self:Command(true)
self.map = map
self.paint_list = {}
end
function SetMapCellCommand:addTile(x_tile, y_tile, ...)
local old = {self.map:getCell(x_tile, y_tile)}
table.insert(self.paint_list, #self.paint_list + 1, {x = x_tile, y = y_tile, new_flags = {...}, old_flags = old})
end
function SetMapCellCommand:perform()
for i = 1 , #self.paint_list do
local cell_table = self.paint_list[i]
self.map:setCell(cell_table.x, cell_table.y, unpack(cell_table.new_flags))
end
end
function SetMapCellCommand:undo()
for i = #self.paint_list, 1, -1 do
local cell_table = self.paint_list[i]
self.map:setCell(cell_table.x, cell_table.y, unpack(cell_table.old_flags))
end
end
@@ -1,49 +0,0 @@
--[[ Copyright (c) 2013 Alan Woolley
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. --]]
class "SetMapCellFlagsCommand" (Command)
---@type SetMapCellFlagsCommand
local SetMapCellFlagsCommand = _G["SetMapCellFlagsCommand"]
function SetMapCellFlagsCommand:SetMapCellFlagsCommand(map)
self:Command(true)
self.map = map
self.paint_list = {}
end
function SetMapCellFlagsCommand:addTile(x_tile, y_tile, ...)
local old = {self.map:getCellFlags(x_tile, y_tile)}
table.insert(self.paint_list, #self.paint_list + 1, {x = x_tile, y = y_tile, new_flags = {...}, old_flags = old})
end
function SetMapCellFlagsCommand:perform()
for i = 1 , #self.paint_list do
local cell_table = self.paint_list[i]
self.map:setCellFlags(cell_table.x, cell_table.y, unpack(cell_table.new_flags))
end
end
function SetMapCellFlagsCommand:undo()
for i = #self.paint_list, 1, -1 do
local cell_table = self.paint_list[i]
self.map:setCellFlags(cell_table.x, cell_table.y, unpack(cell_table.old_flags))
end
end
View
@@ -146,9 +146,6 @@ int CorsixTH_lua_main_no_eval(lua_State *L)
#if defined(IS_CORSIXTH_APP)
"code = loadfile(\"CorsixTH.app/Contents/Resources/\"..name)\n"
"if code then return code end\n"
#elif defined(IS_MAPEDIT_APP)
"code = loadfile(\"MapEdit.app/Contents/Resources/\"..name)\n"
"if code then return code end\n"
#endif
#endif
"for num_dotdot = 0, 3 do\n"
Oops, something went wrong.

0 comments on commit 1156f40

Please sign in to comment.