Fix October bug

This commit is contained in:
Eliza Velasquez 2018-10-13 18:28:54 +00:00
parent 9aacb5f136
commit c096f6f020
9 changed files with 147 additions and 17 deletions

View file

@ -306,3 +306,5 @@ if(STEAM)
"${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/steam_appid.txt"
COPYONLY)
endif()
add_subdirectory(scripts)

View file

@ -16,13 +16,16 @@ class MkxpConan(ConanFile):
"openal/1.18.2@bincrafters/stable",
"physfs/stable-3.0@eliza/stable",
"pixman/0.34.0@bincrafters/stable",
"ruby/2.3.7@eliza/stable",
"ruby/trunk@eliza/stable",
"sdl2/2.0.8@bincrafters/stable",
"sdl2_image/2.0.3@bincrafters/stable",
"sdl2_ttf/2.0.14@eliza/stable",
"sdl_sound-mkxp/1.0.1@eliza/stable",
"sigc++/2.10.0@bincrafters/stable",
)
build_requires = (
"ruby_installer/2.3.3@bincrafters/stable",
)
options = {
"platform": ["standalone", "steam"],
}
@ -30,6 +33,7 @@ class MkxpConan(ConanFile):
"platform=standalone",
"boost:without_test=True",
"cygwin_installer:packages=xxd",
"openal:shared=True",
)
def build_requirements(self):
@ -67,7 +71,11 @@ class MkxpConan(ConanFile):
self.do_copy_deps(self.copy_deps)
def do_copy_deps(self, copy):
deps = set(self.deps_cpp_info.deps)
deps.discard("cygwin_installer")
deps = set(self.deps_cpp_info.deps) - set((
"cygwin_installer",
"msys2_installer",
"ruby_installer"))
for dep in deps:
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)

View file

@ -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

View file

@ -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

View file

@ -33,8 +33,8 @@ Dir.entries(game_data_dir).each do |e|
end
unless target_path
STDERR.puts "error: could not determine game engine version"
exit 1
STDERR.puts "warning: could not determine game engine version, assuming XP"
target_path = File.join(game_data_dir, 'xScripts.rxdata')
end
# Generate path of script list

125
scripts/CMakeLists.txt Normal file
View 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}")

View file

@ -25,7 +25,7 @@
#include <boost/program_options/parsers.hpp>
#include <boost/program_options/variables_map.hpp>
#include <SDL_filesystem.h>
#include <physfs.h>
#include <fstream>
#include <stdint.h>
@ -49,15 +49,12 @@ namespace std
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)
return std::string();
std::string str(path);
SDL_free(path);
return str;
return path;
}
template<typename T>

View file

@ -318,8 +318,6 @@ FileSystem::FileSystem(const char *argv0,
p = new FileSystemPrivate;
p->havePathCache = false;
PHYSFS_init(argv0);
PHYSFS_registerArchiver(&RGSS1_Archiver);
PHYSFS_registerArchiver(&RGSS2_Archiver);
PHYSFS_registerArchiver(&RGSS3_Archiver);

View file

@ -25,6 +25,7 @@
#include <SDL_image.h>
#include <SDL_ttf.h>
#include <SDL_sound.h>
#include <physfs.h>
#ifdef _MSC_VER
#include <direct.h>
@ -230,6 +231,9 @@ int main(int argc, char *argv[])
}
#endif
/* Initialize physfs here so that config can call PHYSFS_getPrefDir */
PHYSFS_init(argv[0]);
/* now we load the config */
Config conf;
conf.read(argc, argv);