mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-21 14:29:55 +00:00
Merge branch 'master' into linux
This commit is contained in:
commit
6d23c773aa
18 changed files with 263 additions and 148 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
bin/
|
bin/
|
||||||
lib/
|
lib/
|
||||||
oneshot\.dir/
|
*.dir/
|
||||||
x64/
|
x64/
|
||||||
|
|
||||||
Makefile*
|
Makefile*
|
||||||
|
|
@ -28,6 +28,7 @@ __pycache__
|
||||||
/dist
|
/dist
|
||||||
/debug
|
/debug
|
||||||
/release
|
/release
|
||||||
|
steamshim_parent/build/
|
||||||
|
|
||||||
object_script.*
|
object_script.*
|
||||||
rpgscript.bat
|
rpgscript.bat
|
||||||
|
|
@ -53,3 +54,5 @@ conan_imports_manifest\.txt
|
||||||
package/
|
package/
|
||||||
|
|
||||||
oclint/
|
oclint/
|
||||||
|
|
||||||
|
steamworks/
|
||||||
|
|
@ -2,44 +2,18 @@ cmake_minimum_required(VERSION 2.8.11)
|
||||||
Project(oneshot)
|
Project(oneshot)
|
||||||
|
|
||||||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
||||||
conan_basic_setup()
|
conan_basic_setup(TARGETS)
|
||||||
|
|
||||||
## Setup options ##
|
## Setup options ##
|
||||||
|
|
||||||
option(STEAM "Build for Steam" ON)
|
option(STEAM "Build for Steam" OFF)
|
||||||
|
set(STEAMWORKS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/steamworks" CACHE PATH "Path to Steamworks folder")
|
||||||
|
option(DEBUG "Debug mode" OFF)
|
||||||
|
|
||||||
## Misc setup ##
|
## Misc setup ##
|
||||||
|
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
# IF("${CMAKE_SYSTEM}" MATCHES "Linux")
|
|
||||||
# SET(LINUX ON)
|
|
||||||
# ENDIF()
|
|
||||||
|
|
||||||
# set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
|
|
||||||
|
|
||||||
# IF(LINUX)
|
|
||||||
# if(CMAKE_SIZEOF_VOID_P MATCHES "8" AND NOT(FORCE32) )
|
|
||||||
# set(CMAKE_EXECUTABLE_SUFFIX ".bin.x86_64")
|
|
||||||
# set(BIN_RPATH "\$ORIGIN/lib64")
|
|
||||||
# set(LIB_PATH "lib64")
|
|
||||||
# else()
|
|
||||||
# set(CMAKE_EXECUTABLE_SUFFIX ".bin.x86")
|
|
||||||
# set(BIN_RPATH "\$ORIGIN/lib")
|
|
||||||
# set(LIB_PATH "lib")
|
|
||||||
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FILE_OFFSET_BITS=64")
|
|
||||||
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FILE_OFFSET_BITS=64")
|
|
||||||
# endif()
|
|
||||||
# elseif(APPLE)
|
|
||||||
# SET(BIN_RPATH "@executable_path/../Frameworks")
|
|
||||||
# set(LIB_PATH "lib")
|
|
||||||
# endif()
|
|
||||||
|
|
||||||
# set(CMAKE_SKIP_BUILD_RPATH TRUE)
|
|
||||||
# set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
|
|
||||||
# set(CMAKE_INSTALL_RPATH ${BIN_RPATH})
|
|
||||||
# set(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
|
|
||||||
|
|
||||||
## Setup main source ##
|
## Setup main source ##
|
||||||
|
|
||||||
set(MAIN_HEADERS
|
set(MAIN_HEADERS
|
||||||
|
|
@ -150,10 +124,13 @@ set(MAIN_SOURCE
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
list(APPEND MAIN_SOURCE assets/resources.rc)
|
list(APPEND MAIN_SOURCE assets/resources.rc)
|
||||||
list(APPEND DEFINES UNICODE)
|
list(APPEND DEFINES UNICODE)
|
||||||
list(APPEND PLATFORM_LIBRARIES Secur32)
|
list(APPEND PLATFORM_LIBRARIES Secur32 Shlwapi)
|
||||||
include_directories(
|
include_directories(
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/windows
|
${CMAKE_CURRENT_BINARY_DIR}/windows
|
||||||
)
|
)
|
||||||
|
elseif(APPLE)
|
||||||
|
list(APPEND MAIN_HEADERS src/mac-desktop.h)
|
||||||
|
list(APPEND MAIN_SOURCE src/mac-desktop.mm)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (STEAM)
|
if (STEAM)
|
||||||
|
|
@ -262,6 +239,7 @@ set(BINDING_HEADERS
|
||||||
binding-mri/sceneelement-binding.h
|
binding-mri/sceneelement-binding.h
|
||||||
binding-mri/viewportelement-binding.h
|
binding-mri/viewportelement-binding.h
|
||||||
binding-mri/flashable-binding.h
|
binding-mri/flashable-binding.h
|
||||||
|
binding-mri/journal-binding.h
|
||||||
)
|
)
|
||||||
set(BINDING_SOURCE
|
set(BINDING_SOURCE
|
||||||
binding-mri/binding-mri.cpp
|
binding-mri/binding-mri.cpp
|
||||||
|
|
@ -302,4 +280,31 @@ add_executable(${PROJECT_NAME} MACOSX_BUNDLE WIN32
|
||||||
|
|
||||||
target_compile_definitions(${PROJECT_NAME} PRIVATE ${DEFINES})
|
target_compile_definitions(${PROJECT_NAME} PRIVATE ${DEFINES})
|
||||||
target_include_directories(${PROJECT_NAME} PRIVATE src)
|
target_include_directories(${PROJECT_NAME} PRIVATE src)
|
||||||
target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS} ${PLATFORM_LIBRARIES})
|
target_link_libraries(${PROJECT_NAME}
|
||||||
|
CONAN_PKG::boost
|
||||||
|
CONAN_PKG::openal
|
||||||
|
CONAN_PKG::physfs
|
||||||
|
CONAN_PKG::pixman
|
||||||
|
CONAN_PKG::ruby
|
||||||
|
CONAN_PKG::sdl2
|
||||||
|
CONAN_PKG::sdl2_image
|
||||||
|
CONAN_PKG::sdl2_ttf
|
||||||
|
CONAN_PKG::sdl_sound-mkxp
|
||||||
|
CONAN_PKG::sigc++
|
||||||
|
${PLATFORM_LIBRARIES})
|
||||||
|
|
||||||
|
IF(APPLE)
|
||||||
|
add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND cmake -P "${CMAKE_SOURCE_DIR}/patches/mac/CompleteBundle.cmake" VERBATIM)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
if(STEAM)
|
||||||
|
add_subdirectory(steamshim_parent)
|
||||||
|
|
||||||
|
# steam_appid.txt
|
||||||
|
configure_file(
|
||||||
|
"${CMAKE_SOURCE_DIR}/steam_appid.txt"
|
||||||
|
"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/steam_appid.txt"
|
||||||
|
COPYONLY)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory(scripts)
|
||||||
|
|
|
||||||
22
Info.plist
22
Info.plist
|
|
@ -1,22 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>NSPrincipalClass</key>
|
|
||||||
<string>NSApplication</string>
|
|
||||||
<key>CFBundleIconFile</key>
|
|
||||||
<string></string>
|
|
||||||
<key>CFBundlePackageType</key>
|
|
||||||
<string>APPL</string>
|
|
||||||
<key>CFBundleGetInfoString</key>
|
|
||||||
<string>Created by Qt/QMake</string>
|
|
||||||
<key>CFBundleSignature</key>
|
|
||||||
<string>????</string>
|
|
||||||
<key>CFBundleExecutable</key>
|
|
||||||
<string>OneShot</string>
|
|
||||||
<key>CFBundleIdentifier</key>
|
|
||||||
<string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>
|
|
||||||
<key>NOTE</key>
|
|
||||||
<string>This file was generated by Qt/QMake.</string>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
|
|
@ -32,6 +32,7 @@ Thanks to [hunternet93](https://github.com/hunternet93) for starting the reimple
|
||||||
* Ruby
|
* Ruby
|
||||||
* Python 3 (journal reimplementation only)
|
* Python 3 (journal reimplementation only)
|
||||||
* PyQt5 for Python 3 (journal reimplementation only)
|
* PyQt5 for Python 3 (journal reimplementation only)
|
||||||
|
* Steamworks SDK (optional, place contents of sdk folder in ZIP into "steamworks" folder in root)
|
||||||
|
|
||||||
### Building with Conan
|
### Building with Conan
|
||||||
|
|
||||||
|
|
|
||||||
14
cleanup.sh
14
cleanup.sh
|
|
@ -1,9 +1,18 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
rm -rf journal/mac/__pycache__
|
rm -rf journal/mac/__pycache__
|
||||||
rm -rf steamshim_parent/steamshim
|
rm -rf steamshim_parent/build
|
||||||
|
rm -rf steamshim_parent/CMakeFiles
|
||||||
|
rm -rf steamshim_parent/CMakeCache.txt
|
||||||
rm -rf build
|
rm -rf build
|
||||||
|
rm -rf bin
|
||||||
|
rm -rf lib
|
||||||
rm -rf dist
|
rm -rf dist
|
||||||
|
rm -rf x64
|
||||||
|
rm -rf *.sln
|
||||||
|
rm -rf *.vcxproj
|
||||||
|
rm -rf *.vcxproj.filters
|
||||||
|
rm -rf *.user
|
||||||
rm -rf _______.app
|
rm -rf _______.app
|
||||||
rm -rf OneShot.app
|
rm -rf OneShot.app
|
||||||
rm -rf OneShot
|
rm -rf OneShot
|
||||||
|
|
@ -13,6 +22,9 @@ rm -rf cmake_install.cmake
|
||||||
rm -rf CMakeCache.txt
|
rm -rf CMakeCache.txt
|
||||||
rm -rf conanbuildinfo.txt
|
rm -rf conanbuildinfo.txt
|
||||||
rm -rf conaninfo.txt
|
rm -rf conaninfo.txt
|
||||||
|
rm -rf conan_imports_manifest.txt
|
||||||
|
rm -rf *.xxd
|
||||||
|
rm -rf *.dir
|
||||||
if [ -f .qmake.stash ]
|
if [ -f .qmake.stash ]
|
||||||
then
|
then
|
||||||
make distclean
|
make distclean
|
||||||
|
|
|
||||||
32
conanfile.py
32
conanfile.py
|
|
@ -3,37 +3,51 @@ import os.path
|
||||||
|
|
||||||
|
|
||||||
class MkxpConan(ConanFile):
|
class MkxpConan(ConanFile):
|
||||||
name = "mkxp"
|
name = "oneshot"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
license = "GPLv2"
|
license = "GPLv2"
|
||||||
url = "https://github.com/elizagamedev/mkxp-oneshot"
|
url = "https://github.com/elizagamedev/mkxp-oneshot"
|
||||||
description = "OneShot game runtime"
|
description = "OneShot game runtime"
|
||||||
settings = "os", "compiler", "build_type", "arch"
|
settings = "os", "compiler", "build_type", "arch", "cppstd"
|
||||||
generators = "cmake"
|
generators = "cmake"
|
||||||
exports_sources = "*"
|
exports_sources = "*"
|
||||||
requires = (
|
requires = (
|
||||||
"boost/1.68.0@conan/stable",
|
"boost/1.68.0@conan/stable",
|
||||||
"openal/1.18.2@bincrafters/stable",
|
"openal/1.18.2@bincrafters/stable",
|
||||||
"physfs/3.0.1@eliza/stable",
|
"physfs/stable-3.0@eliza/stable",
|
||||||
"pixman/0.34.0@bincrafters/stable",
|
"pixman/0.34.0@bincrafters/stable",
|
||||||
"ruby-mkxp/2.5.1@eliza/stable",
|
"ruby/trunk@eliza/stable",
|
||||||
"sdl2/2.0.8@bincrafters/stable",
|
"sdl2/2.0.8@bincrafters/stable",
|
||||||
"sdl2_image/2.0.3@bincrafters/stable",
|
"sdl2_image/2.0.3@bincrafters/stable",
|
||||||
"sdl2_ttf/2.0.14@eliza/stable",
|
"sdl2_ttf/2.0.14@eliza/stable",
|
||||||
"sdl_sound-mkxp/1.0.1@eliza/stable",
|
"sdl_sound-mkxp/1.0.1@eliza/stable",
|
||||||
"sigc++/2.10.0@eliza/stable",
|
"sigc++/2.10.0@bincrafters/stable",
|
||||||
)
|
)
|
||||||
|
build_requires = (
|
||||||
|
"ruby_installer/2.3.3@bincrafters/stable",
|
||||||
|
)
|
||||||
|
options = {
|
||||||
|
"platform": ["standalone", "steam"],
|
||||||
|
}
|
||||||
default_options = (
|
default_options = (
|
||||||
|
"platform=standalone",
|
||||||
"boost:without_test=True",
|
"boost:without_test=True",
|
||||||
"cygwin_installer:packages=xxd",
|
"cygwin_installer:packages=xxd",
|
||||||
|
"openal:shared=True",
|
||||||
)
|
)
|
||||||
|
|
||||||
def build_requirements(self):
|
def build_requirements(self):
|
||||||
if tools.os_info.is_windows:
|
if tools.os_info.is_windows:
|
||||||
self.build_requires("cygwin_installer/2.9.0@bincrafters/stable")
|
self.build_requires("cygwin_installer/2.9.0@bincrafters/stable")
|
||||||
|
|
||||||
|
def requirements(self):
|
||||||
|
if self.options.platform == "steam":
|
||||||
|
self.requires("steamworks/1.42@eliza/stable")
|
||||||
|
|
||||||
def build_configure(self):
|
def build_configure(self):
|
||||||
cmake = CMake(self)
|
cmake = CMake(self)
|
||||||
|
if self.options.platform == "steam":
|
||||||
|
cmake.definitions["STEAM"] = "ON"
|
||||||
cmake.configure()
|
cmake.configure()
|
||||||
cmake.build()
|
cmake.build()
|
||||||
|
|
||||||
|
|
@ -57,7 +71,11 @@ class MkxpConan(ConanFile):
|
||||||
self.do_copy_deps(self.copy_deps)
|
self.do_copy_deps(self.copy_deps)
|
||||||
|
|
||||||
def do_copy_deps(self, copy):
|
def do_copy_deps(self, copy):
|
||||||
deps = set(self.deps_cpp_info.deps)
|
deps = set(self.deps_cpp_info.deps) - set((
|
||||||
deps.discard("cygwin_installer")
|
"cygwin_installer",
|
||||||
|
"msys2_installer",
|
||||||
|
"ruby_installer"))
|
||||||
for dep in deps:
|
for dep in deps:
|
||||||
copy("*.dll", dst="bin", src="bin", root_package=dep, keep_path=False)
|
copy("*.dll", dst="bin", src="bin", root_package=dep, keep_path=False)
|
||||||
|
if self.settings.build_type == "Debug":
|
||||||
|
copy("*.pdb", dst="bin", root_package=dep, keep_path=False)
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@ cd `dirname $0`
|
||||||
linux_version="0.1.0"
|
linux_version="0.1.0"
|
||||||
make_threads=8
|
make_threads=8
|
||||||
ONESHOT_PATH=$HOME/.steam/steam/steamapps/common/OneShot
|
ONESHOT_PATH=$HOME/.steam/steam/steamapps/common/OneShot
|
||||||
|
STEAMWORKS_PATH=/usr/steamworks
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
white="\033[0;37m" # White - Regular
|
white="\033[0;37m" # White - Regular
|
||||||
|
|
@ -24,8 +25,10 @@ echo "-> ${cyan}Compile engine...${color_reset}"
|
||||||
make -j${make_threads}
|
make -j${make_threads}
|
||||||
echo "-> ${cyan}Compile steamshim...${color_reset}"
|
echo "-> ${cyan}Compile steamshim...${color_reset}"
|
||||||
cd steamshim_parent
|
cd steamshim_parent
|
||||||
HOST=linux64 make -j${make_threads}
|
mkdir build && cd build
|
||||||
cd ..
|
cmake -DSTEAMWORKS_PATH=${STEAMWORKS_PATH} ..
|
||||||
|
make -j${make_threads}
|
||||||
|
cd ../..
|
||||||
echo "-> ${cyan}Compile journal...${color_reset}"
|
echo "-> ${cyan}Compile journal...${color_reset}"
|
||||||
pyinstaller journal/unix/journal.spec --onefile --windowed
|
pyinstaller journal/unix/journal.spec --onefile --windowed
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ cd `dirname $0`
|
||||||
mac_version="1.1.0"
|
mac_version="1.1.0"
|
||||||
make_threads=8
|
make_threads=8
|
||||||
ONESHOT_PATH=$HOME/Library/Application\ Support/Steam/steamapps/common/OneShot
|
ONESHOT_PATH=$HOME/Library/Application\ Support/Steam/steamapps/common/OneShot
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
white="\033[0;37m" # White - Regular
|
white="\033[0;37m" # White - Regular
|
||||||
bold="\033[1;37m" # White - Bold
|
bold="\033[1;37m" # White - Bold
|
||||||
|
|
@ -28,8 +27,9 @@ if [[ $use_qmake == True ]]
|
||||||
make -j${make_threads}
|
make -j${make_threads}
|
||||||
echo "-> ${cyan}Compile steamshim...${color_reset}"
|
echo "-> ${cyan}Compile steamshim...${color_reset}"
|
||||||
cd steamshim_parent
|
cd steamshim_parent
|
||||||
HOST=osx make -j${make_threads}
|
# mkdir build && cd build
|
||||||
cd ..
|
STEAMWORKS=./steamworks make -j${make_threads}
|
||||||
|
cd .. # cd ../..
|
||||||
else
|
else
|
||||||
echo "${bold}WARNING: Conan/CMake method not ready yet.${color_reset}"
|
echo "${bold}WARNING: Conan/CMake method not ready yet.${color_reset}"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
"C:\Ruby23\bin\ruby.exe" rpgscript.rb "C:\Users\GIR\Documents\oneshot scripts and stuff\mkxp-oneshot\scripts" "C:\Users\GIR\Dropbox\Oneshot Project\Solstice\Game"
|
|
||||||
pause
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
"C:\Ruby23\bin\ruby.exe" rpgscript.rb "C:\Users\GIR\Documents\oneshot scripts and stuff\mkxp-oneshot\scripts" "C:\Users\GIR\Dropbox\Oneshot Project\Game"
|
|
||||||
pause
|
|
||||||
|
|
@ -33,8 +33,8 @@ Dir.entries(game_data_dir).each do |e|
|
||||||
end
|
end
|
||||||
|
|
||||||
unless target_path
|
unless target_path
|
||||||
STDERR.puts "error: could not determine game engine version"
|
STDERR.puts "warning: could not determine game engine version, assuming XP"
|
||||||
exit 1
|
target_path = File.join(game_data_dir, 'xScripts.rxdata')
|
||||||
end
|
end
|
||||||
|
|
||||||
# Generate path of script list
|
# Generate path of script list
|
||||||
|
|
|
||||||
125
scripts/CMakeLists.txt
Normal file
125
scripts/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,125 @@
|
||||||
|
set(scripts
|
||||||
|
Credits_Message.rb
|
||||||
|
Data_FastTravel.rb
|
||||||
|
Data_Footsteps.rb
|
||||||
|
Data_Item.rb
|
||||||
|
Data_SpecialEventData.rb
|
||||||
|
Data_TileText.rb
|
||||||
|
Demo.rb
|
||||||
|
Desktop_Message.rb
|
||||||
|
Doc_Message.rb
|
||||||
|
EdText.rb
|
||||||
|
Ed_Message.rb
|
||||||
|
FastTravel.rb
|
||||||
|
Game_Actor.rb
|
||||||
|
Game_Actors.rb
|
||||||
|
Game_BattleAction.rb
|
||||||
|
Game_Battler 1.rb
|
||||||
|
Game_Battler 2.rb
|
||||||
|
Game_Battler 3.rb
|
||||||
|
Game_Character 1.rb
|
||||||
|
Game_Character 2.rb
|
||||||
|
Game_Character 3.rb
|
||||||
|
Game_CommonEvent.rb
|
||||||
|
Game_Enemy.rb
|
||||||
|
Game_Event.rb
|
||||||
|
Game_FastTravel.rb
|
||||||
|
Game_Follower.rb
|
||||||
|
Game_Light.rb
|
||||||
|
Game_Map.rb
|
||||||
|
Game_Oneshot.rb
|
||||||
|
Game_Party.rb
|
||||||
|
Game_Picture.rb
|
||||||
|
Game_Player.rb
|
||||||
|
Game_Screen.rb
|
||||||
|
Game_SelfSwitches.rb
|
||||||
|
Game_Switches.rb
|
||||||
|
Game_System.rb
|
||||||
|
Game_Temp.rb
|
||||||
|
Game_Variables.rb
|
||||||
|
Interpreter 1.rb
|
||||||
|
Interpreter 2.rb
|
||||||
|
Interpreter 3.rb
|
||||||
|
Interpreter 4.rb
|
||||||
|
Interpreter 5.rb
|
||||||
|
Interpreter 6.rb
|
||||||
|
Interpreter 7.rb
|
||||||
|
Main.rb
|
||||||
|
Particles.rb
|
||||||
|
Persistent.rb
|
||||||
|
Puzzle_Film.rb
|
||||||
|
Puzzle_Pixel.rb
|
||||||
|
Puzzle_Safe.rb
|
||||||
|
Puzzle_Sokoban.rb
|
||||||
|
RPG.rb
|
||||||
|
SaveLoad.rb
|
||||||
|
Scene_Debug.rb
|
||||||
|
Scene_End.rb
|
||||||
|
Scene_Equip.rb
|
||||||
|
Scene_File.rb
|
||||||
|
Scene_Item.rb
|
||||||
|
Scene_Load.rb
|
||||||
|
Scene_Map.rb
|
||||||
|
Scene_Menu.rb
|
||||||
|
Scene_Name.rb
|
||||||
|
Scene_Save.rb
|
||||||
|
Scene_Skill.rb
|
||||||
|
Scene_Status.rb
|
||||||
|
Scene_Title.rb
|
||||||
|
Script.rb
|
||||||
|
Sprite_Battler.rb
|
||||||
|
Sprite_Character.rb
|
||||||
|
Sprite_Footprint.rb
|
||||||
|
Sprite_Footsplash.rb
|
||||||
|
Sprite_Light.rb
|
||||||
|
Sprite_MapText.rb
|
||||||
|
Sprite_Picture.rb
|
||||||
|
Sprite_Timer.rb
|
||||||
|
Spriteset_Map.rb
|
||||||
|
Window_Base.rb
|
||||||
|
Window_BattleResult.rb
|
||||||
|
Window_BattleStatus.rb
|
||||||
|
Window_Command.rb
|
||||||
|
Window_DebugLeft.rb
|
||||||
|
Window_DebugRight.rb
|
||||||
|
Window_EquipItem.rb
|
||||||
|
Window_EquipLeft.rb
|
||||||
|
Window_EquipRight.rb
|
||||||
|
Window_Gold.rb
|
||||||
|
Window_Help.rb
|
||||||
|
Window_InputNumber.rb
|
||||||
|
Window_Item.rb
|
||||||
|
Window_MainMenu.rb
|
||||||
|
Window_MenuStatus.rb
|
||||||
|
Window_Message.rb
|
||||||
|
Window_NameEdit.rb
|
||||||
|
Window_NameInput.rb
|
||||||
|
Window_PartyCommand.rb
|
||||||
|
Window_PlayTime.rb
|
||||||
|
Window_SaveFile.rb
|
||||||
|
Window_Selectable.rb
|
||||||
|
Window_Settings.rb
|
||||||
|
Window_ShopBuy.rb
|
||||||
|
Window_ShopCommand.rb
|
||||||
|
Window_ShopNumber.rb
|
||||||
|
Window_ShopSell.rb
|
||||||
|
Window_ShopStatus.rb
|
||||||
|
Window_Skill.rb
|
||||||
|
Window_SkillStatus.rb
|
||||||
|
Window_Status.rb
|
||||||
|
Window_Steps.rb
|
||||||
|
Window_Target.rb
|
||||||
|
i18n_English.rb
|
||||||
|
i18n_Japanese.rb
|
||||||
|
i18n_Language.rb)
|
||||||
|
|
||||||
|
find_program(RUBY_EXE ruby
|
||||||
|
DOC "Location of the Ruby executable")
|
||||||
|
set(game_dir "${CMAKE_BINARY_DIR}/bin")
|
||||||
|
set(xscripts "${game_dir}/Data/xScripts.rxdata")
|
||||||
|
add_custom_command(
|
||||||
|
OUTPUT "${xscripts}"
|
||||||
|
COMMAND "${RUBY_EXE}" "${CMAKE_SOURCE_DIR}/rpgscript.rb" "${CMAKE_CURRENT_LIST_DIR}" "${game_dir}"
|
||||||
|
DEPENDS _scripts.txt ${scripts}
|
||||||
|
COMMENT "Bundling xScripts.rxdata")
|
||||||
|
add_custom_target(xScripts ALL DEPENDS "${xscripts}")
|
||||||
|
|
@ -401,10 +401,7 @@ class Window_Message < Window_Selectable
|
||||||
$game_system.se_play($data_system.cancel_se)
|
$game_system.se_play($data_system.cancel_se)
|
||||||
$game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
|
$game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
|
||||||
terminate_message
|
terminate_message
|
||||||
end
|
elsif Input.trigger?(Input::ACTION)
|
||||||
|
|
||||||
# Confirm
|
|
||||||
if Input.trigger?(Input::ACTION)
|
|
||||||
$game_system.se_play($data_system.decision_se)
|
$game_system.se_play($data_system.decision_se)
|
||||||
$game_temp.choice_proc.call(self.index)
|
$game_temp.choice_proc.call(self.index)
|
||||||
terminate_message
|
terminate_message
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
#include <boost/program_options/parsers.hpp>
|
#include <boost/program_options/parsers.hpp>
|
||||||
#include <boost/program_options/variables_map.hpp>
|
#include <boost/program_options/variables_map.hpp>
|
||||||
|
|
||||||
#include <SDL_filesystem.h>
|
#include <physfs.h>
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
@ -35,17 +35,26 @@
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "sdl-util.h"
|
#include "sdl-util.h"
|
||||||
|
|
||||||
|
namespace std
|
||||||
|
{
|
||||||
|
std::ostream& operator<<(std::ostream &os, const std::vector<std::string> &vec)
|
||||||
|
{
|
||||||
|
for (auto item : vec)
|
||||||
|
{
|
||||||
|
os << item << " ";
|
||||||
|
}
|
||||||
|
return os;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static std::string prefPath(const char *org, const char *app)
|
static std::string prefPath(const char *org, const char *app)
|
||||||
{
|
{
|
||||||
char *path = SDL_GetPrefPath(org, app);
|
const char *path = PHYSFS_getPrefDir(org, app);
|
||||||
|
|
||||||
if (!path)
|
if (!path)
|
||||||
return std::string();
|
return std::string();
|
||||||
|
|
||||||
std::string str(path);
|
return path;
|
||||||
SDL_free(path);
|
|
||||||
|
|
||||||
return str;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
|
@ -117,9 +126,9 @@ void Config::read(int argc, char *argv[])
|
||||||
po::options_description podesc;
|
po::options_description podesc;
|
||||||
podesc.add_options()
|
podesc.add_options()
|
||||||
PO_DESC_ALL
|
PO_DESC_ALL
|
||||||
("preloadScript", po::value<StringVec>()->composing())
|
("preloadScript", po::value<StringVec>()->composing()->default_value(StringVec()))
|
||||||
("fontSub", po::value<StringVec>()->composing())
|
("fontSub", po::value<StringVec>()->composing()->default_value(StringVec()))
|
||||||
("rubyLoadpath", po::value<StringVec>()->composing())
|
("rubyLoadpath", po::value<StringVec>()->composing()->default_value(StringVec()))
|
||||||
;
|
;
|
||||||
|
|
||||||
po::variables_map vm;
|
po::variables_map vm;
|
||||||
|
|
|
||||||
|
|
@ -40,11 +40,8 @@
|
||||||
#include <stack>
|
#include <stack>
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#define OS_OSX
|
#define OS_OSX
|
||||||
#endif
|
#include <iconv.h>
|
||||||
|
|
||||||
#ifdef OS_OSX
|
|
||||||
#include <iconv.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct SDLRWIoContext
|
struct SDLRWIoContext
|
||||||
|
|
@ -321,8 +318,6 @@ FileSystem::FileSystem(const char *argv0,
|
||||||
p = new FileSystemPrivate;
|
p = new FileSystemPrivate;
|
||||||
p->havePathCache = false;
|
p->havePathCache = false;
|
||||||
|
|
||||||
PHYSFS_init(argv0);
|
|
||||||
|
|
||||||
PHYSFS_registerArchiver(&RGSS1_Archiver);
|
PHYSFS_registerArchiver(&RGSS1_Archiver);
|
||||||
PHYSFS_registerArchiver(&RGSS2_Archiver);
|
PHYSFS_registerArchiver(&RGSS2_Archiver);
|
||||||
PHYSFS_registerArchiver(&RGSS3_Archiver);
|
PHYSFS_registerArchiver(&RGSS3_Archiver);
|
||||||
|
|
@ -465,7 +460,7 @@ struct FontSetsCBData
|
||||||
};
|
};
|
||||||
|
|
||||||
static PHYSFS_EnumerateCallbackResult
|
static PHYSFS_EnumerateCallbackResult
|
||||||
findFontsFolderCB (void *data, const char *dir, const char *fname)
|
fontSetEnumCB (void *data, const char *dir, const char *fname)
|
||||||
{
|
{
|
||||||
FontSetsCBData *d = static_cast<FontSetsCBData*>(data);
|
FontSetsCBData *d = static_cast<FontSetsCBData*>(data);
|
||||||
|
|
||||||
|
|
@ -473,7 +468,7 @@ findFontsFolderCB (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_STOP;
|
return PHYSFS_ENUM_OK;
|
||||||
|
|
||||||
char lowExt[8];
|
char lowExt[8];
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
@ -483,7 +478,7 @@ findFontsFolderCB (void *data, const char *dir, const char *fname)
|
||||||
lowExt[i] = '\0';
|
lowExt[i] = '\0';
|
||||||
|
|
||||||
if (strcmp(lowExt, "ttf") && strcmp(lowExt, "otf") && strcmp(lowExt, "ttc"))
|
if (strcmp(lowExt, "ttf") && strcmp(lowExt, "otf") && strcmp(lowExt, "ttc"))
|
||||||
return PHYSFS_ENUM_STOP;
|
return PHYSFS_ENUM_OK;
|
||||||
|
|
||||||
char filename[512];
|
char filename[512];
|
||||||
snprintf(filename, sizeof(filename), "%s/%s", dir, fname);
|
snprintf(filename, sizeof(filename), "%s/%s", dir, fname);
|
||||||
|
|
@ -507,7 +502,7 @@ void FileSystem::initFontSets(SharedFontState &sfs)
|
||||||
{
|
{
|
||||||
FontSetsCBData d = { p, &sfs };
|
FontSetsCBData d = { p, &sfs };
|
||||||
|
|
||||||
PHYSFS_enumerate("Fonts", findFontsFolderCB, &d);
|
PHYSFS_enumerate("Fonts", fontSetEnumCB, &d);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct OpenReadEnumData
|
struct OpenReadEnumData
|
||||||
|
|
|
||||||
10
src/main.cpp
10
src/main.cpp
|
|
@ -25,6 +25,7 @@
|
||||||
#include <SDL_image.h>
|
#include <SDL_image.h>
|
||||||
#include <SDL_ttf.h>
|
#include <SDL_ttf.h>
|
||||||
#include <SDL_sound.h>
|
#include <SDL_sound.h>
|
||||||
|
#include <physfs.h>
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
|
|
@ -46,10 +47,6 @@
|
||||||
|
|
||||||
#include "binding.h"
|
#include "binding.h"
|
||||||
|
|
||||||
#ifdef __WINDOWS__
|
|
||||||
#include "resource.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "icon.png.xxd"
|
#include "icon.png.xxd"
|
||||||
|
|
||||||
#ifdef STEAM
|
#ifdef STEAM
|
||||||
|
|
@ -234,6 +231,9 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Initialize physfs here so that config can call PHYSFS_getPrefDir */
|
||||||
|
PHYSFS_init(argv[0]);
|
||||||
|
|
||||||
/* now we load the config */
|
/* now we load the config */
|
||||||
Config conf;
|
Config conf;
|
||||||
conf.read(argc, argv);
|
conf.read(argc, argv);
|
||||||
|
|
@ -252,7 +252,7 @@ int main(int argc, char *argv[])
|
||||||
if (conf.windowTitle.empty())
|
if (conf.windowTitle.empty())
|
||||||
conf.windowTitle = conf.game.title;
|
conf.windowTitle = conf.game.title;
|
||||||
|
|
||||||
int imgFlags = IMG_INIT_PNG | IMG_INIT_JPG;
|
int imgFlags = IMG_INIT_PNG;
|
||||||
if (IMG_Init(imgFlags) != imgFlags)
|
if (IMG_Init(imgFlags) != imgFlags)
|
||||||
{
|
{
|
||||||
showInitError(std::string("Error initializing SDL_image: ") + SDL_GetError());
|
showInitError(std::string("Error initializing SDL_image: ") + SDL_GetError());
|
||||||
|
|
|
||||||
18
steamshim_parent/CMakeLists.txt
Normal file
18
steamshim_parent/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
add_executable(steamshim WIN32
|
||||||
|
steamshim_parent.cpp)
|
||||||
|
|
||||||
|
target_compile_definitions(steamshim PRIVATE
|
||||||
|
-DGAME_LAUNCH_NAME="oneshot")
|
||||||
|
|
||||||
|
if(DEBUG)
|
||||||
|
target_compile_definitions(steamshim PRIVATE
|
||||||
|
-DSTEAMSHIM_DEBUG)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
target_sources(steamshim PRIVATE
|
||||||
|
resources.rc)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_link_libraries(steamshim PRIVATE
|
||||||
|
CONAN_PKG::steamworks)
|
||||||
|
|
@ -1,45 +0,0 @@
|
||||||
TARGET := steamshim
|
|
||||||
GAME_LAUNCH_NAME ?= oneshot
|
|
||||||
|
|
||||||
CXX ?= clang++
|
|
||||||
WINDRES ?= windres
|
|
||||||
HOST ?= linux64
|
|
||||||
FLAGS := -I$(STEAMWORKS)/public -DGAME_LAUNCH_NAME=\"$(GAME_LAUNCH_NAME)\" -Wall
|
|
||||||
DEBUG ?= 0
|
|
||||||
|
|
||||||
ifeq ($(HOST),w32)
|
|
||||||
FLAGS += -L$(STEAMWORKS)/redistributable_bin
|
|
||||||
else ifeq ($(HOST),linux32)
|
|
||||||
FLAGS += -L$(STEAMWORKS)/redistributable_bin/linux32 -m32
|
|
||||||
else ifeq ($(HOST),linux64)
|
|
||||||
FLAGS += -L$(STEAMWORKS)/redistributable_bin/linux64 -m64
|
|
||||||
else ifeq ($(HOST),osx)
|
|
||||||
FLAGS += -L$(STEAMWORKS)/redistributable_bin/osx32
|
|
||||||
endif
|
|
||||||
|
|
||||||
FLAGS += -lsteam_api
|
|
||||||
|
|
||||||
ifeq ($(DEBUG),1)
|
|
||||||
FLAGS += -DSTEAMSHIM_DEBUG
|
|
||||||
else ifeq ($(HOST),w32)
|
|
||||||
FLAGS += -mwindows
|
|
||||||
endif
|
|
||||||
|
|
||||||
SRC := steamshim_parent.cpp
|
|
||||||
RES := resources.rc
|
|
||||||
RESOBJ := resources.o
|
|
||||||
|
|
||||||
ifeq ($(HOST),w32)
|
|
||||||
$(TARGET).exe: $(SRC) $(RESOBJ)
|
|
||||||
$(CXX) $^ -o $@ $(FLAGS)
|
|
||||||
$(RESOBJ): $(RES)
|
|
||||||
$(WINDRES) $< $@
|
|
||||||
else
|
|
||||||
$(TARGET): $(SRC)
|
|
||||||
$(CXX) $^ -o $@ $(FLAGS)
|
|
||||||
endif
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f $(TARGET) $(TARGET).exe $(RESOBJ)
|
|
||||||
|
|
||||||
.PHONY: clean
|
|
||||||
Loading…
Reference in a new issue