2013-09-01 14:27:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
TEMPLATE = app
|
2013-11-30 11:00:11 +00:00
|
|
|
QT =
|
2013-09-01 14:27:21 +00:00
|
|
|
TARGET = mkxp
|
|
|
|
DEPENDPATH += src shader assets
|
2013-09-22 22:17:51 +00:00
|
|
|
INCLUDEPATH += . src
|
2013-12-11 19:46:54 +00:00
|
|
|
|
2013-12-29 17:01:57 +00:00
|
|
|
CONFIG(release, debug|release): DEFINES += NDEBUG
|
2013-12-11 19:46:54 +00:00
|
|
|
|
2019-05-18 14:17:09 +00:00
|
|
|
CONFIG += c++11
|
|
|
|
# And for older qmake versions..
|
|
|
|
QMAKE_CXXFLAGS += -std=c++11
|
|
|
|
|
2013-12-29 17:01:57 +00:00
|
|
|
isEmpty(BINDING) {
|
|
|
|
BINDING = MRI
|
2013-12-11 19:46:54 +00:00
|
|
|
}
|
|
|
|
|
2013-12-29 17:01:57 +00:00
|
|
|
contains(BINDING, MRI) {
|
|
|
|
contains(_HAVE_BINDING, YES) {
|
|
|
|
error("Only one binding may be selected")
|
|
|
|
}
|
|
|
|
_HAVE_BINDING = YES
|
2013-12-11 19:46:54 +00:00
|
|
|
|
2013-12-29 17:01:57 +00:00
|
|
|
CONFIG += BINDING_MRI
|
|
|
|
}
|
2013-12-11 19:46:54 +00:00
|
|
|
|
2013-12-29 17:01:57 +00:00
|
|
|
contains(BINDING, MRUBY) {
|
|
|
|
contains(_HAVE_BINDING, YES) {
|
|
|
|
error("Only one binding may be selected")
|
|
|
|
}
|
|
|
|
_HAVE_BINDING = YES
|
2013-09-01 14:27:21 +00:00
|
|
|
|
2013-12-29 17:01:57 +00:00
|
|
|
CONFIG += BINDING_MRUBY
|
2013-09-01 14:27:21 +00:00
|
|
|
}
|
|
|
|
|
2013-12-29 17:01:57 +00:00
|
|
|
contains(BINDING, NULL) {
|
|
|
|
contains(_HAVE_BINDING, YES) {
|
|
|
|
error("Only one binding may be selected")
|
|
|
|
}
|
|
|
|
_HAVE_BINDING = YES
|
|
|
|
|
|
|
|
CONFIG += BINDING_NULL
|
|
|
|
}
|
2013-09-01 14:27:21 +00:00
|
|
|
|
|
|
|
unix {
|
2013-11-30 11:00:11 +00:00
|
|
|
CONFIG += link_pkgconfig
|
2014-08-28 21:11:10 +00:00
|
|
|
PKGCONFIG += sigc++-2.0 pixman-1 zlib physfs vorbisfile \
|
2013-12-11 19:46:54 +00:00
|
|
|
sdl2 SDL2_image SDL2_ttf SDL_sound openal
|
2013-12-02 20:40:05 +00:00
|
|
|
|
2014-09-07 03:23:10 +00:00
|
|
|
SHARED_FLUID {
|
2014-07-31 01:32:07 +00:00
|
|
|
PKGCONFIG += fluidsynth
|
|
|
|
}
|
|
|
|
|
2014-08-20 03:20:07 +00:00
|
|
|
INI_ENCODING {
|
|
|
|
PKGCONFIG += libguess
|
|
|
|
}
|
|
|
|
|
2013-12-29 17:01:57 +00:00
|
|
|
# Deal with boost paths...
|
|
|
|
isEmpty(BOOST_I) {
|
|
|
|
BOOST_I = $$(BOOST_I)
|
|
|
|
}
|
|
|
|
isEmpty(BOOST_I) {}
|
|
|
|
else {
|
|
|
|
INCLUDEPATH += $$BOOST_I
|
|
|
|
}
|
|
|
|
|
|
|
|
isEmpty(BOOST_L) {
|
|
|
|
BOOST_L = $$(BOOST_L)
|
|
|
|
}
|
|
|
|
isEmpty(BOOST_L) {}
|
|
|
|
else {
|
|
|
|
LIBS += -L$$BOOST_L
|
|
|
|
}
|
|
|
|
|
2014-05-27 05:35:06 +00:00
|
|
|
isEmpty(BOOST_LIB_SUFFIX) {
|
|
|
|
BOOST_LIB_SUFFIX = $$(BOOST_LIB_SUFFIX)
|
|
|
|
}
|
|
|
|
|
|
|
|
LIBS += -lboost_program_options$$BOOST_LIB_SUFFIX
|
2013-09-01 14:27:21 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Input
|
|
|
|
HEADERS += \
|
|
|
|
src/quadarray.h \
|
|
|
|
src/audio.h \
|
|
|
|
src/binding.h \
|
|
|
|
src/bitmap.h \
|
|
|
|
src/disposable.h \
|
|
|
|
src/etc.h \
|
|
|
|
src/etc-internal.h \
|
|
|
|
src/eventthread.h \
|
|
|
|
src/flashable.h \
|
|
|
|
src/font.h \
|
|
|
|
src/input.h \
|
2018-09-25 17:58:10 +00:00
|
|
|
src/iniconfig.h \
|
2013-09-01 14:27:21 +00:00
|
|
|
src/plane.h \
|
|
|
|
src/scene.h \
|
|
|
|
src/sprite.h \
|
|
|
|
src/table.h \
|
|
|
|
src/texpool.h \
|
|
|
|
src/tilequad.h \
|
|
|
|
src/transform.h \
|
|
|
|
src/viewport.h \
|
|
|
|
src/window.h \
|
2013-09-01 18:32:23 +00:00
|
|
|
src/serializable.h \
|
|
|
|
src/shader.h \
|
|
|
|
src/glstate.h \
|
|
|
|
src/quad.h \
|
|
|
|
src/tilemap.h \
|
2014-11-30 16:46:28 +00:00
|
|
|
src/tilemap-common.h \
|
2013-09-01 18:32:23 +00:00
|
|
|
src/graphics.h \
|
2014-11-29 16:47:40 +00:00
|
|
|
src/gl-debug.h \
|
2013-09-01 18:32:23 +00:00
|
|
|
src/global-ibo.h \
|
|
|
|
src/exception.h \
|
|
|
|
src/filesystem.h \
|
|
|
|
src/serial-util.h \
|
|
|
|
src/intrulist.h \
|
|
|
|
src/binding.h \
|
2013-09-01 14:27:21 +00:00
|
|
|
src/gl-util.h \
|
|
|
|
src/util.h \
|
Implement a new tileset atlas layout to allow for bigger tilesets
The atlas packing algorithm has been reworked to pack autotiles
and tileset very efficiently into a texture, splitting the tileset
in multiple ways and eliminating the previous duplication of image
data in the atlas across "frames". Animation, which these frames
were designed for, is now done via duplicated buffer frames,
ie. each animation frame has its own VBO and IBO data. This was
not done to save on VRAM (hardly less memory is used), but to
make place for the new atlas layout.
Thanks to this new layout, even with a max texture size of 2048,
one can use tilesets with up to 15000 height. Of course, such
a tileset couldn't be stored in a regular Bitmap to begin with,
which is why I also introduced a hack called "mega surfaces":
software surfaces stored in RAM and wrapped inside a Bitmap,
whose sole purpose is to be passed to a Tilemap as tilesets.
Various other minor changes and fixes are included.
2013-09-23 20:21:58 +00:00
|
|
|
src/config.h \
|
2014-01-25 08:24:55 +00:00
|
|
|
src/settingsmenu.h \
|
|
|
|
src/keybindings.h \
|
2013-09-27 14:54:01 +00:00
|
|
|
src/tileatlas.h \
|
2013-11-30 11:00:11 +00:00
|
|
|
src/sharedstate.h \
|
2013-12-11 19:46:54 +00:00
|
|
|
src/al-util.h \
|
|
|
|
src/boost-hash.h \
|
2014-05-30 21:01:35 +00:00
|
|
|
src/debugwriter.h \
|
2014-07-11 06:31:12 +00:00
|
|
|
src/gl-fun.h \
|
2014-07-13 12:03:18 +00:00
|
|
|
src/gl-meta.h \
|
2014-07-23 15:28:20 +00:00
|
|
|
src/vertex.h \
|
|
|
|
src/soundemitter.h \
|
|
|
|
src/aldatasource.h \
|
|
|
|
src/alstream.h \
|
2014-07-23 20:57:39 +00:00
|
|
|
src/audiostream.h \
|
2014-08-28 21:11:10 +00:00
|
|
|
src/rgssad.h \
|
|
|
|
src/windowvx.h \
|
|
|
|
src/tilemapvx.h \
|
2014-09-07 03:23:10 +00:00
|
|
|
src/tileatlasvx.h \
|
|
|
|
src/sharedmidistate.h \
|
2014-09-30 07:13:12 +00:00
|
|
|
src/fluid-fun.h \
|
|
|
|
src/sdl-util.h
|
2013-09-01 14:27:21 +00:00
|
|
|
|
|
|
|
SOURCES += \
|
|
|
|
src/main.cpp \
|
|
|
|
src/audio.cpp \
|
|
|
|
src/bitmap.cpp \
|
|
|
|
src/eventthread.cpp \
|
|
|
|
src/filesystem.cpp \
|
|
|
|
src/font.cpp \
|
|
|
|
src/input.cpp \
|
2018-09-25 17:58:10 +00:00
|
|
|
src/iniconfig.cpp \
|
2013-09-01 14:27:21 +00:00
|
|
|
src/plane.cpp \
|
|
|
|
src/scene.cpp \
|
|
|
|
src/sprite.cpp \
|
|
|
|
src/table.cpp \
|
|
|
|
src/tilequad.cpp \
|
|
|
|
src/viewport.cpp \
|
|
|
|
src/window.cpp \
|
|
|
|
src/texpool.cpp \
|
2013-09-01 18:32:23 +00:00
|
|
|
src/shader.cpp \
|
|
|
|
src/glstate.cpp \
|
|
|
|
src/tilemap.cpp \
|
2013-09-01 14:27:21 +00:00
|
|
|
src/autotiles.cpp \
|
2013-09-01 18:32:23 +00:00
|
|
|
src/graphics.cpp \
|
2014-11-29 16:47:40 +00:00
|
|
|
src/gl-debug.cpp \
|
2013-09-01 14:27:21 +00:00
|
|
|
src/etc.cpp \
|
Implement a new tileset atlas layout to allow for bigger tilesets
The atlas packing algorithm has been reworked to pack autotiles
and tileset very efficiently into a texture, splitting the tileset
in multiple ways and eliminating the previous duplication of image
data in the atlas across "frames". Animation, which these frames
were designed for, is now done via duplicated buffer frames,
ie. each animation frame has its own VBO and IBO data. This was
not done to save on VRAM (hardly less memory is used), but to
make place for the new atlas layout.
Thanks to this new layout, even with a max texture size of 2048,
one can use tilesets with up to 15000 height. Of course, such
a tileset couldn't be stored in a regular Bitmap to begin with,
which is why I also introduced a hack called "mega surfaces":
software surfaces stored in RAM and wrapped inside a Bitmap,
whose sole purpose is to be passed to a Tilemap as tilesets.
Various other minor changes and fixes are included.
2013-09-23 20:21:58 +00:00
|
|
|
src/config.cpp \
|
2014-01-25 08:24:55 +00:00
|
|
|
src/settingsmenu.cpp \
|
|
|
|
src/keybindings.cpp \
|
2013-09-27 14:54:01 +00:00
|
|
|
src/tileatlas.cpp \
|
2014-05-30 21:01:35 +00:00
|
|
|
src/sharedstate.cpp \
|
2014-07-13 12:03:18 +00:00
|
|
|
src/gl-fun.cpp \
|
|
|
|
src/gl-meta.cpp \
|
2014-07-23 15:28:20 +00:00
|
|
|
src/vertex.cpp \
|
|
|
|
src/soundemitter.cpp \
|
|
|
|
src/sdlsoundsource.cpp \
|
|
|
|
src/alstream.cpp \
|
2014-07-23 20:57:39 +00:00
|
|
|
src/audiostream.cpp \
|
2014-08-16 21:20:33 +00:00
|
|
|
src/rgssad.cpp \
|
2014-08-28 21:11:10 +00:00
|
|
|
src/bundledfont.cpp \
|
|
|
|
src/vorbissource.cpp \
|
|
|
|
src/windowvx.cpp \
|
|
|
|
src/tilemapvx.cpp \
|
|
|
|
src/tileatlasvx.cpp \
|
2014-09-07 03:23:10 +00:00
|
|
|
src/autotilesvx.cpp \
|
|
|
|
src/midisource.cpp \
|
|
|
|
src/fluid-fun.cpp
|
2013-09-01 14:27:21 +00:00
|
|
|
|
2015-09-20 17:54:57 +00:00
|
|
|
HEADERS += steamshim/steamshim_child.h
|
|
|
|
SOURCES += steamshim/steamshim_child.c
|
|
|
|
|
2014-01-01 06:04:41 +00:00
|
|
|
EMBED = \
|
2014-12-23 17:33:33 +00:00
|
|
|
shader/common.h \
|
2014-01-01 06:04:41 +00:00
|
|
|
shader/transSimple.frag \
|
|
|
|
shader/trans.frag \
|
|
|
|
shader/hue.frag \
|
|
|
|
shader/sprite.frag \
|
|
|
|
shader/plane.frag \
|
2014-12-23 17:56:00 +00:00
|
|
|
shader/gray.frag \
|
2014-01-01 06:04:41 +00:00
|
|
|
shader/bitmapBlit.frag \
|
2014-12-23 17:56:00 +00:00
|
|
|
shader/flatColor.frag \
|
2014-01-01 06:04:41 +00:00
|
|
|
shader/simple.frag \
|
|
|
|
shader/simpleColor.frag \
|
|
|
|
shader/simpleAlpha.frag \
|
2014-12-23 16:52:32 +00:00
|
|
|
shader/simpleAlphaUni.frag \
|
2014-01-01 06:04:41 +00:00
|
|
|
shader/flashMap.frag \
|
2014-12-23 17:56:00 +00:00
|
|
|
shader/minimal.vert \
|
2014-01-01 06:04:41 +00:00
|
|
|
shader/simple.vert \
|
|
|
|
shader/simpleColor.vert \
|
|
|
|
shader/sprite.vert \
|
Tilemap: Use vertex shader based autotile animation strategy
Previously, we would just stuff the entire tilemap vertex data
four times into the buffers, with only the autotile vertices
offset according to the animation frame. This meant we could
prepare the buffers once, and then just bind a different offset
for each animation frame without any shader changes, but it also
lead to a huge amount of data being duplicated (and blowing up
the buffer sizes).
The new method only requires one buffer, and instead animates by
recognizing vertices belonging to autotiles in a custom vertex
shader, which offsets them on the fly according to the animation
index.
With giant tilemaps, this method would turn out to be a little
less efficient, but considering the Tilemap is planned to be
rewritten to only hold the range of tiles visible on the screen
in its buffers, the on the fly offsetting will become neglient,
while at the same time the amount of data we have to send to the
GPU everytime the tilemap is updated is greatly reduced; so a
net win in the end.
2014-07-06 17:44:19 +00:00
|
|
|
shader/tilemap.vert \
|
2013-12-04 15:57:45 +00:00
|
|
|
shader/blur.frag \
|
|
|
|
shader/blurH.vert \
|
|
|
|
shader/blurV.vert \
|
2014-08-15 11:59:28 +00:00
|
|
|
shader/simpleMatrix.vert \
|
2014-08-28 21:11:10 +00:00
|
|
|
shader/tilemapvx.vert \
|
2014-11-29 16:23:42 +00:00
|
|
|
assets/liberation.ttf \
|
|
|
|
assets/icon.png
|
2013-12-04 15:57:45 +00:00
|
|
|
|
2014-09-07 03:23:10 +00:00
|
|
|
SHARED_FLUID {
|
|
|
|
DEFINES += SHARED_FLUID
|
2014-07-31 01:32:07 +00:00
|
|
|
}
|
|
|
|
|
2014-08-20 03:20:07 +00:00
|
|
|
INI_ENCODING {
|
|
|
|
DEFINES += INI_ENCODING
|
|
|
|
}
|
|
|
|
|
2013-09-22 22:17:51 +00:00
|
|
|
defineReplace(xxdOutput) {
|
|
|
|
return($$basename(1).xxd)
|
|
|
|
}
|
|
|
|
|
2013-09-01 14:27:21 +00:00
|
|
|
# xxd
|
2013-09-22 22:17:51 +00:00
|
|
|
xxd.output_function = xxdOutput
|
2013-09-01 14:27:21 +00:00
|
|
|
xxd.commands = xxd -i ${QMAKE_FILE_NAME} > ${QMAKE_FILE_OUT}
|
|
|
|
xxd.depends = $$EMBED
|
|
|
|
xxd.input = EMBED
|
|
|
|
xxd.variable_out = HEADERS
|
|
|
|
|
|
|
|
QMAKE_EXTRA_COMPILERS += xxd
|
|
|
|
|
|
|
|
|
|
|
|
BINDING_NULL {
|
|
|
|
SOURCES += binding-null/binding-null.cpp
|
|
|
|
}
|
|
|
|
|
|
|
|
BINDING_MRUBY {
|
|
|
|
LIBS += mruby/build/host/lib/libmruby.a
|
|
|
|
INCLUDEPATH += mruby/include
|
|
|
|
DEPENDPATH += mruby/include
|
|
|
|
DEFINES += BINDING_MRUBY
|
|
|
|
|
|
|
|
HEADERS += \
|
|
|
|
binding-mruby/binding-util.h \
|
|
|
|
binding-mruby/disposable-binding.h \
|
2013-09-01 18:32:23 +00:00
|
|
|
binding-mruby/flashable-binding.h \
|
|
|
|
binding-mruby/binding-types.h \
|
|
|
|
binding-mruby/sceneelement-binding.h \
|
|
|
|
binding-mruby/viewportelement-binding.h \
|
|
|
|
binding-mruby/serializable-binding.h \
|
|
|
|
binding-mruby/mrb-ext/file.h \
|
|
|
|
binding-mruby/mrb-ext/rwmem.h \
|
|
|
|
binding-mruby/mrb-ext/marshal.h
|
2013-09-01 14:27:21 +00:00
|
|
|
|
|
|
|
SOURCES += \
|
|
|
|
binding-mruby/binding-mruby.cpp \
|
|
|
|
binding-mruby/binding-util.cpp \
|
|
|
|
binding-mruby/window-binding.cpp \
|
|
|
|
binding-mruby/bitmap-binding.cpp \
|
|
|
|
binding-mruby/sprite-binding.cpp \
|
|
|
|
binding-mruby/font-binding.cpp \
|
|
|
|
binding-mruby/viewport-binding.cpp \
|
|
|
|
binding-mruby/plane-binding.cpp \
|
|
|
|
binding-mruby/audio-binding.cpp \
|
|
|
|
binding-mruby/tilemap-binding.cpp \
|
|
|
|
binding-mruby/etc-binding.cpp \
|
|
|
|
binding-mruby/graphics-binding.cpp \
|
|
|
|
binding-mruby/input-binding.cpp \
|
|
|
|
binding-mruby/table-binding.cpp \
|
|
|
|
binding-mruby/module_rpg.c \
|
|
|
|
binding-mruby/mrb-ext/file.cpp \
|
|
|
|
binding-mruby/mrb-ext/marshal.cpp \
|
|
|
|
binding-mruby/mrb-ext/rwmem.cpp \
|
|
|
|
binding-mruby/mrb-ext/kernel.cpp \
|
|
|
|
binding-mruby/mrb-ext/time.cpp
|
|
|
|
}
|
|
|
|
|
|
|
|
BINDING_MRI {
|
2014-10-11 13:32:35 +00:00
|
|
|
isEmpty(MRIVERSION) {
|
|
|
|
MRIVERSION = 2.1
|
|
|
|
}
|
|
|
|
|
|
|
|
PKGCONFIG += ruby-$$MRIVERSION
|
2013-09-01 14:27:21 +00:00
|
|
|
DEFINES += BINDING_MRI
|
|
|
|
|
2013-09-01 18:21:09 +00:00
|
|
|
# EMBED2 = binding-mri/module_rpg.rb
|
|
|
|
# xxdp.output = ${QMAKE_FILE_NAME}.xxd
|
|
|
|
# xxdp.commands = xxd+/xxd+ ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_OUT} --string
|
|
|
|
# xxdp.depends = $$EMBED2
|
|
|
|
# xxdp.input = EMBED2
|
|
|
|
# xxdp.variable_out = HEADERS
|
|
|
|
# QMAKE_EXTRA_COMPILERS += xxdp
|
2013-09-01 14:27:21 +00:00
|
|
|
|
|
|
|
HEADERS += \
|
2013-09-01 18:32:23 +00:00
|
|
|
binding-mri/binding-util.h \
|
2013-09-01 14:27:21 +00:00
|
|
|
binding-mri/binding-types.h \
|
2013-09-01 18:32:23 +00:00
|
|
|
binding-mri/serializable-binding.h \
|
|
|
|
binding-mri/disposable-binding.h \
|
|
|
|
binding-mri/sceneelement-binding.h \
|
|
|
|
binding-mri/viewportelement-binding.h \
|
|
|
|
binding-mri/flashable-binding.h
|
2013-09-01 14:27:21 +00:00
|
|
|
|
|
|
|
SOURCES += \
|
|
|
|
binding-mri/binding-mri.cpp \
|
2013-09-01 18:32:23 +00:00
|
|
|
binding-mri/binding-util.cpp \
|
|
|
|
binding-mri/table-binding.cpp \
|
|
|
|
binding-mri/etc-binding.cpp \
|
|
|
|
binding-mri/bitmap-binding.cpp \
|
|
|
|
binding-mri/font-binding.cpp \
|
|
|
|
binding-mri/graphics-binding.cpp \
|
|
|
|
binding-mri/input-binding.cpp \
|
|
|
|
binding-mri/sprite-binding.cpp \
|
|
|
|
binding-mri/viewport-binding.cpp \
|
|
|
|
binding-mri/plane-binding.cpp \
|
|
|
|
binding-mri/window-binding.cpp \
|
|
|
|
binding-mri/tilemap-binding.cpp \
|
|
|
|
binding-mri/audio-binding.cpp \
|
|
|
|
binding-mri/module_rpg.cpp \
|
2014-08-28 21:11:10 +00:00
|
|
|
binding-mri/filesystem-binding.cpp \
|
|
|
|
binding-mri/windowvx-binding.cpp \
|
|
|
|
binding-mri/tilemapvx-binding.cpp
|
2013-09-01 14:27:21 +00:00
|
|
|
}
|
2014-05-03 02:07:07 +00:00
|
|
|
|
|
|
|
OTHER_FILES += $$EMBED
|