Compare commits
1 Commits
master
...
hanetzer/m
Author | SHA1 | Date |
---|---|---|
Marty Plummer | ed29332523 |
|
@ -1,5 +0,0 @@
|
||||||
root=true
|
|
||||||
[*]
|
|
||||||
end_of_line = lf
|
|
||||||
indent_style = tab
|
|
||||||
indent_size = 4
|
|
|
@ -99,6 +99,7 @@ find_package(ZLIB REQUIRED)
|
||||||
## Setup main source ##
|
## Setup main source ##
|
||||||
|
|
||||||
set(MAIN_HEADERS
|
set(MAIN_HEADERS
|
||||||
|
assets/resource.h
|
||||||
src/quadarray.h
|
src/quadarray.h
|
||||||
src/audio.h
|
src/audio.h
|
||||||
src/binding.h
|
src/binding.h
|
||||||
|
@ -110,7 +111,6 @@ set(MAIN_HEADERS
|
||||||
src/flashable.h
|
src/flashable.h
|
||||||
src/font.h
|
src/font.h
|
||||||
src/input.h
|
src/input.h
|
||||||
src/iniconfig.h
|
|
||||||
src/plane.h
|
src/plane.h
|
||||||
src/scene.h
|
src/scene.h
|
||||||
src/sprite.h
|
src/sprite.h
|
||||||
|
@ -168,7 +168,6 @@ set(MAIN_SOURCE
|
||||||
src/filesystem.cpp
|
src/filesystem.cpp
|
||||||
src/font.cpp
|
src/font.cpp
|
||||||
src/input.cpp
|
src/input.cpp
|
||||||
src/iniconfig.cpp
|
|
||||||
src/plane.cpp
|
src/plane.cpp
|
||||||
src/scene.cpp
|
src/scene.cpp
|
||||||
src/sprite.cpp
|
src/sprite.cpp
|
||||||
|
@ -208,7 +207,6 @@ set(MAIN_SOURCE
|
||||||
)
|
)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
list(APPEND MAIN_HEADERS windows/resource.h)
|
|
||||||
list(APPEND MAIN_SOURCE windows/resource.rc)
|
list(APPEND MAIN_SOURCE windows/resource.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -417,7 +415,6 @@ target_include_directories(${PROJECT_NAME} PRIVATE
|
||||||
${PIXMAN_INCLUDE_DIRS}
|
${PIXMAN_INCLUDE_DIRS}
|
||||||
${PHYSFS_INCLUDE_DIRS}
|
${PHYSFS_INCLUDE_DIRS}
|
||||||
${SDL2_INCLUDE_DIRS} # Blindly assume other SDL bits are in same directory
|
${SDL2_INCLUDE_DIRS} # Blindly assume other SDL bits are in same directory
|
||||||
${SDL_SOUND_INCLUDE_DIRS}
|
|
||||||
${Boost_INCLUDE_DIR}
|
${Boost_INCLUDE_DIR}
|
||||||
${MRI_INCLUDE_DIRS}
|
${MRI_INCLUDE_DIRS}
|
||||||
${VORBISFILE_INCLUDE_DIRS}
|
${VORBISFILE_INCLUDE_DIRS}
|
||||||
|
|
14
README.md
14
README.md
|
@ -1,19 +1,13 @@
|
||||||
# mkxp
|
# mkxp
|
||||||
|
|
||||||
Discord community: https://discord.gg/A8xHE8P
|
|
||||||
Matrix space: https://matrix.to/#/#rpgmaker:mapleshrine.eu
|
|
||||||
Further links: https://mapleshrine.eu
|
|
||||||
|
|
||||||
mkxp is a project that seeks to provide a fully open source implementation of the Ruby Game Scripting System (RGSS) interface used in the popular game creation software "RPG Maker XP", "RPG Maker VX" and "RPG Maker VX Ace" (trademark by Enterbrain, Inc.), with focus on Linux. The goal is to be able to run games created with the above software natively without changing a single file.
|
mkxp is a project that seeks to provide a fully open source implementation of the Ruby Game Scripting System (RGSS) interface used in the popular game creation software "RPG Maker XP", "RPG Maker VX" and "RPG Maker VX Ace" (trademark by Enterbrain, Inc.), with focus on Linux. The goal is to be able to run games created with the above software natively without changing a single file.
|
||||||
|
|
||||||
It is licensed under the GNU General Public License v2+.
|
It is licensed under the GNU General Public License v2+.
|
||||||
|
|
||||||
## Prebuilt binaries
|
## Prebuilt binaries
|
||||||
[**Linux / Windows**](https://www.mapleshrine.eu/releases/)
|
[**Linux (32bit/64bit)**](http://ancurio.bplaced.net/mkxp/generic/)
|
||||||
[**OSX**](https://app.box.com/mkxpmacbuilds) by Ali
|
[**OSX**](https://app.box.com/mkxpmacbuilds) by Ali
|
||||||
|
[**Windows (mingw-w64 32bit)**](http://ancurio.bplaced.net/mkxp/mingw32/)
|
||||||
## Should I use mkxp
|
|
||||||
mkxp primarily targets technically versed users that are comfortable with Ruby / RGSS, and ideally know how to compile the project themselves. The reason for this is that for most games, due to Win32-API usage, mkxp is simply not a plug-and-play solution, but a building block with which a fully cross-platform version can be created in time.
|
|
||||||
|
|
||||||
## Bindings
|
## Bindings
|
||||||
Bindings provide the glue code for an interpreted language environment to run game scripts in. Currently there are three bindings:
|
Bindings provide the glue code for an interpreted language environment to run game scripts in. Currently there are three bindings:
|
||||||
|
@ -89,7 +83,7 @@ To run mkxp, you should have a graphics card capable of at least **OpenGL (ES) 2
|
||||||
|
|
||||||
## Dependency kit
|
## Dependency kit
|
||||||
|
|
||||||
To facilitate hacking, I have assembled a package containing all dependencies to compile mkxp on a bare-bones Ubuntu 12.04 64bit installation. Compatibility with other distributions has not been tested. You can download it [here](https://mapleshrine.eu/depkits/linux64.tar.xz). Read the "README" for instructions.
|
To facilitate hacking, I have assembled a package containing all dependencies to compile mkxp on a bare-bones Ubuntu 12.04 64bit installation. Compatibility with other distributions has not been tested. You can download it [here](https://www.dropbox.com/s/mtp44ur367m2zts/mkxp-depkit.tar.xz). Read the "README" for instructions.
|
||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
|
@ -105,7 +99,7 @@ Example: `./mkxp --gameFolder="my game" --vsync=true --fixedFramerate=60`
|
||||||
|
|
||||||
mkxp doesn't come with a soundfont by default, so you will have to supply it yourself (set its path in the config). Playback has been tested and should work reasonably well with all RTP assets.
|
mkxp doesn't come with a soundfont by default, so you will have to supply it yourself (set its path in the config). Playback has been tested and should work reasonably well with all RTP assets.
|
||||||
|
|
||||||
You can use this public domain soundfont: [GMGSx.sf2](https://mapleshrine.eu/unsorted/GMGSx.sf2)
|
You can use this public domain soundfont: [GMGSx.sf2](https://www.dropbox.com/s/qxdvoxxcexsvn43/GMGSx.sf2?dl=0)
|
||||||
|
|
||||||
## Fonts
|
## Fonts
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||||
|
<assemblyIdentity type="win32"
|
||||||
|
name="MKXP.Application"
|
||||||
|
version="2.0.0.0"
|
||||||
|
processorArchitecture="@ARCH@" />
|
||||||
|
<description>MKXP.Application</description>
|
||||||
|
<dependency>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity type="win32"
|
||||||
|
name="Microsoft.Windows.Common-Controls"
|
||||||
|
version="6.0.0.0"
|
||||||
|
language="*"
|
||||||
|
processorArchitecture="*"
|
||||||
|
publicKeyToken="6595b64144ccf1df" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity type="win32"
|
||||||
|
name="runtime"
|
||||||
|
version="1.0.0.0"
|
||||||
|
language="*"
|
||||||
|
processorArchitecture="@ARCH@" />
|
||||||
|
</dependentAssembly>
|
||||||
|
</dependency>
|
||||||
|
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<security>
|
||||||
|
<requestedPrivileges>
|
||||||
|
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||||
|
</requestedPrivileges>
|
||||||
|
</security>
|
||||||
|
</trustInfo>
|
||||||
|
</assembly>
|
|
@ -0,0 +1,30 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||||
|
<noInheritable></noInheritable>
|
||||||
|
<assemblyIdentity type="win32" name="runtime" version="1.0.0.0" processorArchitecture="@ARCH@" ></assemblyIdentity>
|
||||||
|
<!-- <file name="libstdc++-6.dll"></file> -->
|
||||||
|
<!-- <file name="libgcc_s_sjlj-1.dll"></file> -->
|
||||||
|
<file name="libboost_program_options.dll"></file>
|
||||||
|
<file name="libFLAC-8.dll"></file>
|
||||||
|
<file name="libfreetype-6.dll"></file>
|
||||||
|
<file name="libgcc_s_seh-1.dll"></file>
|
||||||
|
<file name="libjpeg-62.dll"></file>
|
||||||
|
<file name="libmodplug-1.dll"></file>
|
||||||
|
<file name="libogg-0.dll"></file>
|
||||||
|
<file name="libphysfs.dll"></file>
|
||||||
|
<file name="libpixman-1-0.dll"></file>
|
||||||
|
<file name="libpng16-16.dll"></file>
|
||||||
|
<file name="libSDL2-2-0-0.dll"></file>
|
||||||
|
<file name="libSDL_sound-1-0-1.dll"></file>
|
||||||
|
<file name="libsigc-2.0-0.dll"></file>
|
||||||
|
<file name="libspeex-1.dll"></file>
|
||||||
|
<file name="libstdc++-6.dll"></file>
|
||||||
|
<file name="libvorbis-0.dll"></file>
|
||||||
|
<file name="libvorbisfile-3.dll"></file>
|
||||||
|
<file name="libwebp-6.dll"></file>
|
||||||
|
<file name="OpenAL32.dll"></file>
|
||||||
|
<file name="ruby24.dll"></file>
|
||||||
|
<file name="SDL2_image.dll"></file>
|
||||||
|
<file name="SDL2_ttf.dll"></file>
|
||||||
|
<file name="zlib1.dll"></file>
|
||||||
|
</assembly>
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
@ -147,16 +147,7 @@ static void mriBindingInit()
|
||||||
_rb_define_module_function(mod, "raw_key_states", mkxpRawKeyStates);
|
_rb_define_module_function(mod, "raw_key_states", mkxpRawKeyStates);
|
||||||
_rb_define_module_function(mod, "mouse_in_window", mkxpMouseInWindow);
|
_rb_define_module_function(mod, "mouse_in_window", mkxpMouseInWindow);
|
||||||
|
|
||||||
/* Load global constants */
|
|
||||||
rb_gv_set("MKXP", Qtrue);
|
rb_gv_set("MKXP", Qtrue);
|
||||||
|
|
||||||
VALUE debug = rb_bool_new(shState->config().editor.debug);
|
|
||||||
if (rgssVer == 1)
|
|
||||||
rb_gv_set("DEBUG", debug);
|
|
||||||
else if (rgssVer >= 2)
|
|
||||||
rb_gv_set("TEST", debug);
|
|
||||||
|
|
||||||
rb_gv_set("BTEST", rb_bool_new(shState->config().editor.battleTest));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
@ -67,7 +67,7 @@ raiseRbExc(const Exception &exc);
|
||||||
|
|
||||||
/* 2.1 has added a new field (flags) to rb_data_type_t */
|
/* 2.1 has added a new field (flags) to rb_data_type_t */
|
||||||
#include <ruby/version.h>
|
#include <ruby/version.h>
|
||||||
#if RUBY_API_VERSION_MAJOR >= 2 && RUBY_API_VERSION_MINOR >= 1
|
#if RUBY_API_VERSION_MINOR > 0
|
||||||
/* TODO: can mkxp use RUBY_TYPED_FREE_IMMEDIATELY here? */
|
/* TODO: can mkxp use RUBY_TYPED_FREE_IMMEDIATELY here? */
|
||||||
#define DEF_TYPE_FLAGS 0
|
#define DEF_TYPE_FLAGS 0
|
||||||
#else
|
#else
|
||||||
|
@ -90,12 +90,7 @@ raiseRbExc(const Exception &exc);
|
||||||
template<rb_data_type_t *rbType>
|
template<rb_data_type_t *rbType>
|
||||||
static VALUE classAllocate(VALUE klass)
|
static VALUE classAllocate(VALUE klass)
|
||||||
{
|
{
|
||||||
/* 2.3 has changed the name of this function */
|
|
||||||
#if RUBY_API_VERSION_MAJOR >= 2 && RUBY_API_VERSION_MINOR >= 3
|
|
||||||
return rb_data_typed_object_wrap(klass, 0, rbType);
|
|
||||||
#else
|
|
||||||
return rb_data_typed_object_alloc(klass, 0, rbType);
|
return rb_data_typed_object_alloc(klass, 0, rbType);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class C>
|
template<class C>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
binding_src = [
|
||||||
|
'audio-binding.cpp',
|
||||||
|
'binding-mri.cpp',
|
||||||
|
'binding-util.cpp',
|
||||||
|
'bitmap-binding.cpp',
|
||||||
|
'etc-binding.cpp',
|
||||||
|
'filesystem-binding.cpp',
|
||||||
|
'font-binding.cpp',
|
||||||
|
'graphics-binding.cpp',
|
||||||
|
'input-binding.cpp',
|
||||||
|
'module_rpg.cpp',
|
||||||
|
'plane-binding.cpp',
|
||||||
|
'sprite-binding.cpp',
|
||||||
|
'table-binding.cpp',
|
||||||
|
'tilemap-binding.cpp',
|
||||||
|
'tilemapvx-binding.cpp',
|
||||||
|
'viewport-binding.cpp',
|
||||||
|
'window-binding.cpp',
|
||||||
|
'windowvx-binding.cpp'
|
||||||
|
]
|
||||||
|
ruby = dependency('-'.join(['ruby', get_option('MRIVERSION')]))
|
||||||
|
binding = build_target('binding',
|
||||||
|
binding_src,
|
||||||
|
dependencies : [ ruby, sdl2, sigcxx ],
|
||||||
|
include_directories : incdirs,
|
||||||
|
target_type : 'static_library')
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2014 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2014 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
@ -114,17 +114,8 @@ static void mrbBindingInit(mrb_state *mrb)
|
||||||
/* Load RPG module */
|
/* Load RPG module */
|
||||||
mrb_load_irep(mrb, mrbModuleRPG);
|
mrb_load_irep(mrb, mrbModuleRPG);
|
||||||
|
|
||||||
/* Load global constants */
|
|
||||||
mrb_define_global_const(mrb, "MKXP", mrb_true_value());
|
mrb_define_global_const(mrb, "MKXP", mrb_true_value());
|
||||||
|
|
||||||
mrb_value debug = rb_bool_new(shState->config().editor.debug);
|
|
||||||
if (rgssVer == 1)
|
|
||||||
mrb_define_global_const(mrb, "DEBUG", debug);
|
|
||||||
else if (rgssVer >= 2)
|
|
||||||
mrb_define_global_const(mrb, "TEST", debug);
|
|
||||||
|
|
||||||
mrb_define_global_const(mrb, "BTEST", mrb_bool_value(shState->config().editor.battleTest));
|
|
||||||
|
|
||||||
mrb_gc_arena_restore(mrb, arena);
|
mrb_gc_arena_restore(mrb, arena);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
binding_src = [
|
||||||
|
'audio-binding.cpp',
|
||||||
|
'binding-mruby.cpp',
|
||||||
|
'binding-util.cpp',
|
||||||
|
'bitmap-binding.cpp',
|
||||||
|
'etc-binding.cpp',
|
||||||
|
'font-binding.cpp',
|
||||||
|
'graphics-binding.cpp',
|
||||||
|
'input-binding.cpp',
|
||||||
|
'module_rpg.c',
|
||||||
|
'mrb-ext/file.cpp',
|
||||||
|
'mrb-ext/kernel.cpp',
|
||||||
|
'mrb-ext/marshal.cpp',
|
||||||
|
'mrb-ext/rwmem.cpp',
|
||||||
|
'mrb-ext/time.cpp',
|
||||||
|
'plane-binding.cpp',
|
||||||
|
'sprite-binding.cpp',
|
||||||
|
'table-binding.cpp',
|
||||||
|
'tilemap-binding.cpp',
|
||||||
|
'viewport-binding.cpp',
|
||||||
|
'window-binding.cpp',
|
||||||
|
]
|
||||||
|
|
||||||
|
binding = static_library('binding',
|
||||||
|
binding_src,
|
||||||
|
include_directories : incdirs)
|
||||||
|
|
||||||
|
error('mruby support is not yet implemented in meson')
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
binding = static_library('binding',
|
||||||
|
'binding-null.cpp',
|
||||||
|
dependencies : [ sdl2, sigcxx ],
|
||||||
|
include_directories : incdirs)
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
[binaries]
|
||||||
|
c = '/usr/bin/i686-w64-mingw32-gcc'
|
||||||
|
cpp = '/usr/bin/i686-w64-mingw32-g++'
|
||||||
|
ar = '/usr/bin/i686-w64-mingw32-ar'
|
||||||
|
strip = '/usr/bin/i686-w64-mingw32-strip'
|
||||||
|
pkgconfig = '/usr/bin/i686-w64-mingw32-pkg-config'
|
||||||
|
windres = '/usr/bin/i686-w64-mingw32-windres'
|
||||||
|
|
||||||
|
[host_machine]
|
||||||
|
system = 'windows'
|
||||||
|
cpu_family = 'i686'
|
||||||
|
cpu = 'x86'
|
||||||
|
endian = 'little'
|
||||||
|
|
||||||
|
[properties]
|
||||||
|
root = '/usr/i686-w64-mingw32'
|
|
@ -0,0 +1,16 @@
|
||||||
|
[binaries]
|
||||||
|
c = '/usr/bin/x86_64-w64-mingw32-gcc'
|
||||||
|
cpp = '/usr/bin/x86_64-w64-mingw32-g++'
|
||||||
|
ar = '/usr/bin/x86_64-w64-mingw32-ar'
|
||||||
|
strip = '/usr/bin/x86_64-w64-mingw32-strip'
|
||||||
|
pkgconfig = '/usr/bin/x86_64-w64-mingw32-pkg-config'
|
||||||
|
windres = '/usr/bin/x86_64-w64-mingw32-windres'
|
||||||
|
|
||||||
|
[host_machine]
|
||||||
|
system = 'windows'
|
||||||
|
cpu_family = 'x86_64'
|
||||||
|
cpu = 'amd64'
|
||||||
|
endian = 'little'
|
||||||
|
|
||||||
|
[properties]
|
||||||
|
root = '/usr/x86_64-w64-mingw32'
|
|
@ -0,0 +1,102 @@
|
||||||
|
project('mkxp',
|
||||||
|
'c', 'cpp',
|
||||||
|
default_options : [ 'c_std=c11', 'cpp_std=c++14'])
|
||||||
|
incdirs = include_directories(['assets', 'src'])
|
||||||
|
|
||||||
|
# xxd embedding
|
||||||
|
xxd_sh = find_program('tools/xxd.sh')
|
||||||
|
xxd_exe = find_program('xxd')
|
||||||
|
sed_exe = find_program('sed')
|
||||||
|
|
||||||
|
#bin2h_exe = executable('bin2h', 'tools/bin2h.c', native : true)
|
||||||
|
xxd_gen = generator(xxd_sh,
|
||||||
|
output : '@PLAINNAME@.xxd',
|
||||||
|
arguments : [ xxd_exe.path(), sed_exe.path(), '@INPUT@', '@OUTPUT@']
|
||||||
|
)
|
||||||
|
|
||||||
|
embedded = xxd_gen.process(
|
||||||
|
[
|
||||||
|
'assets/icon.png',
|
||||||
|
'assets/liberation.ttf',
|
||||||
|
'shader/bitmapBlit.frag',
|
||||||
|
'shader/blur.frag',
|
||||||
|
'shader/blurH.vert',
|
||||||
|
'shader/blurV.vert',
|
||||||
|
'shader/common.h',
|
||||||
|
'shader/flashMap.frag',
|
||||||
|
'shader/flatColor.frag',
|
||||||
|
'shader/gray.frag',
|
||||||
|
'shader/hue.frag',
|
||||||
|
'shader/minimal.vert',
|
||||||
|
'shader/plane.frag',
|
||||||
|
'shader/simple.frag',
|
||||||
|
'shader/simple.vert',
|
||||||
|
'shader/simpleAlpha.frag',
|
||||||
|
'shader/simpleAlphaUni.frag',
|
||||||
|
'shader/simpleColor.frag',
|
||||||
|
'shader/simpleColor.vert',
|
||||||
|
'shader/simpleMatrix.vert',
|
||||||
|
'shader/sprite.frag',
|
||||||
|
'shader/sprite.vert',
|
||||||
|
'shader/tilemap.vert',
|
||||||
|
'shader/tilemapvx.vert',
|
||||||
|
'shader/trans.frag',
|
||||||
|
'shader/transSimple.frag'
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
boost = dependency('boost', modules : ['program_options'])
|
||||||
|
openal = dependency('openal')
|
||||||
|
physfs = dependency('physfs', version : '>=2.1')
|
||||||
|
pixman = dependency('pixman-1')
|
||||||
|
sdl2 = dependency('sdl2')
|
||||||
|
sdl2_image = dependency('SDL2_image')
|
||||||
|
sdl2_ttf = dependency('SDL2_ttf')
|
||||||
|
sdl_sound = dependency('SDL_sound')
|
||||||
|
sigcxx = dependency('sigc++-2.0')
|
||||||
|
vorbisfile = dependency('vorbisfile')
|
||||||
|
zlib = dependency('zlib')
|
||||||
|
|
||||||
|
fluidsynth = []
|
||||||
|
if get_option('SHARED_FLUID')
|
||||||
|
fluidsynth = dependency('fluidsynth')
|
||||||
|
add_global_arguments('-DSHARED_FLUID', language : 'cpp')
|
||||||
|
endif
|
||||||
|
|
||||||
|
if get_option('RGSS2')
|
||||||
|
add_global_arguments('-DRGSS2', language : 'cpp')
|
||||||
|
endif
|
||||||
|
|
||||||
|
res = []
|
||||||
|
manifest = []
|
||||||
|
platdeps = []
|
||||||
|
if host_machine.system() == 'windows'
|
||||||
|
conf_data = configuration_data()
|
||||||
|
conf_data.set('ARCH', host_machine.cpu())
|
||||||
|
manifest = configure_file(
|
||||||
|
input : 'assets/mkxp.manifest.in',
|
||||||
|
output : 'mkxp.manifest',
|
||||||
|
configuration : conf_data
|
||||||
|
)
|
||||||
|
configure_file(
|
||||||
|
input : 'assets/runtime.manifest.in',
|
||||||
|
output : 'runtime.manifest',
|
||||||
|
configuration : conf_data
|
||||||
|
)
|
||||||
|
win = import('windows')
|
||||||
|
res = win.compile_resources([ 'assets/resource.rc' ],
|
||||||
|
include_directories : incdirs)
|
||||||
|
endif
|
||||||
|
|
||||||
|
subdir('-'.join(['binding', get_option('BINDING').to_lower()]))
|
||||||
|
|
||||||
|
subdir('src')
|
||||||
|
|
||||||
|
executable(
|
||||||
|
'mkxp',
|
||||||
|
sources : [ embedded, main_src, res ],
|
||||||
|
link_with : binding,
|
||||||
|
dependencies : [boost, fluidsynth, openal, physfs, pixman, sdl2,
|
||||||
|
sdl2_image, sdl2_ttf, sdl_sound, sigcxx, vorbisfile, zlib ],
|
||||||
|
include_directories : [ incdirs ]
|
||||||
|
)
|
|
@ -0,0 +1,5 @@
|
||||||
|
option('SHARED_FLUID', type : 'boolean', value : false, description : 'Dynamically link with fluidsynth at build time')
|
||||||
|
option('WORKDIR_CURRENT', type : 'boolean', value : false, description : 'Keep current directory on startup')
|
||||||
|
option('BINDING', type : 'combo', choices : ['MRI', 'MRUBY', 'NULL'], value : 'MRI', description : 'The Binding Type (MRI, MRUBY, NULL)')
|
||||||
|
option('MRIVERSION', type : 'string', value : '2.1', description : 'Version of MRI to link with')
|
||||||
|
option('RGSS2', type : 'boolean', value : false)
|
|
@ -86,12 +86,6 @@
|
||||||
# defScreenH=480
|
# defScreenH=480
|
||||||
|
|
||||||
|
|
||||||
# Override the game window title
|
|
||||||
# (default: none)
|
|
||||||
#
|
|
||||||
# windowTitle=Custom Title
|
|
||||||
|
|
||||||
|
|
||||||
# Enforce a static frame rate
|
# Enforce a static frame rate
|
||||||
# (0 = disabled)
|
# (0 = disabled)
|
||||||
#
|
#
|
||||||
|
|
6
mkxp.pro
6
mkxp.pro
|
@ -8,10 +8,6 @@ INCLUDEPATH += . src
|
||||||
|
|
||||||
CONFIG(release, debug|release): DEFINES += NDEBUG
|
CONFIG(release, debug|release): DEFINES += NDEBUG
|
||||||
|
|
||||||
CONFIG += c++11
|
|
||||||
# And for older qmake versions..
|
|
||||||
QMAKE_CXXFLAGS += -std=c++11
|
|
||||||
|
|
||||||
isEmpty(BINDING) {
|
isEmpty(BINDING) {
|
||||||
BINDING = MRI
|
BINDING = MRI
|
||||||
}
|
}
|
||||||
|
@ -93,7 +89,6 @@ HEADERS += \
|
||||||
src/flashable.h \
|
src/flashable.h \
|
||||||
src/font.h \
|
src/font.h \
|
||||||
src/input.h \
|
src/input.h \
|
||||||
src/iniconfig.h \
|
|
||||||
src/plane.h \
|
src/plane.h \
|
||||||
src/scene.h \
|
src/scene.h \
|
||||||
src/sprite.h \
|
src/sprite.h \
|
||||||
|
@ -150,7 +145,6 @@ SOURCES += \
|
||||||
src/filesystem.cpp \
|
src/filesystem.cpp \
|
||||||
src/font.cpp \
|
src/font.cpp \
|
||||||
src/input.cpp \
|
src/input.cpp \
|
||||||
src/iniconfig.cpp \
|
|
||||||
src/plane.cpp \
|
src/plane.cpp \
|
||||||
src/scene.cpp \
|
src/scene.cpp \
|
||||||
src/sprite.cpp \
|
src/sprite.cpp \
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2014 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2014 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2014 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2014 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2014 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2014 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2014 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2014 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2014 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2014 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
@ -33,7 +33,6 @@
|
||||||
#include "debugwriter.h"
|
#include "debugwriter.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "sdl-util.h"
|
#include "sdl-util.h"
|
||||||
#include "iniconfig.h"
|
|
||||||
|
|
||||||
#ifdef INI_ENCODING
|
#ifdef INI_ENCODING
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
@ -162,7 +161,6 @@ void Config::read(int argc, char *argv[])
|
||||||
PO_DESC(vsync, bool, false) \
|
PO_DESC(vsync, bool, false) \
|
||||||
PO_DESC(defScreenW, int, 0) \
|
PO_DESC(defScreenW, int, 0) \
|
||||||
PO_DESC(defScreenH, int, 0) \
|
PO_DESC(defScreenH, int, 0) \
|
||||||
PO_DESC(windowTitle, std::string, "") \
|
|
||||||
PO_DESC(fixedFramerate, int, 0) \
|
PO_DESC(fixedFramerate, int, 0) \
|
||||||
PO_DESC(frameSkip, bool, true) \
|
PO_DESC(frameSkip, bool, true) \
|
||||||
PO_DESC(syncToRefreshrate, bool, false) \
|
PO_DESC(syncToRefreshrate, bool, false) \
|
||||||
|
@ -190,27 +188,6 @@ void Config::read(int argc, char *argv[])
|
||||||
// Not gonna take your shit boost
|
// Not gonna take your shit boost
|
||||||
#define GUARD_ALL( exp ) try { exp } catch(...) {}
|
#define GUARD_ALL( exp ) try { exp } catch(...) {}
|
||||||
|
|
||||||
editor.debug = false;
|
|
||||||
editor.battleTest = false;
|
|
||||||
|
|
||||||
/* Read arguments sent from the editor */
|
|
||||||
if (argc > 1)
|
|
||||||
{
|
|
||||||
std::string argv1 = argv[1];
|
|
||||||
/* RGSS1 uses "debug", 2 and 3 use "test" */
|
|
||||||
if (argv1 == "debug" || argv1 == "test")
|
|
||||||
editor.debug = true;
|
|
||||||
else if (argv1 == "btest")
|
|
||||||
editor.battleTest = true;
|
|
||||||
|
|
||||||
/* Fix offset */
|
|
||||||
if (editor.debug || editor.battleTest)
|
|
||||||
{
|
|
||||||
argc--;
|
|
||||||
argv++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#define PO_DESC(key, type, def) (#key, po::value< type >()->default_value(def))
|
#define PO_DESC(key, type, def) (#key, po::value< type >()->default_value(def))
|
||||||
|
|
||||||
po::options_description podesc;
|
po::options_description podesc;
|
||||||
|
@ -311,32 +288,26 @@ void Config::readGameINI()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
po::options_description podesc;
|
||||||
|
podesc.add_options()
|
||||||
|
("Game.Title", po::value<std::string>())
|
||||||
|
("Game.Scripts", po::value<std::string>())
|
||||||
|
;
|
||||||
|
|
||||||
|
po::variables_map vm;
|
||||||
std::string iniFilename = execName + ".ini";
|
std::string iniFilename = execName + ".ini";
|
||||||
SDLRWStream iniFile(iniFilename.c_str(), "r");
|
SDLRWStream iniFile(iniFilename.c_str(), "r");
|
||||||
|
|
||||||
if (iniFile)
|
if (iniFile)
|
||||||
{
|
{
|
||||||
INIConfiguration ic;
|
try
|
||||||
if(ic.load(iniFile.stream()))
|
|
||||||
{
|
{
|
||||||
GUARD_ALL( game.title = ic.getStringProperty("Game", "Title"); );
|
po::store(po::parse_config_file(iniFile.stream(), podesc, true), vm);
|
||||||
GUARD_ALL( game.scripts = ic.getStringProperty("Game", "Scripts"); );
|
po::notify(vm);
|
||||||
|
|
||||||
strReplace(game.scripts, '\\', '/');
|
|
||||||
|
|
||||||
if (game.title.empty())
|
|
||||||
{
|
|
||||||
Debug() << iniFilename + ": Could not find Game.Title property";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (game.scripts.empty())
|
|
||||||
{
|
|
||||||
Debug() << iniFilename + ": Could not find Game.Scripts property";
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
catch (po::error &error)
|
||||||
{
|
{
|
||||||
Debug() << iniFilename + ": Failed to parse ini file";
|
Debug() << iniFilename + ":" << error.what();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -344,6 +315,11 @@ void Config::readGameINI()
|
||||||
Debug() << "FAILED to open" << iniFilename;
|
Debug() << "FAILED to open" << iniFilename;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GUARD_ALL( game.title = vm["Game.Title"].as<std::string>(); );
|
||||||
|
GUARD_ALL( game.scripts = vm["Game.Scripts"].as<std::string>(); );
|
||||||
|
|
||||||
|
strReplace(game.scripts, '\\', '/');
|
||||||
|
|
||||||
#ifdef INI_ENCODING
|
#ifdef INI_ENCODING
|
||||||
/* Can add more later */
|
/* Can add more later */
|
||||||
const char *languages[] =
|
const char *languages[] =
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
@ -41,7 +41,6 @@ struct Config
|
||||||
|
|
||||||
int defScreenW;
|
int defScreenW;
|
||||||
int defScreenH;
|
int defScreenH;
|
||||||
std::string windowTitle;
|
|
||||||
|
|
||||||
int fixedFramerate;
|
int fixedFramerate;
|
||||||
bool frameSkip;
|
bool frameSkip;
|
||||||
|
@ -88,12 +87,6 @@ struct Config
|
||||||
|
|
||||||
std::vector<std::string> rubyLoadpaths;
|
std::vector<std::string> rubyLoadpaths;
|
||||||
|
|
||||||
/* Editor flags */
|
|
||||||
struct {
|
|
||||||
bool debug;
|
|
||||||
bool battleTest;
|
|
||||||
} editor;
|
|
||||||
|
|
||||||
/* Game INI contents */
|
/* Game INI contents */
|
||||||
struct {
|
struct {
|
||||||
std::string scripts;
|
std::string scripts;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
@ -30,6 +30,7 @@
|
||||||
#include <SDL_rect.h>
|
#include <SDL_rect.h>
|
||||||
|
|
||||||
#include <al.h>
|
#include <al.h>
|
||||||
|
#include <alc.h>
|
||||||
#include <alext.h>
|
#include <alext.h>
|
||||||
|
|
||||||
#include "sharedstate.h"
|
#include "sharedstate.h"
|
||||||
|
@ -295,14 +296,14 @@ void EventThread::process(RGSSThreadData &rtData)
|
||||||
if (fullscreen)
|
if (fullscreen)
|
||||||
{
|
{
|
||||||
/* Prevent fullscreen flicker */
|
/* Prevent fullscreen flicker */
|
||||||
strncpy(pendingTitle, rtData.config.windowTitle.c_str(),
|
strncpy(pendingTitle, rtData.config.game.title.c_str(),
|
||||||
sizeof(pendingTitle));
|
sizeof(pendingTitle));
|
||||||
havePendingTitle = true;
|
havePendingTitle = true;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_SetWindowTitle(win, rtData.config.windowTitle.c_str());
|
SDL_SetWindowTitle(win, rtData.config.game.title.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -409,7 +410,7 @@ void EventThread::process(RGSSThreadData &rtData)
|
||||||
|
|
||||||
case REQUEST_MESSAGEBOX :
|
case REQUEST_MESSAGEBOX :
|
||||||
SDL_ShowSimpleMessageBox(event.user.code,
|
SDL_ShowSimpleMessageBox(event.user.code,
|
||||||
rtData.config.windowTitle.c_str(),
|
rtData.config.game.title.c_str(),
|
||||||
(const char*) event.user.data1, win);
|
(const char*) event.user.data1, win);
|
||||||
free(event.user.data1);
|
free(event.user.data1);
|
||||||
msgBoxDone.set();
|
msgBoxDone.set();
|
||||||
|
@ -428,7 +429,7 @@ void EventThread::process(RGSSThreadData &rtData)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
snprintf(buffer, sizeof(buffer), "%s - %d FPS",
|
snprintf(buffer, sizeof(buffer), "%s - %d FPS",
|
||||||
rtData.config.windowTitle.c_str(), event.user.code);
|
rtData.config.game.title.c_str(), event.user.code);
|
||||||
|
|
||||||
/* Updating the window title in fullscreen
|
/* Updating the window title in fullscreen
|
||||||
* mode seems to cause flickering */
|
* mode seems to cause flickering */
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
@ -36,9 +36,8 @@
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include <alc.h>
|
|
||||||
|
|
||||||
struct RGSSThreadData;
|
struct RGSSThreadData;
|
||||||
|
typedef struct ALCdevice_struct ALCdevice;
|
||||||
struct SDL_Window;
|
struct SDL_Window;
|
||||||
union SDL_Event;
|
union SDL_Event;
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
@ -311,32 +311,18 @@ struct FileSystemPrivate
|
||||||
bool havePathCache;
|
bool havePathCache;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void throwPhysfsError(const char *desc)
|
|
||||||
{
|
|
||||||
PHYSFS_ErrorCode ec = PHYSFS_getLastErrorCode();
|
|
||||||
const char *englishStr = PHYSFS_getErrorByCode(ec);
|
|
||||||
|
|
||||||
throw Exception(Exception::PHYSFSError, "%s: %s", desc, englishStr);
|
|
||||||
}
|
|
||||||
|
|
||||||
FileSystem::FileSystem(const char *argv0,
|
FileSystem::FileSystem(const char *argv0,
|
||||||
bool allowSymlinks)
|
bool allowSymlinks)
|
||||||
{
|
{
|
||||||
if (PHYSFS_init(argv0) == 0)
|
|
||||||
throwPhysfsError("Error initializing PhysFS");
|
|
||||||
|
|
||||||
/* One error (=return 0) turns the whole product to 0 */
|
|
||||||
int er = 1;
|
|
||||||
er *= PHYSFS_registerArchiver(&RGSS1_Archiver);
|
|
||||||
er *= PHYSFS_registerArchiver(&RGSS2_Archiver);
|
|
||||||
er *= PHYSFS_registerArchiver(&RGSS3_Archiver);
|
|
||||||
|
|
||||||
if (er == 0)
|
|
||||||
throwPhysfsError("Error registering PhysFS RGSS archiver");
|
|
||||||
|
|
||||||
p = new FileSystemPrivate;
|
p = new FileSystemPrivate;
|
||||||
p->havePathCache = false;
|
p->havePathCache = false;
|
||||||
|
|
||||||
|
PHYSFS_init(argv0);
|
||||||
|
|
||||||
|
PHYSFS_registerArchiver(&RGSS1_Archiver);
|
||||||
|
PHYSFS_registerArchiver(&RGSS2_Archiver);
|
||||||
|
PHYSFS_registerArchiver(&RGSS3_Archiver);
|
||||||
|
|
||||||
if (allowSymlinks)
|
if (allowSymlinks)
|
||||||
PHYSFS_permitSymbolicLinks(1);
|
PHYSFS_permitSymbolicLinks(1);
|
||||||
}
|
}
|
||||||
|
@ -412,8 +398,8 @@ struct CacheEnumData
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static PHYSFS_EnumerateCallbackResult
|
static void cacheEnumCB(void *d, const char *origdir,
|
||||||
cacheEnumCB(void *d, const char *origdir, const char *fname)
|
const char *fname)
|
||||||
{
|
{
|
||||||
CacheEnumData &data = *static_cast<CacheEnumData*>(d);
|
CacheEnumData &data = *static_cast<CacheEnumData*>(d);
|
||||||
char fullPath[512];
|
char fullPath[512];
|
||||||
|
@ -440,7 +426,7 @@ cacheEnumCB(void *d, const char *origdir, const char *fname)
|
||||||
|
|
||||||
/* Iterate over its contents */
|
/* Iterate over its contents */
|
||||||
data.fileLists.push(&list);
|
data.fileLists.push(&list);
|
||||||
PHYSFS_enumerate(fullPath, cacheEnumCB, d);
|
PHYSFS_enumerateFilesCallback(fullPath, cacheEnumCB, d);
|
||||||
data.fileLists.pop();
|
data.fileLists.pop();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -455,15 +441,13 @@ cacheEnumCB(void *d, const char *origdir, const char *fname)
|
||||||
/* Add the lower -> mixed mapping of the file's full path */
|
/* Add the lower -> mixed mapping of the file's full path */
|
||||||
data.p->pathCache.insert(lowerCase, mixedCase);
|
data.p->pathCache.insert(lowerCase, mixedCase);
|
||||||
}
|
}
|
||||||
|
|
||||||
return PHYSFS_ENUM_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileSystem::createPathCache()
|
void FileSystem::createPathCache()
|
||||||
{
|
{
|
||||||
CacheEnumData data(p);
|
CacheEnumData data(p);
|
||||||
data.fileLists.push(&p->fileLists[""]);
|
data.fileLists.push(&p->fileLists[""]);
|
||||||
PHYSFS_enumerate("", cacheEnumCB, &data);
|
PHYSFS_enumerateFilesCallback("", cacheEnumCB, &data);
|
||||||
|
|
||||||
p->havePathCache = true;
|
p->havePathCache = true;
|
||||||
}
|
}
|
||||||
|
@ -474,8 +458,8 @@ struct FontSetsCBData
|
||||||
SharedFontState *sfs;
|
SharedFontState *sfs;
|
||||||
};
|
};
|
||||||
|
|
||||||
static PHYSFS_EnumerateCallbackResult
|
static void fontSetEnumCB(void *data, const char *dir,
|
||||||
fontSetEnumCB (void *data, const char *dir, const char *fname)
|
const char *fname)
|
||||||
{
|
{
|
||||||
FontSetsCBData *d = static_cast<FontSetsCBData*>(data);
|
FontSetsCBData *d = static_cast<FontSetsCBData*>(data);
|
||||||
|
|
||||||
|
@ -483,7 +467,7 @@ fontSetEnumCB (void *data, const char *dir, const char *fname)
|
||||||
const char *ext = findExt(fname);
|
const char *ext = findExt(fname);
|
||||||
|
|
||||||
if (!ext)
|
if (!ext)
|
||||||
return PHYSFS_ENUM_OK;
|
return;
|
||||||
|
|
||||||
char lowExt[8];
|
char lowExt[8];
|
||||||
size_t i;
|
size_t i;
|
||||||
|
@ -493,7 +477,7 @@ fontSetEnumCB (void *data, const char *dir, const char *fname)
|
||||||
lowExt[i] = '\0';
|
lowExt[i] = '\0';
|
||||||
|
|
||||||
if (strcmp(lowExt, "ttf") && strcmp(lowExt, "otf"))
|
if (strcmp(lowExt, "ttf") && strcmp(lowExt, "otf"))
|
||||||
return PHYSFS_ENUM_OK;
|
return;
|
||||||
|
|
||||||
char filename[512];
|
char filename[512];
|
||||||
snprintf(filename, sizeof(filename), "%s/%s", dir, fname);
|
snprintf(filename, sizeof(filename), "%s/%s", dir, fname);
|
||||||
|
@ -501,7 +485,7 @@ fontSetEnumCB (void *data, const char *dir, const char *fname)
|
||||||
PHYSFS_File *handle = PHYSFS_openRead(filename);
|
PHYSFS_File *handle = PHYSFS_openRead(filename);
|
||||||
|
|
||||||
if (!handle)
|
if (!handle)
|
||||||
return PHYSFS_ENUM_ERROR;
|
return;
|
||||||
|
|
||||||
SDL_RWops ops;
|
SDL_RWops ops;
|
||||||
initReadOps(handle, ops, false);
|
initReadOps(handle, ops, false);
|
||||||
|
@ -509,35 +493,31 @@ fontSetEnumCB (void *data, const char *dir, const char *fname)
|
||||||
d->sfs->initFontSetCB(ops, filename);
|
d->sfs->initFontSetCB(ops, filename);
|
||||||
|
|
||||||
SDL_RWclose(&ops);
|
SDL_RWclose(&ops);
|
||||||
|
|
||||||
return PHYSFS_ENUM_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Basically just a case-insensitive search
|
/* Basically just a case-insensitive search
|
||||||
* for the folder "Fonts"... */
|
* for the folder "Fonts"... */
|
||||||
static PHYSFS_EnumerateCallbackResult
|
static void findFontsFolderCB(void *data, const char *,
|
||||||
findFontsFolderCB(void *data, const char *, const char *fname)
|
const char *fname)
|
||||||
{
|
{
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
char buffer[512];
|
char buffer[512];
|
||||||
const char *s = fname;
|
const char *s = fname;
|
||||||
|
|
||||||
while (*s && i < sizeof(buffer))
|
while (s && i < sizeof(buffer))
|
||||||
buffer[i++] = tolower(*s++);
|
buffer[i++] = tolower(*s++);
|
||||||
|
|
||||||
buffer[i] = '\0';
|
buffer[i] = '\0';
|
||||||
|
|
||||||
if (strcmp(buffer, "fonts") == 0)
|
if (strcmp(buffer, "fonts") == 0)
|
||||||
PHYSFS_enumerate(fname, fontSetEnumCB, data);
|
PHYSFS_enumerateFilesCallback(fname, fontSetEnumCB, data);
|
||||||
|
|
||||||
return PHYSFS_ENUM_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileSystem::initFontSets(SharedFontState &sfs)
|
void FileSystem::initFontSets(SharedFontState &sfs)
|
||||||
{
|
{
|
||||||
FontSetsCBData d = { p, &sfs };
|
FontSetsCBData d = { p, &sfs };
|
||||||
|
|
||||||
PHYSFS_enumerate("", findFontsFolderCB, &d);
|
PHYSFS_enumerateFilesCallback(".", findFontsFolderCB, &d);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct OpenReadEnumData
|
struct OpenReadEnumData
|
||||||
|
@ -570,19 +550,19 @@ struct OpenReadEnumData
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
static PHYSFS_EnumerateCallbackResult
|
static void openReadEnumCB(void *d, const char *dirpath,
|
||||||
openReadEnumCB(void *d, const char *dirpath, const char *filename)
|
const char *filename)
|
||||||
{
|
{
|
||||||
OpenReadEnumData &data = *static_cast<OpenReadEnumData*>(d);
|
OpenReadEnumData &data = *static_cast<OpenReadEnumData*>(d);
|
||||||
char buffer[512];
|
char buffer[512];
|
||||||
const char *fullPath;
|
const char *fullPath;
|
||||||
|
|
||||||
if (data.stopSearching)
|
if (data.stopSearching)
|
||||||
return PHYSFS_ENUM_STOP;
|
return;
|
||||||
|
|
||||||
/* If there's not even a partial match, continue searching */
|
/* If there's not even a partial match, continue searching */
|
||||||
if (strncmp(filename, data.filename, data.filenameN) != 0)
|
if (strncmp(filename, data.filename, data.filenameN) != 0)
|
||||||
return PHYSFS_ENUM_OK;
|
return;
|
||||||
|
|
||||||
if (!*dirpath)
|
if (!*dirpath)
|
||||||
{
|
{
|
||||||
|
@ -600,7 +580,7 @@ openReadEnumCB(void *d, const char *dirpath, const char *filename)
|
||||||
* of the extension), or up to a following '\0' (full match), we've
|
* of the extension), or up to a following '\0' (full match), we've
|
||||||
* found our file */
|
* found our file */
|
||||||
if (last != '.' && last != '\0')
|
if (last != '.' && last != '\0')
|
||||||
return PHYSFS_ENUM_STOP;
|
return;
|
||||||
|
|
||||||
/* If the path cache is active, translate from lower case
|
/* If the path cache is active, translate from lower case
|
||||||
* to mixed case path */
|
* to mixed case path */
|
||||||
|
@ -615,9 +595,9 @@ openReadEnumCB(void *d, const char *dirpath, const char *filename)
|
||||||
* be a deeper rooted problem somewhere within PhysFS.
|
* be a deeper rooted problem somewhere within PhysFS.
|
||||||
* Just abort alltogether. */
|
* Just abort alltogether. */
|
||||||
data.stopSearching = true;
|
data.stopSearching = true;
|
||||||
data.physfsError = PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode());
|
data.physfsError = PHYSFS_getLastError();
|
||||||
|
|
||||||
return PHYSFS_ENUM_ERROR;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
initReadOps(phys, data.ops, false);
|
initReadOps(phys, data.ops, false);
|
||||||
|
@ -628,7 +608,6 @@ openReadEnumCB(void *d, const char *dirpath, const char *filename)
|
||||||
data.stopSearching = true;
|
data.stopSearching = true;
|
||||||
|
|
||||||
++data.matchCount;
|
++data.matchCount;
|
||||||
return PHYSFS_ENUM_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileSystem::openRead(OpenHandler &handler, const char *filename)
|
void FileSystem::openRead(OpenHandler &handler, const char *filename)
|
||||||
|
@ -674,7 +653,7 @@ void FileSystem::openRead(OpenHandler &handler, const char *filename)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
PHYSFS_enumerate(dir, openReadEnumCB, &data);
|
PHYSFS_enumerateFilesCallback(dir, openReadEnumCB, &data);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.physfsError)
|
if (data.physfsError)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -6,6 +6,10 @@
|
||||||
|
|
||||||
#include "debugwriter.h"
|
#include "debugwriter.h"
|
||||||
|
|
||||||
|
#ifdef SHARED_FLUID
|
||||||
|
#include <fluidsynth.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if __LINUX__ || __ANDROID__
|
#if __LINUX__ || __ANDROID__
|
||||||
#define FLUID_LIB "libfluidsynth.so.1"
|
#define FLUID_LIB "libfluidsynth.so.1"
|
||||||
#elif __MACOSX__
|
#elif __MACOSX__
|
||||||
|
|
|
@ -1,12 +1,6 @@
|
||||||
#ifndef FLUIDFUN_H
|
#ifndef FLUIDFUN_H
|
||||||
#define FLUIDFUN_H
|
#define FLUIDFUN_H
|
||||||
|
|
||||||
#ifdef SHARED_FLUID
|
|
||||||
# include <fluidsynth.h>
|
|
||||||
#else
|
|
||||||
# define FLUIDSYNTH_VERSION_MAJOR 2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct _fluid_hashtable_t fluid_settings_t;
|
typedef struct _fluid_hashtable_t fluid_settings_t;
|
||||||
typedef struct _fluid_synth_t fluid_synth_t;
|
typedef struct _fluid_synth_t fluid_synth_t;
|
||||||
|
|
||||||
|
@ -25,12 +19,7 @@ typedef int (*FLUIDSYNTHPROGRAMCHANGEPROC)(fluid_synth_t* synth, int chan, int p
|
||||||
typedef fluid_settings_t* (*NEWFLUIDSETTINGSPROC)(void);
|
typedef fluid_settings_t* (*NEWFLUIDSETTINGSPROC)(void);
|
||||||
typedef fluid_synth_t* (*NEWFLUIDSYNTHPROC)(fluid_settings_t* settings);
|
typedef fluid_synth_t* (*NEWFLUIDSYNTHPROC)(fluid_settings_t* settings);
|
||||||
typedef void (*DELETEFLUIDSETTINGSPROC)(fluid_settings_t* settings);
|
typedef void (*DELETEFLUIDSETTINGSPROC)(fluid_settings_t* settings);
|
||||||
|
|
||||||
#if FLUIDSYNTH_VERSION_MAJOR == 1
|
|
||||||
typedef int (*DELETEFLUIDSYNTHPROC)(fluid_synth_t* synth);
|
typedef int (*DELETEFLUIDSYNTHPROC)(fluid_synth_t* synth);
|
||||||
#else
|
|
||||||
typedef void (*DELETEFLUIDSYNTHPROC)(fluid_synth_t* synth);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define FLUID_FUNCS \
|
#define FLUID_FUNCS \
|
||||||
FLUID_FUN(settings_setnum, FLUIDSETTINGSSETNUMPROC) \
|
FLUID_FUN(settings_setnum, FLUIDSETTINGSSETNUMPROC) \
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
**
|
**
|
||||||
** This file is part of mkxp.
|
** This file is part of mkxp.
|
||||||
**
|
**
|
||||||
** Copyright (C) 2014 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
** Copyright (C) 2014 Jonas Kulla <Nyocurio@gmail.com>
|
||||||
**
|
**
|
||||||
** mkxp is free software: you can redistribute it and/or modify
|
** mkxp is free software: you can redistribute it and/or modify
|
||||||
** it under the terms of the GNU General Public License as published by
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue