Compare commits
33 Commits
hanetzer/m
...
master
Author | SHA1 | Date |
---|---|---|
Amaryllis Kulla | 6a875b30d2 | |
Amaryllis Kulla | 998aa9f846 | |
Amaryllis Kulla | b4c439c6eb | |
Amaryllis Kulla | 380b676777 | |
Amaryllis Kulla | a962c158db | |
Jaiden | cf6403ae65 | |
Ancurio | f138731f7c | |
mara | ac8f4b1594 | |
Jari Vetoniemi | 990843a50b | |
Jari Vetoniemi | 66dc9309db | |
Jonas Kulla | 5c117a55bf | |
Jonas Kulla | cb09036c55 | |
Jonas Kulla | 6903f2ab43 | |
Jonas Kulla | 9dc42914de | |
Jonas Kulla | 86194118a3 | |
Jonas Kulla | 98bdfcf758 | |
Jonas Kulla | 6fa5b8c856 | |
Jonas Kulla | d6b477b887 | |
Jonas Kulla | 9dcfb66e86 | |
Jonas Kulla | d4b9adc1d1 | |
Luis Caceres | 43cb318862 | |
Eliza Velasquez | bab22d87be | |
Jonas Kulla | ae59fcd112 | |
ReinUsesLisp | b5e5a26d8b | |
Jonas Kulla | 9f44ee5068 | |
Jonas Kulla | 183ebbed65 | |
Jonas Kulla | 7902d0942d | |
Jonas Kulla | 947974cac6 | |
Jonas Kulla | 2f81fbbf4b | |
Jonas Kulla | 7d9a85dbbd | |
Carsten Teibes | d427df0c2b | |
Carsten Teibes | b1bdf1e445 | |
Carsten Teibes | fde6a92197 |
|
@ -0,0 +1,5 @@
|
|||
root=true
|
||||
[*]
|
||||
end_of_line = lf
|
||||
indent_style = tab
|
||||
indent_size = 4
|
|
@ -99,7 +99,6 @@ find_package(ZLIB REQUIRED)
|
|||
## Setup main source ##
|
||||
|
||||
set(MAIN_HEADERS
|
||||
assets/resource.h
|
||||
src/quadarray.h
|
||||
src/audio.h
|
||||
src/binding.h
|
||||
|
@ -111,6 +110,7 @@ set(MAIN_HEADERS
|
|||
src/flashable.h
|
||||
src/font.h
|
||||
src/input.h
|
||||
src/iniconfig.h
|
||||
src/plane.h
|
||||
src/scene.h
|
||||
src/sprite.h
|
||||
|
@ -168,6 +168,7 @@ set(MAIN_SOURCE
|
|||
src/filesystem.cpp
|
||||
src/font.cpp
|
||||
src/input.cpp
|
||||
src/iniconfig.cpp
|
||||
src/plane.cpp
|
||||
src/scene.cpp
|
||||
src/sprite.cpp
|
||||
|
@ -207,6 +208,7 @@ set(MAIN_SOURCE
|
|||
)
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND MAIN_HEADERS windows/resource.h)
|
||||
list(APPEND MAIN_SOURCE windows/resource.rc)
|
||||
endif()
|
||||
|
||||
|
@ -415,6 +417,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE
|
|||
${PIXMAN_INCLUDE_DIRS}
|
||||
${PHYSFS_INCLUDE_DIRS}
|
||||
${SDL2_INCLUDE_DIRS} # Blindly assume other SDL bits are in same directory
|
||||
${SDL_SOUND_INCLUDE_DIRS}
|
||||
${Boost_INCLUDE_DIR}
|
||||
${MRI_INCLUDE_DIRS}
|
||||
${VORBISFILE_INCLUDE_DIRS}
|
||||
|
|
14
README.md
14
README.md
|
@ -1,13 +1,19 @@
|
|||
# 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.
|
||||
|
||||
It is licensed under the GNU General Public License v2+.
|
||||
|
||||
## Prebuilt binaries
|
||||
[**Linux (32bit/64bit)**](http://ancurio.bplaced.net/mkxp/generic/)
|
||||
[**Linux / Windows**](https://www.mapleshrine.eu/releases/)
|
||||
[**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 provide the glue code for an interpreted language environment to run game scripts in. Currently there are three bindings:
|
||||
|
@ -83,7 +89,7 @@ To run mkxp, you should have a graphics card capable of at least **OpenGL (ES) 2
|
|||
|
||||
## 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://www.dropbox.com/s/mtp44ur367m2zts/mkxp-depkit.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://mapleshrine.eu/depkits/linux64.tar.xz). Read the "README" for instructions.
|
||||
|
||||
## Configuration
|
||||
|
||||
|
@ -99,7 +105,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.
|
||||
|
||||
You can use this public domain soundfont: [GMGSx.sf2](https://www.dropbox.com/s/qxdvoxxcexsvn43/GMGSx.sf2?dl=0)
|
||||
You can use this public domain soundfont: [GMGSx.sf2](https://mapleshrine.eu/unsorted/GMGSx.sf2)
|
||||
|
||||
## Fonts
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
@ -147,7 +147,16 @@ static void mriBindingInit()
|
|||
_rb_define_module_function(mod, "raw_key_states", mkxpRawKeyStates);
|
||||
_rb_define_module_function(mod, "mouse_in_window", mkxpMouseInWindow);
|
||||
|
||||
/* Load global constants */
|
||||
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
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** 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 */
|
||||
#include <ruby/version.h>
|
||||
#if RUBY_API_VERSION_MINOR > 0
|
||||
#if RUBY_API_VERSION_MAJOR >= 2 && RUBY_API_VERSION_MINOR >= 1
|
||||
/* TODO: can mkxp use RUBY_TYPED_FREE_IMMEDIATELY here? */
|
||||
#define DEF_TYPE_FLAGS 0
|
||||
#else
|
||||
|
@ -90,7 +90,12 @@ raiseRbExc(const Exception &exc);
|
|||
template<rb_data_type_t *rbType>
|
||||
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);
|
||||
#endif
|
||||
}
|
||||
|
||||
template<class C>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2014 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2014 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
@ -114,8 +114,17 @@ static void mrbBindingInit(mrb_state *mrb)
|
|||
/* Load RPG module */
|
||||
mrb_load_irep(mrb, mrbModuleRPG);
|
||||
|
||||
/* Load global constants */
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -86,6 +86,12 @@
|
|||
# defScreenH=480
|
||||
|
||||
|
||||
# Override the game window title
|
||||
# (default: none)
|
||||
#
|
||||
# windowTitle=Custom Title
|
||||
|
||||
|
||||
# Enforce a static frame rate
|
||||
# (0 = disabled)
|
||||
#
|
||||
|
|
6
mkxp.pro
6
mkxp.pro
|
@ -8,6 +8,10 @@ INCLUDEPATH += . src
|
|||
|
||||
CONFIG(release, debug|release): DEFINES += NDEBUG
|
||||
|
||||
CONFIG += c++11
|
||||
# And for older qmake versions..
|
||||
QMAKE_CXXFLAGS += -std=c++11
|
||||
|
||||
isEmpty(BINDING) {
|
||||
BINDING = MRI
|
||||
}
|
||||
|
@ -89,6 +93,7 @@ HEADERS += \
|
|||
src/flashable.h \
|
||||
src/font.h \
|
||||
src/input.h \
|
||||
src/iniconfig.h \
|
||||
src/plane.h \
|
||||
src/scene.h \
|
||||
src/sprite.h \
|
||||
|
@ -145,6 +150,7 @@ SOURCES += \
|
|||
src/filesystem.cpp \
|
||||
src/font.cpp \
|
||||
src/input.cpp \
|
||||
src/iniconfig.cpp \
|
||||
src/plane.cpp \
|
||||
src/scene.cpp \
|
||||
src/sprite.cpp \
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2014 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2014 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2014 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2014 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2014 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2014 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2014 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2014 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2014 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2014 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
@ -33,6 +33,7 @@
|
|||
#include "debugwriter.h"
|
||||
#include "util.h"
|
||||
#include "sdl-util.h"
|
||||
#include "iniconfig.h"
|
||||
|
||||
#ifdef INI_ENCODING
|
||||
extern "C" {
|
||||
|
@ -161,6 +162,7 @@ void Config::read(int argc, char *argv[])
|
|||
PO_DESC(vsync, bool, false) \
|
||||
PO_DESC(defScreenW, int, 0) \
|
||||
PO_DESC(defScreenH, int, 0) \
|
||||
PO_DESC(windowTitle, std::string, "") \
|
||||
PO_DESC(fixedFramerate, int, 0) \
|
||||
PO_DESC(frameSkip, bool, true) \
|
||||
PO_DESC(syncToRefreshrate, bool, false) \
|
||||
|
@ -188,6 +190,27 @@ void Config::read(int argc, char *argv[])
|
|||
// Not gonna take your shit boost
|
||||
#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))
|
||||
|
||||
po::options_description podesc;
|
||||
|
@ -288,26 +311,32 @@ void Config::readGameINI()
|
|||
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";
|
||||
SDLRWStream iniFile(iniFilename.c_str(), "r");
|
||||
|
||||
if (iniFile)
|
||||
{
|
||||
try
|
||||
INIConfiguration ic;
|
||||
if(ic.load(iniFile.stream()))
|
||||
{
|
||||
po::store(po::parse_config_file(iniFile.stream(), podesc, true), vm);
|
||||
po::notify(vm);
|
||||
GUARD_ALL( game.title = ic.getStringProperty("Game", "Title"); );
|
||||
GUARD_ALL( game.scripts = ic.getStringProperty("Game", "Scripts"); );
|
||||
|
||||
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";
|
||||
}
|
||||
}
|
||||
catch (po::error &error)
|
||||
else
|
||||
{
|
||||
Debug() << iniFilename + ":" << error.what();
|
||||
Debug() << iniFilename + ": Failed to parse ini file";
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -315,11 +344,6 @@ void Config::readGameINI()
|
|||
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
|
||||
/* Can add more later */
|
||||
const char *languages[] =
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
@ -41,6 +41,7 @@ struct Config
|
|||
|
||||
int defScreenW;
|
||||
int defScreenH;
|
||||
std::string windowTitle;
|
||||
|
||||
int fixedFramerate;
|
||||
bool frameSkip;
|
||||
|
@ -87,6 +88,12 @@ struct Config
|
|||
|
||||
std::vector<std::string> rubyLoadpaths;
|
||||
|
||||
/* Editor flags */
|
||||
struct {
|
||||
bool debug;
|
||||
bool battleTest;
|
||||
} editor;
|
||||
|
||||
/* Game INI contents */
|
||||
struct {
|
||||
std::string scripts;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
@ -30,7 +30,6 @@
|
|||
#include <SDL_rect.h>
|
||||
|
||||
#include <al.h>
|
||||
#include <alc.h>
|
||||
#include <alext.h>
|
||||
|
||||
#include "sharedstate.h"
|
||||
|
@ -296,14 +295,14 @@ void EventThread::process(RGSSThreadData &rtData)
|
|||
if (fullscreen)
|
||||
{
|
||||
/* Prevent fullscreen flicker */
|
||||
strncpy(pendingTitle, rtData.config.game.title.c_str(),
|
||||
strncpy(pendingTitle, rtData.config.windowTitle.c_str(),
|
||||
sizeof(pendingTitle));
|
||||
havePendingTitle = true;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
SDL_SetWindowTitle(win, rtData.config.game.title.c_str());
|
||||
SDL_SetWindowTitle(win, rtData.config.windowTitle.c_str());
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -410,7 +409,7 @@ void EventThread::process(RGSSThreadData &rtData)
|
|||
|
||||
case REQUEST_MESSAGEBOX :
|
||||
SDL_ShowSimpleMessageBox(event.user.code,
|
||||
rtData.config.game.title.c_str(),
|
||||
rtData.config.windowTitle.c_str(),
|
||||
(const char*) event.user.data1, win);
|
||||
free(event.user.data1);
|
||||
msgBoxDone.set();
|
||||
|
@ -429,7 +428,7 @@ void EventThread::process(RGSSThreadData &rtData)
|
|||
break;
|
||||
|
||||
snprintf(buffer, sizeof(buffer), "%s - %d FPS",
|
||||
rtData.config.game.title.c_str(), event.user.code);
|
||||
rtData.config.windowTitle.c_str(), event.user.code);
|
||||
|
||||
/* Updating the window title in fullscreen
|
||||
* mode seems to cause flickering */
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
@ -36,8 +36,9 @@
|
|||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <alc.h>
|
||||
|
||||
struct RGSSThreadData;
|
||||
typedef struct ALCdevice_struct ALCdevice;
|
||||
struct SDL_Window;
|
||||
union SDL_Event;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
@ -311,18 +311,32 @@ struct FileSystemPrivate
|
|||
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,
|
||||
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->havePathCache = false;
|
||||
|
||||
PHYSFS_init(argv0);
|
||||
|
||||
PHYSFS_registerArchiver(&RGSS1_Archiver);
|
||||
PHYSFS_registerArchiver(&RGSS2_Archiver);
|
||||
PHYSFS_registerArchiver(&RGSS3_Archiver);
|
||||
|
||||
if (allowSymlinks)
|
||||
PHYSFS_permitSymbolicLinks(1);
|
||||
}
|
||||
|
@ -398,8 +412,8 @@ struct CacheEnumData
|
|||
}
|
||||
};
|
||||
|
||||
static void cacheEnumCB(void *d, const char *origdir,
|
||||
const char *fname)
|
||||
static PHYSFS_EnumerateCallbackResult
|
||||
cacheEnumCB(void *d, const char *origdir, const char *fname)
|
||||
{
|
||||
CacheEnumData &data = *static_cast<CacheEnumData*>(d);
|
||||
char fullPath[512];
|
||||
|
@ -426,7 +440,7 @@ static void cacheEnumCB(void *d, const char *origdir,
|
|||
|
||||
/* Iterate over its contents */
|
||||
data.fileLists.push(&list);
|
||||
PHYSFS_enumerateFilesCallback(fullPath, cacheEnumCB, d);
|
||||
PHYSFS_enumerate(fullPath, cacheEnumCB, d);
|
||||
data.fileLists.pop();
|
||||
}
|
||||
else
|
||||
|
@ -441,13 +455,15 @@ static void cacheEnumCB(void *d, const char *origdir,
|
|||
/* Add the lower -> mixed mapping of the file's full path */
|
||||
data.p->pathCache.insert(lowerCase, mixedCase);
|
||||
}
|
||||
|
||||
return PHYSFS_ENUM_OK;
|
||||
}
|
||||
|
||||
void FileSystem::createPathCache()
|
||||
{
|
||||
CacheEnumData data(p);
|
||||
data.fileLists.push(&p->fileLists[""]);
|
||||
PHYSFS_enumerateFilesCallback("", cacheEnumCB, &data);
|
||||
PHYSFS_enumerate("", cacheEnumCB, &data);
|
||||
|
||||
p->havePathCache = true;
|
||||
}
|
||||
|
@ -458,8 +474,8 @@ struct FontSetsCBData
|
|||
SharedFontState *sfs;
|
||||
};
|
||||
|
||||
static void fontSetEnumCB(void *data, const char *dir,
|
||||
const char *fname)
|
||||
static PHYSFS_EnumerateCallbackResult
|
||||
fontSetEnumCB (void *data, const char *dir, const char *fname)
|
||||
{
|
||||
FontSetsCBData *d = static_cast<FontSetsCBData*>(data);
|
||||
|
||||
|
@ -467,7 +483,7 @@ static void fontSetEnumCB(void *data, const char *dir,
|
|||
const char *ext = findExt(fname);
|
||||
|
||||
if (!ext)
|
||||
return;
|
||||
return PHYSFS_ENUM_OK;
|
||||
|
||||
char lowExt[8];
|
||||
size_t i;
|
||||
|
@ -477,7 +493,7 @@ static void fontSetEnumCB(void *data, const char *dir,
|
|||
lowExt[i] = '\0';
|
||||
|
||||
if (strcmp(lowExt, "ttf") && strcmp(lowExt, "otf"))
|
||||
return;
|
||||
return PHYSFS_ENUM_OK;
|
||||
|
||||
char filename[512];
|
||||
snprintf(filename, sizeof(filename), "%s/%s", dir, fname);
|
||||
|
@ -485,7 +501,7 @@ static void fontSetEnumCB(void *data, const char *dir,
|
|||
PHYSFS_File *handle = PHYSFS_openRead(filename);
|
||||
|
||||
if (!handle)
|
||||
return;
|
||||
return PHYSFS_ENUM_ERROR;
|
||||
|
||||
SDL_RWops ops;
|
||||
initReadOps(handle, ops, false);
|
||||
|
@ -493,31 +509,35 @@ static void fontSetEnumCB(void *data, const char *dir,
|
|||
d->sfs->initFontSetCB(ops, filename);
|
||||
|
||||
SDL_RWclose(&ops);
|
||||
|
||||
return PHYSFS_ENUM_OK;
|
||||
}
|
||||
|
||||
/* Basically just a case-insensitive search
|
||||
* for the folder "Fonts"... */
|
||||
static void findFontsFolderCB(void *data, const char *,
|
||||
const char *fname)
|
||||
static PHYSFS_EnumerateCallbackResult
|
||||
findFontsFolderCB(void *data, const char *, const char *fname)
|
||||
{
|
||||
size_t i = 0;
|
||||
char buffer[512];
|
||||
const char *s = fname;
|
||||
|
||||
while (s && i < sizeof(buffer))
|
||||
while (*s && i < sizeof(buffer))
|
||||
buffer[i++] = tolower(*s++);
|
||||
|
||||
buffer[i] = '\0';
|
||||
|
||||
if (strcmp(buffer, "fonts") == 0)
|
||||
PHYSFS_enumerateFilesCallback(fname, fontSetEnumCB, data);
|
||||
PHYSFS_enumerate(fname, fontSetEnumCB, data);
|
||||
|
||||
return PHYSFS_ENUM_OK;
|
||||
}
|
||||
|
||||
void FileSystem::initFontSets(SharedFontState &sfs)
|
||||
{
|
||||
FontSetsCBData d = { p, &sfs };
|
||||
|
||||
PHYSFS_enumerateFilesCallback(".", findFontsFolderCB, &d);
|
||||
PHYSFS_enumerate("", findFontsFolderCB, &d);
|
||||
}
|
||||
|
||||
struct OpenReadEnumData
|
||||
|
@ -550,19 +570,19 @@ struct OpenReadEnumData
|
|||
{}
|
||||
};
|
||||
|
||||
static void openReadEnumCB(void *d, const char *dirpath,
|
||||
const char *filename)
|
||||
static PHYSFS_EnumerateCallbackResult
|
||||
openReadEnumCB(void *d, const char *dirpath, const char *filename)
|
||||
{
|
||||
OpenReadEnumData &data = *static_cast<OpenReadEnumData*>(d);
|
||||
char buffer[512];
|
||||
const char *fullPath;
|
||||
|
||||
if (data.stopSearching)
|
||||
return;
|
||||
return PHYSFS_ENUM_STOP;
|
||||
|
||||
/* If there's not even a partial match, continue searching */
|
||||
if (strncmp(filename, data.filename, data.filenameN) != 0)
|
||||
return;
|
||||
return PHYSFS_ENUM_OK;
|
||||
|
||||
if (!*dirpath)
|
||||
{
|
||||
|
@ -580,7 +600,7 @@ static void openReadEnumCB(void *d, const char *dirpath,
|
|||
* of the extension), or up to a following '\0' (full match), we've
|
||||
* found our file */
|
||||
if (last != '.' && last != '\0')
|
||||
return;
|
||||
return PHYSFS_ENUM_STOP;
|
||||
|
||||
/* If the path cache is active, translate from lower case
|
||||
* to mixed case path */
|
||||
|
@ -595,9 +615,9 @@ static void openReadEnumCB(void *d, const char *dirpath,
|
|||
* be a deeper rooted problem somewhere within PhysFS.
|
||||
* Just abort alltogether. */
|
||||
data.stopSearching = true;
|
||||
data.physfsError = PHYSFS_getLastError();
|
||||
data.physfsError = PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode());
|
||||
|
||||
return;
|
||||
return PHYSFS_ENUM_ERROR;
|
||||
}
|
||||
|
||||
initReadOps(phys, data.ops, false);
|
||||
|
@ -608,6 +628,7 @@ static void openReadEnumCB(void *d, const char *dirpath,
|
|||
data.stopSearching = true;
|
||||
|
||||
++data.matchCount;
|
||||
return PHYSFS_ENUM_OK;
|
||||
}
|
||||
|
||||
void FileSystem::openRead(OpenHandler &handler, const char *filename)
|
||||
|
@ -653,7 +674,7 @@ void FileSystem::openRead(OpenHandler &handler, const char *filename)
|
|||
}
|
||||
else
|
||||
{
|
||||
PHYSFS_enumerateFilesCallback(dir, openReadEnumCB, &data);
|
||||
PHYSFS_enumerate(dir, openReadEnumCB, &data);
|
||||
}
|
||||
|
||||
if (data.physfsError)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -6,10 +6,6 @@
|
|||
|
||||
#include "debugwriter.h"
|
||||
|
||||
#ifdef SHARED_FLUID
|
||||
#include <fluidsynth.h>
|
||||
#endif
|
||||
|
||||
#if __LINUX__ || __ANDROID__
|
||||
#define FLUID_LIB "libfluidsynth.so.1"
|
||||
#elif __MACOSX__
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
#ifndef 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_synth_t fluid_synth_t;
|
||||
|
||||
|
@ -19,7 +25,12 @@ typedef int (*FLUIDSYNTHPROGRAMCHANGEPROC)(fluid_synth_t* synth, int chan, int p
|
|||
typedef fluid_settings_t* (*NEWFLUIDSETTINGSPROC)(void);
|
||||
typedef fluid_synth_t* (*NEWFLUIDSYNTHPROC)(fluid_settings_t* settings);
|
||||
typedef void (*DELETEFLUIDSETTINGSPROC)(fluid_settings_t* settings);
|
||||
|
||||
#if FLUIDSYNTH_VERSION_MAJOR == 1
|
||||
typedef int (*DELETEFLUIDSYNTHPROC)(fluid_synth_t* synth);
|
||||
#else
|
||||
typedef void (*DELETEFLUIDSYNTHPROC)(fluid_synth_t* synth);
|
||||
#endif
|
||||
|
||||
#define FLUID_FUNCS \
|
||||
FLUID_FUN(settings_setnum, FLUIDSETTINGSSETNUMPROC) \
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2014 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2014 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2014 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2014 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2014 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2014 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2014 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2014 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
@ -84,10 +84,9 @@ void GLBlendMode::apply(const BlendType &value)
|
|||
break;
|
||||
|
||||
case BlendSubstraction :
|
||||
// FIXME Alpha calculation is untested
|
||||
gl.BlendEquation(GL_FUNC_REVERSE_SUBTRACT);
|
||||
gl.BlendFuncSeparate(GL_SRC_ALPHA, GL_ONE,
|
||||
GL_ONE, GL_ONE);
|
||||
GL_ZERO, GL_ONE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
|
@ -708,6 +708,9 @@ void Graphics::transition(int duration,
|
|||
|
||||
setBrightness(255);
|
||||
|
||||
/* Capture new scene */
|
||||
p->screen.composite();
|
||||
|
||||
/* The PP frontbuffer will hold the current scene after the
|
||||
* composition step. Since the backbuffer is unused during
|
||||
* the transition, we can reuse it as the target buffer for
|
||||
|
@ -715,9 +718,6 @@ void Graphics::transition(int duration,
|
|||
TEXFBO ¤tScene = p->screen.getPP().frontBuffer();
|
||||
TEXFBO &transBuffer = p->screen.getPP().backBuffer();
|
||||
|
||||
/* Capture new scene */
|
||||
p->screen.composite();
|
||||
|
||||
/* If no transition bitmap is provided,
|
||||
* we can use a simplified shader */
|
||||
TransShader &transShader = shState->shaders().trans;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
**
|
||||
** This file is part of mkxp.
|
||||
**
|
||||
** Copyright (C) 2013 Jonas Kulla <Nyocurio@gmail.com>
|
||||
** Copyright (C) 2013 - 2021 Amaryllis Kulla <ancurio@mapleshrine.eu>
|
||||
**
|
||||
** mkxp is free software: you can redistribute it and/or modify
|
||||
** 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