more fixes
This commit is contained in:
parent
db760f1710
commit
01082581a8
|
@ -118,7 +118,7 @@ def patch_hash(hash: list[int], output_dir: Path):
|
||||||
def patch_uuid(uuid: str, output_dir: Path):
|
def patch_uuid(uuid: str, output_dir: Path):
|
||||||
output_dir.joinpath("data", "uuid.txt").write_text(uuid)
|
output_dir.joinpath("data", "uuid.txt").write_text(uuid)
|
||||||
|
|
||||||
def wrap_msg_text(text: str, facepic: bool, max_text_boxes: int | None = 1) -> str:
|
def wrap_msg_text(text: str, facepic: bool, *, ending: str = "<NOD", max_text_boxes: int | None = 1) -> str:
|
||||||
hard_limit = 35
|
hard_limit = 35
|
||||||
msgbox_limit = 26 if facepic else hard_limit
|
msgbox_limit = 26 if facepic else hard_limit
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ def wrap_msg_text(text: str, facepic: bool, max_text_boxes: int | None = 1) -> s
|
||||||
text += "<NOD"
|
text += "<NOD"
|
||||||
if len(l) != hard_limit:
|
if len(l) != hard_limit:
|
||||||
text += "\r\n"
|
text += "\r\n"
|
||||||
text += "<NOD"
|
text += ending
|
||||||
|
|
||||||
return text
|
return text
|
||||||
|
|
||||||
|
@ -141,4 +141,4 @@ def create_hint_script(text: str, facepic: bool, ending: str) -> str:
|
||||||
"""
|
"""
|
||||||
A desperate attempt to generate valid <MSG text. Fills one text box (up to three lines). Attempts to wrap words elegantly.
|
A desperate attempt to generate valid <MSG text. Fills one text box (up to three lines). Attempts to wrap words elegantly.
|
||||||
"""
|
"""
|
||||||
return f"<PRI<MSG<TUR{wrap_msg_text(text, facepic)}{ending}"
|
return f"<PRI<MSG<TUR{wrap_msg_text(text, facepic, ending=ending)}"
|
||||||
|
|
|
@ -41,6 +41,8 @@ xor esi, esi
|
||||||
:$LL4@RestoreStr
|
:$LL4@RestoreStr
|
||||||
; Line 153
|
; Line 153
|
||||||
mov eax, [Strip_addr]
|
mov eax, [Strip_addr]
|
||||||
|
test eax, eax
|
||||||
|
je :return
|
||||||
test [edi+eax], 128 ; 00000080H
|
test [edi+eax], 128 ; 00000080H
|
||||||
je :$LN2@RestoreStr
|
je :$LN2@RestoreStr
|
||||||
; Line 155
|
; Line 155
|
||||||
|
@ -77,7 +79,8 @@ add edi, 50 ; 00000050H
|
||||||
cmp esi, MAX_STRIPx10 ; 000007f0H
|
cmp esi, MAX_STRIPx10 ; 000007f0H
|
||||||
jl :$LL4@RestoreStr
|
jl :$LL4@RestoreStr
|
||||||
; Line 164
|
; Line 164
|
||||||
|
:return
|
||||||
pop edi
|
pop edi
|
||||||
pop esi
|
pop esi
|
||||||
leave
|
leave
|
||||||
retn
|
retn
|
|
@ -0,0 +1,4 @@
|
||||||
|
0x40CD91
|
||||||
|
03
|
||||||
|
0x40CDC8
|
||||||
|
03
|
|
@ -0,0 +1,4 @@
|
||||||
|
0x40149E
|
||||||
|
8B 4D F8 49 79 01 41 B8 68 9C 49 00 31 D2 39 10
|
||||||
|
7D 02 89 08 39 08 7E 14 89 10 90 90 90 90 90 90
|
||||||
|
90 90 90 90 90 90 90 90 90 90 90 90
|
|
@ -0,0 +1,2 @@
|
||||||
|
0x41DB17
|
||||||
|
95 EA
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue