Skip to content

Commit

Permalink
Version 2.5 with some bugfixes and a better game recognition
Browse files Browse the repository at this point in the history
  • Loading branch information
nuive committed Feb 21, 2022
1 parent 9e2bce2 commit e8467a9
Show file tree
Hide file tree
Showing 52 changed files with 696 additions and 888 deletions.
4 changes: 2 additions & 2 deletions encoding.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ LPWSTR lpWideCharStr, int cchWideChar);

local CP_UTF8 = 65001
local function to_utf16(s)
local needed = kernel32.MultiByteToWideChar(CP_UTF8, 0, s, -1, NULL, 0)
local needed = kernel32.MultiByteToWideChar(CP_UTF8, 0, s, -1, nil, 0)
local buf = ffi.new("wchar_t[?]", needed)
local written = kernel32.MultiByteToWideChar(CP_UTF8, 0, s, -1, buf, needed)
return ffi.string(buf, written*2)
return ffi.string(ffi.cast("char *", buf), written*2)
end

local function to_utf8(s)
Expand Down
11 changes: 10 additions & 1 deletion game/common/gsc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,16 @@ if old_puzzle_cursor == nil and puzzle_cursor ~= 0 then
return
end
if puzzle_cursor ~= old_puzzle_cursor then
local piece = string.format("%d", memory.readbyte(RAM_UNOWN_PUZZLE+puzzle_cursor))
local piece = memory.readbyte(RAM_UNOWN_PUZZLE+puzzle_cursor)
if piece == 0 then
if puzzle_cursor < 6 or puzzle_cursor % 6 == 0 or puzzle_cursor % 6 == 5 then
piece = message.translate("frame")
else
piece = message.translate("empty")
end
else
piece = string.format("%d", memory.readbyte(RAM_UNOWN_PUZZLE+puzzle_cursor))
end
tolk.output(piece)
old_puzzle_cursor = puzzle_cursor
end
Expand Down
2 changes: 1 addition & 1 deletion game/common/rby.lua
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ or (tileset == 0x07 and type == 0x3f)) then
-- audio.play(scriptpath .. "sounds\\s_water.wav", 0, pan, vol)
-- elseif type == 0x33 then
-- audio.play(scriptpath .. "sounds\\s_waterfall.wav", 0, pan, vol)
elseif is_camera and (type == 0x13) then
elseif is_camera and (type == 0x13 or type == 0x43) then
audio.play(scriptpath .. "sounds\\s_stairup.wav", 0, pan, vol)
elseif is_camera and (type == 0x1b) then
audio.play(scriptpath .. "sounds\\s_stairdown.wav", 0, pan, vol)
Expand Down
7 changes: 0 additions & 7 deletions game/crystal-clear/en/fonts.lua

This file was deleted.

Loading

0 comments on commit e8467a9

Please sign in to comment.