summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-08-02 16:13:36 +0300
committerAndrei Karas <akaras@inbox.ru>2015-08-03 21:50:05 +0300
commitf651273ebf2a8b11aa01ed1434ecb613177ced6a (patch)
treec51d2bed1476270e27ad95c5a46e15af32eaccdd
parent30846b7f68f1ad05a0719ae37f75fd2901a6545a (diff)
downloadmanaplus-f651273ebf2a8b11aa01ed1434ecb613177ced6a.tar.gz
manaplus-f651273ebf2a8b11aa01ed1434ecb613177ced6a.tar.bz2
manaplus-f651273ebf2a8b11aa01ed1434ecb613177ced6a.tar.xz
manaplus-f651273ebf2a8b11aa01ed1434ecb613177ced6a.zip
Add gui mode for dyecmd. Now only basic code added.
-rw-r--r--src/Makefile.am1373
-rw-r--r--src/actions/actiondef.h4
-rw-r--r--src/client.h6
-rw-r--r--src/dyetool/actions/actions.cpp109
-rw-r--r--src/dyetool/actions/chat.cpp63
-rw-r--r--src/dyetool/actions/commands.cpp93
-rw-r--r--src/dyetool/actions/move.cpp44
-rw-r--r--src/dyetool/actions/pets.cpp47
-rw-r--r--src/dyetool/actions/statusbar.cpp49
-rw-r--r--src/dyetool/actions/tabs.cpp39
-rw-r--r--src/dyetool/actions/target.cpp38
-rw-r--r--src/dyetool/actions/windows.cpp58
-rw-r--r--src/dyetool/client.cpp748
-rw-r--r--src/dyetool/client.h126
-rw-r--r--src/dyetool/dyemain.cpp7
-rw-r--r--src/dyetool/gui/viewport.cpp290
-rw-r--r--src/dyetool/gui/viewport.h220
-rw-r--r--src/eventsmanager.cpp26
-rw-r--r--src/gui/dialogsmanager.cpp23
-rw-r--r--src/gui/gui.cpp9
-rw-r--r--src/gui/popupmanager.cpp16
-rw-r--r--src/gui/popups/popupmenu.h3
-rw-r--r--src/gui/viewport.h6
-rw-r--r--src/gui/widgets/browserbox.cpp2
-rw-r--r--src/gui/widgets/textfield.cpp2
-rw-r--r--src/gui/widgets/window.cpp10
-rw-r--r--src/gui/windowmanager.cpp15
-rw-r--r--src/input/inputmanager.cpp55
-rw-r--r--src/maingui.cpp1
-rw-r--r--src/net/ipc.cpp3
-rw-r--r--src/resources/dyepalette.cpp5
-rw-r--r--src/resources/resourcemanager.cpp14
-rw-r--r--src/soundmanager.cpp4
33 files changed, 2719 insertions, 789 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 947896dd6..c4f25e6c3 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2,235 +2,68 @@ AUTOMAKE_OPTIONS = subdir-objects
bin_PROGRAMS = manaplus dyecmd
-manaplus_CXXFLAGS = -DPKG_DATADIR=\""$(pkgdatadir)/"\" \
+dyecmd_CXXFLAGS = -DPKG_DATADIR=\""$(pkgdatadir)/"\" \
-DLOCALEDIR=\""$(localedir)"\" \
-Wall
-dyecmd_CXXFLAGS = -DPKG_DATADIR=\""$(pkgdatadir)/"\" \
+manaplus_CXXFLAGS = -DPKG_DATADIR=\""$(pkgdatadir)/"\" \
-DLOCALEDIR=\""$(localedir)"\" \
-Wall
if ENABLE_PORTABLE
-manaplus_CXXFLAGS += -DENABLE_PORTABLE
dyecmd_CXXFLAGS += -DENABLE_PORTABLE
+manaplus_CXXFLAGS += -DENABLE_PORTABLE
endif
if ENABLE_CHECKPLUGIN
-manaplus_CXXFLAGS += -fplugin=../build/checkplugin.so -fplugin-arg-checkplugin-command=detectnullpointers
dyecmd_CXXFLAGS += -fplugin=../build/checkplugin.so -fplugin-arg-checkplugin-command=detectnullpointers
+manaplus_CXXFLAGS += -fplugin=../build/checkplugin.so -fplugin-arg-checkplugin-command=detectnullpointers
endif
if USE_OPENGL
-manaplus_CXXFLAGS += -DUSE_OPENGL
dyecmd_CXXFLAGS += -DUSE_OPENGL
+manaplus_CXXFLAGS += -DUSE_OPENGL
endif
if ENABLE_MEM_DEBUG
-manaplus_CXXFLAGS += -DENABLE_MEM_DEBUG -DDEBUG_DUMP_LEAKS
dyecmd_CXXFLAGS += -DENABLE_MEM_DEBUG -DDEBUG_DUMP_LEAKS
+manaplus_CXXFLAGS += -DENABLE_MEM_DEBUG -DDEBUG_DUMP_LEAKS
manaplus_SOURCES = debug/debug_new.cpp \
debug/debug_new.h \
debug/fast_mutex.h \
debug/static_assert.h
+dyecmd_SOURCES = debug/debug_new.cpp \
+ debug/debug_new.h \
+ debug/fast_mutex.h \
+ debug/static_assert.h
else
manaplus_SOURCES =
endif
if ENABLE_CILKPLUS
-manaplus_CXXFLAGS += -DENABLE_CILKPLUS -fcilkplus -lcilkrts
dyecmd_CXXFLAGS += -DENABLE_CILKPLUS -fcilkplus -lcilkrts
+manaplus_CXXFLAGS += -DENABLE_CILKPLUS -fcilkplus -lcilkrts
endif
dyecmd_CXXFLAGS += -DDYECMD
-dyecmd_SOURCES = gui/cliprect.cpp \
- gui/color.cpp \
- gui/rect.cpp \
- events/actionevent.h \
- gui/cliprect.h \
- gui/color.h \
- events/event.h \
- gui/rect.h \
- dyetool/dyemain.cpp \
- animatedsprite.cpp \
- animatedsprite.h \
- animationdelayload.cpp \
- animationdelayload.h \
- configuration.cpp \
- configuration.h \
- graphicsmanager.cpp \
- graphicsmanager.h \
- graphicsvertexes.cpp \
- graphicsvertexes.h \
- logger.cpp \
- logger.h \
- navigationmanager.cpp \
- navigationmanager.h \
- settings.cpp \
- settings.h \
- listeners/debugmessagelistener.cpp \
- listeners/debugmessagelistener.h \
- resources/map/walklayer.cpp \
- resources/map/walklayer.h \
- render/graphics.cpp \
- render/graphics.h \
- render/renderers.cpp \
- render/renderers.h \
- render/sdl2softwaregraphics.cpp \
- render/sdl2softwaregraphics.h \
- render/sdl2graphics.cpp \
- render/sdl2graphics.h \
- render/sdlgraphics.cpp \
- render/sdlgraphics.h \
- render/softwaregraphicsdef.hpp \
- render/mgl.cpp \
- render/mgl.h \
- render/mgl.hpp \
- render/mglcheck.h \
- render/mgldefines.h \
- render/mglemu.cpp \
- render/mglemu.h \
- render/mglfunctions.h \
- render/mgltypes.h \
- render/mglx.cpp \
- render/mglx.h \
- render/mglx.hpp \
- render/mglxinit.cpp \
- render/mglxinit.h \
- render/mglxtypes.h \
- render/mobileopenglgraphics.cpp \
- render/mobileopenglgraphics.h \
- render/modernopenglgraphics.cpp \
- render/modernopenglgraphics.h \
- render/normalopenglgraphics.cpp \
- render/normalopenglgraphics.h \
- render/safeopenglgraphics.cpp\
- render/safeopenglgraphics.h \
- render/shaders/shader.cpp \
- render/shaders/shader.h \
- render/shaders/shaderprogram.cpp \
- render/shaders/shaderprogram.h \
- render/shaders/shadersmanager.cpp \
- render/shaders/shadersmanager.h \
- resources/action.cpp \
- resources/action.h \
- resources/animation.cpp \
- resources/animation.h \
- resources/atlasitem.h \
- resources/atlasmanager.cpp \
- resources/atlasmanager.h \
- resources/atlasresource.cpp \
- resources/atlasresource.h \
- resources/db/palettedb.cpp \
- resources/db/palettedb.h \
- resources/delayedmanager.cpp \
- resources/delayedmanager.h \
- resources/dye.cpp \
- resources/dye.h \
- resources/dyepalette.cpp \
- resources/dyepalette.h \
- resources/effectdescription.h \
- resources/emoteinfo.h \
- resources/emotesprite.h \
- resources/equipmentslots.h \
- resources/image.cpp \
- resources/image.h \
- resources/imagehelper.cpp \
- resources/imagehelper.h \
- resources/imagerect.h \
- resources/imageset.cpp \
- resources/imageset.h \
- resources/imagewriter.cpp \
- resources/imagewriter.h \
- resources/openglimagehelper.cpp \
- resources/openglimagehelper.h \
- resources/resource.cpp \
- resources/resource.h \
- resources/resourcemanager.cpp \
- resources/resourcemanager.h \
- resources/sdl2softwareimagehelper.cpp \
- resources/sdl2softwareimagehelper.h \
- resources/sdl2imagehelper.cpp \
- resources/sdl2imagehelper.h \
- resources/sdlimagehelper.cpp \
- resources/sdlimagehelper.h \
- resources/sdlmusic.cpp \
- resources/sdlmusic.h \
- resources/soundeffect.cpp \
- resources/soundeffect.h \
- resources/subimage.cpp \
- resources/subimage.h \
- resources/surfaceimagehelper.cpp \
- resources/surfaceimagehelper.h \
- resources/textureatlas.h \
- resources/updatefile.h \
- resources/spritedef.cpp \
- resources/spritedef.h \
- resources/spritedisplay.h \
- resources/spritereference.h \
- test/testmain.cpp \
- test/testmain.h \
- utils/env.cpp \
- utils/env.h \
- utils/gettext.h \
- utils/gettexthelper.cpp \
- utils/gettexthelper.h \
- utils/glxhelper.cpp \
- utils/glxhelper.h \
- utils/files.cpp \
- utils/files.h \
- utils/mkdir.cpp \
- utils/mkdir.h \
- utils/paths.cpp \
- utils/paths.h \
- utils/perfomance.cpp \
- utils/perfomance.h \
- utils/physfsrwops.cpp \
- utils/physfsrwops.h \
- utils/physfstools.cpp \
- utils/physfstools.h \
- utils/physfscheckutils.cpp \
- utils/physfscheckutils.h \
- utils/physfsmemoryobject.h \
- utils/process.cpp \
- utils/process.h \
- utils/sdl2helper.cpp \
- utils/sdl2helper.h \
- utils/sdlcheckutils.cpp \
- utils/sdlcheckutils.h \
- utils/sdlhelper.cpp \
- utils/sdlhelper.h \
- utils/sdlmemoryobject.h \
- utils/stringmap.h \
- utils/stringutils.cpp \
- utils/stringutils.h \
- utils/timer.cpp \
- utils/timer.h \
- utils/xml.cpp \
- utils/xml.h \
- utils/xmlutils.cpp \
- utils/xmlutils.h \
- utils/translation/podict.cpp \
- utils/translation/podict.h
+dyecmd_SOURCES = dyetool/dyemain.cpp
if USE_MUMBLE
manaplus_CXXFLAGS += -DUSE_MUMBLE
endif
if ENABLE_CHECKS
-manaplus_CXXFLAGS += -DENABLE_CHECKS
dyecmd_CXXFLAGS += -DENABLE_CHECKS
+manaplus_CXXFLAGS += -DENABLE_CHECKS
endif
+SRC =
+
if USE_SDL2
if USE_INTERNALSDLGFX
dyecmd_CXXFLAGS += -I$(srcdir)/sdl2gfx -DUSE_SDL2
-dyecmd_SOURCES += sdl2gfx/SDL2_framerate.c \
- sdl2gfx/SDL2_framerate.h \
- sdl2gfx/SDL2_rotozoom.c \
- sdl2gfx/SDL2_rotozoom.h
-
manaplus_CXXFLAGS += -I$(srcdir)/sdl2gfx -DUSE_SDL2
-manaplus_SOURCES += sdl2gfx/SDL2_framerate.c \
+SRC += sdl2gfx/SDL2_framerate.c \
sdl2gfx/SDL2_framerate.h \
sdl2gfx/SDL2_rotozoom.c \
sdl2gfx/SDL2_rotozoom.h
@@ -240,8 +73,10 @@ manaplus_CXXFLAGS += -DUSE_SDL2
endif
endif
-manaplus_SOURCES += events/actionevent.h \
+SRC += events/actionevent.h \
listeners/actionlistener.h \
+ listeners/attributelistener.cpp \
+ listeners/attributelistener.h \
gui/widgets/basiccontainer.h \
gui/buttoninfo.h \
gui/buttontext.h \
@@ -267,9 +102,8 @@ manaplus_SOURCES += events/actionevent.h \
listeners/debugmessagelistener.h \
listeners/guitableactionlistener.cpp \
listeners/guitableactionlistener.h \
- listeners/inputactionreplaylistener.cpp \
- listeners/inputactionreplaylistener.h \
- listeners/inventorylistener.h \
+ listeners/tooltiplistener.cpp \
+ listeners/tooltiplistener.h \
render/graphics.h \
events/inputguievent.h \
input/key.h \
@@ -285,21 +119,12 @@ manaplus_SOURCES += events/actionevent.h \
listeners/openurllistener.h \
listeners/playerdeathlistener.cpp \
listeners/playerdeathlistener.h \
- listeners/playerpostdeathlistener.h \
- listeners/playerlistener.cpp \
- listeners/playerlistener.h \
gui/rect.h \
events/selectionevent.h \
listeners/selectionlistener.h \
listeners/statlistener.cpp \
listeners/statlistener.h \
listeners/tablemodellistener.h \
- listeners/tooltiplistener.cpp \
- listeners/tooltiplistener.h \
- listeners/updatestatuslistener.cpp \
- listeners/updatestatuslistener.h \
- listeners/uploadlistener.cpp \
- listeners/uploadlistener.h \
utils/sdlpixel.h \
gui/widgets/widget.h \
listeners/weightlistener.h \
@@ -316,33 +141,12 @@ manaplus_SOURCES += events/actionevent.h \
input/key.cpp \
gui/rect.cpp \
gui/widgets/widget.cpp \
- gui/widgets/basiccontainer2.cpp
-
-manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
- gui/widgets/avatarlistbox.h \
- gui/models/avatarlistmodel.h \
- gui/models/beingslistmodel.h \
+ gui/widgets/basiccontainer2.cpp \
gui/models/colorlistmodel.h \
- gui/widgets/tabs/chat/battletab.cpp \
- gui/widgets/tabs/chat/battletab.h \
- gui/widgets/tabs/chat/channeltab.cpp \
- gui/widgets/tabs/chat/channeltab.h \
gui/widgets/browserbox.cpp \
gui/widgets/browserbox.h \
gui/widgets/button.cpp \
gui/widgets/button.h \
- gui/widgets/characterdisplay.cpp \
- gui/widgets/characterdisplay.h \
- gui/widgets/characterviewbase.h \
- gui/widgets/characterviewnormal.cpp \
- gui/widgets/characterviewnormal.h \
- gui/widgets/characterviewsmall.cpp \
- gui/widgets/characterviewsmall.h \
- gui/widgets/tabs/chat/chattabtype.h \
- gui/widgets/tabs/debugwindowtabs.cpp \
- gui/widgets/tabs/debugwindowtabs.h \
- gui/widgets/tabs/chat/chattab.cpp \
- gui/widgets/tabs/chat/chattab.h \
gui/widgets/chatinput.h \
gui/widgets/checkbox.cpp \
gui/widgets/checkbox.h \
@@ -359,8 +163,6 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
gui/widgets/desktop.h \
gui/widgets/dropdown.cpp \
gui/widgets/dropdown.h \
- gui/widgets/emoteshortcutcontainer.cpp \
- gui/widgets/emoteshortcutcontainer.h \
gui/widgets/equipmentbox.h \
gui/widgets/equipmentpage.h \
gui/widgets/extendedlistbox.cpp \
@@ -378,8 +180,6 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
gui/models/langlistmodel.h \
gui/widgets/flowcontainer.cpp \
gui/widgets/flowcontainer.h \
- gui/widgets/tabs/chat/gmtab.cpp \
- gui/widgets/tabs/chat/gmtab.h \
gui/widgets/guitable.cpp \
gui/widgets/guitable.h \
gui/widgets/horizontcontainer.cpp \
@@ -388,23 +188,8 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
gui/widgets/icon.h \
gui/widgets/inttextfield.cpp \
gui/widgets/inttextfield.h \
- gui/widgets/itemcontainer.cpp \
- gui/widgets/itemcontainer.h \
- gui/widgets/itemlinkhandler.cpp \
- gui/widgets/itemlinkhandler.h \
- gui/widgets/virtshortcutcontainer.cpp \
- gui/widgets/virtshortcutcontainer.h \
- gui/widgets/emotepage.cpp \
- gui/widgets/emotepage.h \
- gui/widgets/itemshortcutcontainer.cpp \
- gui/widgets/itemshortcutcontainer.h \
- gui/widgets/spellshortcutcontainer.cpp \
- gui/widgets/spellshortcutcontainer.h \
- gui/widgets/statuswindowattrs.h \
gui/widgets/label.cpp \
gui/widgets/label.h \
- gui/widgets/tabs/chat/langtab.cpp \
- gui/widgets/tabs/chat/langtab.h \
gui/widgets/layout.cpp \
gui/widgets/layout.h \
gui/widgets/layoutarray.cpp \
@@ -423,16 +208,9 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
gui/models/modelistmodel.h \
gui/models/namesmodel.cpp \
gui/models/namesmodel.h \
- gui/models/opengllistmodel.h \
- gui/models/playerrelationlistmodel.h \
- gui/models/playertablemodel.cpp \
- gui/models/playertablemodel.h \
- gui/models/questsmodel.h \
gui/models/serverslistmodel.h \
gui/widgets/passwordfield.cpp \
gui/widgets/passwordfield.h \
- gui/widgets/playerbox.cpp \
- gui/widgets/playerbox.h \
gui/widgets/popup.cpp \
gui/widgets/popup.h \
gui/widgets/popuplist.cpp \
@@ -447,52 +225,11 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
gui/widgets/radiogroup.h \
gui/widgets/scrollarea.cpp \
gui/widgets/scrollarea.h \
- gui/widgets/serverslistbox.h \
- gui/widgets/setupbuttonitem.cpp \
- gui/widgets/setupbuttonitem.h \
- gui/widgets/setupitem.cpp \
- gui/widgets/setupitem.h \
- gui/widgets/setupquickitem.cpp \
- gui/widgets/setupquickitem.h \
- gui/widgets/tabs/setuptab.cpp \
- gui/widgets/tabs/setuptab.h \
- gui/widgets/tabs/setuptabscroll.cpp \
- gui/widgets/tabs/setuptabscroll.h \
- gui/widgets/setuptouchitem.cpp \
- gui/widgets/setuptouchitem.h \
- gui/models/shopitems.cpp \
- gui/models/shopitems.h \
- gui/widgets/shoplistbox.cpp \
- gui/widgets/shoplistbox.h \
- gui/widgets/shortcutcontainer.cpp \
- gui/widgets/shortcutcontainer.h \
- gui/widgets/skilldata.cpp \
- gui/widgets/skilldata.h \
- gui/widgets/skillinfo.cpp \
- gui/widgets/skillinfo.h \
- gui/widgets/skilllistbox.h \
- gui/models/skillmodel.cpp \
- gui/models/skillmodel.h \
- gui/models/sortlistmodelbuy.h \
- gui/models/sortlistmodelinv.h \
gui/models/soundsmodel.h \
gui/widgets/slider.cpp \
gui/widgets/slider.h \
gui/widgets/sliderlist.cpp \
gui/widgets/sliderlist.h \
- gui/widgets/tabs/shortcuttab.h \
- gui/widgets/tabs/skilltab.h \
- gui/widgets/tabs/socialattacktab.h \
- gui/widgets/tabs/socialfriendsfunctor.h \
- gui/widgets/tabs/socialfriendstab.h \
- gui/widgets/tabs/socialguildtab.h \
- gui/widgets/tabs/socialguildtab2.h \
- gui/widgets/tabs/socialnavigationtab.h \
- gui/widgets/tabs/socialpartytab.h \
- gui/widgets/tabs/socialpickuptab.h \
- gui/widgets/tabs/socialplayerstab.h \
- gui/widgets/tabs/socialtab.h \
- gui/widgets/tabs/socialtabbase.h \
gui/widgets/tabs/tab.cpp \
gui/widgets/tabs/tab.h \
gui/widgets/tabbedarea.cpp \
@@ -500,12 +237,7 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
gui/models/tablemodel.cpp \
gui/models/tablemodel.h \
gui/models/targettypemodel.h \
- gui/models/touchactionmodel.cpp \
- gui/models/touchactionmodel.h \
gui/models/typelistmodel.h \
- gui/models/updatetypemodel.h \
- gui/models/updatelistmodel.h \
- gui/models/worldlistmodel.h \
gui/models/themesmodel.h \
gui/widgets/tabstrip.cpp \
gui/widgets/tabstrip.h \
@@ -515,12 +247,8 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
gui/widgets/textfield.h \
gui/widgets/textpreview.cpp \
gui/widgets/textpreview.h \
- gui/widgets/tabs/chat/tradetab.cpp \
- gui/widgets/tabs/chat/tradetab.h \
gui/widgets/vertcontainer.cpp \
gui/widgets/vertcontainer.h \
- gui/widgets/tabs/chat/whispertab.cpp \
- gui/widgets/tabs/chat/whispertab.h \
gui/widgets/widget2.h \
gui/widgets/widgetgroup.cpp \
gui/widgets/widgetgroup.h \
@@ -528,151 +256,23 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
gui/widgets/window.h \
gui/widgets/windowcontainer.cpp \
gui/widgets/windowcontainer.h \
- gui/popups/beingpopup.cpp \
- gui/popups/beingpopup.h \
- gui/popups/createpartypopup.h \
- gui/windows/buydialog.cpp \
- gui/windows/buydialog.h \
- gui/windows/buyselldialog.cpp \
- gui/windows/buyselldialog.h \
- gui/windows/changeemaildialog.cpp \
- gui/windows/changeemaildialog.h \
- gui/windows/changepassworddialog.cpp \
- gui/windows/changepassworddialog.h \
- gui/windows/charselectdialog.cpp \
- gui/windows/charselectdialog.h \
- gui/windows/charcreatedialog.cpp \
- gui/windows/charcreatedialog.h \
- gui/windows/chardeleteconfirm.h \
- gui/windows/chatwindow.cpp \
- gui/windows/chatwindow.h \
gui/windows/confirmdialog.cpp \
gui/windows/confirmdialog.h \
- gui/windows/connectiondialog.cpp \
- gui/windows/connectiondialog.h \
- gui/windows/debugwindow.cpp \
- gui/windows/debugwindow.h \
- gui/windows/didyouknowwindow.cpp \
- gui/windows/didyouknowwindow.h \
- gui/windows/editdialog.cpp \
- gui/windows/editdialog.h \
- gui/windows/editserverdialog.cpp \
- gui/windows/editserverdialog.h \
- gui/windows/emotewindow.cpp \
- gui/windows/emotewindow.h \
- gui/windows/equipmentwindow.cpp \
- gui/windows/equipmentwindow.h \
gui/focushandler.cpp \
gui/focushandler.h \
gui/gui.cpp \
gui/gui.h \
gui/mailmessage.h \
- gui/windows/helpwindow.cpp \
- gui/windows/helpwindow.h \
- gui/windows/inventorywindow.cpp \
- gui/windows/inventorywindow.h \
- gui/windows/itemamountwindow.cpp \
- gui/windows/itemamountwindow.h \
- gui/popups/itempopup.cpp \
- gui/popups/itempopup.h \
- gui/popups/spellpopup.cpp \
- gui/popups/spellpopup.h \
- gui/popups/statuspopup.cpp \
- gui/popups/statuspopup.h \
- gui/popups/textboxpopup.cpp \
- gui/popups/textboxpopup.h \
- gui/windows/killstats.cpp \
- gui/windows/killstats.h \
- gui/windows/logindialog.cpp \
- gui/windows/logindialog.h \
- gui/windows/minimap.cpp \
- gui/windows/minimap.h \
- gui/windows/ministatuswindow.cpp \
- gui/windows/ministatuswindow.h \
- gui/windows/npcdialog.cpp \
- gui/windows/npcdialog.h \
- gui/windows/npcselldialog.cpp \
- gui/windows/npcselldialog.h \
gui/windows/okdialog.cpp \
gui/windows/okdialog.h \
- gui/windows/outfitwindow.cpp \
- gui/windows/outfitwindow.h \
- gui/windows/textcommandeditor.cpp \
- gui/windows/textcommandeditor.h \
gui/onlineplayer.h \
gui/palette.cpp \
gui/palette.h \
- gui/popupmanager.cpp \
- gui/popupmanager.h \
- gui/popups/popupmenu.cpp \
- gui/popups/popupmenu.h \
- gui/popups/skillpopup.cpp \
- gui/popups/skillpopup.h \
- gui/windows/questswindow.cpp \
- gui/windows/questswindow.h \
- gui/windows/quitdialog.cpp \
- gui/windows/quitdialog.h \
- gui/windows/registerdialog.cpp \
- gui/windows/registerdialog.h \
gui/sdlinput.cpp \
gui/sdlinput.h \
- gui/widgets/selldialog.cpp \
- gui/widgets/selldialog.h \
- gui/windows/serverdialog.cpp \
- gui/windows/serverdialog.h \
- gui/windows/setupwindow.cpp \
- gui/windows/setupwindow.h \
- gui/widgets/tabs/setup_audio.cpp \
- gui/widgets/tabs/setup_audio.h \
- gui/widgets/tabs/setup_colors.cpp \
- gui/widgets/tabs/setup_colors.h \
- gui/widgets/tabs/setup_joystick.cpp \
- gui/widgets/tabs/setup_joystick.h \
- gui/widgets/tabs/setup_mods.cpp \
- gui/widgets/tabs/setup_mods.h \
- gui/widgets/tabs/setup_other.cpp \
- gui/widgets/tabs/setup_other.h \
- gui/widgets/tabs/setup_theme.cpp \
- gui/widgets/tabs/setup_theme.h \
- gui/widgets/tabs/setup_touch.cpp \
- gui/widgets/tabs/setup_touch.h \
- gui/widgets/tabs/setup_chat.cpp \
- gui/widgets/tabs/setup_chat.h \
- gui/widgets/tabs/setup_input.cpp \
- gui/widgets/tabs/setup_input.h \
- gui/widgets/tabs/setup_perfomance.cpp \
- gui/widgets/tabs/setup_perfomance.h \
- gui/widgets/tabs/setup_players.cpp \
- gui/widgets/tabs/setup_players.h \
- gui/widgets/tabs/setup_quick.cpp \
- gui/widgets/tabs/setup_quick.h \
- gui/widgets/tabs/setup_relations.cpp \
- gui/widgets/tabs/setup_relations.h \
- gui/widgets/tabs/setup_video.cpp \
- gui/widgets/tabs/setup_video.h \
- gui/widgets/tabs/setup_visual.cpp \
- gui/widgets/tabs/setup_visual.h \
+ gui/windows/editdialog.cpp \
+ gui/windows/editdialog.h \
gui/setupactiondata.h \
- gui/setupinputpages.cpp \
- gui/setupinputpages.h \
- input/pages/basic.cpp \
- input/pages/basic.h \
- input/pages/chat.cpp \
- input/pages/chat.h \
- input/pages/emotes.cpp \
- input/pages/emotes.h \
- input/pages/gui.cpp \
- input/pages/gui.h \
- input/pages/move.cpp \
- input/pages/move.h \
- input/pages/other.cpp \
- input/pages/other.h \
- input/pages/outfits.cpp \
- input/pages/outfits.h \
- input/pages/shortcuts.cpp \
- input/pages/shortcuts.h \
- input/pages/windows.cpp \
- input/pages/windows.h \
gui/fonts/font.cpp \
gui/fonts/font.h \
gui/fonts/textchunk.cpp \
@@ -681,22 +281,6 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
gui/fonts/textchunklist.h \
gui/fonts/textchunksmall.cpp \
gui/fonts/textchunksmall.h \
- gui/windows/shopwindow.cpp \
- gui/windows/shopwindow.h \
- gui/windows/shortcutwindow.cpp \
- gui/windows/shortcutwindow.h \
- gui/windows/skilldialog.cpp \
- gui/windows/skilldialog.h \
- gui/windows/socialwindow.cpp \
- gui/windows/socialwindow.h \
- gui/popups/speechbubble.cpp \
- gui/popups/speechbubble.h \
- gui/windows/statuswindow.cpp \
- gui/windows/statuswindow.h \
- gui/windows/textdialog.cpp \
- gui/windows/textdialog.h \
- gui/popups/textpopup.cpp \
- gui/popups/textpopup.h \
gui/skin.cpp \
gui/skin.h \
gui/theme.cpp \
@@ -704,130 +288,37 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
gui/themecolorsidoperators.cpp \
gui/themecolorsidoperators.h \
gui/themeinfo.h \
- gui/touchactiondata.cpp \
- gui/touchactiondata.h \
- gui/windows/tradewindow.cpp \
- gui/windows/tradewindow.h \
- gui/windows/unregisterdialog.cpp \
- gui/windows/unregisterdialog.h \
- gui/windows/updaterwindow.cpp \
- gui/windows/updaterwindow.h \
gui/userpalette.cpp \
gui/userpalette.h \
- gui/viewport.cpp \
- gui/viewport.h \
gui/windowmanager.cpp \
gui/windowmanager.h \
- gui/windows/whoisonline.cpp \
- gui/windows/whoisonline.h \
- gui/windowmenu.cpp \
- gui/windowmenu.h \
- gui/windows/worldselectdialog.cpp \
- gui/windows/worldselectdialog.h \
- net/adminhandler.h \
- net/beinghandler.h \
- net/buysellhandler.h \
- net/character.h \
- net/charserverhandler.cpp \
- net/charserverhandler.h \
- net/chathandler.h \
- net/download.cpp \
- net/download.h \
enums/net/auctionsearchtype.h \
enums/net/battlegroundtype.h \
enums/net/downloadstatus.h \
enums/net/packettype.h \
- net/gamehandler.h \
- net/generalhandler.h \
- net/guildhandler.h \
- net/inventoryhandler.h \
- net/ipc.cpp \
- net/ipc.h \
- net/ea/inventoryitem.h \
- net/logindata.h \
- net/loginhandler.h \
- net/messagehandler.h \
- net/messagein.cpp \
- net/messagein.h \
- net/messageout.cpp \
- net/messageout.h \
- net/net.cpp \
- net/net.h \
- net/netconsts.h \
- net/npchandler.h \
- net/partyhandler.h \
enums/net/partyshare.h \
enums/net/servertype.h \
enums/net/storesearchtype.h \
- net/pethandler.h \
- net/playerhandler.h \
- net/questhandler.h \
- net/registrationoptions.h \
- net/sdltcpnet.cpp \
- net/sdltcpnet.h \
- net/serverfeatures.h \
- net/serverinfo.h \
- net/skillhandler.h \
- net/tradehandler.h \
- net/updatetypeoperators.cpp \
- net/updatetypeoperators.h \
enums/net/updatetype.h \
- net/uploadcharinfo.h \
- net/worldinfo.h \
- net/packetcounters.cpp \
- net/packetcounters.h \
- net/packetdefine.h \
- net/packetlimiter.cpp \
- net/packetlimiter.h \
resources/action.cpp \
resources/action.h \
resources/ambientlayer.cpp \
resources/ambientlayer.h \
- resources/animation.cpp \
- resources/animation.h \
resources/atlasitem.h \
resources/atlasmanager.cpp \
resources/atlasmanager.h \
resources/atlasresource.cpp \
resources/atlasresource.h \
resources/attack.h \
- resources/db/avatardb.cpp \
- resources/db/avatardb.h \
- resources/db/badgesdb.cpp \
- resources/db/badgesdb.h \
- resources/beingcommon.cpp \
- resources/beingcommon.h \
- resources/beinginfo.cpp \
- resources/beinginfo.h \
- resources/beingmenuitem.h \
- resources/chatobject.cpp \
- resources/chatobject.h \
- resources/db/chardb.cpp \
- resources/db/chardb.h \
- resources/db/colordb.cpp \
- resources/db/colordb.h \
- resources/db/commandsdb.cpp \
- resources/db/commandsdb.h \
resources/cursor.cpp \
resources/cursor.h \
- resources/delayedmanager.cpp \
- resources/delayedmanager.h \
- resources/db/deaddb.cpp \
- resources/db/deaddb.h \
resources/dye.cpp \
resources/dye.h \
resources/dyecolor.h \
resources/dyepalette.cpp \
resources/dyepalette.h \
- resources/db/emotedb.cpp \
- resources/db/emotedb.h \
- resources/db/homunculusdb.cpp \
- resources/db/homunculusdb.h \
- resources/db/horsedb.cpp \
- resources/db/horsedb.h \
resources/fboinfo.h \
resources/frame.h \
- resources/horseinfo.h \
resources/image.cpp \
resources/image.h \
resources/imagehelper.cpp \
@@ -836,47 +327,17 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
resources/imageset.h \
resources/imagewriter.cpp \
resources/imagewriter.h \
- resources/db/itemdb.cpp \
- resources/db/itemdb.h \
- resources/db/itemdbstat.h \
- resources/iteminfo.h \
- resources/iteminfo.cpp \
- resources/itemslot.h \
- enums/resources/itemsoundevent.h \
- resources/itemtype.h \
- resources/itemtypemap.h \
- resources/itemtypemapdata.h \
- resources/db/mapdb.cpp \
- resources/db/mapdb.h \
- resources/db/mercenarydb.cpp \
- resources/db/mercenarydb.h \
- resources/db/moddb.cpp \
- resources/db/moddb.h \
- resources/mapinfo.h \
- enums/resources/map/mapitemtype.h \
- resources/mapreader.cpp \
- resources/mapreader.h \
- resources/modinfo.cpp \
- resources/modinfo.h \
resources/mstack.h \
resources/notificationinfo.h \
resources/notifications.h \
enums/resources/notifyflags.h \
enums/resources/notifytypes.h \
- resources/db/monsterdb.cpp \
- resources/db/monsterdb.h \
- resources/db/npcdb.cpp \
- resources/db/npcdb.h \
resources/openglimagehelper.cpp \
resources/openglimagehelper.h \
resources/questeffect.h \
resources/questitem.h \
resources/questitemtext.h \
resources/questtype.h \
- resources/db/palettedb.cpp \
- resources/db/palettedb.h \
- resources/db/petdb.cpp \
- resources/db/petdb.h \
resources/resource.cpp \
resources/resource.h \
resources/resourcemanager.cpp \
@@ -892,10 +353,6 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
resources/skillconsts.h \
resources/skillowner.h \
resources/skilltype.h \
- resources/db/sounddb.cpp \
- resources/db/sounddb.h \
- resources/db/weaponsdb.cpp \
- resources/db/weaponsdb.h \
resources/soundeffect.cpp \
resources/soundeffect.h \
resources/soundinfo.h \
@@ -919,8 +376,6 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
utils/base64.cpp \
utils/base64.h \
utils/booleanoptions.h \
- utils/chatutils.cpp \
- utils/chatutils.h \
utils/checkutils.cpp \
utils/checkutils.h \
utils/copynpaste.cpp \
@@ -982,79 +437,11 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
test/testmain.h \
actions/actiondef.h \
actions/actionfuncptr.h \
- actions/actions.cpp \
- actions/actions.h \
- actions/chat.cpp \
- actions/chat.h \
- actions/commands.cpp \
- actions/commands.h \
- actions/move.cpp \
- actions/move.h \
- actions/pets.cpp \
- actions/pets.h \
- actions/statusbar.cpp \
- actions/statusbar.h \
- actions/tabs.cpp \
- actions/tabs.h \
- actions/target.cpp \
- actions/target.h \
- actions/windows.cpp \
- actions/windows.h \
- being/actor.cpp \
- being/actor.h \
- being/actorsprite.cpp \
- being/actorsprite.h \
- enums/being/actortype.h \
- enums/being/attacktype.h \
- enums/being/attributes.h \
- listeners/actorspritelistener.h \
- listeners/arrowslistener.cpp \
- listeners/arrowslistener.h \
- listeners/attributelistener.cpp \
- listeners/attributelistener.h \
- listeners/awaylistener.cpp \
- listeners/awaylistener.h \
listeners/baselistener.hpp \
- listeners/charrenamelistener.cpp \
- listeners/charrenamelistener.h \
- actormanager.cpp \
- actormanager.h \
- animatedsprite.cpp \
- animatedsprite.h \
- animationdelayload.cpp \
- animationdelayload.h \
- particle/animationparticle.cpp \
- particle/animationparticle.h \
- avatar.cpp \
- avatar.h \
- being/being.cpp \
- being/being.h \
- enums/being/beingaction.h \
- being/beingcacheentry.h \
- enums/being/beingdirection.h \
- being/beingflag.h \
- being/beingspeech.h \
- beingequipbackend.cpp \
- beingequipbackend.h \
- spellmanager.cpp \
- spellmanager.h \
- catch.hpp \
- chatlogger.cpp \
- chatlogger.h \
- client.cpp \
- client.h \
commandline.cpp \
commandline.h \
configmanager.cpp \
configmanager.h \
- being/compounditem.h \
- being/compoundsprite.cpp \
- being/compoundsprite.h \
- being/crazymoves.cpp \
- being/crazymoves.h \
- enums/being/cookingtype.h \
- enums/being/gender.h \
- being/homunculusinfo.h \
listeners/configlistener.h \
configuration.cpp \
configuration.h \
@@ -1063,55 +450,16 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
defaults.h \
dirs.cpp \
dirs.h \
- dragdrop.h \
- dropshortcut.cpp \
- dropshortcut.h \
- effectmanager.cpp \
- effectmanager.h \
- emoteshortcut.cpp \
- emoteshortcut.h \
- emoteshortcutconsts.h \
- equipment.h \
eventsmanager.cpp \
eventsmanager.h \
- flooritem.cpp \
- flooritem.h \
- game.cpp \
- game.h \
- gamemodifiers.cpp \
- gamemodifiers.h \
render/graphics.cpp \
render/graphics.h \
graphicsmanager.cpp \
graphicsmanager.h \
graphicsvertexes.cpp \
graphicsvertexes.h \
- guild.cpp \
- guild.h \
- enums/dragdropsource.h \
- enums/equipslot.h \
- enums/guildpositionflags.h \
- enums/inventorytype.h \
- particle/imageparticle.cpp \
- particle/imageparticle.h \
- imagesprite.cpp \
- imagesprite.h \
- inventory.cpp \
- inventory.h \
- item.cpp \
- item.h \
- itemshortcut.cpp \
- itemshortcut.h \
- itemsoundmanager.cpp \
- itemsoundmanager.h \
- spellshortcut.cpp \
- spellshortcut.h \
- textcommand.cpp \
- textcommand.h \
events/inputevent.h \
- enums/input/inputaction.h \
input/inputactiondata.h \
- input/inputactionmap.h \
input/inputactionoperators.cpp \
input/inputactionoperators.h \
input/inputactionsortfunctor.h \
@@ -1129,36 +477,10 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
input/multitouchmanager.cpp \
input/multitouchmanager.h \
localconsts.h \
- being/localplayer.cpp \
- being/localplayer.h \
- being/mercenaryinfo.h \
- being/petinfo.h \
- enums/being/pickup.h \
logger.cpp \
logger.h \
- main.cpp \
- main.h \
maingui.cpp \
maingui.h \
- enums/resources/map/blockmask.h \
- enums/resources/map/blocktype.h \
- resources/map/location.h \
- resources/map/map.cpp \
- resources/map/map.h \
- resources/map/mapconsts.h \
- resources/map/mapheights.cpp \
- resources/map/mapheights.h \
- resources/map/mapitem.cpp \
- resources/map/mapitem.h \
- resources/map/maplayer.cpp \
- resources/map/maplayer.h \
- resources/map/mapobject.h \
- resources/map/mapobjectlist.h \
- resources/map/maprowvertexes.h \
- enums/resources/map/maptype.h \
- resources/map/metatile.h \
- resources/map/objectslayer.cpp \
- resources/map/objectslayer.h \
render/mgl.cpp \
render/mgl.h \
render/mgl.hpp \
@@ -1181,10 +503,6 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
render/normalopenglgraphics.cpp \
render/normalopenglgraphics.h \
input/mouseinput.h \
- navigationmanager.cpp \
- navigationmanager.h \
- notifymanager.cpp \
- notifymanager.h \
options.h \
render/graphicsdef.hpp \
render/imagegraphics.cpp \
@@ -1203,45 +521,14 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
render/rendererslistsdl2.h \
enums/render/blitmode.h \
enums/render/rendertype.h \
- particle/particle.cpp \
- particle/particle.h \
- particle/particlecontainer.cpp \
- particle/particlecontainer.h \
- particle/particleemitter.cpp \
- particle/particleemitter.h \
- particle/particleemitterprop.h \
- particle/particleinfo.h \
- particle/particlelist.cpp \
- particle/particlelist.h \
- particle/particlevector.cpp \
- particle/particlevector.h \
- party.cpp \
- party.h \
being/playerignorestrategy.h \
- being/playerinfo.cpp \
- being/playerinfo.h \
- being/playerrelation.cpp \
- being/playerrelation.h \
- being/playerrelations.cpp \
- being/playerrelations.h \
enums/being/rank.h \
enums/being/reachable.h \
enums/being/relation.h \
enums/being/targetcursorsize.h \
enums/being/targetcursortype.h \
- listeners/playerrelationslistener.h \
- listeners/renamelistener.cpp \
- listeners/renamelistener.h \
- listeners/requesttradelistener.h \
position.cpp \
position.h \
- resources/map/properties.h \
- resources/map/speciallayer.cpp \
- resources/map/speciallayer.h \
- resources/map/tileanimation.cpp \
- resources/map/tileanimation.h \
- particle/rotationalparticle.cpp \
- particle/rotationalparticle.h \
render/safeopenglgraphics.cpp\
render/safeopenglgraphics.h \
render/sdl2graphics.cpp \
@@ -1254,16 +541,6 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
sdlshared.h \
settings.cpp \
settings.h \
- shopitem.cpp \
- shopitem.h \
- shortcutbase.cpp \
- shortcutbase.h \
- simpleanimation.cpp \
- simpleanimation.h \
- soundconsts.h \
- soundmanager.cpp \
- soundmanager.h \
- sprite.h \
enums/screendensity.h \
enums/state.h \
enums/simpletypes/allowsort.h \
@@ -1297,8 +574,6 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
enums/simpletypes/useargs.h \
enums/simpletypes/useresman.h \
enums/simpletypes/visible.h \
- statuseffect.cpp \
- statuseffect.h \
render/surfacegraphics.cpp \
render/surfacegraphics.h \
render/shaders/shader.cpp \
@@ -1307,29 +582,590 @@ manaplus_SOURCES += gui/widgets/avatarlistbox.cpp \
render/shaders/shaderprogram.h \
render/shaders/shadersmanager.cpp \
render/shaders/shadersmanager.h \
+ resources/animation.cpp \
+ resources/animation.h \
+ simpleanimation.cpp \
+ simpleanimation.h \
+ sprite.h \
+ soundconsts.h \
+ soundmanager.cpp \
+ soundmanager.h \
text.cpp \
text.h \
textmanager.cpp \
textmanager.h \
- particle/textparticle.cpp \
- particle/textparticle.h \
- resources/map/tileset.h \
touchactions.cpp \
touchactions.h \
touchmanager.cpp \
touchmanager.h \
- units.cpp \
- units.h \
variabledata.h \
vector.cpp \
vector.h \
- resources/map/walklayer.cpp \
- resources/map/walklayer.h \
- winver.h \
+ net/ipc.cpp \
+ net/ipc.h \
+ net/sdltcpnet.cpp \
+ net/sdltcpnet.h \
+ gui/popups/textboxpopup.cpp \
+ gui/popups/textboxpopup.h \
+ gui/popups/textpopup.cpp \
+ gui/popups/textpopup.h \
+ gui/popupmanager.cpp \
+ gui/popupmanager.h \
+ enums/input/inputaction.h \
+ input/inputactionmap.h \
+ winver.h
+
+dyecmd_SOURCES += ${SRC}
+manaplus_SOURCES += ${SRC}
+
+manaplus_SOURCES += main.cpp \
+ main.h \
+ avatar.cpp \
+ avatar.h \
+ actormanager.cpp \
+ actormanager.h \
+ animatedsprite.cpp \
+ animatedsprite.h \
+ animationdelayload.cpp \
+ animationdelayload.h \
+ actions/actions.cpp \
+ actions/actions.h \
+ actions/chat.cpp \
+ actions/chat.h \
+ actions/commands.cpp \
+ actions/commands.h \
+ actions/move.cpp \
+ actions/move.h \
+ actions/pets.cpp \
+ actions/pets.h \
+ actions/statusbar.cpp \
+ actions/statusbar.h \
+ actions/tabs.cpp \
+ actions/tabs.h \
+ actions/target.cpp \
+ actions/target.h \
+ actions/windows.cpp \
+ actions/windows.h \
+ client.cpp \
+ client.h \
+ imagesprite.cpp \
+ imagesprite.h \
+ inventory.cpp \
+ inventory.h \
+ textcommand.cpp \
+ textcommand.h \
+ item.cpp \
+ item.h \
+ itemshortcut.cpp \
+ itemshortcut.h \
+ itemsoundmanager.cpp \
+ itemsoundmanager.h \
+ enums/dragdropsource.h \
+ enums/equipslot.h \
+ enums/guildpositionflags.h \
+ enums/inventorytype.h \
+ spellshortcut.cpp \
+ spellshortcut.h \
+ statuseffect.cpp \
+ statuseffect.h \
+ units.cpp \
+ units.h \
+ particle/animationparticle.cpp \
+ particle/animationparticle.h \
+ being/being.cpp \
+ being/being.h \
+ enums/being/beingaction.h \
+ being/beingcacheentry.h \
+ enums/being/beingdirection.h \
+ being/beingflag.h \
+ being/beingspeech.h \
+ being/localplayer.cpp \
+ being/localplayer.h \
+ being/mercenaryinfo.h \
+ being/petinfo.h \
+ being/compounditem.h \
+ being/compoundsprite.cpp \
+ being/compoundsprite.h \
+ being/crazymoves.cpp \
+ being/crazymoves.h \
+ enums/being/cookingtype.h \
+ enums/being/gender.h \
+ being/homunculusinfo.h \
+ enums/being/pickup.h \
+ beingequipbackend.cpp \
+ beingequipbackend.h \
+ shopitem.cpp \
+ shopitem.h \
+ flooritem.cpp \
+ flooritem.h \
+ game.cpp \
+ game.h \
+ gamemodifiers.cpp \
+ gamemodifiers.h \
+ guild.cpp \
+ guild.h \
+ spellmanager.cpp \
+ spellmanager.h \
+ catch.hpp \
+ chatlogger.cpp \
+ chatlogger.h \
+ shortcutbase.cpp \
+ shortcutbase.h \
+ being/playerinfo.cpp \
+ being/playerinfo.h \
+ being/playerrelation.cpp \
+ being/playerrelation.h \
+ being/playerrelations.cpp \
+ being/playerrelations.h \
+ gui/touchactiondata.cpp \
+ gui/touchactiondata.h \
+ gui/models/avatarlistmodel.h \
+ gui/models/beingslistmodel.h \
+ gui/models/opengllistmodel.h \
+ gui/models/playerrelationlistmodel.h \
+ gui/models/playertablemodel.cpp \
+ gui/models/playertablemodel.h \
+ gui/models/questsmodel.h \
+ being/actor.cpp \
+ being/actor.h \
+ being/actorsprite.cpp \
+ being/actorsprite.h \
+ enums/being/actortype.h \
+ enums/being/attacktype.h \
+ enums/being/attributes.h \
+ dragdrop.h \
+ dropshortcut.cpp \
+ dropshortcut.h \
+ effectmanager.cpp \
+ effectmanager.h \
+ emoteshortcut.cpp \
+ emoteshortcut.h \
+ emoteshortcutconsts.h \
+ equipment.h \
+ listeners/actorspritelistener.h \
+ listeners/arrowslistener.cpp \
+ listeners/arrowslistener.h \
+ listeners/awaylistener.cpp \
+ listeners/awaylistener.h \
+ listeners/charrenamelistener.cpp \
+ listeners/charrenamelistener.h \
+ gui/viewport.cpp \
+ gui/viewport.h \
+ gui/popups/itempopup.cpp \
+ gui/popups/itempopup.h \
+ gui/popups/spellpopup.cpp \
+ gui/popups/spellpopup.h \
+ gui/popups/statuspopup.cpp \
+ gui/popups/statuspopup.h \
+ gui/popups/popupmenu.cpp \
+ gui/popups/popupmenu.h \
+ gui/popups/skillpopup.cpp \
+ gui/popups/skillpopup.h \
+ gui/popups/speechbubble.cpp \
+ gui/popups/speechbubble.h \
+ gui/popups/beingpopup.cpp \
+ gui/popups/beingpopup.h \
+ gui/popups/createpartypopup.h \
+ gui/widgets/itemcontainer.cpp \
+ gui/widgets/itemcontainer.h \
+ gui/widgets/tabs/chat/battletab.cpp \
+ gui/widgets/tabs/chat/battletab.h \
+ gui/widgets/tabs/chat/channeltab.cpp \
+ gui/widgets/tabs/chat/channeltab.h \
+ gui/widgets/tabs/chat/chattabtype.h \
+ gui/widgets/tabs/debugwindowtabs.cpp \
+ gui/widgets/tabs/debugwindowtabs.h \
+ gui/widgets/tabs/chat/chattab.cpp \
+ gui/widgets/tabs/chat/chattab.h \
+ gui/widgets/tabs/chat/gmtab.cpp \
+ gui/widgets/tabs/chat/gmtab.h \
+ gui/widgets/tabs/chat/langtab.cpp \
+ gui/widgets/tabs/chat/langtab.h \
+ gui/widgets/tabs/chat/tradetab.cpp \
+ gui/widgets/tabs/chat/tradetab.h \
+ gui/widgets/tabs/chat/whispertab.cpp \
+ gui/widgets/tabs/chat/whispertab.h \
gui/widgets/tabs/chat/guildtab.cpp \
gui/widgets/tabs/chat/guildtab.h \
gui/widgets/tabs/chat/partytab.cpp \
gui/widgets/tabs/chat/partytab.h \
+ gui/widgets/avatarlistbox.cpp \
+ gui/widgets/avatarlistbox.h \
+ gui/widgets/characterdisplay.cpp \
+ gui/widgets/characterdisplay.h \
+ gui/widgets/characterviewbase.h \
+ gui/widgets/characterviewnormal.cpp \
+ gui/widgets/characterviewnormal.h \
+ gui/widgets/characterviewsmall.cpp \
+ gui/widgets/characterviewsmall.h \
+ gui/widgets/itemlinkhandler.cpp \
+ gui/widgets/itemlinkhandler.h \
+ gui/widgets/emoteshortcutcontainer.cpp \
+ gui/widgets/emoteshortcutcontainer.h \
+ gui/widgets/virtshortcutcontainer.cpp \
+ gui/widgets/virtshortcutcontainer.h \
+ gui/widgets/emotepage.cpp \
+ gui/widgets/emotepage.h \
+ gui/widgets/itemshortcutcontainer.cpp \
+ gui/widgets/itemshortcutcontainer.h \
+ gui/widgets/spellshortcutcontainer.cpp \
+ gui/widgets/spellshortcutcontainer.h \
+ gui/widgets/statuswindowattrs.h \
+ gui/widgets/selldialog.cpp \
+ gui/widgets/selldialog.h \
+ gui/widgets/tabs/setup_audio.cpp \
+ gui/widgets/tabs/setup_audio.h \
+ gui/widgets/tabs/setup_colors.cpp \
+ gui/widgets/tabs/setup_colors.h \
+ gui/widgets/tabs/setup_joystick.cpp \
+ gui/widgets/tabs/setup_joystick.h \
+ gui/widgets/tabs/setup_mods.cpp \
+ gui/widgets/tabs/setup_mods.h \
+ gui/widgets/tabs/setup_other.cpp \
+ gui/widgets/tabs/setup_other.h \
+ gui/widgets/tabs/setup_theme.cpp \
+ gui/widgets/tabs/setup_theme.h \
+ gui/widgets/tabs/setup_touch.cpp \
+ gui/widgets/tabs/setup_touch.h \
+ gui/widgets/tabs/setup_chat.cpp \
+ gui/widgets/tabs/setup_chat.h \
+ gui/widgets/tabs/setup_input.cpp \
+ gui/widgets/tabs/setup_input.h \
+ gui/widgets/tabs/setup_perfomance.cpp \
+ gui/widgets/tabs/setup_perfomance.h \
+ gui/widgets/tabs/setup_players.cpp \
+ gui/widgets/tabs/setup_players.h \
+ gui/widgets/tabs/setup_quick.cpp \
+ gui/widgets/tabs/setup_quick.h \
+ gui/widgets/tabs/setup_relations.cpp \
+ gui/widgets/tabs/setup_relations.h \
+ gui/widgets/tabs/setup_video.cpp \
+ gui/widgets/tabs/setup_video.h \
+ gui/widgets/tabs/setup_visual.cpp \
+ gui/widgets/tabs/setup_visual.h \
+ gui/widgets/serverslistbox.h \
+ gui/widgets/setupbuttonitem.cpp \
+ gui/widgets/setupbuttonitem.h \
+ gui/widgets/setupitem.cpp \
+ gui/widgets/setupitem.h \
+ gui/widgets/setupquickitem.cpp \
+ gui/widgets/setupquickitem.h \
+ gui/widgets/tabs/setuptab.cpp \
+ gui/widgets/tabs/setuptab.h \
+ gui/widgets/tabs/setuptabscroll.cpp \
+ gui/widgets/tabs/setuptabscroll.h \
+ gui/widgets/setuptouchitem.cpp \
+ gui/widgets/setuptouchitem.h \
+ gui/widgets/playerbox.cpp \
+ gui/widgets/playerbox.h \
+ gui/models/shopitems.cpp \
+ gui/models/shopitems.h \
+ gui/widgets/shoplistbox.cpp \
+ gui/widgets/shoplistbox.h \
+ gui/widgets/shortcutcontainer.cpp \
+ gui/widgets/shortcutcontainer.h \
+ gui/widgets/skilldata.cpp \
+ gui/widgets/skilldata.h \
+ gui/widgets/skillinfo.cpp \
+ gui/widgets/skillinfo.h \
+ gui/widgets/skilllistbox.h \
+ gui/widgets/tabs/shortcuttab.h \
+ gui/widgets/tabs/skilltab.h \
+ gui/widgets/tabs/socialattacktab.h \
+ gui/widgets/tabs/socialfriendsfunctor.h \
+ gui/widgets/tabs/socialfriendstab.h \
+ gui/widgets/tabs/socialguildtab.h \
+ gui/widgets/tabs/socialguildtab2.h \
+ gui/widgets/tabs/socialnavigationtab.h \
+ gui/widgets/tabs/socialpartytab.h \
+ gui/widgets/tabs/socialpickuptab.h \
+ gui/widgets/tabs/socialplayerstab.h \
+ gui/widgets/tabs/socialtab.h \
+ gui/widgets/tabs/socialtabbase.h \
+ gui/models/skillmodel.cpp \
+ gui/models/skillmodel.h \
+ gui/models/sortlistmodelbuy.h \
+ gui/models/sortlistmodelinv.h \
+ gui/models/touchactionmodel.cpp \
+ gui/models/touchactionmodel.h \
+ gui/models/updatetypemodel.h \
+ gui/models/updatelistmodel.h \
+ gui/models/worldlistmodel.h \
+ gui/windowmenu.cpp \
+ gui/windowmenu.h \
+ gui/windows/tradewindow.cpp \
+ gui/windows/tradewindow.h \
+ gui/windows/unregisterdialog.cpp \
+ gui/windows/unregisterdialog.h \
+ gui/windows/updaterwindow.cpp \
+ gui/windows/updaterwindow.h \
+ gui/windows/whoisonline.cpp \
+ gui/windows/whoisonline.h \
+ gui/windows/worldselectdialog.cpp \
+ gui/windows/worldselectdialog.h \
+ gui/windows/shopwindow.cpp \
+ gui/windows/shopwindow.h \
+ gui/windows/shortcutwindow.cpp \
+ gui/windows/shortcutwindow.h \
+ gui/windows/skilldialog.cpp \
+ gui/windows/skilldialog.h \
+ gui/windows/socialwindow.cpp \
+ gui/windows/socialwindow.h \
+ gui/windows/statuswindow.cpp \
+ gui/windows/statuswindow.h \
+ gui/windows/textdialog.cpp \
+ gui/windows/textdialog.h \
+ gui/windows/setupwindow.cpp \
+ gui/windows/setupwindow.h \
+ gui/windows/serverdialog.cpp \
+ gui/windows/serverdialog.h \
+ gui/windows/quitdialog.cpp \
+ gui/windows/quitdialog.h \
+ gui/windows/questswindow.cpp \
+ gui/windows/questswindow.h \
+ gui/windows/registerdialog.cpp \
+ gui/windows/registerdialog.h \
+ gui/windows/buydialog.cpp \
+ gui/windows/buydialog.h \
+ gui/windows/buyselldialog.cpp \
+ gui/windows/buyselldialog.h \
+ gui/windows/changeemaildialog.cpp \
+ gui/windows/changeemaildialog.h \
+ gui/windows/changepassworddialog.cpp \
+ gui/windows/changepassworddialog.h \
+ gui/windows/charselectdialog.cpp \
+ gui/windows/charselectdialog.h \
+ gui/windows/charcreatedialog.cpp \
+ gui/windows/charcreatedialog.h \
+ gui/windows/chardeleteconfirm.h \
+ gui/windows/chatwindow.cpp \
+ gui/windows/chatwindow.h \
+ gui/windows/connectiondialog.cpp \
+ gui/windows/connectiondialog.h \
+ gui/windows/debugwindow.cpp \
+ gui/windows/debugwindow.h \
+ gui/windows/didyouknowwindow.cpp \
+ gui/windows/didyouknowwindow.h \
+ gui/windows/editserverdialog.cpp \
+ gui/windows/editserverdialog.h \
+ gui/windows/emotewindow.cpp \
+ gui/windows/emotewindow.h \
+ gui/windows/equipmentwindow.cpp \
+ gui/windows/equipmentwindow.h \
+ gui/windows/helpwindow.cpp \
+ gui/windows/helpwindow.h \
+ gui/windows/inventorywindow.cpp \
+ gui/windows/inventorywindow.h \
+ gui/windows/itemamountwindow.cpp \
+ gui/windows/itemamountwindow.h \
+ gui/windows/killstats.cpp \
+ gui/windows/killstats.h \
+ gui/windows/logindialog.cpp \
+ gui/windows/logindialog.h \
+ gui/windows/minimap.cpp \
+ gui/windows/minimap.h \
+ gui/windows/ministatuswindow.cpp \
+ gui/windows/ministatuswindow.h \
+ gui/windows/npcdialog.cpp \
+ gui/windows/npcdialog.h \
+ gui/windows/npcselldialog.cpp \
+ gui/windows/npcselldialog.h \
+ gui/windows/outfitwindow.cpp \
+ gui/windows/outfitwindow.h \
+ gui/windows/textcommandeditor.cpp \
+ gui/windows/textcommandeditor.h \
+ gui/setupinputpages.cpp \
+ gui/setupinputpages.h \
+ input/pages/basic.cpp \
+ input/pages/basic.h \
+ input/pages/chat.cpp \
+ input/pages/chat.h \
+ input/pages/emotes.cpp \
+ input/pages/emotes.h \
+ input/pages/gui.cpp \
+ input/pages/gui.h \
+ input/pages/move.cpp \
+ input/pages/move.h \
+ input/pages/other.cpp \
+ input/pages/other.h \
+ input/pages/outfits.cpp \
+ input/pages/outfits.h \
+ input/pages/shortcuts.cpp \
+ input/pages/shortcuts.h \
+ input/pages/windows.cpp \
+ input/pages/windows.h \
+ listeners/playerpostdeathlistener.h \
+ listeners/inputactionreplaylistener.cpp \
+ listeners/inputactionreplaylistener.h \
+ listeners/inventorylistener.h \
+ listeners/updatestatuslistener.cpp \
+ listeners/updatestatuslistener.h \
+ listeners/uploadlistener.cpp \
+ listeners/uploadlistener.h \
+ listeners/playerlistener.cpp \
+ listeners/playerlistener.h \
+ listeners/playerrelationslistener.h \
+ listeners/renamelistener.cpp \
+ listeners/renamelistener.h \
+ listeners/requesttradelistener.h \
+ particle/rotationalparticle.cpp \
+ particle/rotationalparticle.h \
+ navigationmanager.cpp \
+ navigationmanager.h \
+ notifymanager.cpp \
+ notifymanager.h \
+ particle/imageparticle.cpp \
+ particle/imageparticle.h \
+ particle/particle.cpp \
+ particle/particle.h \
+ particle/particlecontainer.cpp \
+ particle/particlecontainer.h \
+ particle/particleemitter.cpp \
+ particle/particleemitter.h \
+ particle/particleemitterprop.h \
+ particle/particleinfo.h \
+ particle/particlelist.cpp \
+ particle/particlelist.h \
+ particle/particlevector.cpp \
+ particle/particlevector.h \
+ party.cpp \
+ party.h \
+ utils/chatutils.cpp \
+ utils/chatutils.h \
+ resources/db/avatardb.cpp \
+ resources/db/avatardb.h \
+ resources/db/badgesdb.cpp \
+ resources/db/badgesdb.h \
+ resources/db/chardb.cpp \
+ resources/db/chardb.h \
+ resources/db/colordb.cpp \
+ resources/db/colordb.h \
+ resources/db/commandsdb.cpp \
+ resources/db/commandsdb.h \
+ resources/db/deaddb.cpp \
+ resources/db/deaddb.h \
+ resources/db/emotedb.cpp \
+ resources/db/emotedb.h \
+ resources/db/homunculusdb.cpp \
+ resources/db/homunculusdb.h \
+ resources/db/horsedb.cpp \
+ resources/db/horsedb.h \
+ resources/db/itemdb.cpp \
+ resources/db/itemdb.h \
+ resources/db/itemdbstat.h \
+ resources/db/mapdb.cpp \
+ resources/db/mapdb.h \
+ resources/db/mercenarydb.cpp \
+ resources/db/mercenarydb.h \
+ resources/db/moddb.cpp \
+ resources/db/moddb.h \
+ resources/db/monsterdb.cpp \
+ resources/db/monsterdb.h \
+ resources/db/npcdb.cpp \
+ resources/db/npcdb.h \
+ resources/db/palettedb.cpp \
+ resources/db/palettedb.h \
+ resources/db/petdb.cpp \
+ resources/db/petdb.h \
+ resources/db/sounddb.cpp \
+ resources/db/sounddb.h \
+ resources/db/weaponsdb.cpp \
+ resources/db/weaponsdb.h \
+ resources/iteminfo.h \
+ resources/iteminfo.cpp \
+ resources/itemslot.h \
+ enums/resources/itemsoundevent.h \
+ resources/itemtype.h \
+ resources/itemtypemap.h \
+ resources/itemtypemapdata.h \
+ resources/mapinfo.h \
+ enums/resources/map/mapitemtype.h \
+ resources/mapreader.cpp \
+ resources/mapreader.h \
+ resources/modinfo.cpp \
+ resources/modinfo.h \
+ resources/beingcommon.cpp \
+ resources/beingcommon.h \
+ resources/beinginfo.cpp \
+ resources/beinginfo.h \
+ resources/beingmenuitem.h \
+ resources/chatobject.cpp \
+ resources/chatobject.h \
+ resources/delayedmanager.cpp \
+ resources/delayedmanager.h \
+ resources/horseinfo.h \
+ enums/resources/map/blockmask.h \
+ enums/resources/map/blocktype.h \
+ resources/map/location.h \
+ resources/map/map.cpp \
+ resources/map/map.h \
+ resources/map/mapconsts.h \
+ resources/map/mapheights.cpp \
+ resources/map/mapheights.h \
+ resources/map/mapitem.cpp \
+ resources/map/mapitem.h \
+ resources/map/maplayer.cpp \
+ resources/map/maplayer.h \
+ resources/map/mapobject.h \
+ resources/map/mapobjectlist.h \
+ resources/map/maprowvertexes.h \
+ enums/resources/map/maptype.h \
+ resources/map/metatile.h \
+ resources/map/objectslayer.cpp \
+ resources/map/objectslayer.h \
+ particle/textparticle.cpp \
+ particle/textparticle.h \
+ resources/map/properties.h \
+ resources/map/speciallayer.cpp \
+ resources/map/speciallayer.h \
+ resources/map/tileanimation.cpp \
+ resources/map/tileanimation.h \
+ resources/map/tileset.h \
+ resources/map/walklayer.cpp \
+ resources/map/walklayer.h \
+ net/adminhandler.h \
+ net/beinghandler.h \
+ net/buysellhandler.h \
+ net/character.h \
+ net/charserverhandler.cpp \
+ net/charserverhandler.h \
+ net/chathandler.h \
+ net/download.cpp \
+ net/download.h \
+ net/gamehandler.h \
+ net/generalhandler.h \
+ net/guildhandler.h \
+ net/inventoryhandler.h \
+ net/ea/inventoryitem.h \
+ net/logindata.h \
+ net/loginhandler.h \
+ net/messagehandler.h \
+ net/messagein.cpp \
+ net/messagein.h \
+ net/messageout.cpp \
+ net/messageout.h \
+ net/net.cpp \
+ net/net.h \
+ net/netconsts.h \
+ net/npchandler.h \
+ net/partyhandler.h \
+ net/pethandler.h \
+ net/playerhandler.h \
+ net/questhandler.h \
+ net/registrationoptions.h \
+ net/serverfeatures.h \
+ net/serverinfo.h \
+ net/skillhandler.h \
+ net/tradehandler.h \
+ net/updatetypeoperators.cpp \
+ net/updatetypeoperators.h \
+ net/uploadcharinfo.h \
+ net/worldinfo.h \
+ net/packetcounters.cpp \
+ net/packetcounters.h \
+ net/packetdefine.h \
+ net/packetlimiter.cpp \
+ net/packetlimiter.h \
net/ea/adminhandler.cpp \
net/ea/adminhandler.h \
net/ea/beinghandler.cpp \
@@ -1600,6 +1436,29 @@ manaplus_SOURCES += \
mumblemanager.cpp \
mumblemanager.h
+dyecmd_SOURCES += dyetool/gui/viewport.cpp \
+ dyetool/gui/viewport.h \
+ dyetool/client.cpp \
+ dyetool/client.h \
+ dyetool/actions/actions.cpp \
+ dyetool/actions/actions.h \
+ dyetool/actions/chat.cpp \
+ dyetool/actions/chat.h \
+ dyetool/actions/commands.cpp \
+ dyetool/actions/commands.h \
+ dyetool/actions/move.cpp \
+ dyetool/actions/move.h \
+ dyetool/actions/pets.cpp \
+ dyetool/actions/pets.h \
+ dyetool/actions/statusbar.cpp \
+ dyetool/actions/statusbar.h \
+ dyetool/actions/tabs.cpp \
+ dyetool/actions/tabs.h \
+ dyetool/actions/target.cpp \
+ dyetool/actions/target.h \
+ dyetool/actions/windows.cpp \
+ dyetool/actions/windows.h
+
if ENABLE_UNITTESTS
TESTS = manaplustests
check_PROGRAMS = manaplustests
diff --git a/src/actions/actiondef.h b/src/actions/actiondef.h
index 6957f0f00..ec10520a0 100644
--- a/src/actions/actiondef.h
+++ b/src/actions/actiondef.h
@@ -28,6 +28,10 @@
#define impHandler(name) bool name(InputEvent &event)
#define impHandler0(name) bool name(InputEvent &event A_UNUSED)
+#define impHandlerVoid(name) bool name(InputEvent &event A_UNUSED) \
+ { \
+ return false; \
+ }
#define callYellowBar(name) \
GameModifiers::name(!inputManager.isActionActive( \
diff --git a/src/client.h b/src/client.h
index 089ac06a3..95607ba08 100644
--- a/src/client.h
+++ b/src/client.h
@@ -23,6 +23,11 @@
#ifndef CLIENT_H
#define CLIENT_H
+#ifdef DYECMD
+#include "dyetool/client.h"
+
+#else
+
#include "enums/state.h"
#include "listeners/actionlistener.h"
@@ -151,4 +156,5 @@ extern Client *client;
extern unsigned int mLastHost;
extern unsigned long mSearchHash;
+#endif // DYECMD
#endif // CLIENT_H
diff --git a/src/dyetool/actions/actions.cpp b/src/dyetool/actions/actions.cpp
new file mode 100644
index 000000000..046cd9c97
--- /dev/null
+++ b/src/dyetool/actions/actions.cpp
@@ -0,0 +1,109 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2012-2015 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * 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
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "actions/actions.h"
+
+#include "actions/actiondef.h"
+
+#include "debug.h"
+
+namespace Actions
+{
+
+impHandlerVoid(emote)
+impHandlerVoid(outfit)
+impHandlerVoid(mouseClick)
+impHandlerVoid(ok)
+impHandlerVoid(shortcut)
+impHandlerVoid(quit)
+impHandlerVoid(dropItem0)
+impHandlerVoid(dropItem)
+impHandlerVoid(dropItemId)
+impHandlerVoid(dropItemInv)
+impHandlerVoid(dropItemIdAll)
+impHandlerVoid(dropItemInvAll)
+impHandlerVoid(heal)
+impHandlerVoid(healmd)
+impHandlerVoid(itenplz)
+impHandlerVoid(setHome)
+impHandlerVoid(magicAttack)
+impHandlerVoid(copyEquippedToOutfit)
+impHandlerVoid(pickup)
+impHandlerVoid(sit)
+impHandlerVoid(screenshot)
+impHandlerVoid(ignoreInput)
+impHandlerVoid(buy)
+impHandlerVoid(sell)
+impHandlerVoid(talk)
+impHandlerVoid(stopAttack)
+impHandlerVoid(untarget)
+impHandlerVoid(attack)
+impHandlerVoid(targetAttack)
+impHandlerVoid(attackHuman)
+impHandlerVoid(safeVideoMode)
+impHandlerVoid(stopSit)
+impHandlerVoid(showKeyboard)
+impHandlerVoid(showWindows)
+impHandlerVoid(openTrade)
+impHandlerVoid(ipcToggle)
+impHandlerVoid(where)
+impHandlerVoid(who)
+impHandlerVoid(cleanGraphics)
+impHandlerVoid(cleanFonts)
+impHandlerVoid(trade)
+impHandlerVoid(priceLoad)
+impHandlerVoid(priceSave)
+impHandlerVoid(cacheInfo)
+impHandlerVoid(disconnect)
+impHandlerVoid(undress)
+impHandlerVoid(dirs)
+impHandlerVoid(uptime)
+impHandlerVoid(dump)
+impHandlerVoid(serverIgnoreAll)
+impHandlerVoid(serverUnIgnoreAll)
+impHandler0(error)
+{
+ exit(0);
+}
+impHandlerVoid(dumpGraphics)
+impHandlerVoid(dumpEnvironment)
+impHandlerVoid(dumpTests)
+impHandlerVoid(dumpOGL)
+impHandlerVoid(dumpGL)
+impHandlerVoid(dumpMods)
+#if defined USE_OPENGL && defined DEBUG_SDLFONT
+impHandlerVoid(testSdlFont)
+#endif
+impHandlerVoid(createItems)
+impHandlerVoid(uploadConfig)
+impHandlerVoid(uploadServerConfig)
+impHandlerVoid(uploadLog)
+impHandlerVoid(mercenaryFire)
+impHandlerVoid(useItem)
+impHandlerVoid(useItemInv)
+impHandlerVoid(invToStorage)
+impHandlerVoid(tradeAdd)
+impHandlerVoid(storageToInv)
+impHandlerVoid(protectItem)
+impHandlerVoid(unprotectItem)
+impHandlerVoid(kick)
+impHandlerVoid(clearDrop)
+
+} // namespace Actions
diff --git a/src/dyetool/actions/chat.cpp b/src/dyetool/actions/chat.cpp
new file mode 100644
index 000000000..70bc09034
--- /dev/null
+++ b/src/dyetool/actions/chat.cpp
@@ -0,0 +1,63 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2012-2015 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * 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
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "actions/chat.h"
+
+#include "actions/actiondef.h"
+
+#include "debug.h"
+
+namespace Actions
+{
+
+impHandlerVoid(toggleChat)
+impHandlerVoid(prevChatTab)
+impHandlerVoid(nextChatTab)
+impHandlerVoid(closeChatTab)
+impHandlerVoid(closeAllChatTabs)
+impHandlerVoid(ignoreAllWhispers)
+impHandlerVoid(scrollChatUp)
+impHandlerVoid(scrollChatDown)
+impHandlerVoid(msg)
+impHandlerVoid(msgText)
+impHandlerVoid(msg2)
+impHandlerVoid(query)
+impHandlerVoid(clearChatTab)
+impHandlerVoid(createParty)
+impHandlerVoid(createGuild)
+impHandlerVoid(party)
+impHandlerVoid(guild)
+impHandlerVoid(me)
+impHandlerVoid(toggle)
+impHandlerVoid(kickParty)
+impHandlerVoid(kickGuild)
+impHandlerVoid(addText)
+impHandlerVoid(clearChat)
+impHandlerVoid(chatGeneralTab)
+impHandlerVoid(chatDebugTab)
+impHandlerVoid(chatBattleTab)
+impHandlerVoid(chatTradeTab)
+impHandlerVoid(chatLangTab)
+impHandlerVoid(chatGmTab)
+impHandlerVoid(chatPartyTab)
+impHandlerVoid(chatGuildTab)
+impHandlerVoid(hat)
+
+} // namespace Actions
diff --git a/src/dyetool/actions/commands.cpp b/src/dyetool/actions/commands.cpp
new file mode 100644
index 000000000..1820e3038
--- /dev/null
+++ b/src/dyetool/actions/commands.cpp
@@ -0,0 +1,93 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2012-2015 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * 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
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "actions/commands.h"
+
+#include "actions/actiondef.h"
+
+#include "debug.h"
+
+namespace Actions
+{
+
+impHandlerVoid(chatAnnounce)
+impHandlerVoid(chatIgnore)
+impHandlerVoid(chatUnignore)
+impHandlerVoid(chatErase)
+impHandlerVoid(chatFriend)
+impHandlerVoid(chatDisregard)
+impHandlerVoid(chatNeutral)
+impHandlerVoid(chatBlackList)
+impHandlerVoid(chatEnemy)
+impHandlerVoid(chatNuke)
+impHandlerVoid(chatAdd)
+impHandlerVoid(present)
+impHandlerVoid(printAll)
+impHandlerVoid(move)
+impHandlerVoid(setTarget)
+impHandlerVoid(commandOutfit)
+impHandlerVoid(commandEmote)
+impHandlerVoid(awayMessage)
+impHandlerVoid(pseudoAway)
+impHandlerVoid(follow)
+impHandlerVoid(navigate)
+impHandlerVoid(navigateTo)
+impHandlerVoid(moveCamera)
+impHandlerVoid(imitation)
+impHandlerVoid(sendMail)
+impHandlerVoid(info)
+impHandlerVoid(wait)
+impHandlerVoid(addPriorityAttack)
+impHandlerVoid(addAttack)
+impHandlerVoid(removeAttack)
+impHandlerVoid(addIgnoreAttack)
+impHandlerVoid(setDrop)
+impHandlerVoid(url)
+impHandlerVoid(openUrl)
+impHandlerVoid(execute)
+impHandlerVoid(enableHighlight)
+impHandlerVoid(disableHighlight)
+impHandlerVoid(dontRemoveName)
+impHandlerVoid(removeName)
+impHandlerVoid(disableAway)
+impHandlerVoid(enableAway)
+impHandlerVoid(testParticle)
+impHandlerVoid(talkRaw)
+impHandlerVoid(gm)
+impHandlerVoid(hack)
+impHandlerVoid(debugSpawn)
+impHandlerVoid(serverIgnoreWhisper)
+impHandlerVoid(serverUnIgnoreWhisper)
+impHandlerVoid(setHomunculusName)
+impHandlerVoid(fireHomunculus)
+impHandlerVoid(leaveParty)
+impHandlerVoid(warp)
+impHandlerVoid(homunTalk)
+impHandlerVoid(homunEmote)
+impHandlerVoid(commandHomunEmote)
+impHandlerVoid(createPublicChatRoom)
+impHandlerVoid(joinChatRoom)
+impHandlerVoid(leaveChatRoom)
+impHandlerVoid(confSet)
+impHandlerVoid(serverConfSet)
+impHandlerVoid(confGet)
+impHandlerVoid(serverConfGet)
+
+} // namespace Actions
diff --git a/src/dyetool/actions/move.cpp b/src/dyetool/actions/move.cpp
new file mode 100644
index 000000000..2e1a759fa
--- /dev/null
+++ b/src/dyetool/actions/move.cpp
@@ -0,0 +1,44 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2012-2015 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * 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
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "actions/move.h"
+
+#include "actions/actiondef.h"
+
+#include "debug.h"
+
+namespace Actions
+{
+
+impHandlerVoid(moveUp)
+impHandlerVoid(moveDown)
+impHandlerVoid(moveLeft)
+impHandlerVoid(moveRight)
+impHandlerVoid(moveForward)
+impHandlerVoid(moveToPoint)
+impHandlerVoid(crazyMoves)
+impHandlerVoid(moveToTarget)
+impHandlerVoid(moveToHome)
+impHandlerVoid(directUp)
+impHandlerVoid(directDown)
+impHandlerVoid(directLeft)
+impHandlerVoid(directRight)
+
+} // namespace Actions
diff --git a/src/dyetool/actions/pets.cpp b/src/dyetool/actions/pets.cpp
new file mode 100644
index 000000000..89b6da30c
--- /dev/null
+++ b/src/dyetool/actions/pets.cpp
@@ -0,0 +1,47 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2012-2015 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * 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
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "actions/pets.h"
+
+#include "actions/actiondef.h"
+
+#include "debug.h"
+
+namespace Actions
+{
+
+impHandlerVoid(commandEmotePet)
+impHandlerVoid(talkPet)
+impHandlerVoid(setPetName)
+impHandlerVoid(petEmote)
+impHandlerVoid(catchPet)
+impHandlerVoid(petMoveUp)
+impHandlerVoid(petMoveDown)
+impHandlerVoid(petMoveLeft)
+impHandlerVoid(petMoveRight)
+impHandlerVoid(petDirectUp)
+impHandlerVoid(petDirectDown)
+impHandlerVoid(petDirectLeft)
+impHandlerVoid(petDirectRight)
+impHandlerVoid(petAiStart)
+impHandlerVoid(petAiStop)
+impHandlerVoid(petMove)
+
+} // namespace Actions
diff --git a/src/dyetool/actions/statusbar.cpp b/src/dyetool/actions/statusbar.cpp
new file mode 100644
index 000000000..155bf280c
--- /dev/null
+++ b/src/dyetool/actions/statusbar.cpp
@@ -0,0 +1,49 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2012-2015 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * 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
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "actions/statusbar.h"
+
+#include "actions/actiondef.h"
+
+#include "debug.h"
+
+namespace Actions
+{
+
+impHandlerVoid(switchQuickDrop)
+impHandlerVoid(changeCrazyMove)
+impHandlerVoid(changePickupType)
+impHandlerVoid(changeMoveType)
+impHandlerVoid(changeAttackWeaponType)
+impHandlerVoid(changeAttackType)
+impHandlerVoid(changeTargetingType)
+impHandlerVoid(changeFollowMode)
+impHandlerVoid(changeImitationMode)
+impHandlerVoid(changeMagicAttackType)
+impHandlerVoid(changePvpMode)
+impHandlerVoid(changeMoveToTarget)
+impHandlerVoid(changeGameModifier)
+impHandlerVoid(changeAudio)
+impHandlerVoid(away)
+impHandlerVoid(camera)
+impHandlerVoid(changeMapMode)
+impHandlerVoid(changeTrade)
+
+} // namespace Actions
diff --git a/src/dyetool/actions/tabs.cpp b/src/dyetool/actions/tabs.cpp
new file mode 100644
index 000000000..942de1ba9
--- /dev/null
+++ b/src/dyetool/actions/tabs.cpp
@@ -0,0 +1,39 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2012-2015 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * 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
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "actions/tabs.h"
+
+#include "actions/actiondef.h"
+
+#include "debug.h"
+
+namespace Actions
+{
+
+impHandlerVoid(prevSocialTab)
+impHandlerVoid(nextSocialTab)
+impHandlerVoid(nextShortcutsTab)
+impHandlerVoid(prevShortcutsTab)
+impHandlerVoid(nextCommandsTab)
+impHandlerVoid(prevCommandsTab)
+impHandlerVoid(nextInvTab)
+impHandlerVoid(prevInvTab)
+
+} // namespace Actions
diff --git a/src/dyetool/actions/target.cpp b/src/dyetool/actions/target.cpp
new file mode 100644
index 000000000..f3ddd3b2a
--- /dev/null
+++ b/src/dyetool/actions/target.cpp
@@ -0,0 +1,38 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2012-2015 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * 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
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "actions/target.h"
+
+#include "actions/actiondef.h"
+
+#include "debug.h"
+
+namespace Actions
+{
+
+impHandlerVoid(targetPlayer)
+impHandlerVoid(targetMonster)
+impHandlerVoid(targetClosestMonster)
+impHandlerVoid(targetNPC)
+impHandlerVoid(targetMercenary)
+impHandlerVoid(targetPet)
+impHandlerVoid(contextMenu)
+
+} // namespace Actions
diff --git a/src/dyetool/actions/windows.cpp b/src/dyetool/actions/windows.cpp
new file mode 100644
index 000000000..37637a3f1
--- /dev/null
+++ b/src/dyetool/actions/windows.cpp
@@ -0,0 +1,58 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2012-2015 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * 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
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "actions/windows.h"
+
+#include "actions/actiondef.h"
+
+#include "debug.h"
+
+namespace Actions
+{
+
+impHandlerVoid(setupWindowShow)
+impHandlerVoid(hideWindows)
+impHandlerVoid(helpWindowShow)
+impHandlerVoid(aboutWindowShow)
+impHandlerVoid(statusWindowShow)
+impHandlerVoid(inventoryWindowShow)
+impHandlerVoid(equipmentWindowShow)
+impHandlerVoid(skillDialogShow)
+impHandlerVoid(minimapWindowShow)
+impHandlerVoid(chatWindowShow)
+impHandlerVoid(shortcutWindowShow)
+impHandlerVoid(debugWindowShow)
+impHandlerVoid(socialWindowShow)
+impHandlerVoid(emoteShortcutWindowShow)
+impHandlerVoid(outfitWindowShow)
+impHandlerVoid(shopWindowShow)
+impHandlerVoid(dropShortcutWindowShow)
+impHandlerVoid(killStatsWindowShow)
+impHandlerVoid(spellShortcutWindowShow)
+impHandlerVoid(whoIsOnlineWindowShow)
+impHandlerVoid(didYouKnowWindowShow)
+impHandlerVoid(questsWindowShow)
+impHandlerVoid(bankWindowShow)
+impHandlerVoid(cartWindowShow)
+impHandlerVoid(updaterWindowShow)
+impHandlerVoid(quickWindowShow)
+impHandlerVoid(mailWindowShow)
+
+} // namespace Actions
diff --git a/src/dyetool/client.cpp b/src/dyetool/client.cpp
new file mode 100644
index 000000000..85cf216e2
--- /dev/null
+++ b/src/dyetool/client.cpp
@@ -0,0 +1,748 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2004-2009 The Mana World Development Team
+ * Copyright (C) 2009-2010 The Mana Developers
+ * Copyright (C) 2011-2015 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * 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
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "client.h"
+
+#include "chatlogger.h"
+#include "configmanager.h"
+#include "dirs.h"
+#include "dropshortcut.h"
+#include "emoteshortcut.h"
+#include "eventsmanager.h"
+#include "game.h"
+#include "graphicsmanager.h"
+#include "itemshortcut.h"
+#include "party.h"
+#include "settings.h"
+#include "soundmanager.h"
+#include "spellshortcut.h"
+#include "statuseffect.h"
+#include "units.h"
+#include "touchmanager.h"
+
+#include "being/playerinfo.h"
+#include "being/playerrelations.h"
+
+#include "input/inputmanager.h"
+#include "input/joystick.h"
+#include "input/keyboardconfig.h"
+
+#include "gui/dialogsmanager.h"
+#include "gui/gui.h"
+#include "gui/skin.h"
+#include "gui/popupmanager.h"
+#include "gui/windowmanager.h"
+
+#include "gui/widgets/button.h"
+#include "gui/widgets/createwidget.h"
+#include "gui/widgets/desktop.h"
+#include "gui/widgets/windowcontainer.h"
+#include "gui/widgets/window.h"
+
+#include "resources/imagehelper.h"
+#include "resources/resourcemanager.h"
+
+#include "utils/cpu.h"
+#include "utils/delete2.h"
+#include "utils/env.h"
+#include "utils/fuzzer.h"
+#include "utils/gettext.h"
+#include "utils/gettexthelper.h"
+#ifdef ANDROID
+#include "utils/paths.h"
+#endif
+#include "utils/physfstools.h"
+#include "utils/sdlcheckutils.h"
+#include "utils/timer.h"
+
+#include "utils/translation/translationmanager.h"
+
+#include "listeners/errorlistener.h"
+
+#include "configuration.h"
+
+#include "net/ipc.h"
+
+#ifdef WIN32
+#include <SDL_syswm.h>
+#include "utils/specialfolder.h"
+#undef ERROR
+#endif
+
+#ifdef ANDROID
+#ifndef USE_SDL2
+#include <SDL_screenkeyboard.h>
+#include <fstream>
+#endif
+#endif
+
+#include <sys/stat.h>
+
+#include "debug.h"
+
+std::string errorMessage;
+
+Client *client = nullptr;
+
+extern FPSmanager fpsManager;
+
+volatile bool runCounters;
+bool isSafeMode = false;
+int serverVersion = 0;
+unsigned int tmwServerVersion = 0;
+int start_time;
+unsigned int mLastHost = 0;
+unsigned long mSearchHash = 0;
+int textures_count = 0;
+
+Client::Client() :
+ ActionListener(),
+ mCurrentDialog(nullptr),
+ mSetupButton(nullptr),
+ mVideoButton(nullptr),
+ mHelpButton(nullptr),
+ mAboutButton(nullptr),
+ mThemesButton(nullptr),
+ mPerfomanceButton(nullptr),
+#ifdef ANDROID
+ mCloseButton(nullptr),
+#endif
+ mState(STATE_GAME),
+ mOldState(STATE_START),
+ mSkin(nullptr),
+ mButtonPadding(1),
+ mButtonSpacing(3),
+ mPing(0),
+ mConfigAutoSaved(false)
+{
+ WindowManager::init();
+}
+
+void Client::testsInit()
+{
+}
+
+void Client::testsClear()
+{
+}
+
+// +++ need remove duplicate from here
+void Client::gameInit()
+{
+ logger = new Logger;
+
+ // Load branding information
+ if (!settings.options.brandingPath.empty())
+ branding.init(settings.options.brandingPath);
+ branding.setDefaultValues(getBrandingDefaults());
+
+ Dirs::initRootDir();
+ Dirs::initHomeDir();
+
+ // Configure logger
+ if (!settings.options.logFileName.empty())
+ settings.logFileName = settings.options.logFileName;
+ else
+ settings.logFileName = settings.localDataDir + "/manaplus.log";
+ logger->setLogFile(settings.logFileName);
+
+#ifdef USE_FUZZER
+ Fuzzer::init();
+#endif
+ ConfigManager::backupConfig("config.xml");
+ ConfigManager::initConfiguration();
+ paths.setDefaultValues(getPathsDefaults());
+ logger->log("init 4");
+ logger->setDebugLog(config.getBoolValue("debugLog"));
+ logger->setReportUnimplimented(config.getBoolValue("unimplimentedLog"));
+
+ config.incValue("runcount");
+
+#ifndef ANDROID
+ if (settings.options.test.empty())
+ ConfigManager::storeSafeParameters();
+#endif
+
+ const ResourceManager *const resman = ResourceManager::getInstance();
+ if (!resman->setWriteDir(settings.localDataDir))
+ {
+ logger->error(strprintf("%s couldn't be set as home directory! "
+ "Exiting.", settings.localDataDir.c_str()));
+ }
+
+ GettextHelper::initLang();
+
+// chatLogger = new ChatLogger;
+// if (settings.options.chatLogDir.empty())
+// {
+// chatLogger->setBaseLogDir(settings.localDataDir
+// + std::string("/logs/"));
+// }
+// else
+// {
+// chatLogger->setBaseLogDir(settings.options.chatLogDir);
+// }
+
+ logger->setLogToStandardOut(config.getBoolValue("logToStandardOut"));
+
+ // Log the client version
+ logger->log1(FULL_VERSION);
+ logger->log("Start configPath: " + config.getConfigPath());
+
+ Dirs::initScreenshotDir();
+
+ // Initialize SDL
+ logger->log1("Initializing SDL...");
+ if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER) < 0)
+ {
+ logger->safeError(strprintf("Could not initialize SDL: %s",
+ SDL_GetError()));
+ }
+ atexit(SDL_Quit);
+
+#ifndef USE_SDL2
+ SDL_EnableUNICODE(1);
+#endif
+ WindowManager::applyKeyRepeat();
+
+ // disable unused SDL events
+#ifndef USE_SDL2
+ SDL_EventState(SDL_VIDEOEXPOSE, SDL_IGNORE);
+#endif
+ SDL_EventState(SDL_SYSWMEVENT, SDL_IGNORE);
+ SDL_EventState(SDL_USEREVENT, SDL_IGNORE);
+
+#ifdef WIN32
+ Dirs::extractDataDir();
+ Dirs::mountDataDir();
+#endif
+
+ WindowManager::setIcon();
+ ConfigManager::checkConfigVersion();
+ logVars();
+ Cpu::detect();
+#if defined(USE_OPENGL)
+#if !defined(ANDROID) && !defined(__APPLE__) && !defined(__native_client__)
+ if (!settings.options.safeMode && settings.options.test.empty()
+ && !config.getBoolValue("videodetected"))
+ {
+ graphicsManager.detectVideoSettings();
+ }
+#endif
+#endif
+ updateEnv();
+ initGraphics();
+
+#ifndef WIN32
+ Dirs::extractDataDir();
+ Dirs::mountDataDir();
+#endif
+
+ Dirs::updateDataPath();
+
+ // Add the main data directories to our PhysicsFS search path
+ if (!settings.options.dataPath.empty())
+ resman->addToSearchPath(settings.options.dataPath, false);
+
+ // Add the local data directory to PhysicsFS search path
+ resman->addToSearchPath(settings.localDataDir, false);
+ TranslationManager::loadCurrentLang();
+
+ WindowManager::initTitle();
+
+ mainGraphics->postInit();
+
+ theme = new Theme;
+ Theme::selectSkin();
+ touchManager.init();
+
+ // Initialize the item and emote shortcuts.
+// for (unsigned f = 0; f < SHORTCUT_TABS; f ++)
+// itemShortcut[f] = new ItemShortcut(f);
+// emoteShortcut = new EmoteShortcut;
+// dropShortcut = new DropShortcut;
+
+ gui = new Gui();
+ gui->postInit(mainGraphics);
+ dialogsManager = new DialogsManager;
+ popupManager = new PopupManager;
+
+ initSoundManager();
+ eventsManager.init();
+
+ // Initialize keyboard
+ keyboard.init();
+ inputManager.init();
+
+ // Initialise player relations
+ Joystick::init();
+ WindowManager::createWindows();
+
+ keyboard.update();
+ if (joystick)
+ joystick->update();
+
+// if (mState != STATE_ERROR)
+// mState = STATE_CHOOSE_SERVER;
+
+ startTimers();
+
+ const int fpsLimit = config.getIntValue("fpslimit");
+ settings.limitFps = fpsLimit > 0;
+
+ SDL_initFramerate(&fpsManager);
+ WindowManager::setFramerate(fpsLimit);
+
+ start_time = static_cast<int>(time(nullptr));
+
+// PlayerInfo::init();
+
+#ifdef ANDROID
+#ifndef USE_SDL2
+ WindowManager::updateScreenKeyboard(SDL_GetScreenKeyboardHeight(nullptr));
+#endif
+#endif
+
+ mSkin = theme->load("windowmenu.xml", "");
+ if (mSkin)
+ {
+ mButtonPadding = mSkin->getPadding();
+ mButtonSpacing = mSkin->getOption("spacing", 3);
+ }
+}
+
+Client::~Client()
+{
+ if (!settings.options.testMode)
+ gameClear();
+ else
+ testsClear();
+}
+
+void Client::initSoundManager()
+{
+ // Initialize sound engine
+ try
+ {
+ if (config.getBoolValue("sound"))
+ soundManager.init();
+
+ soundManager.setSfxVolume(config.getIntValue("sfxVolume"));
+ soundManager.setMusicVolume(config.getIntValue("musicVolume"));
+ }
+ catch (const char *const err)
+ {
+ mState = STATE_ERROR;
+ errorMessage = err;
+ logger->log("Warning: %s", err);
+ }
+ soundManager.playMusic(branding.getValue(
+ "loginMusic", "Magick - Real.ogg"));
+}
+
+void Client::initGraphics()
+{
+ WindowManager::applyVSync();
+ runCounters = config.getBoolValue("packetcounters");
+
+ graphicsManager.initGraphics();
+
+ imageHelper->postInit();
+ getConfigDefaults2(config.getDefaultValues());
+ WindowManager::applyGrabMode();
+ WindowManager::applyGamma();
+
+ mainGraphics->beginDraw();
+}
+
+void Client::gameClear()
+{
+ if (logger)
+ logger->log1("Quitting1");
+
+ eventsManager.shutdown();
+ WindowManager::deleteWindows();
+ if (windowContainer)
+ windowContainer->slowLogic();
+
+ stopTimers();
+
+ delete2(ipc);
+
+ if (logger)
+ logger->log1("Quitting2");
+
+ delete2(mCurrentDialog);
+ delete2(popupManager);
+ delete2(dialogsManager);
+ delete2(gui);
+
+ if (logger)
+ logger->log1("Quitting3");
+
+ graphicsManager.deleteRenderers();
+
+ if (logger)
+ logger->log1("Quitting4");
+
+ XML::cleanupXML();
+
+ if (logger)
+ logger->log1("Quitting5");
+
+ // Shutdown sound
+ soundManager.close();
+
+ if (logger)
+ logger->log1("Quitting6");
+
+ touchManager.clear();
+ ResourceManager::deleteInstance();
+
+ if (logger)
+ logger->log1("Quitting8");
+
+ WindowManager::deleteIcon();
+
+ if (logger)
+ logger->log1("Quitting9");
+
+ delete2(joystick);
+
+ keyboard.deinit();
+
+ if (logger)
+ logger->log1("Quitting10");
+
+ soundManager.shutdown();
+ touchManager.shutdown();
+
+#ifdef DEBUG_CONFIG
+ config.enableKeyLogging();
+#endif
+ config.removeOldKeys();
+ config.write();
+ serverConfig.write();
+
+ config.clear();
+ serverConfig.clear();
+
+ if (logger)
+ logger->log1("Quitting11");
+
+#ifdef USE_PROFILER
+ Perfomance::clear();
+#endif
+
+#ifdef DEBUG_OPENGL_LEAKS
+ if (logger)
+ logger->log("textures left: %d", textures_count);
+#endif
+
+// delete2(chatLogger);
+ TranslationManager::close();
+}
+
+#define ADDBUTTON(var, object) var = object; \
+ x -= var->getWidth() + mButtonSpacing; \
+ var->setPosition(x, mButtonPadding); \
+ top->add(var);
+
+void Client::stateGame()
+{
+ if (!gui)
+ return;
+
+ BasicContainer2 *const top = static_cast<BasicContainer2*>(
+ gui->getTop());
+
+ if (!top)
+ return;
+
+ CREATEWIDGETV(desktop, Desktop, nullptr);
+ top->add(desktop);
+ int x = top->getWidth() - mButtonPadding;
+ ADDBUTTON(mSetupButton, new Button(desktop,
+ // TRANSLATORS: setup tab quick button
+ _("Setup"), "Setup", this))
+ ADDBUTTON(mPerfomanceButton, new Button(desktop,
+ // TRANSLATORS: perfoamance tab quick button
+ _("Performance"), "Perfomance", this))
+ ADDBUTTON(mVideoButton, new Button(desktop,
+ // TRANSLATORS: video tab quick button
+ _("Video"), "Video", this))
+ ADDBUTTON(mThemesButton, new Button(desktop,
+ // TRANSLATORS: theme tab quick button
+ _("Theme"), "Themes", this))
+ ADDBUTTON(mAboutButton, new Button(desktop,
+ // TRANSLATORS: theme tab quick button
+ _("About"), "about", this))
+ ADDBUTTON(mHelpButton, new Button(desktop,
+ // TRANSLATORS: theme tab quick button
+ _("Help"), "help", this))
+#ifdef ANDROID
+ ADDBUTTON(mCloseButton, new Button(desktop,
+ // TRANSLATORS: close quick button
+ _("Close"), "close", this))
+#endif
+ desktop->setSize(mainGraphics->getWidth(),
+ mainGraphics->getHeight());
+}
+
+int Client::gameExec()
+{
+ int lastTickTime = tick_time;
+
+ while (mState != STATE_EXIT)
+ {
+ PROFILER_START();
+ if (eventsManager.handleEvents())
+ continue;
+
+ BLOCK_START("Client::gameExec 4")
+ if (gui)
+ gui->logic();
+ cur_time = static_cast<int>(time(nullptr));
+ int k = 0;
+ while (lastTickTime != tick_time && k < 40)
+ {
+// if (mGame)
+// mGame->logic();
+// else
+ if (gui)
+ gui->handleInput();
+
+ ++lastTickTime;
+ k ++;
+ }
+ soundManager.logic();
+
+ logic_count += k;
+ if (gui)
+ gui->slowLogic();
+// if (mGame)
+// mGame->slowLogic();
+ slowLogic();
+ BLOCK_END("Client::gameExec 4")
+
+ // This is done because at some point tick_time will wrap.
+ lastTickTime = tick_time;
+
+ // Update the screen when application is visible, delay otherwise.
+ if (!WindowManager::getIsMinimized())
+ {
+ frame_count++;
+ if (gui)
+ gui->draw();
+ mainGraphics->updateScreen();
+ }
+ else
+ {
+ SDL_Delay(100);
+ }
+
+ BLOCK_START("~Client::SDL_framerateDelay")
+ if (settings.limitFps)
+ SDL_framerateDelay(&fpsManager);
+ BLOCK_END("~Client::SDL_framerateDelay")
+
+ BLOCK_START("Client::gameExec 6")
+// if (mState == STATE_CONNECT_GAME)
+// {
+// stateConnectGame1();
+// }
+ BLOCK_END("Client::gameExec 6")
+
+ if (mState != mOldState)
+ {
+ BLOCK_START("Client::gameExec 7")
+
+ mOldState = mState;
+
+ // Get rid of the dialog of the previous state
+ delete2(mCurrentDialog);
+
+ // State has changed, while the quitDialog was active, it might
+ // not be correct anymore
+// if (mQuitDialog)
+// {
+// mQuitDialog->scheduleDelete();
+// mQuitDialog = nullptr;
+// }
+ BLOCK_END("Client::gameExec 7")
+
+ BLOCK_START("Client::gameExec 8")
+ switch (mState)
+ {
+ case STATE_GAME:
+ stateGame();
+ break;
+
+ case STATE_LOAD_DATA:
+ {
+ BLOCK_START("Client::gameExec STATE_LOAD_DATA")
+ logger->log1("State: LOAD DATA");
+
+ const ResourceManager *const resman
+ = ResourceManager::getInstance();
+
+ // If another data path has been set,
+ // we don't load any other files...
+ if (settings.options.dataPath.empty())
+ {
+ // Add customdata directory
+ resman->searchAndAddArchives(
+ "customdata/",
+ "zip",
+ false);
+ }
+
+ if (!settings.options.skipUpdate)
+ {
+ resman->searchAndAddArchives(
+ settings.updatesDir + "/local/",
+ "zip",
+ false);
+
+ resman->addToSearchPath(settings.localDataDir
+ + dirSeparator + settings.updatesDir + "/local/",
+ false);
+ }
+
+ logger->log("Init paths");
+ paths.init("paths.xml", UseResman_true);
+ paths.setDefaultValues(getPathsDefaults());
+ TranslationManager::loadCurrentLang();
+
+ if (desktop)
+ desktop->reloadWallpaper();
+
+ mState = STATE_GET_CHARACTERS;
+ BLOCK_END("Client::gameExec STATE_LOAD_DATA")
+ break;
+ }
+ case STATE_START:
+ default:
+ mState = STATE_FORCE_QUIT;
+ break;
+ }
+ BLOCK_END("Client::gameExec 8")
+ }
+ PROFILER_END();
+ }
+
+ return 0;
+}
+
+void Client::action(const ActionEvent &event)
+{
+ std::string tab;
+ const std::string &eventId = event.getId();
+
+ if (eventId == "close")
+ {
+ setState(STATE_FORCE_QUIT);
+ return;
+ }
+ if (eventId == "Setup")
+ {
+ tab.clear();
+ }
+ else if (eventId == "help")
+ {
+ inputManager.executeAction(InputAction::WINDOW_HELP);
+ return;
+ }
+ else if (eventId == "about")
+ {
+ inputManager.executeAction(InputAction::WINDOW_ABOUT);
+ return;
+ }
+ else if (eventId == "Video")
+ {
+ tab = "Video";
+ }
+ else if (eventId == "Themes")
+ {
+ tab = "Theme";
+ }
+ else if (eventId == "Perfomance")
+ {
+ tab = "Perfomance";
+ }
+ else
+ {
+ return;
+ }
+}
+
+void Client::moveButtons(const int width)
+{
+ if (mSetupButton)
+ {
+ int x = width - mSetupButton->getWidth() - mButtonPadding;
+ mSetupButton->setPosition(x, mButtonPadding);
+#ifndef WIN32
+ x -= mPerfomanceButton->getWidth() + mButtonSpacing;
+ mPerfomanceButton->setPosition(x, mButtonPadding);
+
+ x -= mVideoButton->getWidth() + mButtonSpacing;
+ mVideoButton->setPosition(x, mButtonPadding);
+
+ x -= mThemesButton->getWidth() + mButtonSpacing;
+ mThemesButton->setPosition(x, mButtonPadding);
+
+ x -= mAboutButton->getWidth() + mButtonSpacing;
+ mAboutButton->setPosition(x, mButtonPadding);
+
+ x -= mHelpButton->getWidth() + mButtonSpacing;
+ mHelpButton->setPosition(x, mButtonPadding);
+#ifdef ANDROID
+ x -= mCloseButton->getWidth() + mButtonSpacing;
+ mCloseButton->setPosition(x, mButtonPadding);
+#endif
+#endif
+ }
+}
+
+void Client::windowRemoved(const Window *const window)
+{
+ if (mCurrentDialog == window)
+ mCurrentDialog = nullptr;
+}
+
+void Client::logVars()
+{
+#ifdef ANDROID
+ logger->log("APPDIR: %s", getenv("APPDIR"));
+ logger->log("DATADIR2: %s", getSdStoragePath().c_str());
+#endif
+}
+
+void Client::slowLogic()
+{
+}
+
+int Client::testsExec()
+{
+ return 0;
+}
diff --git a/src/dyetool/client.h b/src/dyetool/client.h
new file mode 100644
index 000000000..b0fb4229f
--- /dev/null
+++ b/src/dyetool/client.h
@@ -0,0 +1,126 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2004-2009 The Mana World Development Team
+ * Copyright (C) 2009-2010 The Mana Developers
+ * Copyright (C) 2011-2015 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * 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
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef DYETOOL_CLIENT_H
+#define DYETOOL_CLIENT_H
+
+#include "enums/state.h"
+
+#include "listeners/actionlistener.h"
+
+#include "net/serverinfo.h"
+
+#ifdef USE_SDL2
+#include <SDL2_framerate.h>
+#else
+#include <SDL_framerate.h>
+#endif
+
+#include "localconsts.h"
+
+class Button;
+class Desktop;
+class Skin;
+class Window;
+
+extern bool isSafeMode;
+extern int serverVersion;
+extern unsigned int tmwServerVersion;
+extern int start_time;
+extern int textures_count;
+
+extern std::string errorMessage;
+
+/**
+ * The core part of the client. This class initializes all subsystems, runs
+ * the event loop, and shuts everything down again.
+ */
+class Client final : public ActionListener
+{
+ public:
+ Client();
+
+ A_DELETE_COPY(Client)
+
+ ~Client();
+
+ void gameInit();
+
+ void testsInit();
+
+ int gameExec();
+
+ static int testsExec();
+
+ void setState(const State state)
+ { mState = state; }
+
+ State getState() const A_WARN_UNUSED
+ { return mState; }
+
+ void action(const ActionEvent &event) override final;
+
+ void moveButtons(const int width);
+
+ void windowRemoved(const Window *const window);
+
+ void slowLogic();
+
+ private:
+ void stateGame();
+
+ void initSoundManager();
+
+ static void initGraphics();
+
+ void gameClear();
+
+ void testsClear();
+
+ static void logVars();
+
+ Window *mCurrentDialog;
+ Button *mSetupButton;
+ Button *mVideoButton;
+ Button *mHelpButton;
+ Button *mAboutButton;
+ Button *mThemesButton;
+ Button *mPerfomanceButton;
+#ifdef ANDROID
+ Button *mCloseButton;
+#endif
+
+ State mState;
+ State mOldState;
+
+ Skin *mSkin;
+ int mButtonPadding;
+ int mButtonSpacing;
+ int mPing;
+ bool mConfigAutoSaved;
+};
+
+extern Client *client;
+extern unsigned int mLastHost;
+extern unsigned long mSearchHash;
+
+#endif // DYETOOL_CLIENT_H
diff --git a/src/dyetool/dyemain.cpp b/src/dyetool/dyemain.cpp
index 9d20e1df6..1d5f55a6d 100644
--- a/src/dyetool/dyemain.cpp
+++ b/src/dyetool/dyemain.cpp
@@ -21,6 +21,7 @@
#include "logger.h"
#include "graphicsmanager.h"
+#include "maingui.h"
#include "sdlshared.h"
#include "resources/image.h"
@@ -41,8 +42,6 @@
#include "debug.h"
-int serverVersion = 0;
-
static void printHelp()
{
std::cout << _("dyecmd srcfile dyestring dstfile") << std::endl;
@@ -52,6 +51,10 @@ static void printHelp()
int main(int argc, char **argv)
{
+ if (argc == 2)
+ {
+ return mainGui(argc, argv);
+ }
if (argc < 3 || argc > 4)
{
printHelp();
diff --git a/src/dyetool/gui/viewport.cpp b/src/dyetool/gui/viewport.cpp
new file mode 100644
index 000000000..26de44a3a
--- /dev/null
+++ b/src/dyetool/gui/viewport.cpp
@@ -0,0 +1,290 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2004-2009 The Mana World Development Team
+ * Copyright (C) 2009-2010 The Mana Developers
+ * Copyright (C) 2011-2015 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * 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
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "gui/viewport.h"
+
+#include "actormanager.h"
+#include "configuration.h"
+#include "game.h"
+#include "settings.h"
+#include "sdlshared.h"
+#include "textmanager.h"
+
+#include "enums/resources/map/mapitemtype.h"
+
+#include "resources/map/map.h"
+#include "resources/map/mapitem.h"
+#include "resources/map/speciallayer.h"
+
+#include "being/localplayer.h"
+#include "being/playerinfo.h"
+
+#include "input/inputmanager.h"
+
+#include "gui/gui.h"
+#include "gui/popupmanager.h"
+#include "gui/userpalette.h"
+
+#include "gui/fonts/font.h"
+
+#include "gui/popups/beingpopup.h"
+#include "gui/popups/popupmenu.h"
+#include "gui/popups/textpopup.h"
+
+#include "gui/windows/ministatuswindow.h"
+
+#include "debug.h"
+
+Viewport *viewport = nullptr;
+
+extern volatile int tick_time;
+extern MiniStatusWindow *miniStatusWindow;
+
+Viewport::Viewport() :
+ WindowContainer(nullptr),
+ MouseListener(),
+ mMouseX(0),
+ mMouseY(0),
+ mMap(nullptr),
+ mHoverBeing(nullptr),
+ mHoverItem(nullptr),
+ mHoverSign(nullptr),
+ mScrollRadius(config.getIntValue("ScrollRadius")),
+ mScrollLaziness(config.getIntValue("ScrollLaziness")),
+ mScrollCenterOffsetX(config.getIntValue("ScrollCenterOffsetX")),
+ mScrollCenterOffsetY(config.getIntValue("ScrollCenterOffsetY")),
+ mMousePressX(0),
+ mMousePressY(0),
+ mPixelViewX(0),
+ mPixelViewY(0),
+ mLocalWalkTime(-1),
+ mCameraRelativeX(0),
+ mCameraRelativeY(0),
+ mShowBeingPopup(config.getBoolValue("showBeingPopup")),
+ mSelfMouseHeal(config.getBoolValue("selfMouseHeal")),
+ mEnableLazyScrolling(config.getBoolValue("enableLazyScrolling")),
+ mMouseDirectionMove(config.getBoolValue("mouseDirectionMove")),
+ mLongMouseClick(config.getBoolValue("longmouseclick")),
+ mMouseClicked(false),
+ mPlayerFollowMouse(false)
+{
+ setOpaque(false);
+ addMouseListener(this);
+
+ config.addListener("ScrollLaziness", this);
+ config.addListener("ScrollRadius", this);
+ config.addListener("showBeingPopup", this);
+ config.addListener("selfMouseHeal", this);
+ config.addListener("enableLazyScrolling", this);
+ config.addListener("mouseDirectionMove", this);
+ config.addListener("longmouseclick", this);
+
+ setFocusable(true);
+}
+
+Viewport::~Viewport()
+{
+ config.removeListeners(this);
+ CHECKLISTENERS
+}
+
+void Viewport::setMap(Map *const map A_UNUSED)
+{
+}
+
+void Viewport::draw(Graphics *graphics)
+{
+ BLOCK_START("Viewport::draw 1")
+ static int lastTick = tick_time;
+
+ graphics->setColor(Color(64, 64, 64));
+ graphics->fillRectangle(
+ Rect(0, 0, getWidth(), getHeight()));
+
+ // Avoid freaking out when tick_time overflows
+ if (tick_time < lastTick)
+ lastTick = tick_time;
+
+ // Draw contained widgets
+ WindowContainer::draw(graphics);
+ BLOCK_END("Viewport::draw 1")
+}
+
+void Viewport::safeDraw(Graphics *graphics)
+{
+ Viewport::draw(graphics);
+}
+
+void Viewport::logic()
+{
+ BLOCK_START("Viewport::logic")
+ // Make the player follow the mouse position
+ // if the mouse is dragged elsewhere than in a window.
+ Gui::getMouseState(mMouseX, mMouseY);
+ BLOCK_END("Viewport::logic")
+}
+
+void Viewport::followMouse()
+{
+}
+
+void Viewport::drawDebugPath(Graphics *const graphics A_UNUSED)
+{
+}
+
+bool Viewport::openContextMenu(const MouseEvent &event A_UNUSED)
+{
+ return false;
+}
+
+void Viewport::mousePressed(MouseEvent &event)
+{
+ if (event.getSource() != this || event.isConsumed())
+ return;
+
+ mMouseClicked = true;
+
+ mMousePressX = event.getX();
+ mMousePressY = event.getY();
+ const MouseButtonT eventButton = event.getButton();
+
+ // Right click might open a popup
+ if (eventButton == MouseButton::RIGHT)
+ {
+ if (openContextMenu(event))
+ return;
+ }
+
+ // If a popup is active, just remove it
+ if (popupManager->isPopupMenuVisible())
+ {
+ mPlayerFollowMouse = false;
+ popupManager->hidePopupMenu();
+ return;
+ }
+
+ // Left click can cause different actions
+ if (!mLongMouseClick && eventButton == MouseButton::LEFT)
+ {
+ if (leftMouseAction())
+ {
+ mPlayerFollowMouse = false;
+ return;
+ }
+ }
+}
+
+void Viewport::walkByMouse(const MouseEvent &event A_UNUSED)
+{
+}
+
+void Viewport::mouseDragged(MouseEvent &event)
+{
+ if (event.getSource() != this || event.isConsumed())
+ {
+ mPlayerFollowMouse = false;
+ return;
+ }
+ if (mMouseClicked)
+ {
+ if (abs(event.getX() - mMousePressX) > 32
+ || abs(event.getY() - mMousePressY) > 32)
+ {
+ mPlayerFollowMouse = true;
+ }
+ }
+
+ walkByMouse(event);
+}
+
+void Viewport::mouseReleased(MouseEvent &event)
+{
+ mPlayerFollowMouse = false;
+ mLocalWalkTime = -1;
+ if (mLongMouseClick && mMouseClicked)
+ {
+ mMouseClicked = false;
+ if (event.getSource() != this || event.isConsumed())
+ return;
+ const MouseButtonT eventButton = event.getButton();
+ if (eventButton == MouseButton::LEFT)
+ {
+ // long button press
+ if (gui && gui->isLongPress())
+ {
+ if (openContextMenu(event))
+ {
+ gui->resetClickCount();
+ return;
+ }
+ }
+ else
+ {
+ if (leftMouseAction())
+ return;
+ }
+ walkByMouse(event);
+ }
+ }
+}
+
+void Viewport::optionChanged(const std::string &name)
+{
+ if (name == "ScrollLaziness")
+ mScrollLaziness = config.getIntValue("ScrollLaziness");
+ else if (name == "ScrollRadius")
+ mScrollRadius = config.getIntValue("ScrollRadius");
+ else if (name == "showBeingPopup")
+ mShowBeingPopup = config.getBoolValue("showBeingPopup");
+ else if (name == "selfMouseHeal")
+ mSelfMouseHeal = config.getBoolValue("selfMouseHeal");
+ else if (name == "enableLazyScrolling")
+ mEnableLazyScrolling = config.getBoolValue("enableLazyScrolling");
+ else if (name == "mouseDirectionMove")
+ mMouseDirectionMove = config.getBoolValue("mouseDirectionMove");
+ else if (name == "longmouseclick")
+ mLongMouseClick = config.getBoolValue("longmouseclick");
+}
+
+void Viewport::mouseMoved(MouseEvent &event A_UNUSED)
+{
+}
+
+void Viewport::toggleMapDrawType()
+{
+}
+
+void Viewport::toggleCameraMode()
+{
+}
+
+void Viewport::cleanHoverItems()
+{
+ mHoverBeing = nullptr;
+ mHoverItem = nullptr;
+ mHoverSign = nullptr;
+}
+
+bool Viewport::leftMouseAction()
+{
+ return false;
+}
diff --git a/src/dyetool/gui/viewport.h b/src/dyetool/gui/viewport.h
new file mode 100644
index 000000000..12527d962
--- /dev/null
+++ b/src/dyetool/gui/viewport.h
@@ -0,0 +1,220 @@
+/*
+ * The ManaPlus Client
+ * Copyright (C) 2004-2009 The Mana World Development Team
+ * Copyright (C) 2009-2010 The Mana Developers
+ * Copyright (C) 2011-2015 The ManaPlus Developers
+ *
+ * This file is part of The ManaPlus Client.
+ *
+ * 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
+ * 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, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef DYETOOL_GUI_VIEWPORT_H
+#define DYETOOL_GUI_VIEWPORT_H
+
+#include "position.h"
+
+#include "enums/simpletypes/beingid.h"
+
+#include "gui/widgets/windowcontainer.h"
+
+#include "listeners/mouselistener.h"
+
+class ActorSprite;
+class Being;
+class FloorItem;
+class Graphics;
+class Map;
+class MapItem;
+
+/** Delay between two mouse calls when dragging mouse and move the player */
+const int walkingMouseDelay = 500;
+
+/**
+ * The viewport on the map. Displays the current map and handles mouse input
+ * and the popup menu.
+ *
+ * TODO: This class is planned to be extended to allow floating widgets on top
+ * of it such as NPC messages, which are positioned using map pixel
+ * coordinates.
+ */
+class Viewport final : public WindowContainer,
+ public MouseListener,
+ public ConfigListener
+{
+ public:
+ /**
+ * Constructor.
+ */
+ Viewport();
+
+ A_DELETE_COPY(Viewport)
+
+ /**
+ * Destructor.
+ */
+ ~Viewport();
+
+ /**
+ * Sets the map displayed by the viewport.
+ */
+ void setMap(Map *const map);
+
+ /**
+ * Draws the viewport.
+ */
+ void draw(Graphics *graphics) override final A_NONNULL(2);
+
+ void safeDraw(Graphics *graphics) override final A_NONNULL(2);
+
+ /**
+ * Implements player to keep following mouse.
+ */
+ void logic() override final;
+
+ /**
+ * Toggles whether the path debug graphics are shown. normal,
+ * debug with all images and grid, debug with out big images
+ * and with out grid.
+ */
+ void toggleMapDrawType();
+
+ void toggleCameraMode();
+
+ /**
+ * Handles mouse press on map.
+ */
+ void mousePressed(MouseEvent &event) override final;
+
+ /**
+ * Handles mouse move on map
+ */
+ void mouseDragged(MouseEvent &event) override final;
+
+ /**
+ * Handles mouse button release on map.
+ */
+ void mouseReleased(MouseEvent &event) override final;
+
+ /**
+ * Handles mouse move on map.
+ */
+ void mouseMoved(MouseEvent &event) override final;
+
+ /**
+ * A relevant config option changed.
+ */
+ void optionChanged(const std::string &name) override final;
+
+ /**
+ * Returns camera x offset in pixels.
+ */
+ int getCameraX() const A_WARN_UNUSED
+ { return mPixelViewX; }
+
+ /**
+ * Returns camera y offset in pixels.
+ */
+ int getCameraY() const A_WARN_UNUSED
+ { return mPixelViewY; }
+
+ /**
+ * Changes viewpoint by relative pixel coordinates.
+ */
+ void scrollBy(const int x, const int y)
+ { mPixelViewX += x; mPixelViewY += y; }
+
+ /**
+ * Clear all hover item\being etc
+ */
+ void cleanHoverItems();
+
+ Map *getMap() const A_WARN_UNUSED
+ { return mMap; }
+
+ void moveCamera(const int dx, const int dy);
+
+ int getCameraRelativeX() const A_WARN_UNUSED
+ { return mCameraRelativeX; }
+
+ int getCameraRelativeY() const A_WARN_UNUSED
+ { return mCameraRelativeY; }
+
+ void setCameraRelativeX(const int n)
+ { mCameraRelativeX = n; }
+
+ void setCameraRelativeY(const int n)
+ { mCameraRelativeY = n; }
+
+ int mMouseX; /**< Current mouse position in pixels. */
+ int mMouseY; /**< Current mouse position in pixels. */
+
+ private:
+ /**
+ * Finds a path from the player to the mouse, and draws it. This is for
+ * debug purposes.
+ */
+ void drawDebugPath(Graphics *const graphics) A_NONNULL(2);
+
+ /**
+ * Draws the given path.
+ */
+ void drawPath(Graphics *const graphics,
+ const Path &path,
+ const Color &color = Color(255, 0, 0))
+ const A_NONNULL(2);
+
+ bool leftMouseAction();
+
+ bool openContextMenu(const MouseEvent &event);
+
+ void walkByMouse(const MouseEvent &event);
+
+ /**
+ * Make the player go to the mouse position.
+ */
+ void followMouse();
+
+ Map *mMap; /**< The current map. */
+
+ Being *mHoverBeing; /**< Being mouse is currently over. */
+ FloorItem *mHoverItem; /**< FloorItem mouse is currently over. */
+ MapItem *mHoverSign; /**< Map sign mouse is currently over. */
+
+ int mScrollRadius;
+ int mScrollLaziness;
+ int mScrollCenterOffsetX;
+ int mScrollCenterOffsetY;
+ int mMousePressX;
+ int mMousePressY;
+ int mPixelViewX; /**< Current viewpoint in pixels. */
+ int mPixelViewY; /**< Current viewpoint in pixels. */
+
+ int mLocalWalkTime; /**< Timestamp before the next walk can be sent. */
+
+ int mCameraRelativeX;
+ int mCameraRelativeY;
+
+ bool mShowBeingPopup;
+ bool mSelfMouseHeal;
+ bool mEnableLazyScrolling;
+ bool mMouseDirectionMove;
+ bool mLongMouseClick;
+ bool mMouseClicked;
+ bool mPlayerFollowMouse;
+};
+
+extern Viewport *viewport; /**< The viewport. */
+
+#endif // DYETOOL_GUI_VIEWPORT_H
diff --git a/src/eventsmanager.cpp b/src/eventsmanager.cpp
index a6ae45e9c..3125e398b 100644
--- a/src/eventsmanager.cpp
+++ b/src/eventsmanager.cpp
@@ -22,7 +22,9 @@
#include "configuration.h"
#include "client.h"
+#ifndef DYECMD
#include "game.h"
+#endif
#include "logger.h"
#ifdef USE_MUMBLE
#include "mumblemanager.h"
@@ -122,12 +124,14 @@ bool EventsManager::handleCommonEvents(const SDL_Event &event) const
bool EventsManager::handleEvents() const
{
BLOCK_START("EventsManager::handleEvents")
+#ifndef DYECMD
if (Game::instance())
{
// Let the game handle the events while it is active
Game::instance()->handleInput();
}
else
+#endif
{
SDL_Event event;
// Handle SDL events
@@ -179,6 +183,7 @@ bool EventsManager::handleEvents() const
void EventsManager::handleGameEvents() const
{
BLOCK_START("EventsManager::handleGameEvents")
+#ifndef DYECMD
Game *const game = Game::instance();
// Events
@@ -192,6 +197,7 @@ void EventsManager::handleGameEvents() const
if (handleCommonEvents(event))
break;
} // End while
+#endif
BLOCK_END("EventsManager::handleGameEvents")
}
@@ -421,7 +427,9 @@ void EventsManager::logEvent(const SDL_Event &event)
#ifdef USE_SDL2
void EventsManager::handleSDL2WindowEvent(const SDL_Event &event)
{
+#ifndef DYECMD
int fpsLimit = 0;
+#endif
const int eventType = event.window.event;
const bool inGame = (client->getState() == STATE_GAME);
switch (eventType)
@@ -445,6 +453,7 @@ void EventsManager::handleSDL2WindowEvent(const SDL_Event &event)
break;
case SDL_WINDOWEVENT_MINIMIZED:
WindowManager::setIsMinimized(true);
+#ifndef DYECMD
if (inGame)
{
if (localPlayer && !settings.awayMode)
@@ -453,11 +462,13 @@ void EventsManager::handleSDL2WindowEvent(const SDL_Event &event)
localPlayer->setHalfAway(true);
}
}
+#endif
setPriority(false);
break;
case SDL_WINDOWEVENT_RESTORED:
case SDL_WINDOWEVENT_MAXIMIZED:
WindowManager::setIsMinimized(false);
+#ifndef DYECMD
if (inGame)
{
if (localPlayer)
@@ -467,6 +478,7 @@ void EventsManager::handleSDL2WindowEvent(const SDL_Event &event)
localPlayer->setHalfAway(false);
}
}
+#endif
setPriority(true);
break;
default:
@@ -476,6 +488,7 @@ void EventsManager::handleSDL2WindowEvent(const SDL_Event &event)
if (!inGame)
return;
+#ifndef DYECMD
if (eventType == SDL_WINDOWEVENT_MINIMIZED
|| eventType == SDL_WINDOWEVENT_RESTORED
|| eventType == SDL_WINDOWEVENT_MAXIMIZED)
@@ -487,23 +500,28 @@ void EventsManager::handleSDL2WindowEvent(const SDL_Event &event)
}
Game::instance()->updateFrameRate(fpsLimit);
}
+#endif
}
#else
void EventsManager::handleActive(const SDL_Event &event)
{
+#ifndef DYECMD
int fpsLimit = 0;
const bool inGame = (client->getState() == STATE_GAME);
+#endif
if (event.active.state & SDL_APPACTIVE)
{
if (event.active.gain)
{ // window restore
WindowManager::setIsMinimized(false);
+#ifndef DYECMD
if (inGame && localPlayer)
{
if (!settings.awayMode)
fpsLimit = config.getIntValue("fpslimit");
localPlayer->setHalfAway(false);
}
+#endif
setPriority(true);
}
else
@@ -512,25 +530,33 @@ void EventsManager::handleActive(const SDL_Event &event)
client->setState(STATE_EXIT);
#else
WindowManager::setIsMinimized(true);
+#ifndef DYECMD
if (inGame && localPlayer && !settings.awayMode)
{
fpsLimit = config.getIntValue("altfpslimit");
localPlayer->setHalfAway(true);
}
+#endif
setPriority(false);
#endif
}
+#ifndef DYECMD
if (inGame && localPlayer)
localPlayer->updateStatus();
+#endif
}
+#ifndef DYECMD
if (inGame && localPlayer)
localPlayer->updateName();
+#endif
if (event.active.state & SDL_APPINPUTFOCUS)
settings.inputFocused = event.active.gain;
if (event.active.state & SDL_APPMOUSEFOCUS)
settings.mouseFocused = event.active.gain;
+#ifndef DYECMD
if (inGame)
Game::instance()->updateFrameRate(fpsLimit);
+#endif
}
#endif
diff --git a/src/gui/dialogsmanager.cpp b/src/gui/dialogsmanager.cpp
index 745ef2cc2..69ea6ae11 100644
--- a/src/gui/dialogsmanager.cpp
+++ b/src/gui/dialogsmanager.cpp
@@ -28,14 +28,19 @@
#include "being/playerinfo.h"
#include "gui/widgets/createwidget.h"
-#include "gui/widgets/selldialog.h"
#include "gui/windows/confirmdialog.h"
+
+#ifndef DYECMD
+#include "gui/widgets/selldialog.h"
+
#include "gui/windows/buyselldialog.h"
#include "gui/windows/buydialog.h"
#include "gui/windows/updaterwindow.h"
#include "listeners/playerpostdeathlistener.h"
+#endif
+
#include "listeners/weightlistener.h"
#include "net/inventoryhandler.h"
@@ -55,11 +60,13 @@ DialogsManager *dialogsManager = nullptr;
OkDialog *weightNotice = nullptr;
int weightNoticeTime = 0;
+#ifndef DYECMD
namespace
{
PlayerPostDeathListener postDeathListener;
WeightListener weightListener;
} // namespace
+#endif
DialogsManager::DialogsManager() :
AttributeListener(),
@@ -69,6 +76,7 @@ DialogsManager::DialogsManager() :
void DialogsManager::closeDialogs()
{
+#ifndef DYECMD
NpcDialog::clearDialogs();
BuyDialog::closeAll();
BuySellDialog::closeAll();
@@ -76,6 +84,7 @@ void DialogsManager::closeDialogs()
SellDialog::closeAll();
if (inventoryHandler)
inventoryHandler->destroyStorage();
+#endif
if (deathNotice)
{
deathNotice->scheduleDelete();
@@ -85,11 +94,13 @@ void DialogsManager::closeDialogs()
void DialogsManager::createUpdaterWindow()
{
+#ifndef DYECMD
CREATEWIDGETV(updaterWindow, UpdaterWindow,
settings.updateHost,
settings.oldUpdates,
false,
UpdateType::Normal);
+#endif
}
Window *DialogsManager::openErrorDialog(const std::string &header,
@@ -126,6 +137,7 @@ Window *DialogsManager::openErrorDialog(const std::string &header,
void DialogsManager::playerDeath()
{
+#ifndef DYECMD
if (!deathNotice)
{
// TRANSLATORS: message header
@@ -141,8 +153,10 @@ void DialogsManager::playerDeath()
260);
deathNotice->addActionListener(&postDeathListener);
}
+#endif
}
+#ifndef DYECMD
void DialogsManager::attributeChanged(const AttributesT id,
const int oldVal,
const int newVal)
@@ -197,3 +211,10 @@ void DialogsManager::attributeChanged(const AttributesT id,
}
}
}
+#else
+void DialogsManager::attributeChanged(const AttributesT id A_UNUSED,
+ const int oldVal A_UNUSED,
+ const int newVal A_UNUSED)
+{
+}
+#endif
diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp
index 382cd42bf..a7e14983e 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/gui.cpp
@@ -73,7 +73,11 @@
#include "gui/widgets/window.h"
+#ifndef DYECMD
#include "dragdrop.h"
+#else
+#include "resources/image.h"
+#endif
#include "settings.h"
#include "touchmanager.h"
@@ -477,6 +481,7 @@ void Gui::draw()
if ((settings.mouseFocused || button & SDL_BUTTON(1))
&& mMouseCursors && mCustomCursor && mMouseCursorAlpha > 0.0F)
{
+#ifndef DYECMD
const Image *const image = dragDrop.getItemImage();
if (mGuiFont)
{
@@ -497,6 +502,7 @@ void Gui::draw()
const int posY = mouseY - (image->mBounds.h / 2);
mGraphics->drawImage(image, posX, posY);
}
+#endif
Image *const mouseCursor = mMouseCursors->get(
static_cast<int>(mCursorType));
if (mouseCursor)
@@ -906,9 +912,10 @@ void Gui::distributeMouseEvent(Widget *const source,
widget = parent;
parent = swap->getParent();
+#ifndef DYECMD
if (type == MouseEventType::RELEASED)
dragDrop.clear();
-
+#endif
if (!widget || event.isConsumed())
break;
diff --git a/src/gui/popupmanager.cpp b/src/gui/popupmanager.cpp
index 3749a6502..cca9cffd4 100644
--- a/src/gui/popupmanager.cpp
+++ b/src/gui/popupmanager.cpp
@@ -42,14 +42,18 @@ PopupManager::~PopupManager()
void PopupManager::closePopupMenu()
{
+#ifndef DYECMD
if (popupMenu)
popupMenu->handleLink("cancel", nullptr);
+#endif
}
void PopupManager::hideBeingPopup()
{
+#ifndef DYECMD
if (beingPopup)
beingPopup->setVisible(Visible_false);
+#endif
}
void PopupManager::hideTextPopup()
@@ -60,19 +64,27 @@ void PopupManager::hideTextPopup()
void PopupManager::hidePopupMenu()
{
+#ifndef DYECMD
if (popupMenu)
popupMenu->setVisible(Visible_false);
+#endif
}
bool PopupManager::isPopupMenuVisible()
{
+#ifndef DYECMD
return popupMenu ? popupMenu->isPopupVisible() : false;
+#else
+ return false;
+#endif
}
void PopupManager::clearPopup()
{
+#ifndef DYECMD
if (popupMenu)
popupMenu->clear();
+#endif
}
bool PopupManager::isTextPopupVisible()
@@ -82,5 +94,9 @@ bool PopupManager::isTextPopupVisible()
bool PopupManager::isBeingPopupVisible()
{
+#ifndef DYECMD
return beingPopup ? beingPopup->isPopupVisible() : false;
+#else
+ return false;
+#endif
}
diff --git a/src/gui/popups/popupmenu.h b/src/gui/popups/popupmenu.h
index ac6798ce1..d83fd7bd5 100644
--- a/src/gui/popups/popupmenu.h
+++ b/src/gui/popups/popupmenu.h
@@ -23,6 +23,8 @@
#ifndef GUI_POPUPS_POPUPMENU_H
#define GUI_POPUPS_POPUPMENU_H
+#ifndef DYECMD
+
#include "enums/inventorytype.h"
#include "enums/simpletypes/beingid.h"
@@ -229,4 +231,5 @@ class PopupMenu final : public Popup, public LinkHandler
extern PopupMenu *popupMenu;
+#endif // DYE_CMD
#endif // GUI_POPUPS_POPUPMENU_H
diff --git a/src/gui/viewport.h b/src/gui/viewport.h
index 0963bd394..fa2dd7508 100644
--- a/src/gui/viewport.h
+++ b/src/gui/viewport.h
@@ -23,6 +23,11 @@
#ifndef GUI_VIEWPORT_H
#define GUI_VIEWPORT_H
+#ifdef DYECMD
+#include "dyetool/gui/viewport.h"
+
+#else
+
#include "position.h"
#include "enums/simpletypes/beingid.h"
@@ -235,4 +240,5 @@ class Viewport final : public WindowContainer,
extern Viewport *viewport; /**< The viewport. */
+#endif // DYECMD
#endif // GUI_VIEWPORT_H
diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp
index 068894418..67dbbe632 100644
--- a/src/gui/widgets/browserbox.cpp
+++ b/src/gui/widgets/browserbox.cpp
@@ -235,10 +235,12 @@ void BrowserBox::addRow(const std::string &row, const bool atTop)
bLink.y2 = bLink.y1 + font->getHeight();
if (bLink.caption.empty())
{
+#ifndef DYECMD
const int id = atoi(bLink.link.c_str());
if (id)
bLink.caption = ItemDB::get(id).getName();
else
+#endif
bLink.caption = bLink.link;
if (translator)
bLink.caption = translator->getStr(bLink.caption);
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp
index c7b9cd312..497f17d2f 100644
--- a/src/gui/widgets/textfield.cpp
+++ b/src/gui/widgets/textfield.cpp
@@ -748,8 +748,10 @@ void TextField::mousePressed(MouseEvent &event)
event.consume();
if (event.getButton() == MouseButton::RIGHT)
{
+#ifndef DYECMD
if (popupMenu)
popupMenu->showTextFieldPopup(this);
+#endif
}
else if (event.getButton() == MouseButton::LEFT)
{
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index 73355e3fc..cd8da96bf 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -67,7 +67,11 @@
#include "client.h"
#include "configuration.h"
+#ifndef DYECMD
#include "dragdrop.h"
+#else
+#include "resources/image.h"
+#endif
#include "graphicsvertexes.h"
#include "soundconsts.h"
#include "soundmanager.h"
@@ -236,8 +240,10 @@ Window::~Window()
if (gui)
gui->removeDragged(this);
+#ifndef DYECMD
if (setupWindow)
setupWindow->unregisterWindowForReset(this);
+#endif
client->windowRemoved(this);
@@ -848,6 +854,7 @@ void Window::mousePressed(MouseEvent &event)
else
mMoved = false;
}
+#ifndef DYECMD
else if (button == MouseButton::RIGHT)
{
if (popupMenu)
@@ -856,6 +863,7 @@ void Window::mousePressed(MouseEvent &event)
popupMenu->showWindowPopup(this);
}
}
+#endif
}
void Window::close()
@@ -891,8 +899,10 @@ void Window::updateResizeHandler(MouseEvent &event)
if (!gui)
return;
+#ifndef DYECMD
if (!dragDrop.isEmpty())
return;
+#endif
mResizeHandles = getResizeHandles(event);
diff --git a/src/gui/windowmanager.cpp b/src/gui/windowmanager.cpp
index d61ffea6e..01cc2c670 100644
--- a/src/gui/windowmanager.cpp
+++ b/src/gui/windowmanager.cpp
@@ -32,16 +32,19 @@
#include "gui/gui.h"
#include "gui/userpalette.h"
+#include "gui/popups/textpopup.h"
+
+#ifndef DYECMD
#include "gui/popups/beingpopup.h"
#include "gui/popups/itempopup.h"
#include "gui/popups/popupmenu.h"
#include "gui/popups/spellpopup.h"
#include "gui/popups/textboxpopup.h"
-#include "gui/popups/textpopup.h"
#include "gui/windows/didyouknowwindow.h"
#include "gui/windows/helpwindow.h"
#include "gui/windows/setupwindow.h"
+#endif
#include "gui/widgets/createwidget.h"
#include "gui/widgets/desktop.h"
@@ -95,21 +98,23 @@ void WindowManager::init()
void WindowManager::createWindows()
{
userPalette = new UserPalette;
+#ifndef DYECMD
CREATEWIDGETV0(setupWindow, SetupWindow);
CREATEWIDGETV0(helpWindow, HelpWindow);
CREATEWIDGETV0(didYouKnowWindow, DidYouKnowWindow);
CREATEWIDGETV0(popupMenu, PopupMenu);
CREATEWIDGETV0(beingPopup, BeingPopup);
- CREATEWIDGETV0(textPopup, TextPopup);
CREATEWIDGETV0(textBoxPopup, TextBoxPopup);
CREATEWIDGETV0(itemPopup, ItemPopup);
CREATEWIDGETV0(spellPopup, SpellPopup);
+#endif
+ CREATEWIDGETV0(textPopup, TextPopup);
}
void WindowManager::deleteWindows()
{
+#ifndef DYECMD
delete2(textBoxPopup);
- delete2(textPopup);
delete2(beingPopup);
delete2(itemPopup);
delete2(spellPopup);
@@ -120,6 +125,8 @@ void WindowManager::deleteWindows()
delete2(userPalette);
delete2(spellManager)
delete2(spellShortcut)
+#endif
+ delete2(textPopup);
}
void WindowManager::initTitle()
@@ -196,9 +203,11 @@ void WindowManager::resizeVideo(int actualWidth,
client->moveButtons(width);
+#ifndef DYECMD
Game *const game = Game::instance();
if (game)
game->videoResized(width, height);
+#endif
if (gui)
gui->draw();
diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp
index 12c28c806..a9d35fb64 100644
--- a/src/input/inputmanager.cpp
+++ b/src/input/inputmanager.cpp
@@ -323,7 +323,9 @@ bool InputManager::hasConflicts(InputActionT &restrict key1,
void InputManager::callbackNewKey()
{
+#ifndef DYECMD
mSetupInput->newKeyCallback(mNewKeyIndex);
+#endif
}
bool InputManager::isActionActive(const InputActionT index) const
@@ -521,7 +523,9 @@ void InputManager::unassignKey()
update();
}
-bool InputManager::handleAssignKey(const SDL_Event &event, const int type)
+#ifndef DYECMD
+bool InputManager::handleAssignKey(const SDL_Event &event,
+ const int type)
{
if (setupWindow && setupWindow->isWindowVisible() &&
getNewKeyIndex() > InputAction::NO_VALUE)
@@ -533,6 +537,13 @@ bool InputManager::handleAssignKey(const SDL_Event &event, const int type)
}
return false;
}
+#else
+bool InputManager::handleAssignKey(const SDL_Event &event A_UNUSED,
+ const int type A_UNUSED)
+{
+ return false;
+}
+#endif
bool InputManager::handleEvent(const SDL_Event &event)
{
@@ -551,6 +562,7 @@ bool InputManager::handleEvent(const SDL_Event &event)
keyboard.handleActicateKey(event);
// send straight to gui for certain windows
+#ifndef DYECMD
if (quitDialog || TextDialog::isActive())
{
if (guiInput)
@@ -560,6 +572,7 @@ bool InputManager::handleEvent(const SDL_Event &event)
BLOCK_END("InputManager::handleEvent")
return true;
}
+#endif
break;
}
case SDL_KEYUP:
@@ -666,6 +679,7 @@ void InputManager::updateConditionMask()
mMask = 1;
if (keyboard.isEnabled())
mMask |= InputCondition::ENABLED;
+#ifndef DYECMD
if ((!chatWindow || !chatWindow->isInputFocused()) &&
!NpcDialog::isAnyInputFocused() &&
!InventoryWindow::isAnyInputFocused() &&
@@ -700,18 +714,6 @@ void InputManager::updateConditionMask()
#endif
mMask |= InputCondition::NOROOM;
- if (!settings.awayMode)
- mMask |= InputCondition::NOAWAY;
-
- if (!setupWindow || !setupWindow->isWindowVisible())
- mMask |= InputCondition::NOSETUP;
-
- if (Game::instance() && Game::instance()->getValidSpeed())
- mMask |= InputCondition::VALIDSPEED;
-
- if (gui && !gui->getFocusHandler()->getModalFocused())
- mMask |= InputCondition::NOMODAL;
-
const NpcDialog *const dialog = NpcDialog::getActive();
if (!dialog || !dialog->isTextInputFocused())
mMask |= InputCondition::NONPCINPUT;
@@ -721,15 +723,12 @@ void InputManager::updateConditionMask()
if (!InventoryWindow::isStorageActive())
mMask |= InputCondition::NOTALKING;
}
+ if (!setupWindow || !setupWindow->isWindowVisible())
+ mMask |= InputCondition::NOSETUP;
- if (!settings.disableGameModifiers)
- mMask |= InputCondition::EMODS;
+ if (Game::instance() && Game::instance()->getValidSpeed())
+ mMask |= InputCondition::VALIDSPEED;
- if (!isActionActive0(InputAction::STOP_ATTACK)
- && !isActionActive0(InputAction::UNTARGET))
- {
- mMask |= InputCondition::NOTARGET;
- }
if (Game::instance())
mMask |= InputCondition::INGAME;
@@ -738,6 +737,22 @@ void InputManager::updateConditionMask()
if (localPlayer && localPlayer->isAlive())
mMask |= InputCondition::ALIVE;
+#endif
+
+ if (!settings.awayMode)
+ mMask |= InputCondition::NOAWAY;
+
+ if (gui && !gui->getFocusHandler()->getModalFocused())
+ mMask |= InputCondition::NOMODAL;
+
+ if (!settings.disableGameModifiers)
+ mMask |= InputCondition::EMODS;
+
+ if (!isActionActive0(InputAction::STOP_ATTACK)
+ && !isActionActive0(InputAction::UNTARGET))
+ {
+ mMask |= InputCondition::NOTARGET;
+ }
}
bool InputManager::checkKey(const InputActionData *const key) const
diff --git a/src/maingui.cpp b/src/maingui.cpp
index aa91c0439..75e51b62d 100644
--- a/src/maingui.cpp
+++ b/src/maingui.cpp
@@ -20,6 +20,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include "maingui.h"
#include "main.h"
diff --git a/src/net/ipc.cpp b/src/net/ipc.cpp
index f6df452ac..e4a70abc8 100644
--- a/src/net/ipc.cpp
+++ b/src/net/ipc.cpp
@@ -187,6 +187,8 @@ void IPC::flush()
if (!mThreadLocked)
{
SDL_mutexP(mMutex);
+#ifndef DYECMD
+// probably need enable only commands in tool
if (chatWindow)
{
FOR_EACH (std::vector<std::string>::const_iterator, it,
@@ -195,6 +197,7 @@ void IPC::flush()
chatWindow->chatInput(*it);
}
}
+#endif
mDelayedCommands.clear();
SDL_mutexV(mMutex);
}
diff --git a/src/resources/dyepalette.cpp b/src/resources/dyepalette.cpp
index 895f9c03f..5ebbdf626 100644
--- a/src/resources/dyepalette.cpp
+++ b/src/resources/dyepalette.cpp
@@ -24,7 +24,9 @@
#include "logger.h"
+#ifndef DYECMD
#include "resources/db/palettedb.h"
+#endif
#include <cmath>
@@ -68,6 +70,7 @@ DyePalette::DyePalette(const std::string &description,
++pos;
}
}
+#ifndef DYECMD
else if (description[0] == '@')
{
size_t pos = 1;
@@ -83,7 +86,7 @@ DyePalette::DyePalette(const std::string &description,
pos = idx + 1;
}
}
-
+#endif
logger->log("Error, invalid embedded palette: %s", description.c_str());
}
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index 0c0a5bd7c..bec7914fc 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -778,6 +778,7 @@ Resource *ResourceManager::getShaderProgram(const std::string &vertex,
}
#endif
+#ifndef DYECMD
struct WalkLayerLoader final
{
const std::string name;
@@ -788,17 +789,15 @@ struct WalkLayerLoader final
if (!v)
return nullptr;
-#ifdef DYECMD
- return nullptr;
-#else
const WalkLayerLoader *const rl = static_cast<const
WalkLayerLoader *const>(v);
Resource *const resource = NavigationManager::loadWalkLayer(rl->map);
return resource;
-#endif
}
};
+#endif
+#ifndef DYECMD
WalkLayer *ResourceManager::getWalkLayer(const std::string &name,
Map *const map)
{
@@ -806,6 +805,13 @@ WalkLayer *ResourceManager::getWalkLayer(const std::string &name,
return static_cast<WalkLayer*>(get("map_" + name,
WalkLayerLoader::load, &rl));
}
+#else
+WalkLayer *ResourceManager::getWalkLayer(const std::string &name A_UNUSED,
+ Map *const map A_UNUSED)
+{
+ return nullptr;
+}
+#endif
struct SpriteDefLoader final
{
diff --git a/src/soundmanager.cpp b/src/soundmanager.cpp
index a501e506b..746f5a924 100644
--- a/src/soundmanager.cpp
+++ b/src/soundmanager.cpp
@@ -25,7 +25,9 @@
#include "configuration.h"
#include "logger.h"
+#ifndef DYECMD
#include "being/localplayer.h"
+#endif
#include "resources/sdlmusic.h"
#include "resources/resourcemanager.h"
@@ -361,6 +363,7 @@ void SoundManager::logic()
void SoundManager::playSfx(const std::string &path,
const int x, const int y) const
{
+#ifndef DYECMD
if (!mInstalled || path.empty() || !mPlayBattle)
return;
@@ -393,6 +396,7 @@ void SoundManager::playSfx(const std::string &path,
if (!mCacheSounds)
sample->decRef();
}
+#endif
}
void SoundManager::playGuiSound(const std::string &name)