Compare commits
5 Commits
master
...
pulsejet/m
Author | SHA1 | Date |
---|---|---|
Varun Patil | 6fccac89e5 | |
Varun Patil | b90aa740bb | |
Varun Patil | a996d36047 | |
Varun Patil | 8b216995cc | |
Varun Patil | 39ac6aecf0 |
|
@ -1,5 +0,0 @@
|
||||||
root=true
|
|
||||||
[*]
|
|
||||||
end_of_line = lf
|
|
||||||
indent_style = tab
|
|
||||||
indent_size = 4
|
|
|
@ -110,7 +110,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 +167,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
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
@ -117,7 +117,7 @@ static void mrbBindingInit(mrb_state *mrb)
|
||||||
/* Load global constants */
|
/* 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);
|
mrb_value debug = mrb_bool_value(shState->config().editor.debug);
|
||||||
if (rgssVer == 1)
|
if (rgssVer == 1)
|
||||||
mrb_define_global_const(mrb, "DEBUG", debug);
|
mrb_define_global_const(mrb, "DEBUG", debug);
|
||||||
else if (rgssVer >= 2)
|
else if (rgssVer >= 2)
|
||||||
|
@ -298,7 +298,7 @@ runRMXPScripts(mrb_state *mrb, mrbc_context *ctx)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int scriptCount = mrb_ary_len(scriptMrb, scriptArray);
|
int scriptCount = RARRAY_LEN(scriptArray);
|
||||||
|
|
||||||
std::string decodeBuffer;
|
std::string decodeBuffer;
|
||||||
decodeBuffer.resize(0x1000);
|
decodeBuffer.resize(0x1000);
|
||||||
|
|
|
@ -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
|
||||||
|
@ -71,8 +71,7 @@ static const MrbExcData excData[] =
|
||||||
{ Shutdown, "SystemExit" },
|
{ Shutdown, "SystemExit" },
|
||||||
{ PHYSFS, "PHYSFSError" },
|
{ PHYSFS, "PHYSFSError" },
|
||||||
{ SDL, "SDLError" },
|
{ SDL, "SDLError" },
|
||||||
{ MKXP, "MKXPError" },
|
{ MKXP, "MKXPError" }
|
||||||
{ IO, "IOError" }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static elementsN(excData);
|
static elementsN(excData);
|
||||||
|
@ -118,6 +117,7 @@ MrbData::MrbData(mrb_state *mrb)
|
||||||
|
|
||||||
exc[TypeError] = mrb_class_get(mrb, "TypeError");
|
exc[TypeError] = mrb_class_get(mrb, "TypeError");
|
||||||
exc[ArgumentError] = mrb_class_get(mrb, "ArgumentError");
|
exc[ArgumentError] = mrb_class_get(mrb, "ArgumentError");
|
||||||
|
exc[IOError] = mrb_class_get(mrb, "IOError");
|
||||||
|
|
||||||
for (size_t i = 0; i < symDataN; ++i)
|
for (size_t i = 0; i < symDataN; ++i)
|
||||||
symbols[symData[i].ind] = mrb_intern_cstr(mrb, symData[i].str);
|
symbols[symData[i].ind] = mrb_intern_cstr(mrb, symData[i].str);
|
||||||
|
@ -134,6 +134,7 @@ static const MrbException excToMrbExc[] =
|
||||||
|
|
||||||
TypeError,
|
TypeError,
|
||||||
ArgumentError,
|
ArgumentError,
|
||||||
|
IOError,
|
||||||
|
|
||||||
PHYSFS, /* PHYSFSError */
|
PHYSFS, /* PHYSFSError */
|
||||||
SDL, /* SDLError */
|
SDL, /* SDLError */
|
||||||
|
|
|
@ -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
|
||||||
|
@ -28,6 +28,7 @@
|
||||||
#include <mruby/data.h>
|
#include <mruby/data.h>
|
||||||
#include <mruby/variable.h>
|
#include <mruby/variable.h>
|
||||||
#include <mruby/class.h>
|
#include <mruby/class.h>
|
||||||
|
#include <mruby/string.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
@ -90,6 +91,7 @@ enum MrbException
|
||||||
|
|
||||||
TypeError,
|
TypeError,
|
||||||
ArgumentError,
|
ArgumentError,
|
||||||
|
IOError,
|
||||||
|
|
||||||
MrbExceptionsMax
|
MrbExceptionsMax
|
||||||
};
|
};
|
||||||
|
@ -352,11 +354,13 @@ inline mrb_value
|
||||||
objectLoad(mrb_state *mrb, mrb_value self, const mrb_data_type &type)
|
objectLoad(mrb_state *mrb, mrb_value self, const mrb_data_type &type)
|
||||||
{
|
{
|
||||||
RClass *klass = mrb_class_ptr(self);
|
RClass *klass = mrb_class_ptr(self);
|
||||||
char *data;
|
|
||||||
int data_len;
|
|
||||||
mrb_get_args(mrb, "s", &data, &data_len);
|
|
||||||
|
|
||||||
C *c = C::deserialize(data, data_len);
|
mrb_value data;
|
||||||
|
mrb_get_args(mrb, "S", &data);
|
||||||
|
|
||||||
|
int data_len = mrb_string_value_len(mrb, data);
|
||||||
|
|
||||||
|
C *c = C::deserialize(RSTRING_PTR(data), data_len);
|
||||||
|
|
||||||
RData *obj = mrb_data_object_alloc(mrb, klass, c, &type);
|
RData *obj = mrb_data_object_alloc(mrb, klass, c, &type);
|
||||||
mrb_value obj_value = mrb_obj_value(obj);
|
mrb_value obj_value = mrb_obj_value(obj);
|
||||||
|
|
|
@ -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
|
||||||
|
@ -49,7 +49,12 @@ MRB_METHOD(fontInitialize)
|
||||||
|
|
||||||
mrb_get_args(mrb, "|zi", &name, &size);
|
mrb_get_args(mrb, "|zi", &name, &size);
|
||||||
|
|
||||||
Font *f = new Font(name, size);
|
Font *f;
|
||||||
|
|
||||||
|
std::vector<std::string> names;
|
||||||
|
names.push_back(name);
|
||||||
|
|
||||||
|
f = new Font(&names, size);
|
||||||
|
|
||||||
setPrivateData(self, f, FontType);
|
setPrivateData(self, f, FontType);
|
||||||
|
|
||||||
|
@ -86,9 +91,7 @@ MRB_METHOD(fontInitializeCopy)
|
||||||
|
|
||||||
MRB_METHOD(FontGetName)
|
MRB_METHOD(FontGetName)
|
||||||
{
|
{
|
||||||
Font *f = getPrivateData<Font>(mrb, self);
|
return mrb_iv_get(mrb, self, mrb_intern_cstr(mrb, "name"));
|
||||||
|
|
||||||
return mrb_str_new_cstr(mrb, f->getName());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MRB_METHOD(FontSetName)
|
MRB_METHOD(FontSetName)
|
||||||
|
@ -98,7 +101,11 @@ MRB_METHOD(FontSetName)
|
||||||
mrb_value name;
|
mrb_value name;
|
||||||
mrb_get_args(mrb, "S", &name);
|
mrb_get_args(mrb, "S", &name);
|
||||||
|
|
||||||
f->setName(RSTRING_PTR(name));
|
std::vector<std::string> names;
|
||||||
|
names.push_back(RSTRING_PTR(name));
|
||||||
|
|
||||||
|
f->setName(names);
|
||||||
|
mrb_iv_set(mrb, self, mrb_intern_cstr(mrb, "name"), name);
|
||||||
|
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
@ -135,17 +142,21 @@ DEF_KLASS_PROP(Font, mrb_bool, DefaultItalic, "b", bool)
|
||||||
DEF_KLASS_PROP(Font, mrb_bool, DefaultOutline, "b", bool)
|
DEF_KLASS_PROP(Font, mrb_bool, DefaultOutline, "b", bool)
|
||||||
DEF_KLASS_PROP(Font, mrb_bool, DefaultShadow, "b", bool)
|
DEF_KLASS_PROP(Font, mrb_bool, DefaultShadow, "b", bool)
|
||||||
|
|
||||||
MRB_FUNCTION(FontGetDefaultName)
|
MRB_METHOD(FontGetDefaultName)
|
||||||
{
|
{
|
||||||
return mrb_str_new_cstr(mrb, Font::getDefaultName());
|
return mrb_iv_get(mrb, self, mrb_intern_cstr(mrb, "default_name"));
|
||||||
}
|
}
|
||||||
|
|
||||||
MRB_FUNCTION(FontSetDefaultName)
|
MRB_METHOD(FontSetDefaultName)
|
||||||
{
|
{
|
||||||
mrb_value nameObj;
|
mrb_value nameObj;
|
||||||
mrb_get_args(mrb, "S", &nameObj);
|
mrb_get_args(mrb, "S", &nameObj);
|
||||||
|
|
||||||
Font::setDefaultName(RSTRING_PTR(nameObj));
|
std::vector<std::string> names;
|
||||||
|
names.push_back(RSTRING_PTR(nameObj));
|
||||||
|
|
||||||
|
Font::setDefaultName(names, shState->fontState());
|
||||||
|
mrb_iv_set(mrb, self, mrb_intern_cstr(mrb, "default_name"), nameObj);
|
||||||
|
|
||||||
return nameObj;
|
return nameObj;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -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
|
||||||
|
@ -596,7 +596,7 @@ fileBindingInit(mrb_state *mrb)
|
||||||
mrb_define_method(mrb, klass, "path", fileGetPath, MRB_ARGS_NONE());
|
mrb_define_method(mrb, klass, "path", fileGetPath, MRB_ARGS_NONE());
|
||||||
|
|
||||||
/* FileTest */
|
/* FileTest */
|
||||||
RClass *module = mrb_define_module(mrb, "FileTest");
|
RClass *module = mrb_define_module(mrb, "MKXPFileTest");
|
||||||
mrb_define_module_function(mrb, module, "exist?", fileTestDoesExist, MRB_ARGS_REQ(1));
|
mrb_define_module_function(mrb, module, "exist?", fileTestDoesExist, MRB_ARGS_REQ(1));
|
||||||
mrb_define_module_function(mrb, module, "directory?", fileTestIsDirectory, MRB_ARGS_REQ(1));
|
mrb_define_module_function(mrb, module, "directory?", fileTestIsDirectory, MRB_ARGS_REQ(1));
|
||||||
mrb_define_module_function(mrb, module, "file?", fileTestIsFile, MRB_ARGS_REQ(1));
|
mrb_define_module_function(mrb, module, "file?", fileTestIsFile, MRB_ARGS_REQ(1));
|
||||||
|
|
|
@ -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
|
||||||
|
@ -172,7 +172,7 @@ MRB_FUNCTION(kernelLoadData)
|
||||||
mrb_get_args(mrb, "z", &filename);
|
mrb_get_args(mrb, "z", &filename);
|
||||||
|
|
||||||
SDL_RWops ops;
|
SDL_RWops ops;
|
||||||
GUARD_EXC( shState->fileSystem().openRead(ops, filename); )
|
GUARD_EXC( shState->fileSystem().openReadRaw(ops, filename); )
|
||||||
|
|
||||||
mrb_value obj;
|
mrb_value obj;
|
||||||
try { obj = marshalLoadInt(mrb, &ops); }
|
try { obj = marshalLoadInt(mrb, &ops); }
|
||||||
|
|
|
@ -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
|
||||||
|
@ -473,8 +473,8 @@ read_value(MarshalContext *ctx)
|
||||||
mrb_state *mrb = ctx->mrb;
|
mrb_state *mrb = ctx->mrb;
|
||||||
int8_t type = ctx->readByte();
|
int8_t type = ctx->readByte();
|
||||||
mrb_value value;
|
mrb_value value;
|
||||||
if (mrb->arena_idx > maxArena)
|
if (mrb->gc.arena_idx > maxArena)
|
||||||
maxArena = mrb->arena_idx;
|
maxArena = mrb->gc.arena_idx;
|
||||||
|
|
||||||
int arena = mrb_gc_arena_save(mrb);
|
int arena = mrb_gc_arena_save(mrb);
|
||||||
|
|
||||||
|
@ -676,7 +676,7 @@ static void
|
||||||
write_array(MarshalContext *ctx, mrb_value array)
|
write_array(MarshalContext *ctx, mrb_value array)
|
||||||
{
|
{
|
||||||
mrb_state *mrb = ctx->mrb;
|
mrb_state *mrb = ctx->mrb;
|
||||||
int len = mrb_ary_len(mrb, array);
|
int len = RARRAY_LEN(array);
|
||||||
write_fixnum(ctx, len);
|
write_fixnum(ctx, len);
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
@ -687,8 +687,6 @@ write_array(MarshalContext *ctx, mrb_value array)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
KHASH_DECLARE(ht, mrb_value, mrb_value, 1)
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
write_hash(MarshalContext *ctx, mrb_value hash)
|
write_hash(MarshalContext *ctx, mrb_value hash)
|
||||||
{
|
{
|
||||||
|
@ -707,7 +705,7 @@ write_hash(MarshalContext *ctx, mrb_value hash)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
write_value(ctx, kh_key(h, k));
|
write_value(ctx, kh_key(h, k));
|
||||||
write_value(ctx, kh_val(h, k));
|
write_value(ctx, kh_val(h, k).v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -732,7 +730,7 @@ write_object(MarshalContext *ctx, mrb_value object)
|
||||||
write_value(ctx, mrb_str_intern(mrb, path));
|
write_value(ctx, mrb_str_intern(mrb, path));
|
||||||
|
|
||||||
mrb_value iv_ary = mrb_obj_instance_variables(mrb, object);
|
mrb_value iv_ary = mrb_obj_instance_variables(mrb, object);
|
||||||
int iv_count = mrb_ary_len(mrb, iv_ary);
|
int iv_count = RARRAY_LEN(iv_ary);
|
||||||
write_fixnum(ctx, iv_count);
|
write_fixnum(ctx, iv_count);
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -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
|
||||||
|
|
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" {
|
||||||
|
@ -311,32 +310,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 +337,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
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -483,7 +469,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 PHYSFS_ENUM_STOP;
|
||||||
|
|
||||||
char lowExt[8];
|
char lowExt[8];
|
||||||
size_t i;
|
size_t i;
|
||||||
|
@ -493,7 +479,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 PHYSFS_ENUM_STOP;
|
||||||
|
|
||||||
char filename[512];
|
char filename[512];
|
||||||
snprintf(filename, sizeof(filename), "%s/%s", dir, fname);
|
snprintf(filename, sizeof(filename), "%s/%s", dir, fname);
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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) 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
|
||||||
|
@ -84,9 +84,10 @@ void GLBlendMode::apply(const BlendType &value)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BlendSubstraction :
|
case BlendSubstraction :
|
||||||
|
// FIXME Alpha calculation is untested
|
||||||
gl.BlendEquation(GL_FUNC_REVERSE_SUBTRACT);
|
gl.BlendEquation(GL_FUNC_REVERSE_SUBTRACT);
|
||||||
gl.BlendFuncSeparate(GL_SRC_ALPHA, GL_ONE,
|
gl.BlendFuncSeparate(GL_SRC_ALPHA, GL_ONE,
|
||||||
GL_ZERO, GL_ONE);
|
GL_ONE, GL_ONE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
@ -708,9 +708,6 @@ void Graphics::transition(int duration,
|
||||||
|
|
||||||
setBrightness(255);
|
setBrightness(255);
|
||||||
|
|
||||||
/* Capture new scene */
|
|
||||||
p->screen.composite();
|
|
||||||
|
|
||||||
/* The PP frontbuffer will hold the current scene after the
|
/* The PP frontbuffer will hold the current scene after the
|
||||||
* composition step. Since the backbuffer is unused during
|
* composition step. Since the backbuffer is unused during
|
||||||
* the transition, we can reuse it as the target buffer for
|
* the transition, we can reuse it as the target buffer for
|
||||||
|
@ -718,6 +715,9 @@ void Graphics::transition(int duration,
|
||||||
TEXFBO ¤tScene = p->screen.getPP().frontBuffer();
|
TEXFBO ¤tScene = p->screen.getPP().frontBuffer();
|
||||||
TEXFBO &transBuffer = p->screen.getPP().backBuffer();
|
TEXFBO &transBuffer = p->screen.getPP().backBuffer();
|
||||||
|
|
||||||
|
/* Capture new scene */
|
||||||
|
p->screen.composite();
|
||||||
|
|
||||||
/* If no transition bitmap is provided,
|
/* If no transition bitmap is provided,
|
||||||
* we can use a simplified shader */
|
* we can use a simplified shader */
|
||||||
TransShader &transShader = shState->shaders().trans;
|
TransShader &transShader = shState->shaders().trans;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue