mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-22 23:06:18 +00:00
Merge pull request #34 from elizagamedev/gir/locAndDebug
Loc changes and debug items:
This commit is contained in:
commit
c9ffa05df7
8 changed files with 83 additions and 46 deletions
|
|
@ -115,7 +115,7 @@
|
||||||
<ConformanceMode>true</ConformanceMode>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
|
@ -143,7 +143,7 @@
|
||||||
<ConformanceMode>true</ConformanceMode>
|
<ConformanceMode>true</ConformanceMode>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Console</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
|
|
||||||
|
|
@ -161,13 +161,13 @@ DWORD WINAPI ipc_thread(LPVOID lpParam)
|
||||||
void init_check_save(WCHAR* save_path) {
|
void init_check_save(WCHAR* save_path) {
|
||||||
FILE* savefile = _wfopen(save_path, L"rb");
|
FILE* savefile = _wfopen(save_path, L"rb");
|
||||||
char imgfile[16] = {0};
|
char imgfile[16] = {0};
|
||||||
char langbuf[9] = {0};
|
char langbuf[17] = {0};
|
||||||
char* openbrace = 0;
|
char* openbrace = 0;
|
||||||
char* closebrace = 0;
|
char* closebrace = 0;
|
||||||
if (savefile) {
|
if (savefile) {
|
||||||
strcpy(imgfile, "save");
|
strcpy(imgfile, "save");
|
||||||
fseek(savefile, -8, SEEK_END);
|
fseek(savefile, -16, SEEK_END);
|
||||||
fread(langbuf, 1, 8, savefile);
|
fread(langbuf, 1, 16, savefile);
|
||||||
fclose(savefile);
|
fclose(savefile);
|
||||||
|
|
||||||
openbrace = strchr(langbuf, '[');
|
openbrace = strchr(langbuf, '[');
|
||||||
|
|
|
||||||
|
|
@ -43,22 +43,17 @@ module Wallpaper
|
||||||
Graphics.update
|
Graphics.update
|
||||||
end
|
end
|
||||||
|
|
||||||
if (name == 'save_w32')
|
locWallpaper = $persistent.langcode + "/" + name
|
||||||
case $persistent.langcode
|
if (name == 'save_w32')
|
||||||
when 'fr'
|
locWallpaperFullPath = "Wallpaper/" + locWallpaper + ".bmp"
|
||||||
name = $persistent.langcode + "/" + name
|
else
|
||||||
when 'pt_BR'
|
locWallpaperFullPath = "Wallpaper/" + locWallpaper + ".png"
|
||||||
name = $persistent.langcode + "/" + name
|
|
||||||
when 'es'
|
|
||||||
name = $persistent.langcode + "/" + name
|
|
||||||
when 'ja'
|
|
||||||
name = $persistent.langcode + "/" + name
|
|
||||||
when 'ko'
|
|
||||||
name = $persistent.langcode + "/" + name
|
|
||||||
when 'zh_CN'
|
|
||||||
name = $persistent.langcode + "/" + name
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if File.exists?(locWallpaperFullPath)
|
||||||
|
name = locWallpaper
|
||||||
|
end
|
||||||
|
|
||||||
$game_oneshot.wallpaper = name
|
$game_oneshot.wallpaper = name
|
||||||
$game_oneshot.wallpaper_color = color
|
$game_oneshot.wallpaper_color = color
|
||||||
Wallpaper.set(name, color)
|
Wallpaper.set(name, color)
|
||||||
|
|
|
||||||
|
|
@ -21,12 +21,13 @@ class Scene_File
|
||||||
@help_window.set_text(@help_text)
|
@help_window.set_text(@help_text)
|
||||||
# Make save file window
|
# Make save file window
|
||||||
@savefile_windows = []
|
@savefile_windows = []
|
||||||
for i in 0..3
|
for i in 0..99
|
||||||
@savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))
|
@savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))
|
||||||
end
|
end
|
||||||
# Select last file to be operated
|
# Select last file to be operated
|
||||||
@file_index = $game_temp.last_file_index
|
@file_index = $game_temp.last_file_index
|
||||||
@savefile_windows[@file_index].selected = true
|
@savefile_windows[@file_index].selected = true
|
||||||
|
updateVisibleSavefileWindows
|
||||||
# Execute transition
|
# Execute transition
|
||||||
Graphics.transition
|
Graphics.transition
|
||||||
# Main loop
|
# Main loop
|
||||||
|
|
@ -76,13 +77,17 @@ class Scene_File
|
||||||
if Input.repeat?(Input::DOWN)
|
if Input.repeat?(Input::DOWN)
|
||||||
# If the down directional button pressed down is not a repeat,
|
# If the down directional button pressed down is not a repeat,
|
||||||
# or cursor position is more in front than 3
|
# or cursor position is more in front than 3
|
||||||
if Input.trigger?(Input::DOWN) or @file_index < 3
|
if Input.trigger?(Input::DOWN) or @file_index < 99
|
||||||
# Play cursor SE
|
# Play cursor SE
|
||||||
$game_system.se_play($data_system.cursor_se)
|
$game_system.se_play($data_system.cursor_se)
|
||||||
# Move cursor down
|
# Move cursor down
|
||||||
@savefile_windows[@file_index].selected = false
|
@savefile_windows[@file_index].selected = false
|
||||||
@file_index = (@file_index + 1) % 4
|
@file_index = (@file_index + 1)
|
||||||
|
if @file_index > 99
|
||||||
|
@file_index = 0
|
||||||
|
end
|
||||||
@savefile_windows[@file_index].selected = true
|
@savefile_windows[@file_index].selected = true
|
||||||
|
updateVisibleSavefileWindows
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -95,8 +100,12 @@ class Scene_File
|
||||||
$game_system.se_play($data_system.cursor_se)
|
$game_system.se_play($data_system.cursor_se)
|
||||||
# Move cursor up
|
# Move cursor up
|
||||||
@savefile_windows[@file_index].selected = false
|
@savefile_windows[@file_index].selected = false
|
||||||
@file_index = (@file_index + 3) % 4
|
@file_index = (@file_index - 1)
|
||||||
|
if @file_index < 0
|
||||||
|
@file_index = 99
|
||||||
|
end
|
||||||
@savefile_windows[@file_index].selected = true
|
@savefile_windows[@file_index].selected = true
|
||||||
|
updateVisibleSavefileWindows
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -108,4 +117,15 @@ class Scene_File
|
||||||
def make_filename(file_index)
|
def make_filename(file_index)
|
||||||
return "Save#{file_index + 1}.rxdata"
|
return "Save#{file_index + 1}.rxdata"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def updateVisibleSavefileWindows
|
||||||
|
for i in 0..99
|
||||||
|
@savefile_windows[i].visible = false
|
||||||
|
end
|
||||||
|
|
||||||
|
screen_start_index = @file_index - (@file_index % 4)
|
||||||
|
for i in screen_start_index..(screen_start_index + 3)
|
||||||
|
@savefile_windows[i].visible = true
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ class Scene_Load < Scene_File
|
||||||
# Timestamp selects new file
|
# Timestamp selects new file
|
||||||
$game_temp.last_file_index = 0
|
$game_temp.last_file_index = 0
|
||||||
latest_time = Time.at(0)
|
latest_time = Time.at(0)
|
||||||
for i in 0..3
|
for i in 0..99
|
||||||
filename = make_filename(i)
|
filename = make_filename(i)
|
||||||
if FileTest.exist?(filename)
|
if FileTest.exist?(filename)
|
||||||
file = File.open(filename, "r")
|
file = File.open(filename, "r")
|
||||||
|
|
@ -58,7 +58,7 @@ class Scene_Load < Scene_File
|
||||||
# Play cancel SE
|
# Play cancel SE
|
||||||
$game_system.se_play($data_system.cancel_se)
|
$game_system.se_play($data_system.cancel_se)
|
||||||
# Switch to title screen
|
# Switch to title screen
|
||||||
$scene = Scene_Title.new
|
$scene = Scene_Map.new
|
||||||
end
|
end
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# * Read Save Data
|
# * Read Save Data
|
||||||
|
|
@ -101,6 +101,16 @@ class Scene_Load < Scene_File
|
||||||
f.moveto($game_player.x, $game_player.y)
|
f.moveto($game_player.x, $game_player.y)
|
||||||
f_prev = f
|
f_prev = f
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
# check for debug file to add debug items
|
||||||
|
if File.exists?("debug_tester.dat")
|
||||||
|
# debug save
|
||||||
|
$game_party.gain_item(54, 1)
|
||||||
|
# plight skip
|
||||||
|
$game_party.gain_item(82, 1)
|
||||||
|
end
|
||||||
|
|
||||||
load_perma_flags
|
load_perma_flags
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -279,7 +279,7 @@ class Scene_Map
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# If debug mode is ON and F5 key was pressed
|
# If debug mode is ON and F5 key was pressed
|
||||||
if $debug and Input.press?(Input::F5)
|
if $debug and Input.press?(Input::F5) and
|
||||||
# Set transferring player flag
|
# Set transferring player flag
|
||||||
$game_temp.player_transferring = true
|
$game_temp.player_transferring = true
|
||||||
# Set player move destination
|
# Set player move destination
|
||||||
|
|
@ -288,23 +288,23 @@ class Scene_Map
|
||||||
$game_temp.player_new_y = $data_system.start_y
|
$game_temp.player_new_y = $data_system.start_y
|
||||||
end
|
end
|
||||||
# debug && F6
|
# debug && F6
|
||||||
if $debug and Input.press?(Input::F6) and $lastpress != 6
|
#if $debug and Input.press?(Input::F6) and $lastpress != 6
|
||||||
$lastpress = 6
|
# $lastpress = 6
|
||||||
Chroma.playAnim("chroma/blank_keyboard.chroma", false);
|
# Chroma.playAnim("chroma/blank_keyboard.chroma", false);
|
||||||
end
|
#end
|
||||||
if $debug and Input.press?(Input::F7) and $lastpress != 7
|
#if $debug and Input.press?(Input::F7) and $lastpress != 7
|
||||||
$lastpress = 7
|
# $lastpress = 7
|
||||||
Chroma.playAnim("chroma/Fire_Keyboard.chroma", true);
|
# Chroma.playAnim("chroma/Fire_Keyboard.chroma", true);
|
||||||
end
|
#end
|
||||||
if $debug and Input.press?(Input::F9) and $lastpress != 9
|
#if $debug and Input.press?(Input::F9) and $lastpress != 9
|
||||||
$lastpress = 9
|
# $lastpress = 9
|
||||||
Chroma.playAnim("chroma/Random_Keyboard.chroma", false);
|
# Chroma.playAnim("chroma/Random_Keyboard.chroma", false);
|
||||||
end
|
#end
|
||||||
# If debug mode is ON and F9 key was pressed
|
# If debug mode is ON and F9 key was pressed
|
||||||
# if $debug and Input.press?(Input::F9)
|
if Input.press?(Input::F9) && File.exists?("debug_tester.dat")
|
||||||
# # Set debug calling flag
|
# Set debug calling flag
|
||||||
# $game_temp.debug_calling = true
|
$game_temp.debug_calling = true
|
||||||
# end
|
end
|
||||||
# If player is not moving
|
# If player is not moving
|
||||||
unless $game_player.moving?
|
unless $game_player.moving?
|
||||||
# Run calling of each screen
|
# Run calling of each screen
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,14 @@ class Scene_Title
|
||||||
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
|
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# check for debug file to add debug items
|
||||||
|
if File.exists?("debug_tester.dat")
|
||||||
|
# debug save
|
||||||
|
$game_party.gain_item(54, 1)
|
||||||
|
# plight skip
|
||||||
|
$game_party.gain_item(82, 1)
|
||||||
|
end
|
||||||
|
|
||||||
@sprite.zoom_x = 2.0
|
@sprite.zoom_x = 2.0
|
||||||
@sprite.zoom_y = 2.0
|
@sprite.zoom_y = 2.0
|
||||||
# Create/render menu options
|
# Create/render menu options
|
||||||
|
|
|
||||||
|
|
@ -71,12 +71,16 @@ module Script
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.skip_bruteforce
|
def self.skip_bruteforce
|
||||||
$game_oneshot.bruteforce_start -= 62800*2*60
|
$game_oneshot.bruteforce_start -= 63014*2*60
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.lose_all_items
|
def self.lose_all_items
|
||||||
for i in 1..99
|
for i in 1..99
|
||||||
$game_party.lose_item(i, 99)
|
#skip debug testing items
|
||||||
|
if i == 54 or i == 81 or i == 82
|
||||||
|
next
|
||||||
|
end
|
||||||
|
$game_party.lose_item(i, 99)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue