From 757ba190b9faba65c44f52cce18c2f8657d2f2aa Mon Sep 17 00:00:00 2001 From: pkali Date: Mon, 17 Jul 2023 04:42:18 -0400 Subject: [PATCH] wip manu --- Manuals/manual.asm | 2 +- Manuals/manual.xex | Bin 30344 -> 30344 bytes Manuals/manual_conv.py | 136 ++++++++++++++++++++++++++++++----------- 3 files changed, 100 insertions(+), 38 deletions(-) diff --git a/Manuals/manual.asm b/Manuals/manual.asm index f57a7b9..a7444fc 100644 --- a/Manuals/manual.asm +++ b/Manuals/manual.asm @@ -158,6 +158,6 @@ man_text_en_end .align $400 WeaponFont - ins '../artwork/weapons_AW6_mod.fnt' ; 'artwork/weapons.fnt' + ins 'manual_font.fnt' ; 'artwork/weapons.fnt' run start \ No newline at end of file diff --git a/Manuals/manual.xex b/Manuals/manual.xex index 82e2ee79c4656b971990cf44b4a2b534a4214720..e9035949aa3a7f30a6df15bc84ad583205bf4dc5 100644 GIT binary patch delta 187 zcmeBp%h>Ujal@pd0EV=*GzJhz`=16x3=%aLYQ$;`7#Pmou_$nt{Q< z04T`7z{Vp11Uzg95`Y2*2?rR`Z2sGTOpuVMlaOFwnEa@yQVz%gA_JgW1E5l%WE~hK z0C^Gy36m>}AF0cMjFDqtxcxuP>G0vh3>6@L1%!Y5_F<4!3=IDnHaC?#VB`SFfxzUf GGC2Ta(KAW_ delta 187 zcmeBp%h>Ujal@pdfCdK*2@3{hW(gG+NB_2_28o&rHDWae3=HS)SQI=v#=xNB^xsK^ zfq}um04T`7z{Vp11Uzg95`Y2*2?sztiMs#)85o#(Eb3N=O@35VDQ8jhZ&HYc07KgU zh2IzcXArOm5fBKm5MThZ1VXM&t}K3}ZsXJl0t~nRr#T%ye3-!|4M+lM5dZe=!%j|1 cpQj%FSHHQb': 30, + '?': 31, + '@': 32, + 'A': 33, + 'B': 34, + 'C': 35, + 'D': 36, + 'E': 37, + 'F': 38, + 'G': 39, + 'H': 40, + 'I': 41, + 'J': 42, + 'K': 43, + 'L': 44, + 'M': 45, + 'N': 46, + 'O': 47, + 'P': 48, + 'Q': 49, + 'R': 50, + 'S': 51, + 'T': 52, + 'U': 53, + 'V': 54, + 'W': 55, + 'X': 56, + 'Y': 57, + 'Z': 58, + '[': 59, + '\\': 60, + ']': 61, + '^': 62, + '_': 63, + 'a': 97, + 'b': 98, + 'c': 99, + 'd': 100, + 'e': 101, + 'f': 102, + 'g': 103, + 'h': 104, + 'i': 105, + 'j': 106, + 'k': 107, + 'l': 108, + 'm': 109, + 'n': 110, + 'o': 111, + 'p': 112, + 'q': 113, + 'r': 114, + 's': 115, + 't': 116, + 'u': 117, + 'v': 118, + 'w': 119, + 'x': 120, + 'y': 121, + 'z': 122, + '|': 124, +} + # convert to SCREENCODES +bin_out = bytearray() for line in out2.split('\n'): - # line = line + ' '*(MAX_W-len(line)) - line_out = "" - if '**' not in line: - line_out = line.replace('"', '""') - else: - # replace **text** with inverse - if line.strip().startswith('**'): - inverse = True - else: - inverse = False - chunks = line.split('**') - line_length = 0 + for i, c in enumerate(line): - for chunk in chunks: - line_length += len(chunk) - if not chunk: - continue - chunk = chunk.replace('"', '""') - print(f' dta d"{chunk}"', end='') - if inverse: - print('*') - else: - print() - inverse = not inverse - # add missing spaces - print(f' dta d"{" "*(MAX_W-line_length)}"') - if '*' in line_out: - if line_out.startswith('*'): - line_out = line_out.replace('*', '$5a, d"', 1) + '"' - else: - line_out = 'd"' + line_out.replace('*', '", $5a, d"') + '"' - elif line_out: - line_out = '"' + line_out + '"' - print(' .align 40') - if line_out: - print(f' dta {line_out}') - - + bin_out.append(utf_to_internal[c]) +print(bin_out)