From 8b627803a3256a027ed78ae81edf8c92a1b16013 Mon Sep 17 00:00:00 2001 From: nmlgc Date: Sun, 17 Nov 2019 20:23:49 +0100 Subject: [PATCH] [Position independence] Vector calls and variables MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Raw, uninteresting position independence work. Or maybe not, given that this was one of the few things that also apply to TH01, and reveal just how chaotically this game was coded. And so we've got three ways that ZUN stored regular 2D points: Regularly (X first, Y second), Y first and X second, and multiple points stored in a structure of arrays… Completes P0059, funded by [Anonymous] and -Tom-. --- th01_reiiden.asm | 454 +++++++--------- th01_reiiden_2.inc | 798 ++++++++++++++--------------- th02_main.asm | 423 +++++++-------- th03/math/math.h | 24 + th03/math/vector1_at.asm | 2 - th03/math/vector2.asm | 1 - th03/math/vector2_between_plus.asm | 4 - th03_main.asm | 315 +++--------- th03_op.asm | 12 +- th04/math/math.h | 13 + th04/math/vector1_at.asm | 3 +- th04/math/vector2_at.asm | 3 - th04/shared.hpp | 5 - th04_main.asm | 438 ++++++++-------- th05_main.asm | 723 +++++++++++++------------- th05_maine.asm | 37 +- 16 files changed, 1451 insertions(+), 1804 deletions(-) create mode 100644 th03/math/math.h create mode 100644 th04/math/math.h diff --git a/th01_reiiden.asm b/th01_reiiden.asm index 02af2a8a..1506d0fe 100644 --- a/th01_reiiden.asm +++ b/th01_reiiden.asm @@ -1231,7 +1231,7 @@ loc_BD88: push 0 call _graph_accesspage_func push 400170h - push word_36C26 + push x_36C26 call sub_197E1 add sp, 0Ah @@ -1257,7 +1257,7 @@ loc_BDC2: push 0 call _graph_accesspage_func push 400170h - push word_36C26 + push x_36C26 call sub_197E1 add sp, 0Eh call sub_17E1E @@ -1380,7 +1380,7 @@ arg_0 = word ptr 6 call sub_30E54 add sp, 4 push 430170h - push word_36C26 + push x_36C26 call sub_197E1 add sp, 6 xor si, si @@ -2107,8 +2107,8 @@ loc_C50B: mov bx, 30h ; '0' cwd idiv bx - add dx, word_36C26 - add dx, 0FFF8h + add dx, x_36C26 + add dx, -8 mov bx, si add bx, bx mov [bx+3E4Ah], dx @@ -3135,7 +3135,7 @@ loc_CEA5: add ax, 56h ; 'V' push ax push 170h - push word_36C26 + push x_36C26 call sub_197E1 add sp, 6 xor di, di @@ -3147,7 +3147,7 @@ loc_CEBC: add bx, bx lea ax, [bp+var_A] add bx, ax - mov ax, word_36C26 + mov ax, x_36C26 mov ss:[bx], ax mov bx, di add bx, bx @@ -3785,14 +3785,14 @@ loc_D3E1: call _printf add sp, 4 mov ax, word_38810 - cmp ax, word_36C26 + cmp ax, x_36C26 jz short loc_D414 - push word_36C26 + push x_36C26 push ds push offset aGx3d ; "gx = %3d" call _printf add sp, 6 - mov ax, word_36C26 + mov ax, x_36C26 mov word_38810, ax loc_D414: @@ -4232,7 +4232,7 @@ loc_D72E: mov _rem_lives, ax mov al, es:[bx+reiidenconfig_t.bombs] mov _bombs, al - mov word_36C26, 130h + mov x_36C26, 304 cmp byte_34A31, 0 jz short loc_D776 cmp es:[bx+reiidenconfig_t.snd_need_init], 0 @@ -4606,7 +4606,7 @@ loc_DAD7: jnz short loc_DB0A loc_DB04: - mov word_36C26, 130h + mov x_36C26, 304 loc_DB0A: fld dbl_34FF5 @@ -4625,7 +4625,7 @@ loc_DB3E: call sub_19E48 pop cx push 400170h - push word_36C26 + push x_36C26 call sub_197E1 add sp, 6 push 3 @@ -11482,10 +11482,10 @@ arg_8 = word ptr 0Eh push [bp+arg_0] call sub_F342 add sp, 0Ah - cmp si, word_36C26 + cmp si, x_36C26 jle short loc_11523 - mov ax, word_36C26 - add ax, 20h ; ' ' + mov ax, x_36C26 + add ax, 32 cmp ax, si jle short loc_11523 cmp di, 180h @@ -11529,10 +11529,10 @@ arg_A = word ptr 10h push [bp+arg_0] call sub_F31A add sp, 0Ch - cmp si, word_36C26 + cmp si, x_36C26 jle short loc_1156A - mov ax, word_36C26 - add ax, 20h ; ' ' + mov ax, x_36C26 + add ax, 32 cmp ax, si jle short loc_1156A cmp di, 180h @@ -12488,12 +12488,12 @@ loc_12237: jz short loc_12299 cmp di, 178h jle short loc_12299 - mov ax, word_36C26 + mov ax, x_36C26 add ax, 4 cmp ax, si jg short loc_12299 - mov ax, word_36C26 - add ax, 18h + mov ax, x_36C26 + add ax, 24 cmp ax, si jle short loc_12299 mov _player_is_hit, 1 @@ -12893,7 +12893,7 @@ loc_126E1: push 0 call _graph_accesspage_func push 400170h - push word_36C26 + push x_36C26 call sub_197E1 add sp, 0Eh @@ -13314,7 +13314,7 @@ loc_12B02: push 0 call _graph_accesspage_func push 400170h - push word_36C26 + push x_36C26 call sub_197E1 add sp, 0Eh @@ -22751,14 +22751,14 @@ arg_0 = word ptr 6 mov si, [bp+arg_0] mov bx, si imul bx, 0Ah - mov ax, word_36C26 - add ax, 0FFE8h + mov ax, x_36C26 + add ax, -24 cmp [bx+5370h], ax jle loc_17E1B mov bx, si imul bx, 0Ah - mov ax, word_36C26 - add ax, 18h + mov ax, x_36C26 + add ax, 24 cmp [bx+5370h], ax jge loc_17E1B mov bx, si @@ -23468,14 +23468,14 @@ arg_0 = word ptr 6 mov si, [bp+arg_0] mov bx, si imul bx, 0Ah - mov ax, word_36C26 - add ax, 0FFE8h + mov ax, x_36C26 + add ax, -24 cmp [bx+5398h], ax jle loc_183A0 mov bx, si imul bx, 0Ah - mov ax, word_36C26 - add ax, 18h + mov ax, x_36C26 + add ax, 24 cmp [bx+5398h], ax jge loc_183A0 mov bx, si @@ -26091,18 +26091,18 @@ arg_0 = word ptr 6 push bp mov bp, sp mov ax, [bp+arg_0] - add word_36C26, ax - cmp word_36C26, 0 + add x_36C26, ax + cmp x_36C26, 0 jge short loc_19697 - mov word_36C26, 0 + mov x_36C26, 0 pop bp retf ; --------------------------------------------------------------------------- loc_19697: - cmp word_36C26, 260h + cmp x_36C26, 608 jl short loc_196A5 - mov word_36C26, 260h + mov x_36C26, 608 loc_196A5: pop bp @@ -27104,7 +27104,7 @@ loc_19F4C: mov byte_35B47, 0 mov byte_34A50, 0 push 400170h - push word_36C26 + push x_36C26 call sub_197E1 add sp, 6 mov byte_39DB3, 40h @@ -27115,7 +27115,7 @@ loc_19F77: cmp dword_34A62, 3Ch ; '<' jbe short loc_19F90 push 430170h - push word_36C26 + push x_36C26 call sub_197E1 add sp, 6 @@ -27173,15 +27173,15 @@ loc_1A00F: mov al, byte_39DB3 cbw push ax - push 170h - push word_36C26 + push 368 + push x_36C26 call sub_196A7 add sp, 6 loc_1A02B: push [bp+var_2] - push 170h - push word_36C26 + push 368 + push x_36C26 call sub_197E1 add sp, 6 mov al, byte ptr [bp+var_2] @@ -27197,14 +27197,14 @@ loc_1A04A: mov al, byte_39DB3 cbw push ax - push 170h - push word_36C26 + push 368 + push x_36C26 call sub_196A7 add sp, 6 - add word_36C26, 4 - cmp word_36C26, 260h + add x_36C26, 4 + cmp x_36C26, 608 jl short loc_1A075 - mov word_36C26, 260h + mov x_36C26, 608 loc_1A075: mov al, byte_35B42 @@ -27224,7 +27224,7 @@ loc_1A089: loc_1A08C: push ax push 170h - push word_36C26 + push x_36C26 call sub_197E1 add sp, 6 mov al, byte_35B42 @@ -27253,13 +27253,13 @@ loc_1A0BA: cbw push ax push 170h - push word_36C26 + push x_36C26 call sub_196A7 add sp, 6 - sub word_36C26, 4 - cmp word_36C26, 0 + sub x_36C26, 4 + cmp x_36C26, 0 jg short loc_1A0E4 - mov word_36C26, 0 + mov x_36C26, 0 loc_1A0E4: mov al, byte_35B42 @@ -27279,7 +27279,7 @@ loc_1A0F8: loc_1A0FB: push ax push 170h - push word_36C26 + push x_36C26 call sub_197E1 add sp, 6 mov al, byte_35B42 @@ -27307,7 +27307,7 @@ loc_1A127: cbw push ax push 170h - push word_36C26 + push x_36C26 call sub_196A7 add sp, 6 mov byte_35B44, 1 @@ -27334,7 +27334,7 @@ loc_1A173: loc_1A178: push [bp+var_2] push 170h - push word_36C26 + push x_36C26 call sub_197E1 add sp, 6 mov al, byte ptr [bp+var_2] @@ -27348,7 +27348,7 @@ loc_1A191: cmp ax, 1 jnz short loc_1A1B2 push 4E0170h - push word_36C26 + push x_36C26 call sub_197E1 add sp, 6 mov byte_39DB3, 4Eh ; 'N' @@ -27361,7 +27361,7 @@ loc_1A1B2: cmp ax, 2 jnz short loc_1A1D1 push 440170h - push word_36C26 + push x_36C26 call sub_197E1 add sp, 6 mov byte_39DB3, 44h ; 'D' @@ -27373,7 +27373,7 @@ loc_1A1D1: cbw push ax push 170h - push word_36C26 + push x_36C26 call sub_196A7 add sp, 6 cmp byte_34A4B, 0 @@ -27417,8 +27417,8 @@ loc_1A24A: loc_1A24D: push ax push 170h - mov ax, word_36C26 - add ax, 0FFF8h + mov ax, x_36C26 + add ax, -8 push ax push ds push offset unk_373AF @@ -27440,7 +27440,7 @@ loc_1A26C: cmp byte_35B43, 0 jnz short loc_1A29E push 170h - mov ax, word_36C26 + mov ax, x_36C26 add ax, 8 push ax push ds @@ -27472,13 +27472,13 @@ loc_1A2C4: cbw push ax push 170h - push word_36C26 + push x_36C26 call sub_196A7 add sp, 6 - add word_36C26, 4 - cmp word_36C26, 260h + add x_36C26, 4 + cmp x_36C26, 608 jl short loc_1A2F8 - mov word_36C26, 260h + mov x_36C26, 608 loc_1A2F8: mov al, byte_35B43 @@ -27487,7 +27487,7 @@ loc_1A2F8: add ax, 4Eh ; 'N' push ax push 170h - push word_36C26 + push x_36C26 call sub_197E1 add sp, 6 mov al, byte_35B43 @@ -27518,13 +27518,13 @@ loc_1A32F: cbw push ax push 170h - push word_36C26 + push x_36C26 call sub_196A7 add sp, 6 - sub word_36C26, 4 - cmp word_36C26, 0 + sub x_36C26, 4 + cmp x_36C26, 0 jge short loc_1A364 - mov word_36C26, 0 + mov x_36C26, 0 loc_1A364: mov al, byte_35B43 @@ -27533,7 +27533,7 @@ loc_1A364: add ax, 44h ; 'D' push ax push 170h - push word_36C26 + push x_36C26 call sub_197E1 add sp, 6 mov al, byte_35B43 @@ -27547,7 +27547,7 @@ loc_1A364: loc_1A390: push 170h - mov ax, word_36C26 + mov ax, x_36C26 add ax, 8 push ax push ds @@ -27630,12 +27630,12 @@ loc_1A43F: push ax push [bp+var_2] push 160h - mov ax, word_36C26 - add ax, 0FFF8h + mov ax, x_36C26 + add ax, -8 push ax push 160h - mov ax, word_36C26 - add ax, 0FFF8h + mov ax, x_36C26 + add ax, -8 push ax push ds push offset unk_37129 @@ -27672,8 +27672,8 @@ loc_1A49F: idiv bx push ax push 160h - mov ax, word_36C26 - add ax, 0FFF8h + mov ax, x_36C26 + add ax, -8 push ax push ds push offset unk_37129 @@ -27689,11 +27689,11 @@ loc_1A4C9: cbw cmp ax, 1 jnz loc_1A5EE - mov si, word_36C26 - add word_36C26, 6 - cmp word_36C26, 260h + mov si, x_36C26 + add x_36C26, 6 + cmp x_36C26, 608 jl short loc_1A4EB - mov word_36C26, 260h + mov x_36C26, 608 loc_1A4EB: mov al, byte_35B43 @@ -27715,8 +27715,8 @@ loc_1A4EB: lea ax, [si-8] push ax push 170h - mov ax, word_36C26 - add ax, 0FFF8h + mov ax, x_36C26 + add ax, -8 push ax push ds push offset unk_373AF @@ -27746,8 +27746,8 @@ loc_1A542: add dx, 2 push dx push 170h - mov ax, word_36C26 - add ax, 0FFF8h + mov ax, x_36C26 + add ax, -8 push ax push ds push offset unk_373AF @@ -27810,11 +27810,11 @@ loc_1A5EE: cbw cmp ax, 2 jnz loc_1A70B - mov si, word_36C26 - sub word_36C26, 6 - cmp word_36C26, 0 + mov si, x_36C26 + sub x_36C26, 6 + cmp x_36C26, 0 jge short loc_1A60F - mov word_36C26, 0 + mov x_36C26, 0 loc_1A60F: mov al, byte_35B43 @@ -27834,8 +27834,8 @@ loc_1A60F: lea ax, [si-8] push ax push 170h - mov ax, word_36C26 - add ax, 0FFF8h + mov ax, x_36C26 + add ax, -8 push ax push ds push offset unk_373AF @@ -27864,8 +27864,8 @@ loc_1A660: idiv bx push dx push 170h - mov ax, word_36C26 - add ax, 0FFF8h + mov ax, x_36C26 + add ax, -8 push ax push ds push offset unk_373AF @@ -28074,8 +28074,8 @@ loc_1A806: loc_1A80A: push [bp+var_2] push 160h - mov ax, word_36C26 - add ax, 0FFF8h + mov ax, x_36C26 + add ax, -8 push ax push ds push offset unk_37129 @@ -28124,8 +28124,8 @@ loc_1A855: loc_1A865: mov [bp+var_2], ax - mov ax, word_36C26 - add ax, 0FFF8h + mov ax, x_36C26 + add ax, -8 mov si, ax push 2 jmp short loc_1A8C0 @@ -28171,8 +28171,8 @@ loc_1A8A3: loc_1A8B3: mov [bp+var_2], ax - mov ax, word_36C26 - add ax, 0FFF8h + mov ax, x_36C26 + add ax, -8 mov si, ax push 0FFFEh @@ -28188,7 +28188,7 @@ loc_1A8C0: loc_1A8D0: mov [bp+var_2], 5 - mov si, word_36C26 + mov si, x_36C26 push 6 call sub_1967E pop cx @@ -28198,8 +28198,8 @@ loc_1A8D0: loc_1A8E8: mov [bp+var_2], 4 - mov si, word_36C26 - push 0FFFAh + mov si, x_36C26 + push -6 call sub_1967E pop cx push 40004h @@ -28209,8 +28209,8 @@ loc_1A8FE: lea ax, [si-8] push ax push 170h - mov ax, word_36C26 - add ax, 0FFF8h + mov ax, x_36C26 + add ax, -8 push ax push ds push offset unk_373AF @@ -28256,14 +28256,14 @@ loc_1A94B: loc_1A94F: push [bp+var_2] push 160h - mov ax, word_36C26 - add ax, 0FFF8h + mov ax, x_36C26 + add ax, -8 push ax loc_1A95C: push 160h - mov ax, word_36C26 - add ax, 0FFF8h + mov ax, x_36C26 + add ax, -8 push ax push ds push offset unk_37129 @@ -28315,7 +28315,7 @@ loc_1A9C0: cmp ax, 1 jnz short loc_1A9DC push 170h - push word_36C26 + push x_36C26 push ds push offset unk_386B8 call sub_2FC44 @@ -28327,8 +28327,8 @@ loc_1A9DC: cmp ax, 4 jnz short loc_1A9FB push 170h - mov ax, word_36C26 - add ax, 10h + mov ax, x_36C26 + add ax, 16 push ax push ds push offset unk_386B8 @@ -28341,7 +28341,7 @@ loc_1A9FB: cmp ax, 7 jnz short loc_1AA1A push 170h - mov ax, word_36C26 + mov ax, x_36C26 add ax, 8 push ax push ds @@ -28355,8 +28355,8 @@ loc_1AA1A: cmp ax, 0Ah jnz short loc_1AA39 push 170h - mov ax, word_36C26 - add ax, 0FFF8h + mov ax, x_36C26 + add ax, -8 push ax push ds push offset unk_386B8 @@ -28369,7 +28369,7 @@ loc_1AA39: cmp ax, 0Dh jnz short loc_1AA58 push 170h - mov ax, word_36C26 + mov ax, x_36C26 add ax, 8 push ax push ds @@ -28383,8 +28383,8 @@ loc_1AA58: cmp ax, 10h jnz short loc_1AA77 push 170h - mov ax, word_36C26 - add ax, 18h + mov ax, x_36C26 + add ax, 24 push ax push ds push offset unk_386B8 @@ -28397,7 +28397,7 @@ loc_1AA77: cmp ax, 13h jnz short loc_1AA96 push 170h - mov ax, word_36C26 + mov ax, x_36C26 add ax, 8 push ax push ds @@ -28432,8 +28432,8 @@ loc_1AAA9: loc_1AACA: push [bp+var_2] push 160h - mov ax, word_36C26 - add ax, 0FFF8h + mov ax, x_36C26 + add ax, -8 push ax push ds push offset unk_37129 @@ -28443,8 +28443,8 @@ loc_1AACA: loc_1AADD: push [bp+var_2] push 170h - mov ax, word_36C26 - add ax, 0FFF8h + mov ax, x_36C26 + add ax, -8 push ax push ds push offset unk_373AF @@ -28693,17 +28693,17 @@ arg_0 = word ptr 6 cmp byte_35B28, 0 jnz loc_1AE0A mov ax, word_36C28 - sub ax, word_36C26 + sub ax, x_36C26 jge short loc_1ACA1 mov ax, word_36C28 - sub ax, word_36C26 + sub ax, x_36C26 imul ax, -1 jmp short loc_1ACA8 ; --------------------------------------------------------------------------- loc_1ACA1: mov ax, word_36C28 - sub ax, word_36C26 + sub ax, x_36C26 loc_1ACA8: cmp ax, 18h @@ -28732,20 +28732,20 @@ loc_1ACD7: cmp si, 64h ; 'd' jge loc_1AD81 mov ax, word_36C28 - sub ax, word_36C26 + sub ax, x_36C26 jge short loc_1ACF3 mov ax, word_36C28 - sub ax, word_36C26 + sub ax, x_36C26 imul ax, -1 jmp short loc_1ACFA ; --------------------------------------------------------------------------- loc_1ACF3: mov ax, word_36C28 - sub ax, word_36C26 + sub ax, x_36C26 loc_1ACFA: - cmp ax, 28h ; '(' + cmp ax, 40 jge loc_1AE0A mov ax, word_36C2A add ax, 0FE90h @@ -28763,10 +28763,10 @@ loc_1AD14: loc_1AD1A: cmp ax, 20h ; ' ' jge loc_1AE0A - mov ax, word_36C26 + mov ax, x_36C26 sub ax, word_36C28 jg short loc_1AD5E - mov ax, word_36C26 + mov ax, x_36C26 sub ax, word_36C28 jnz short loc_1AD66 mov word_34A7C, 0 @@ -28808,20 +28808,20 @@ loc_1AD6C: loc_1AD81: mov ax, word_36C28 - sub ax, word_36C26 + sub ax, x_36C26 jge short loc_1AD96 mov ax, word_36C28 - sub ax, word_36C26 + sub ax, x_36C26 imul ax, -1 jmp short loc_1AD9D ; --------------------------------------------------------------------------- loc_1AD96: mov ax, word_36C28 - sub ax, word_36C26 + sub ax, x_36C26 loc_1AD9D: - cmp ax, 28h ; '(' + cmp ax, 40 jge short loc_1AE0A mov ax, word_36C2A add ax, 0FE90h @@ -28897,7 +28897,7 @@ var_2 = word ptr -2 push di push 200020h push 170h - push word_36C26 + push x_36C26 call _egc_copy_rect_1_to_0 add sp, 8 push 3 @@ -28922,7 +28922,7 @@ loc_1AE4F: add ax, 56h ; 'V' push ax push 170h - push word_36C26 + push x_36C26 call sub_197E1 add sp, 6 xor si, si @@ -28953,8 +28953,8 @@ loc_1AE85: pop cx push 300030h push 160h - mov ax, word_36C26 - add ax, 0FFF8h + mov ax, x_36C26 + add ax, -8 push ax call _egc_copy_rect_1_to_0 add sp, 8 @@ -28969,23 +28969,23 @@ loc_1AE85: push 0 call sub_19E48 pop cx - mov ax, word_36C26 - add ax, 0A0h + mov ax, x_36C26 + add ax, 160 mov [bp+var_2], ax - cmp [bp+var_2], 260h + cmp [bp+var_2], 608 jl short loc_1AEDE - mov [bp+var_2], 260h + mov [bp+var_2], 608 loc_1AEDE: - mov ax, word_36C26 - add ax, 0FF60h + mov ax, x_36C26 + add ax, -160 mov [bp+var_4], ax cmp [bp+var_4], 0 jge short loc_1AEF2 mov [bp+var_4], 0 loc_1AEF2: - mov di, word_36C26 + mov di, x_36C26 xor si, si jmp loc_1AFC8 ; --------------------------------------------------------------------------- @@ -28993,7 +28993,7 @@ loc_1AEF2: loc_1AEFB: push 200020h push 170h - push word_36C26 + push x_36C26 call _egc_copy_rect_1_to_0 add sp, 8 push 200020h @@ -29015,7 +29015,7 @@ loc_1AF2C: idiv bx loc_1AF38: - add word_36C26, ax + add x_36C26, ax cmp si, 0Ah jge short loc_1AF46 mov ax, 0FFF0h @@ -29031,9 +29031,9 @@ loc_1AF46: loc_1AF52: add di, ax - cmp word_36C26, 260h + cmp x_36C26, 608 jl short loc_1AF62 - mov word_36C26, 260h + mov x_36C26, 608 loc_1AF62: or di, di @@ -29053,7 +29053,7 @@ loc_1AF68: add dx, 54h ; 'T' push dx push 170h - push word_36C26 + push x_36C26 call sub_197E1 add sp, 6 mov ax, si @@ -29091,7 +29091,7 @@ loc_1AFC8: jl loc_1AEFB push 200020h push 170h - push word_36C26 + push x_36C26 call _egc_copy_rect_1_to_0 add sp, 8 push 200020h @@ -30787,7 +30787,7 @@ _mode_debug db ? dword_36C20 dd ? public _PLAYER_INVINCIBILITY_TIME _player_invincibility_time dw ? -word_36C26 dw ? +x_36C26 dw ? word_36C28 dw ? word_36C2A dw ? word_36C2C dw ? @@ -33507,7 +33507,7 @@ word_39888 dw ? dw ? byte_3988C db ? unk_3988D db ? ; -dword_3988E dd ? +point_3988E Point dd ? unk_39896 db ? ; db ? ; @@ -33925,10 +33925,9 @@ word_39DF4 dw ? word_39DF6 dw ? word_39DF8 dw ? word_39DFA dw ? -word_39DFC dw ? -word_39DFE dw ? -word_39E00 dw ? -word_39E02 dw ? +point_39DFC Point +y_39E00 dw ? +x_39E02 dw ? word_39E04 dw ? word_39E06 dw ? word_39E08 dw ? @@ -33944,7 +33943,7 @@ word_39E1A dw ? db ? ; word_39E1D dw ? db ? -word_39E20 dw ? +x_39E20 dw ? word_39E22 dw ? db ? ; byte_39E25 db ? @@ -34341,8 +34340,7 @@ word_3A381 dw ? word_3A383 dw ? word_3A385 dw ? word_3A387 dw ? -word_3A389 dw ? -word_3A38B dw ? +point_3A389 Point db ? unk_3A38E db ? ; dd ? @@ -34643,8 +34641,8 @@ word_3A6FE dw ? dd ? dd ? db ? ; -word_3A765 dw ? -word_3A767 dw ? +x_3A765 dw ? +y_3A767 dw ? word_3A769 dw ? word_3A76B dw ? word_3A76D dw ? @@ -35167,8 +35165,8 @@ word_3AF32 dw ? word_3AF34 dw ? word_3AF36 dw ? word_3AF38 dw ? -word_3AF3A dw ? -word_3AF3C dw ? +y_3AF3A dw ? +x_3AF3C dw ? word_3AF3E dw ? word_3AF40 dw ? word_3AF42 dw ? @@ -35234,16 +35232,14 @@ word_3AF44 dw ? dd ? dd ? db ? ; -word_3B037 dw ? -word_3B039 dw ? -word_3B03B dw ? -word_3B03D dw ? +point_3B037 Point +y_3B03B dw ? +x_3B03D dw ? word_3B03F dw ? word_3B041 dw ? word_3B043 dw ? word_3B045 dw ? -word_3B047 dw ? -word_3B049 dw ? +point_3B047 Point word_3B04B dw ? word_3B04D dw ? word_3B04F dw ? @@ -35443,76 +35439,20 @@ word_3B338 dw ? word_3B33A dw ? word_3B33C dw ? word_3B33E dw ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? - dd ? db ? ; +word_3B341 dw 30 dup(?) +word_3B37D dw 30 dup(?) +word_3B3B9 dw 30 dup(?) +word_3B3F5 dw 30 dup(?) word_3B431 dw ? word_3B433 dw ? word_3B435 dw ? byte_3B437 db ? word_3B438 dw ? -word_3B43A dw ? -word_3B43C dw ? -word_3B43E dw ? -word_3B440 dw ? +x_3B43A dw ? +x_3B43C dw ? +y_3B43E dw ? +y_3B440 dw ? word_3B442 dw ? word_3B444 dw ? word_3B446 dw ? @@ -35536,19 +35476,15 @@ word_3B46B dw ? word_3B475 dw ? dd ? dd ? -unk_3B47F db ? ; - db ? ; -unk_3B481 db ? ; - db ? ; -unk_3B483 db ? ; - db ? ; -unk_3B485 db ? ; - db ? ; +x_3B47F dw ? ; +x_3B481 dw ? ; +y_3B483 dw ? ; +y_3B485 dw ? ; word_3B487 dw ? word_3B489 dw ? dd ? -word_3B48F dw ? -word_3B491 dw ? +x_3B48F dw ? +y_3B491 dw ? word_3B493 dw ? word_3B495 dw ? word_3B497 dw ? @@ -35581,26 +35517,18 @@ word_3B4DD dw ? word_3B4E7 dw ? dd ? dd ? -unk_3B4F1 db ? ; - db ? ; -unk_3B4F3 db ? ; - db ? ; -unk_3B4F5 db ? ; - db ? ; -unk_3B4F7 db ? ; - db ? ; -unk_3B4F9 db ? ; - db ? ; -unk_3B4FB db ? ; - db ? ; -unk_3B4FD db ? ; - db ? ; -unk_3B4FF db ? ; +x_3B4F1 dw ? ; +x_3B4F3 dw ? ; +x_3B4F5 dw ? ; +x_3B4F7 dw ? ; +y_3B4F9 dw ? ; +y_3B4FB dw ? ; +y_3B4FD dw ? ; +y_3B4FF dw ? ; dd ? dd ? dd ? dd ? - db ? ; word_3B511 dw ? word_3B513 dw ? word_3B515 dw ? diff --git a/th01_reiiden_2.inc b/th01_reiiden_2.inc index d9a6c72b..a63108b5 100644 --- a/th01_reiiden_2.inc +++ b/th01_reiiden_2.inc @@ -465,7 +465,7 @@ loc_1B3D8: push 3000B0h push 0C0h ; '?' push ds - push offset dword_3988E + push offset point_3988E call sub_166D2 push 1300040h push 2E00000h @@ -602,21 +602,21 @@ sub_1B58F proc far add sp, 10h mov ax, word ptr dword_3982A add ax, 4 - cmp ax, word_36C26 + cmp ax, x_36C26 jge short loc_1B5F1 mov ax, word ptr dword_3982A add ax, 14h - cmp ax, word_36C26 + cmp ax, x_36C26 jg short loc_1B609 loc_1B5F1: mov ax, word ptr dword_3985C add ax, 4 - cmp ax, word_36C26 + cmp ax, x_36C26 jge short loc_1B60E mov ax, word ptr dword_3985C add ax, 2Ch ; ',' - cmp ax, word_36C26 + cmp ax, x_36C26 jle short loc_1B60E loc_1B609: @@ -628,10 +628,10 @@ loc_1B60E: cmp word_3A6CA, 140h jge short loc_1B68A push 7018Eh - mov ax, word ptr dword_3988E+2 + mov ax, point_3988E.y add ax, 1Ch push ax - mov ax, word ptr dword_3988E + mov ax, point_3988E.x add ax, 1Ch push ax call sub_F236 @@ -644,23 +644,23 @@ loc_1B60E: push ax call sub_F236 add sp, 10h - mov ax, word ptr dword_3988E + mov ax, point_3988E.x add ax, 4 - cmp ax, word_36C26 + cmp ax, x_36C26 jge short loc_1B66D - mov ax, word ptr dword_3988E + mov ax, point_3988E.x add ax, 14h - cmp ax, word_36C26 + cmp ax, x_36C26 jg short loc_1B685 loc_1B66D: mov ax, word_398C0 add ax, 4 - cmp ax, word_36C26 + cmp ax, x_36C26 jge short loc_1B68A mov ax, word_398C0 add ax, 14h - cmp ax, word_36C26 + cmp ax, x_36C26 jle short loc_1B68A loc_1B685: @@ -680,11 +680,11 @@ loc_1B68A: add sp, 8 mov ax, word_398F2 add ax, 4 - cmp ax, word_36C26 + cmp ax, x_36C26 jge short loc_1B6CB mov ax, word_398F2 add ax, 14h - cmp ax, word_36C26 + cmp ax, x_36C26 jle short loc_1B6CB mov _player_is_hit, 1 @@ -888,10 +888,10 @@ arg_2 = word ptr 6 sub sp, 8 fstp [bp+var_18] fwait - mov ax, word ptr dword_3988E+2 + mov ax, point_3988E.y add ax, 1Ch push ax ; int - mov ax, word ptr dword_3988E + mov ax, point_3988E.x add ax, 1Ch push ax ; int push ds @@ -989,7 +989,7 @@ loc_1B956: movsx edx, word ptr [bx+8FAh] imul eax, edx sar eax, 8 - add ax, word_39DFC + add ax, point_39DFC.x mov bx, si add bx, bx mov [bx+5446h], ax @@ -1002,7 +1002,7 @@ loc_1B956: movsx edx, word ptr [bx+87Ah] imul eax, edx sar eax, 8 - add ax, word_39DFE + add ax, point_39DFC.y mov bx, si add bx, bx mov [bx+5450h], ax @@ -1114,7 +1114,7 @@ loc_1BA6C: push 30000h pushd 0 push ds - push offset dword_3988E + push offset point_3988E call sub_16733 push 30000h pushd 0 @@ -1243,10 +1243,10 @@ loc_1BBD3: push offset unk_37635 call sub_30368 push 36001Bh - mov ax, word ptr dword_3988E+2 + mov ax, point_3988E.y add ax, 1Ch push ax - mov ax, word ptr dword_3988E + mov ax, point_3988E.x add ax, 1Ch push ax push ds @@ -1293,10 +1293,10 @@ loc_1BC8C: push offset unk_37635 call sub_30368 push 36001Bh - mov ax, word ptr dword_3988E+2 + mov ax, point_3988E.y add ax, 1Ch push ax - mov ax, word ptr dword_3988E + mov ax, point_3988E.x add ax, 1Ch push ax push ds @@ -1376,13 +1376,13 @@ loc_1BDCD: mov word_39852, 0 mov word_39884, 0 push 190h - mov ax, word ptr dword_3988E + mov ax, point_3988E.x add ax, 1Ch push ax - mov ax, word ptr dword_3988E+2 + mov ax, point_3988E.y add ax, 1Ch push ax - mov ax, word ptr dword_3988E + mov ax, point_3988E.x add ax, 1Ch push ax call sub_F2F5 @@ -1487,7 +1487,7 @@ loc_1BEC0: add sp, 18h mov ax, word ptr dword_3982A add ax, 20h ; ' ' - sub ax, word_36C26 + sub ax, x_36C26 cmp ax, 20h ; ' ' jle short loc_1BF11 mov word_3984E, 4 @@ -1497,7 +1497,7 @@ loc_1BEC0: loc_1BF11: mov ax, word ptr dword_3982A add ax, 20h ; ' ' - mov dx, word_36C26 + mov dx, x_36C26 sub dx, ax cmp dx, 20h ; ' ' jle short loc_1BF2A @@ -1511,7 +1511,7 @@ loc_1BF2A: loc_1BF30: mov ax, word ptr dword_3985C add ax, 20h ; ' ' - sub ax, word_36C26 + sub ax, x_36C26 cmp ax, 20h ; ' ' jle short loc_1BF47 mov word_39880, 4 @@ -1521,7 +1521,7 @@ loc_1BF30: loc_1BF47: mov ax, word ptr dword_3985C add ax, 20h ; ' ' - mov dx, word_36C26 + mov dx, x_36C26 sub dx, ax cmp dx, 20h ; ' ' jle short loc_1BF60 @@ -1557,7 +1557,7 @@ loc_1BF88: loc_1BFA0: push ds - push offset dword_3988E + push offset point_3988E call sub_16970 add sp, 4 cmp ax, 1 @@ -1693,7 +1693,7 @@ loc_1C0CA: push 30000h pushd 0 push ds - push offset dword_3988E + push offset point_3988E call sub_16733 push 30000h pushd 0 @@ -1701,9 +1701,9 @@ loc_1C0CA: push offset word_398C0 call sub_16733 add sp, 18h - mov ax, word ptr dword_3988E + mov ax, point_3988E.x add ax, 20h ; ' ' - sub ax, word_36C26 + sub ax, x_36C26 cmp ax, 20h ; ' ' jle short loc_1C11B mov word_398B2, 4 @@ -1711,9 +1711,9 @@ loc_1C0CA: ; --------------------------------------------------------------------------- loc_1C11B: - mov ax, word ptr dword_3988E + mov ax, point_3988E.x add ax, 20h ; ' ' - mov dx, word_36C26 + mov dx, x_36C26 sub dx, ax cmp dx, 20h ; ' ' jle short loc_1C134 @@ -1727,7 +1727,7 @@ loc_1C134: loc_1C13A: mov ax, word_398C0 add ax, 20h ; ' ' - sub ax, word_36C26 + sub ax, x_36C26 cmp ax, 20h ; ' ' jle short loc_1C151 mov word_398E4, 4 @@ -1737,7 +1737,7 @@ loc_1C13A: loc_1C151: mov ax, word_398C0 add ax, 20h ; ' ' - mov dx, word_36C26 + mov dx, x_36C26 sub dx, ax cmp dx, 20h ; ' ' jle short loc_1C16A @@ -1780,15 +1780,15 @@ loc_1C1AF: shl dx, 2 inc dx mov word_39E08, dx - mov ax, word_36C26 + mov ax, x_36C26 add ax, 0FFF8h mov word_39E0A, ax mov ax, 190h - sub ax, word ptr dword_3988E+2 + sub ax, point_3988E.y add ax, 1Ch push ax mov ax, word_39E0A - sub ax, word ptr dword_3988E + sub ax, point_3988E.x add ax, 1Ch push ax call iatan2 @@ -1938,7 +1938,7 @@ loc_1C345: loc_1C35D: push ds - push offset dword_3988E + push offset point_3988E call sub_16970 add sp, 4 cmp ax, 1 @@ -2095,7 +2095,7 @@ loc_1C493: add sp, 18h mov ax, word ptr dword_3982A add ax, 20h ; ' ' - sub ax, word_36C26 + sub ax, x_36C26 cmp ax, 20h ; ' ' jle short loc_1C4EC mov word_3984E, 4 @@ -2105,7 +2105,7 @@ loc_1C493: loc_1C4EC: mov ax, word ptr dword_3982A add ax, 20h ; ' ' - mov dx, word_36C26 + mov dx, x_36C26 sub dx, ax cmp dx, 20h ; ' ' jle short loc_1C505 @@ -2119,7 +2119,7 @@ loc_1C505: loc_1C50B: mov ax, word ptr dword_3985C add ax, 20h ; ' ' - sub ax, word_36C26 + sub ax, x_36C26 cmp ax, 20h ; ' ' jle short loc_1C522 mov word_39880, 4 @@ -2129,7 +2129,7 @@ loc_1C50B: loc_1C522: mov ax, word ptr dword_3985C add ax, 20h ; ' ' - mov dx, word_36C26 + mov dx, x_36C26 sub dx, ax cmp dx, 20h ; ' ' jle short loc_1C53B @@ -2279,7 +2279,7 @@ loc_1C69B: loc_1C6B3: push ds - push offset dword_3988E + push offset point_3988E call sub_16970 add sp, 4 cmp ax, 1 @@ -2418,7 +2418,7 @@ loc_1C7E4: push 30000h pushd 0 push ds - push offset dword_3988E + push offset point_3988E call sub_16733 push 30000h pushd 0 @@ -2426,9 +2426,9 @@ loc_1C7E4: push offset word_398C0 call sub_16733 add sp, 18h - mov ax, word ptr dword_3988E + mov ax, point_3988E.x add ax, 20h ; ' ' - sub ax, word_36C26 + sub ax, x_36C26 cmp ax, 20h ; ' ' jle short loc_1C835 mov word_398B2, 4 @@ -2436,9 +2436,9 @@ loc_1C7E4: ; --------------------------------------------------------------------------- loc_1C835: - mov ax, word ptr dword_3988E + mov ax, point_3988E.x add ax, 20h ; ' ' - mov dx, word_36C26 + mov dx, x_36C26 sub dx, ax cmp dx, 20h ; ' ' jle short loc_1C84E @@ -2452,7 +2452,7 @@ loc_1C84E: loc_1C854: mov ax, word_398C0 add ax, 20h ; ' ' - sub ax, word_36C26 + sub ax, x_36C26 cmp ax, 20h ; ' ' jle short loc_1C86B mov word_398E4, 4 @@ -2462,7 +2462,7 @@ loc_1C854: loc_1C86B: mov ax, word_398C0 add ax, 20h ; ' ' - mov dx, word_36C26 + mov dx, x_36C26 sub dx, ax cmp dx, 20h ; ' ' jle short loc_1C884 @@ -2503,15 +2503,15 @@ loc_1C8C2: shl dx, 2 inc dx mov word_39E08, dx - mov ax, word_36C26 + mov ax, x_36C26 add ax, 0FFF8h mov word_39E0A, ax mov ax, 190h - sub ax, word ptr dword_3988E+2 + sub ax, point_3988E.y add ax, 1Ch push ax mov ax, word_39E0A - sub ax, word ptr dword_3988E + sub ax, point_3988E.x add ax, 1Ch push ax call iatan2 @@ -2664,7 +2664,7 @@ loc_1CA56: loc_1CA6E: push ds - push offset dword_3988E + push offset point_3988E call sub_16970 add sp, 4 cmp ax, 1 @@ -3139,7 +3139,7 @@ loc_1CF75: loc_1CF8D: push ds - push offset dword_3988E + push offset point_3988E call sub_16970 add sp, 4 cmp ax, 1 @@ -3256,7 +3256,7 @@ loc_1D08C: push 30000h pushd 0 push ds - push offset dword_3988E + push offset point_3988E call sub_16733 push 30000h pushd 0 @@ -3272,7 +3272,7 @@ loc_1D08C: add sp, 0Ch mov ax, word ptr dword_3982A add ax, 20h ; ' ' - sub ax, word_36C26 + sub ax, x_36C26 cmp ax, 20h ; ' ' jle short loc_1D116 mov word_3984E, 4 @@ -3282,7 +3282,7 @@ loc_1D08C: loc_1D116: mov ax, word ptr dword_3982A add ax, 20h ; ' ' - mov dx, word_36C26 + mov dx, x_36C26 sub dx, ax cmp dx, 20h ; ' ' jle short loc_1D12F @@ -3296,7 +3296,7 @@ loc_1D12F: loc_1D135: mov ax, word ptr dword_3985C add ax, 20h ; ' ' - sub ax, word_36C26 + sub ax, x_36C26 cmp ax, 20h ; ' ' jle short loc_1D14C mov word_39880, 4 @@ -3306,7 +3306,7 @@ loc_1D135: loc_1D14C: mov ax, word ptr dword_3985C add ax, 20h ; ' ' - mov dx, word_36C26 + mov dx, x_36C26 sub dx, ax cmp dx, 20h ; ' ' jle short loc_1D165 @@ -3318,9 +3318,9 @@ loc_1D165: mov word_39880, 3 loc_1D16B: - mov ax, word ptr dword_3988E + mov ax, point_3988E.x add ax, 20h ; ' ' - sub ax, word_36C26 + sub ax, x_36C26 cmp ax, 20h ; ' ' jle short loc_1D182 mov word_398B2, 4 @@ -3328,9 +3328,9 @@ loc_1D16B: ; --------------------------------------------------------------------------- loc_1D182: - mov ax, word ptr dword_3988E + mov ax, point_3988E.x add ax, 20h ; ' ' - mov dx, word_36C26 + mov dx, x_36C26 sub dx, ax cmp dx, 20h ; ' ' jle short loc_1D19B @@ -3344,7 +3344,7 @@ loc_1D19B: loc_1D1A1: mov ax, word_398C0 add ax, 20h ; ' ' - sub ax, word_36C26 + sub ax, x_36C26 cmp ax, 20h ; ' ' jle short loc_1D1B8 mov word_398E4, 4 @@ -3354,7 +3354,7 @@ loc_1D1A1: loc_1D1B8: mov ax, word_398C0 add ax, 20h ; ' ' - mov dx, word_36C26 + mov dx, x_36C26 sub dx, ax cmp dx, 20h ; ' ' jle short loc_1D1D1 @@ -3368,7 +3368,7 @@ loc_1D1D1: loc_1D1D7: mov ax, word_398F2 add ax, 20h ; ' ' - sub ax, word_36C26 + sub ax, x_36C26 cmp ax, 20h ; ' ' jle short loc_1D1EE mov word_39916, 4 @@ -3378,7 +3378,7 @@ loc_1D1D7: loc_1D1EE: mov ax, word_398F2 add ax, 20h ; ' ' - mov dx, word_36C26 + mov dx, x_36C26 sub dx, ax cmp dx, 20h ; ' ' jle short loc_1D207 @@ -3399,15 +3399,15 @@ loc_1D21D: cmp word_39E08, 0 jnz short loc_1D230 mov word_39E08, 1 - mov ax, word_36C26 + mov ax, x_36C26 mov word_39E0A, ax loc_1D230: push 7 - mov ax, word ptr dword_3988E+2 + mov ax, point_3988E.y add ax, 1Ch push ax - mov ax, word ptr dword_3988E + mov ax, point_3988E.x add ax, 1Ch push ax mov ax, word_398F4 @@ -3424,10 +3424,10 @@ loc_1D230: mov ax, word ptr dword_3985C add ax, 1Ch push ax - mov ax, word ptr dword_3988E+2 + mov ax, point_3988E.y add ax, 1Ch push ax - mov ax, word ptr dword_3988E + mov ax, point_3988E.x add ax, 1Ch push ax call sub_114E3 @@ -3492,14 +3492,14 @@ loc_1D2F6: cwd sub ax, dx sar ax, 1 - add ax, word ptr dword_3988E+2 + add ax, point_3988E.y add ax, 1Ch push ax mov ax, word_39E06 mov bx, 3 cwd idiv bx - add ax, word ptr dword_3988E + add ax, point_3988E.x add ax, 1Ch push ax mov ax, word_39E06 @@ -3528,13 +3528,13 @@ loc_1D2F6: cwd sub ax, dx sar ax, 1 - add ax, word ptr dword_3988E+2 + add ax, point_3988E.y add ax, 1Ch push ax mov ax, word_39E06 cwd idiv bx - add ax, word ptr dword_3988E + add ax, point_3988E.x add ax, 1Ch push ax call sub_114CA @@ -3618,14 +3618,14 @@ loc_1D2F6: cwd sub ax, dx sar ax, 1 - add ax, word ptr dword_3988E+2 + add ax, point_3988E.y add ax, 1Ch push ax mov ax, word_39E06 mov bx, 3 cwd idiv bx - add ax, word ptr dword_3988E + add ax, point_3988E.x add ax, 1Ch push ax mov ax, word_39E06 @@ -3656,13 +3656,13 @@ loc_1D2F6: cwd sub ax, dx sar ax, 1 - add ax, word ptr dword_3988E+2 + add ax, point_3988E.y add ax, 1Ch push ax mov ax, word_39E06 cwd idiv bx - add ax, word ptr dword_3988E + add ax, point_3988E.x add ax, 1Ch push ax call sub_114E3 @@ -3760,14 +3760,14 @@ loc_1D2F6: mov bx, 3 cwd idiv bx - add ax, word ptr dword_3988E + add ax, point_3988E.x add ax, 1Ch mov word_39DE8, ax mov ax, word_39E06 cwd sub ax, dx sar ax, 1 - add ax, word ptr dword_3988E+2 + add ax, point_3988E.y add ax, 1Ch mov word_39DF2, ax mov ax, word ptr dword_3985C @@ -3830,7 +3830,7 @@ loc_1D65D: loc_1D675: push ds - push offset dword_3988E + push offset point_3988E call sub_16970 add sp, 4 cmp ax, 1 @@ -3945,10 +3945,10 @@ loc_1D76D: mov word_39E04, 0 mov word_39E06, 0 mov ax, word_39DF0 - add ax, 40h - mov word_39DFE, ax + add ax, 64 + mov point_39DFC.y, ax mov ax, word_39DE6 - mov word_39DFC, ax + mov point_39DFC.x, ax mov word_39DFA, 40h xor si, si jmp short loc_1D808 @@ -3963,7 +3963,7 @@ loc_1D7B1: movsx edx, word ptr [bx+8FAh] imul eax, edx sar eax, 8 - add ax, word_39DFC + add ax, point_39DFC.x mov bx, si add bx, bx mov [bx+5446h], ax @@ -3975,7 +3975,7 @@ loc_1D7B1: movsx edx, word ptr [bx+87Ah] imul eax, edx sar eax, 8 - add ax, word_39DFE + add ax, point_39DFC.y mov bx, si add bx, bx mov [bx+5450h], ax @@ -4046,7 +4046,7 @@ loc_1D852: idiv bx or dx, dx jnz short loc_1D88A - sub word_39DFE, 3 + sub point_39DFC.y, 3 push 0C0h ; '?' call sub_1B8DE @@ -4113,7 +4113,7 @@ loc_1D92E: push 30000h pushd 0 push ds - push offset dword_3988E + push offset point_3988E call sub_16733 add sp, 0Ch @@ -4194,7 +4194,7 @@ loc_1DA05: jz short loc_1DA42 mov ax, word ptr dword_3982A add ax, 20h ; ' ' - sub ax, word_36C26 + sub ax, x_36C26 cmp ax, 20h ; ' ' jle short loc_1DA23 mov word_3984E, 4 @@ -4204,7 +4204,7 @@ loc_1DA05: loc_1DA23: mov ax, word ptr dword_3982A add ax, 20h ; ' ' - mov dx, word_36C26 + mov dx, x_36C26 sub dx, ax cmp dx, 20h ; ' ' jle short loc_1DA3C @@ -4220,7 +4220,7 @@ loc_1DA42: jz short loc_1DA7F mov ax, word ptr dword_3985C add ax, 20h ; ' ' - sub ax, word_36C26 + sub ax, x_36C26 cmp ax, 20h ; ' ' jle short loc_1DA60 mov word_39880, 4 @@ -4230,7 +4230,7 @@ loc_1DA42: loc_1DA60: mov ax, word ptr dword_3985C add ax, 20h ; ' ' - mov dx, word_36C26 + mov dx, x_36C26 sub dx, ax cmp dx, 20h ; ' ' jle short loc_1DA79 @@ -4244,9 +4244,9 @@ loc_1DA79: loc_1DA7F: test byte ptr word_39E14, 4 jz short loc_1DABC - mov ax, word ptr dword_3988E + mov ax, point_3988E.x add ax, 20h ; ' ' - sub ax, word_36C26 + sub ax, x_36C26 cmp ax, 20h ; ' ' jle short loc_1DA9D mov word_398B2, 4 @@ -4254,9 +4254,9 @@ loc_1DA7F: ; --------------------------------------------------------------------------- loc_1DA9D: - mov ax, word ptr dword_3988E + mov ax, point_3988E.x add ax, 20h ; ' ' - mov dx, word_36C26 + mov dx, x_36C26 sub dx, ax cmp dx, 20h ; ' ' jle short loc_1DAB6 @@ -4272,7 +4272,7 @@ loc_1DABC: jz short loc_1DAF9 mov ax, word_398C0 add ax, 20h ; ' ' - sub ax, word_36C26 + sub ax, x_36C26 cmp ax, 20h ; ' ' jle short loc_1DADA mov word_398E4, 4 @@ -4282,7 +4282,7 @@ loc_1DABC: loc_1DADA: mov ax, word_398C0 add ax, 20h ; ' ' - mov dx, word_36C26 + mov dx, x_36C26 sub dx, ax cmp dx, 20h ; ' ' jle short loc_1DAF3 @@ -4298,7 +4298,7 @@ loc_1DAF9: jz short loc_1DB36 mov ax, word_398F2 add ax, 20h ; ' ' - sub ax, word_36C26 + sub ax, x_36C26 cmp ax, 20h ; ' ' jle short loc_1DB17 mov word_39916, 4 @@ -4308,7 +4308,7 @@ loc_1DAF9: loc_1DB17: mov ax, word_398F2 add ax, 20h ; ' ' - mov dx, word_36C26 + mov dx, x_36C26 sub dx, ax cmp dx, 20h ; ' ' jle short loc_1DB30 @@ -4339,12 +4339,12 @@ loc_1DB5B: mov bx, si add bx, bx mov ax, [bx+5450h] - sub ax, word_39DFE + sub ax, point_39DFC.y push ax mov bx, si add bx, bx mov ax, [bx+5446h] - sub ax, word_39DFC + sub ax, point_39DFC.x push ax call iatan2 mov byte ptr word_39E16, al @@ -4452,17 +4452,17 @@ loc_1DC6D: idiv bx or dx, dx jnz short loc_1DCD0 - cmp word_39DFE, 12Ch + cmp point_39DFC.y, 300 jge short loc_1DCAB push bx push ds - push offset word_39E00 + push offset y_39E00 push ds - push offset word_39E02 - push 190h - push word_36C26 - push word_39DFE - push word_39DFC + push offset x_39E02 + push RES_Y + push x_36C26 + push point_39DFC.y + push point_39DFC.x call _vector_between add sp, 12h @@ -4473,15 +4473,15 @@ loc_1DCAB: idiv bx add ax, 2 add word_39E12, ax - mov ax, word_39E00 - add word_39DFE, ax - mov ax, word_39E02 - add word_39DFC, ax + mov ax, y_39E00 + add point_39DFC.y, ax + mov ax, x_39E02 + add point_39DFC.x, ax push word_39E12 call sub_1B8DE loc_1DCD0: - cmp word_39DFE, 1A4h + cmp point_39DFC.y, 420 jl loc_1DDD4 mov word_3A6CA, 0 mov byte_3A6CE, 0Ah @@ -4547,13 +4547,13 @@ loc_1DDAD: mov word_3A6CA, 0 push 4 push ds - push offset word_39E00 + push offset y_39E00 push ds - push offset word_39E02 - push 190h - push word_36C26 - push word_39DFE - push word_39DFC + push offset x_39E02 + push RES_Y + push x_36C26 + push point_39DFC.y + push point_39DFC.x call _vector_between add sp, 12h @@ -4566,25 +4566,25 @@ loc_1DDD4: idiv bx or dx, dx jnz short loc_1DE37 - cmp word_39DFE, 104h + cmp point_39DFC.y, 260 jge short loc_1DE12 push bx push ds - push offset word_39E00 + push offset y_39E00 push ds - push offset word_39E02 - push 190h - push word_36C26 - push word_39DFE - push word_39DFC + push offset x_39E02 + push RES_Y + push x_36C26 + push point_39DFC.y + push point_39DFC.x call _vector_between add sp, 12h loc_1DE12: - mov ax, word_39E00 - add word_39DFE, ax - mov ax, word_39E02 - add word_39DFC, ax + mov ax, y_39E00 + add point_39DFC.y, ax + mov ax, x_39E02 + add point_39DFC.x, ax mov ax, word_3A6CA mov bx, 40h cwd @@ -4595,7 +4595,7 @@ loc_1DE12: call sub_1B8DE loc_1DE37: - cmp word_39DFE, 1A4h + cmp point_39DFC.y, 420 jl loc_1DED5 mov word_39E10, 0 mov word_3A6CA, 0 @@ -4655,7 +4655,7 @@ loc_1DEF3: loc_1DF0B: push ds - push offset dword_3988E + push offset point_3988E call sub_16970 add sp, 4 cmp ax, 1 @@ -4837,7 +4837,7 @@ loc_1E07C: push 30000h pushd 0 push ds - push offset dword_3988E + push offset point_3988E call sub_16733 add sp, 0Ch @@ -6073,7 +6073,7 @@ loc_1EA31: add bx, bx lea ax, [bp+var_8] add bx, ax - mov ax, word_36C26 + mov ax, x_36C26 add ax, 0Ch sub ax, ss:[bx] push ax @@ -6252,8 +6252,8 @@ loc_1EB64: loc_1EBC7: cmp word_3A6CA, 0E0h jnz short loc_1EBD8 - mov ax, word_36C26 - mov word_39E20, ax + mov ax, x_36C26 + mov x_39E20, ax jmp loc_1EC70 ; --------------------------------------------------------------------------- @@ -6267,8 +6267,8 @@ loc_1EBD8: push ss lea ax, [bp+var_14] push ax - push 180h - mov ax, word_39E20 + push 384 + mov ax, x_39E20 add ax, 8 push ax push di @@ -7239,13 +7239,13 @@ loc_1F495: add bx, bx mov ax, [bx+5497h] add ax, 0FFD8h - cmp ax, word_36C26 + cmp ax, x_36C26 jge short loc_1F4ED mov bx, si add bx, bx mov ax, [bx+5497h] add ax, 8 - cmp ax, word_36C26 + cmp ax, x_36C26 jle short loc_1F4ED mov _player_is_hit, 1 @@ -7817,7 +7817,7 @@ loc_1F9DA: push 140007h push word_39E18 push 190h - mov ax, word_36C26 + mov ax, x_36C26 add ax, 0Eh push ax mov bx, [bp+var_2] @@ -12620,13 +12620,13 @@ loc_221D4: add bx, ax mov ax, es:[bx] sar ax, 4 - mov dx, word_36C26 + mov dx, x_36C26 add dx, 0FFF8h cmp ax, dx jle short loc_2222B mov ax, es:[bx] sar ax, 4 - mov dx, word_36C26 + mov dx, x_36C26 add dx, 18h cmp ax, dx jge short loc_2222B @@ -13229,7 +13229,7 @@ sub_22694 proc far push ds push offset aBoss1_3_bos ; "boss1_3.bos" push ds - push offset dword_3988E + push offset point_3988E call sub_1568F mov word_398B8, 0 push ds @@ -13783,11 +13783,11 @@ loc_22ABA: call sub_2281A push word_3A385 push ds - push offset word_3A38B + push offset point_3A389.y push ds - push offset word_3A389 - push 170h - push word_36C26 + push offset point_3A389.x + push 368 + push x_36C26 mov ax, word ptr dword_3982A+2 add ax, 20h ; ' ' push ax @@ -13798,31 +13798,31 @@ loc_22ABA: add sp, 1Eh loc_22AFE: - cmp word_3A389, 3E7h + cmp point_3A389.x, 999 jz short loc_22B31 push 10001h - push word_3A38B - push word_3A389 + push point_3A389.y + push point_3A389.x call sub_2290C add sp, 8 cmp word ptr dword_3982A+2, 130h jle short loc_22B60 - mov word_3A389, 3E7h - mov word_3A38B, 0FFFCh + mov point_3A389.x, 999 + mov point_3A389.y, -4 jmp short loc_22B60 ; --------------------------------------------------------------------------- loc_22B31: - cmp word_3A38B, 0FFFCh + cmp point_3A389.y, -4 jnz short loc_22B5A push 10001h - push word_3A38B + push point_3A389.y push 0 call sub_2290C add sp, 8 cmp word ptr dword_3982A+2, 60h jge short loc_22B60 - mov word_3A38B, 0 + mov point_3A389.y, 0 jmp short loc_22B60 ; --------------------------------------------------------------------------- @@ -13833,10 +13833,10 @@ loc_22B60: cmp word_34A78, 0 jnz short loc_22B86 mov ax, word ptr dword_3982A - cmp ax, word_36C26 + cmp ax, x_36C26 jg short loc_22B86 add ax, 40h - cmp ax, word_36C26 + cmp ax, x_36C26 jl short loc_22B86 cmp word ptr dword_3982A+2, 110h jl short loc_22B86 @@ -13887,7 +13887,7 @@ loc_22BA1: push ax pushd [dword_3982A] push ds - push offset dword_3988E + push offset point_3988E jmp loc_22C8A ; --------------------------------------------------------------------------- @@ -13905,7 +13905,7 @@ loc_22BD5: push ax pushd [dword_3982A] push ds - push offset dword_3988E + push offset point_3988E call sub_15F4A add sp, 0Ah call [bp+arg_2] @@ -13932,7 +13932,7 @@ loc_22C25: loc_22C27: pushd [dword_3982A] push ds - push offset dword_3988E + push offset point_3988E call sub_15F4A add sp, 0Ah call [bp+arg_6] @@ -13951,7 +13951,7 @@ loc_22C3E: push ax pushd [dword_3982A] push ds - push offset dword_3988E + push offset point_3988E call sub_15F4A add sp, 0Ah call [bp+arg_A] @@ -14013,7 +14013,7 @@ loc_22CC1: push word_398B2 pushd [dword_3982A] push ds - push offset dword_3988E + push offset point_3988E call sub_15F4A add sp, 0Ah @@ -15336,11 +15336,11 @@ arg_2 = word ptr 6 jz short loc_2370F mov ax, dx add ax, 0FFF0h - cmp ax, word_36C26 + cmp ax, x_36C26 jg short loc_2370F mov ax, dx add ax, [bp+arg_0] - cmp ax, word_36C26 + cmp ax, x_36C26 jl short loc_2370F mov _player_is_hit, 1 mov ax, 1 @@ -16204,7 +16204,7 @@ loc_23E9A: add ax, 0E0h mov [bp+var_4], ax push 0A4h ; '?' - mov ax, word_36C26 + mov ax, x_36C26 add ax, 0FED4h push ax call iatan2 @@ -16462,7 +16462,7 @@ sub_240DE proc near push 80014h push 0A0032h push 190h - mov ax, word_36C26 + mov ax, x_36C26 add ax, 3Ch ; '<' push ax push 930133h @@ -16472,7 +16472,7 @@ sub_240DE proc near push 80014h push 0A0032h push 190h - mov ax, word_36C26 + mov ax, x_36C26 add ax, 0FFC4h push ax push 930150h @@ -16718,7 +16718,7 @@ sub_24316 proc near mov bx, 78h ; 'x' cwd idiv bx - add dx, word_36C26 + add dx, x_36C26 add dx, 0FFC4h push dx push 930133h @@ -16741,7 +16741,7 @@ loc_24378: mov bx, 78h ; 'x' cwd idiv bx - add dx, word_36C26 + add dx, x_36C26 add dx, 0FFC4h push dx push 930133h @@ -16764,7 +16764,7 @@ loc_243B7: mov bx, 78h ; 'x' cwd idiv bx - add dx, word_36C26 + add dx, x_36C26 add dx, 0FFC4h push dx push 930133h @@ -16787,7 +16787,7 @@ loc_243F6: mov bx, 78h ; 'x' cwd idiv bx - add dx, word_36C26 + add dx, x_36C26 add dx, 0FFC4h push dx push 930133h @@ -16810,7 +16810,7 @@ loc_24434: mov bx, 78h ; 'x' cwd idiv bx - add dx, word_36C26 + add dx, x_36C26 add dx, 0FFC4h push dx push 930133h @@ -16833,7 +16833,7 @@ loc_24472: mov bx, 78h ; 'x' cwd idiv bx - add dx, word_36C26 + add dx, x_36C26 add dx, 0FFC4h push dx push 930133h @@ -17230,7 +17230,7 @@ loc_24857: loc_24871: push 400170h - push word_36C26 + push x_36C26 call sub_197E1 push 3 push word_36C2A @@ -18035,7 +18035,7 @@ sub_24F41 proc far push ds push offset aBoss5_3_bos ; "boss5_3.bos" push ds - push offset dword_3988E + push offset point_3988E call sub_1568F mov word_398B8, 0 push ds @@ -18088,7 +18088,7 @@ sub_24FE0 proc far push 300060h push 100h push ds - push offset dword_3988E + push offset point_3988E call sub_166D2 add sp, 12h mov word_3983E, 20h ; ' ' @@ -20954,9 +20954,9 @@ loc_26ABF: mov ax, word ptr dword_3982A add ax, 28h ; '(' mov [bp+var_6], ax - mov word ptr dword_3988E, ax + mov point_3988E.x, ax mov ax, [bp+var_4] - mov word ptr dword_3988E+2, ax + mov point_3988E.y, ax mov word_398B2, 0 push 1 call _graph_accesspage_func @@ -21046,7 +21046,7 @@ loc_26B8B: mov bx, 0C0h ; '?' cwd idiv bx - add dx, word ptr dword_3988E + add dx, point_3988E.x add dx, 0FFB8h mov bx, si add bx, bx @@ -21055,7 +21055,7 @@ loc_26B8B: mov bx, 80h ; '?' cwd idiv bx - add dx, word ptr dword_3988E+2 + add dx, point_3988E.y add dx, 0FFD0h mov bx, si add bx, bx @@ -21121,13 +21121,13 @@ loc_26C3C: cmp word_3A6CA, 64h ; 'd' jle loc_26D0B push 200030h - pushd [dword_3988E] + pushd [point_3988E] call _egc_copy_rect_1_to_0 add sp, 8 - mov ax, word ptr dword_3988E + mov ax, point_3988E.x add ax, 0FFD8h mov di, ax - mov ax, word ptr dword_3988E+2 + mov ax, point_3988E.y add ax, 0FFE0h mov [bp+var_4], ax or di, di @@ -21228,23 +21228,23 @@ loc_26D39: mov bx, 200h cwd idiv bx - mov word_3A765, dx + mov x_3A765, dx call IRand mov bx, 88h cwd idiv bx - add dx, 60h - mov word_3A767, dx - mov ax, word ptr dword_3988E - sub ax, word_3A765 + add dx, 96 + mov y_3A767, dx + mov ax, point_3988E.x + sub ax, x_3A765 mov [bp+var_2], ax cwd xor ax, dx sub ax, dx cmp ax, 80h ; '?' jge short loc_26D82 - mov ax, word ptr dword_3988E+2 - sub ax, word_3A767 + mov ax, point_3988E.y + sub ax, y_3A767 mov [bp+var_4], ax cwd xor ax, dx @@ -21253,16 +21253,9 @@ loc_26D39: jl short loc_26D39 loc_26D82: - push 2 - pushd [bp+arg_4] - pushd [bp+arg_0] - push word_3A767 - push word_3A765 - pushd [dword_3988E] - call _vector_between - add sp, 12h - mov ax, word_3A765 - sub ax, word ptr dword_3988E + call _vector_between c, large [point_3988E], x_3A765, y_3A767, large [bp+arg_0], large [bp+arg_4], 2 + mov ax, x_3A765 + sub ax, point_3988E.x mov [bp+var_6], ax cwd xor ax, dx @@ -21330,10 +21323,10 @@ var_2 = word ptr -2 call sub_253A2 push 38h ; '8' push [bp+var_2] - mov ax, word ptr dword_3988E+2 + mov ax, point_3988E.y add ax, 0Ch push ax - mov ax, word ptr dword_3988E + mov ax, point_3988E.x add ax, 14h push ax push ds @@ -21371,10 +21364,10 @@ loc_26E6A: push 580015h loc_26E70: - mov ax, word ptr dword_3988E+2 + mov ax, point_3988E.y add ax, 0Ch push ax - mov ax, word ptr dword_3988E + mov ax, point_3988E.x add ax, 14h push ax push ds @@ -21408,10 +21401,10 @@ sub_26E8C proc far or dx, dx jnz short loc_26ECA push 550016h - mov ax, word ptr dword_3988E+2 + mov ax, point_3988E.y add ax, 0Ch push ax - mov ax, word ptr dword_3988E + mov ax, point_3988E.x add ax, 14h push ax push ds @@ -21438,10 +21431,10 @@ loc_26ECA: or dx, dx jnz short loc_26F10 push 550018h - mov ax, word ptr dword_3988E+2 + mov ax, point_3988E.y add ax, 0Ch push ax - mov ax, word ptr dword_3988E + mov ax, point_3988E.x add ax, 14h push ax push ds @@ -21473,10 +21466,10 @@ sub_26F12 proc far push 2 call IRand push ax - mov ax, word ptr dword_3988E+2 + mov ax, point_3988E.y add ax, 0Ch push ax - mov ax, word ptr dword_3988E + mov ax, point_3988E.x add ax, 14h push ax push ds @@ -21886,7 +21879,7 @@ loc_272E1: push 8 call _mdrv2_se_play pop cx - mov ax, word_36C26 + mov ax, x_36C26 mov word_3A76D, ax loc_27317: @@ -22032,11 +22025,11 @@ loc_274C6: jnz short loc_274F2 mov ax, word_3A76D add ax, 68h ; 'h' - cmp ax, word_36C26 + cmp ax, x_36C26 jle short loc_274E5 mov ax, word_3A76D add ax, 0FF80h - cmp ax, word_36C26 + cmp ax, x_36C26 jl short loc_274F2 loc_274E5: @@ -22128,10 +22121,10 @@ loc_275A1: or dx, dx jnz short loc_275D2 push 48000Ch - mov ax, word ptr dword_3988E+2 + mov ax, point_3988E.y add ax, 2Ch ; ',' push ax - mov ax, word ptr dword_3988E + mov ax, point_3988E.x add ax, 3Ch ; '<' push ax push ds @@ -22569,7 +22562,7 @@ loc_27A65: push 80014h push 70032h push 190h - push word_36C26 + push x_36C26 mov ax, word ptr dword_3982A+2 add ax, 1Ch push ax @@ -23428,7 +23421,7 @@ loc_28258: loc_28279: push ds - push offset dword_3988E + push offset point_3988E loc_2827D: call sub_16970 @@ -23556,7 +23549,7 @@ loc_283AF: loc_283D0: push ds - push offset dword_3988E + push offset point_3988E loc_283D4: call sub_16970 @@ -23653,7 +23646,7 @@ loc_284B3: push word_3A77D push 0 push ds - push offset dword_3988E + push offset point_3988E call sub_16733 add sp, 0Ch mov ax, word_3A6CA @@ -23726,7 +23719,7 @@ loc_2856D: ; --------------------------------------------------------------------------- loc_2857D: - mov ax, word ptr dword_3988E + mov ax, point_3988E.x loc_28580: push ax @@ -23738,7 +23731,7 @@ loc_28580: ; --------------------------------------------------------------------------- loc_28590: - mov ax, word ptr dword_3988E + mov ax, point_3988E.x loc_28593: push ax @@ -23751,7 +23744,7 @@ loc_28593: loc_285A1: push ds - push offset dword_3988E + push offset point_3988E loc_285A5: call sub_16970 @@ -24735,7 +24728,7 @@ loc_28DBF: mov bx, si shl bx, 3 fld qword ptr [bx+5DE2h] - mov ax, word_36C26 + mov ax, x_36C26 add ax, 0FFF8h mov [bp+var_2], ax fild [bp+var_2] @@ -24748,7 +24741,7 @@ loc_28DBF: mov bx, si shl bx, 3 fld qword ptr [bx+5DE2h] - mov ax, word_36C26 + mov ax, x_36C26 add ax, 8 mov [bp+var_2], ax fild [bp+var_2] @@ -25989,7 +25982,7 @@ loc_298FD: loc_29905: call IRand and al, 7Fh - add al, 80h ; '?' + add al, 128 push ax push 3 push ss @@ -26780,16 +26773,16 @@ loc_2A031: call _mdrv2_se_play mov word_3AF32, 1540h mov word_3AF36, 400h - push 70h ; 'p' + push 112 push ds - push offset word_3AF3A + push offset y_3AF3A push ds - push offset word_3AF3C - push 17Ch - mov ax, word_36C26 - add ax, 0Ch + push offset x_3AF3C + push 380 + mov ax, x_36C26 + add ax, 12 push ax - push 400154h + push (64 shl 16) or 340 call _vector_between add sp, 14h mov word_35E03, 2 @@ -26806,7 +26799,7 @@ loc_2A073: push ax call _egc_copy_rect_1_to_0 add sp, 8 - mov ax, word_3AF3A + mov ax, y_3AF3A add word_3AF36, ax cmp word_3AF36, 18C0h jl short loc_2A0B0 @@ -26817,7 +26810,7 @@ loc_2A073: ; --------------------------------------------------------------------------- loc_2A0B0: - mov ax, word_3AF3C + mov ax, x_3AF3C add word_3AF32, ax push 7 mov ax, word_3AF36 @@ -26998,12 +26991,12 @@ loc_2A2BA: mov ax, word_3AF32 sar ax, 4 add ax, 20h ; ' ' - cmp ax, word_36C26 + cmp ax, x_36C26 jle short loc_2A2EB mov ax, word_3AF32 sar ax, 4 add ax, 0FFC0h - cmp ax, word_36C26 + cmp ax, x_36C26 jge short loc_2A2EB cmp word_35E03, 3 jl short loc_2A2EB @@ -27429,19 +27422,19 @@ loc_2A6B0: jl loc_2A894 cmp word_3A6CA, 32h ; '2' jnz short loc_2A735 - mov word_3B037, 1CCh - mov word_3B039, 78h ; 'x' - push 10h + mov point_3B037.x, 460 + mov point_3B037.y, 120 + push 16 push ds - push offset word_3B03B + push offset y_3B03B push ds - push offset word_3B03D - push 190h - push word_36C26 - push word_3B039 - push word_3B037 + push offset x_3B03D + push RES_Y + push x_36C26 + push point_3B037.y + push point_3B037.x call _vector_between - mov ax, word_36C26 + mov ax, x_36C26 mov word_3B03F, ax push 480044h push 40003Ch @@ -27453,7 +27446,7 @@ loc_2A6B0: push 7 push word_3A780 push 190h - push word_36C26 + push x_36C26 push 7801CCh push ds push offset unk_391A0 @@ -27472,19 +27465,19 @@ loc_2A735: jl loc_2A863 cmp word_3A6CA, 64h ; 'd' jnz short loc_2A79B - mov word_3B037, 0B4h ; '?' - mov word_3B039, 78h ; 'x' - push 10h + mov point_3B037.x, 180 + mov point_3B037.y, 120 + push 16 push ds - push offset word_3B03B + push offset y_3B03B push ds - push offset word_3B03D - push 190h - mov ax, 27Fh + push offset x_3B03D + push RES_Y + mov ax, RES_X - 1 sub ax, word_3B03F push ax - push word_3B039 - push word_3B037 + push point_3B037.y + push point_3B037.x call _vector_between add sp, 12h push 80032h @@ -27494,8 +27487,8 @@ loc_2A735: mov ax, 27Fh sub ax, word_3B03F push ax - push word_3B039 - push word_3B037 + push point_3B037.y + push point_3B037.x push ds push offset unk_391E5 jmp short loc_2A724 @@ -27506,26 +27499,26 @@ loc_2A79B: jl loc_2A863 cmp word_3A6CA, 96h jnz short loc_2A7FC - mov word_3B037, 260h - mov word_3B039, 0A4h ; '?' - push 10h + mov point_3B037.x, 608 + mov point_3B037.y, 164 + push 16 push ds - push offset word_3B03B + push offset y_3B03B push ds - push offset word_3B03D - push 190h - push word_36C26 - push word_3B039 - push word_3B037 + push offset x_3B03D + push RES_Y + push x_36C26 + push point_3B037.y + push point_3B037.x call _vector_between add sp, 12h push 80032h push 7 push word_3A780 push 190h - push word_36C26 - push word_3B039 - push word_3B037 + push x_36C26 + push point_3B037.y + push point_3B037.x push ds push offset unk_3922A jmp loc_2A724 @@ -27536,26 +27529,26 @@ loc_2A7FC: jl short loc_2A863 cmp word_3A6CA, 0C8h ; '?' jnz short loc_2A85B - mov word_3B037, 18h - mov word_3B039, 0A4h ; '?' - push 10h + mov point_3B037.x, 24 + mov point_3B037.y, 164 + push 16 push ds - push offset word_3B03B + push offset y_3B03B push ds - push offset word_3B03D - push 190h - push word_36C26 - push word_3B039 - push word_3B037 + push offset x_3B03D + push RES_Y + push x_36C26 + push point_3B037.y + push point_3B037.x call _vector_between add sp, 12h push 80032h push 7 push word_3A780 push 190h - push word_36C26 - push word_3B039 - push word_3B037 + push x_36C26 + push point_3B037.y + push point_3B037.x push ds push offset unk_3926F jmp loc_2A724 @@ -27567,14 +27560,14 @@ loc_2A85B: loc_2A863: push 1400078h - push word_3B037 - push word_3B039 + push point_3B037.x + push point_3B037.y push 7 call sub_28948 - mov ax, word_3B03D - add word_3B037, ax - mov ax, word_3B03B - add word_3B039, ax + mov ax, x_3B03D + add point_3B037.x, ax + mov ax, y_3B03B + add point_3B037.y, ax pop bp retn ; --------------------------------------------------------------------------- @@ -27974,8 +27967,8 @@ var_8 = qword ptr -8 add sp, 0Ch mov word_3B043, 2 mov word_3B045, 18Fh - mov word_3B047, 2 - mov word_3B049, 0FFFEh + mov point_3B047.x, 2 + mov point_3B047.y, -2 mov word_3B04B, 3 leave retn @@ -28084,9 +28077,9 @@ loc_2AD01: fstp [bp+var_8] push 4 push ds - push offset word_3B049 + push offset point_3B047.y push ds - push offset word_3B047 + push offset point_3B047.x push 0 fld [bp+var_8] call ftol@ @@ -28110,13 +28103,13 @@ loc_2AD01: sub sp, 8 fstp [bp+var_1A] fwait - mov ax, word_3B047 + mov ax, point_3B047.x mov [bp+var_A], ax fild [bp+var_A] sub sp, 8 fstp [bp+var_22] fwait - mov ax, word_3B049 + mov ax, point_3B047.y mov [bp+var_A], ax fild [bp+var_A] sub sp, 8 @@ -28138,14 +28131,14 @@ loc_2AD01: sub sp, 8 fstp [bp+var_1A] fwait - mov ax, word_3B047 + mov ax, point_3B047.x neg ax mov [bp+var_A], ax fild [bp+var_A] sub sp, 8 fstp [bp+var_22] fwait - mov ax, word_3B049 + mov ax, point_3B047.y mov [bp+var_A], ax fild [bp+var_A] sub sp, 8 @@ -28518,7 +28511,7 @@ loc_2B125: ; --------------------------------------------------------------------------- loc_2B14D: - mov ax, word_36C26 + mov ax, x_36C26 add ax, 10h sub ax, word_3B04D mov [bp+var_4], ax @@ -28542,7 +28535,7 @@ loc_2B14D: add sp, 14h loc_2B188: - mov ax, word_36C26 + mov ax, x_36C26 add ax, 10h mov dx, 27Fh sub dx, word_3B04D @@ -29616,17 +29609,17 @@ loc_2BBB2: add dx, 4B0h mov bx, si add bx, bx - mov [bx+69DDh], dx + mov word_3B37D[bx], dx push 28h ; '(' push ds mov ax, si add ax, ax - add ax, 6A55h + add ax, offset word_3B3F5 push ax push ds mov ax, si add ax, ax - add ax, 6A19h + add ax, offset word_3B3B9 push ax push 40h call IRand @@ -29636,14 +29629,14 @@ loc_2BBB2: push dx mov bx, si add bx, bx - mov ax, [bx+69DDh] + mov ax, word_3B37D[bx] mov bx, 0Ah cwd idiv bx push ax mov bx, si add bx, bx - mov ax, [bx+69A1h] + mov ax, word_3B341[bx] mov bx, 0Ah cwd idiv bx @@ -30113,7 +30106,7 @@ loc_2C06B: mov bx, 0Ah cwd idiv bx - cmp ax, word_36C26 + cmp ax, x_36C26 jle short loc_2C0BC mov bx, si add bx, bx @@ -30121,7 +30114,7 @@ loc_2C06B: mov bx, 0Ah cwd idiv bx - mov dx, word_36C26 + mov dx, x_36C26 add dx, 18h cmp ax, dx jge short loc_2C0BC @@ -30928,7 +30921,7 @@ loc_2C8AE: jb short loc_2C868 mov word_36C28, 258h mov word_36C2A, 118h - mov word_36C26, 130h + mov x_36C26, 304 fld dbl_35FAA fstp dbl_34A9C fwait @@ -31697,7 +31690,7 @@ loc_2CF26: push ds push offset aBoss8_e2_bos ; "boss8_e2.bos" push ds - push offset dword_3988E + push offset point_3988E call sub_1568F add sp, 22h mov word_398B8, 0 @@ -32095,7 +32088,7 @@ arg_0 = word ptr 6 push si push 800118h push ds - push offset dword_3988E + push offset point_3988E call sub_1588A push 0 call _graph_accesspage_func @@ -32103,7 +32096,7 @@ arg_0 = word ptr 6 push si push 800118h push ds - push offset dword_3988E + push offset point_3988E jmp short loc_2D334 ; --------------------------------------------------------------------------- @@ -32168,7 +32161,7 @@ arg_0 = word ptr 6 push word_35FEE push 800118h push ds - push offset dword_3988E + push offset point_3988E call sub_1588A push 0 call _graph_accesspage_func @@ -32176,7 +32169,7 @@ arg_0 = word ptr 6 push word_35FEE push 800118h push ds - push offset dword_3988E + push offset point_3988E jmp short loc_2D403 ; --------------------------------------------------------------------------- @@ -32292,19 +32285,19 @@ loc_2D44D: call sub_2CDD2 push 7 push ds - push offset word_3B43E + push offset y_3B43E push ds - push offset word_3B43A - push 1800000h - push 0EC013Ch + push offset x_3B43A + push (384 shl 16) or 0 + push (236 shl 16) or 316 call _vector_between push 7 push ds - push offset word_3B440 + push offset y_3B440 push ds - push offset word_3B43C - push 400000h - push 0EC013Ch + push offset x_3B43C + push ( 64 shl 16) or 0 + push (236 shl 16) or 316 call _vector_between add sp, 30h xor si, si @@ -32362,21 +32355,21 @@ loc_2D50D: loc_2D52C: cmp si, 4 jl short loc_2D50D - mov ax, word_3B43A + mov ax, x_3B43A add word_3B442, ax - mov ax, word_3B43E + mov ax, y_3B43E add word_3B44A, ax - mov ax, word_3B43A + mov ax, x_3B43A sub word_3B444, ax - mov ax, word_3B43E + mov ax, y_3B43E add word_3B44C, ax - mov ax, word_3B43C + mov ax, x_3B43C add word_3B446, ax - mov ax, word_3B440 + mov ax, y_3B440 add word_3B44E, ax - mov ax, word_3B43C + mov ax, x_3B43C sub word_3B448, ax - mov ax, word_3B440 + mov ax, y_3B440 add word_3B450, ax cmp word_3B442, 0 jg short loc_2D58B @@ -32801,7 +32794,7 @@ loc_2D935: mov ax, 180h sub ax, word_3B46B push ax - mov ax, word_36C26 + mov ax, x_36C26 add ax, 0Ch sub ax, word_3B457 push ax @@ -32826,9 +32819,9 @@ loc_2D96A: push [bp+var_5] push 6 push ds - push offset unk_3B483 + push offset y_3B483 push ds - push offset unk_3B47F + push offset x_3B47F call _vector add sp, 0Ch mov word_3B461, 3E7h @@ -32901,7 +32894,7 @@ loc_2DA02: jnz short loc_2DA39 mov bx, si add bx, bx - mov ax, word_36C26 + mov ax, x_36C26 mov [bx+6AEBh], ax loc_2DA39: @@ -32941,12 +32934,12 @@ loc_2DA78: push ds mov ax, si add ax, ax - add ax, 6AE3h + add ax, offset y_3B483 push ax push ds mov ax, si add ax, ax - add ax, 6ADFh + add ax, offset x_3B47F push ax call _vector add sp, 0Ch @@ -33008,11 +33001,11 @@ loc_2DAF6: mov bx, si imul bx, 0Ah mov ax, [bx+6AB7h] - cmp ax, word_36C26 + cmp ax, x_36C26 jle short loc_2DB6C mov bx, si imul bx, 0Ah - mov ax, word_36C26 + mov ax, x_36C26 add ax, 18h cmp [bx+6AB7h], ax jge short loc_2DB6C @@ -33059,7 +33052,7 @@ loc_2DB95: mov ax, 180h sub ax, word_3B475 push ax - mov ax, word_36C26 + mov ax, x_36C26 add ax, 0Ch sub ax, word_3B461 push ax @@ -33084,9 +33077,9 @@ loc_2DBCA: push [bp+var_5] push 6 push ds - push offset unk_3B485 + push offset y_3B485 push ds - push offset unk_3B481 + push offset x_3B481 call _vector push 0Ch call _mdrv2_se_play @@ -33313,13 +33306,13 @@ loc_2DD76: jl loc_2DF0A cmp word_3A6CA, 64h ; 'd' jnz short loc_2DDD9 - push 10h + push 16 push ds - push offset word_3B491 + push offset y_3B491 push ds - push offset word_3B48F - push 400040h - push 0C80122h + push offset x_3B48F + push (64 shl 16) or 64 + push (200 shl 16) or 290 call _vector_between mov word_3B493, 122h mov word_3B495, 0C8h ; '?' @@ -33345,9 +33338,9 @@ loc_2DDD9: push word_3B493 call _egc_copy_rect_1_to_0 add sp, 8 - mov ax, word_3B48F + mov ax, x_3B48F add word_3B493, ax - mov ax, word_3B491 + mov ax, y_3B491 add word_3B495, ax cmp word_3B495, 40h jg short loc_2DE1F @@ -33498,7 +33491,7 @@ loc_2DF55: or dx, dx jnz short loc_2DFBA push 0B8h ; '?' - mov ax, word_36C26 + mov ax, x_36C26 add ax, 0FEEAh push ax call iatan2 @@ -33591,7 +33584,7 @@ loc_2E01D: mov ax, 180h sub ax, word_3B4C9 push ax - mov ax, word_36C26 + mov ax, x_36C26 add ax, 0Ch sub ax, word_3B4A1 push ax @@ -33616,9 +33609,9 @@ loc_2E052: push word ptr [bp+var_1] push 6 push ds - push offset unk_3B4F9 + push offset y_3B4F9 push ds - push offset unk_3B4F1 + push offset x_3B4F1 call _vector add sp, 0Ch mov si, 1 @@ -33703,7 +33696,7 @@ loc_2E106: jnz short loc_2E13D mov bx, si add bx, bx - mov ax, word_36C26 + mov ax, x_36C26 mov [bx+6B69h], ax loc_2E13D: @@ -33743,12 +33736,12 @@ loc_2E17C: push ds mov ax, si add ax, ax - add ax, 6B59h + add ax, offset y_3B4F9 push ax push ds mov ax, si add ax, ax - add ax, 6B51h + add ax, offset x_3B4F1 push ax call _vector add sp, 0Ch @@ -33810,11 +33803,11 @@ loc_2E1FA: mov bx, si imul bx, 0Ah mov ax, [bx+6B01h] - cmp ax, word_36C26 + cmp ax, x_36C26 jle short loc_2E270 mov bx, si imul bx, 0Ah - mov ax, word_36C26 + mov ax, x_36C26 add ax, 18h cmp [bx+6B01h], ax jge short loc_2E270 @@ -33861,7 +33854,7 @@ loc_2E299: mov ax, 180h sub ax, word_3B4D3 push ax - mov ax, word_36C26 + mov ax, x_36C26 add ax, 0Ch sub ax, word_3B4AB push ax @@ -33886,9 +33879,9 @@ loc_2E2CE: push word ptr [bp+var_1] push 6 push ds - push offset unk_3B4FB + push offset y_3B4FB push ds - push offset unk_3B4F3 + push offset x_3B4F3 call _vector push 0Ch call _mdrv2_se_play @@ -33916,7 +33909,7 @@ loc_2E311: mov ax, 180h sub ax, word_3B4DD push ax - mov ax, word_36C26 + mov ax, x_36C26 add ax, 0Ch sub ax, word_3B4B5 push ax @@ -33941,9 +33934,9 @@ loc_2E346: push word ptr [bp+var_1] push 6 push ds - push offset unk_3B4FD + push offset y_3B4FD push ds - push offset unk_3B4F5 + push offset x_3B4F5 call _vector push 0Ch call _mdrv2_se_play @@ -33971,7 +33964,7 @@ loc_2E38B: mov ax, 180h sub ax, word_3B4E7 push ax - mov ax, word_36C26 + mov ax, x_36C26 add ax, 0Ch sub ax, word_3B4BF push ax @@ -33996,9 +33989,9 @@ loc_2E3C0: push word ptr [bp+var_1] push 6 push ds - push offset unk_3B4FF + push offset y_3B4FF push ds - push offset unk_3B4F7 + push offset x_3B4F7 call _vector loc_2E3D8: @@ -35082,14 +35075,14 @@ loc_2EED9: loc_2EEFE: inc word_3A6CA inc word_3B52B - cmp word_36C26, 0C6h ; '?' + cmp x_36C26, 198 jge short loc_2EF13 mov ax, 1 jmp short loc_2EF22 ; --------------------------------------------------------------------------- loc_2EF13: - cmp word_36C26, 18Ch + cmp x_36C26, 396 jle short loc_2EF1F xor ax, ax jmp short loc_2EF22 @@ -35212,14 +35205,14 @@ loc_2F02C: jnz loc_2F136 inc word_3A6CA inc word_3B52B - cmp word_36C26, 0C6h ; '?' + cmp x_36C26, 198 jge short loc_2F04C mov ax, 1 jmp short loc_2F05B ; --------------------------------------------------------------------------- loc_2F04C: - cmp word_36C26, 18Ch + cmp x_36C26, 396 jle short loc_2F058 xor ax, ax jmp short loc_2F05B @@ -35325,14 +35318,14 @@ loc_2F136: jnz loc_2F27C inc word_3A6CA inc word_3B52B - cmp word_36C26, 0C6h ; '?' + cmp x_36C26, 198 jge short loc_2F156 mov ax, 1 jmp short loc_2F165 ; --------------------------------------------------------------------------- loc_2F156: - cmp word_36C26, 18Ch + cmp x_36C26, 396 jle short loc_2F162 xor ax, ax jmp short loc_2F165 @@ -35462,14 +35455,14 @@ loc_2F27C: jnz loc_2F386 inc word_3A6CA inc word_3B52B - cmp word_36C26, 0C6h ; '?' + cmp x_36C26, 198 jge short loc_2F29C mov ax, 1 jmp short loc_2F2AB ; --------------------------------------------------------------------------- loc_2F29C: - cmp word_36C26, 18Ch + cmp x_36C26, 396 jle short loc_2F2A8 xor ax, ax jmp short loc_2F2AB @@ -35575,14 +35568,14 @@ loc_2F386: jnz loc_2F4D7 inc word_3A6CA inc word_3B52B - cmp word_36C26, 0C6h ; '?' + cmp x_36C26, 198 jge short loc_2F3A6 mov ax, 1 jmp short loc_2F3B5 ; --------------------------------------------------------------------------- loc_2F3A6: - cmp word_36C26, 18Ch + cmp x_36C26, 396 jle short loc_2F3B2 xor ax, ax jmp short loc_2F3B5 @@ -35711,14 +35704,14 @@ loc_2F4D7: jnz loc_2F600 inc word_3A6CA inc word_3B52B - cmp word_36C26, 0C6h ; '?' + cmp x_36C26, 198 jge short loc_2F4F7 mov ax, 1 jmp short loc_2F506 ; --------------------------------------------------------------------------- loc_2F4F7: - cmp word_36C26, 18Ch + cmp x_36C26, 396 jle short loc_2F503 xor ax, ax jmp short loc_2F506 @@ -35833,14 +35826,14 @@ loc_2F600: jnz loc_2FC40 inc word_3A6CA inc word_3B52B - cmp word_36C26, 0C6h ; '?' + cmp x_36C26, 198 jge short loc_2F620 mov ax, 1 jmp short loc_2F62F ; --------------------------------------------------------------------------- loc_2F620: - cmp word_36C26, 18Ch + cmp x_36C26, 396 jle short loc_2F62C xor ax, ax jmp short loc_2F62F @@ -37154,7 +37147,7 @@ arg_E = byte ptr 14h mov ax, 180h sub ax, [bp+arg_2] push ax - mov ax, word_36C26 + mov ax, x_36C26 add ax, 0Ch sub ax, [bp+arg_0] push ax @@ -37232,8 +37225,8 @@ loc_3015A: push [bp+arg_A] pushd [bp+arg_4] pushd [bp+arg_0] - push 180h - mov ax, word_36C26 + push 384 + mov ax, x_36C26 add ax, 8 push ax push [bp+arg_12] @@ -37458,12 +37451,7 @@ loc_302ED: ; --------------------------------------------------------------------------- loc_3030A: - push word ptr [bp+var_1] - push [bp+arg_A] - pushd [bp+arg_4] - pushd [bp+arg_0] - call _vector - add sp, 0Ch + call _vector c, [bp+arg_0], [bp+arg_4], [bp+arg_A], word ptr [bp+var_1] loc_30320: les bx, [bp+arg_C] @@ -37930,8 +37918,8 @@ loc_306B4: mov ax, word_3B530 add ax, 10h push ax - push 180h - mov ax, word_36C26 + push 384 + mov ax, x_36C26 add ax, 8 push ax mov ax, [bx+4] @@ -38045,8 +38033,8 @@ loc_30809: push ss lea ax, [bp+var_2] push ax - push 180h - mov ax, word_36C26 + push 384 + mov ax, x_36C26 add ax, 8 push ax mov ax, [bx+4] @@ -38359,13 +38347,13 @@ loc_30A47: loc_30A5E: cmp byte_34A57, 1 jnz loc_30AF6 - mov ax, word_36C26 + mov ax, x_36C26 add ax, 0FFF8h mov dx, di sub dx, ax cmp dx, 30h ; '0' jge short loc_30AA0 - mov ax, word_36C26 + mov ax, x_36C26 add ax, 0FFF8h mov dx, di sub dx, ax @@ -38392,7 +38380,7 @@ loc_30AA2: mov bx, word_3B530 mov ax, [bx+2] sar ax, 4 - mov dx, word_36C26 + mov dx, x_36C26 add dx, 0Ch cmp ax, dx jg short loc_30AC2 @@ -38927,13 +38915,13 @@ sub_30F06 proc far mov bx, word_3B530 mov ax, [bx+2] sar ax, 4 - mov dx, word_36C26 + mov dx, x_36C26 add dx, 4 cmp ax, dx jl short loc_30F6C mov ax, [bx+2] sar ax, 4 - mov dx, word_36C26 + mov dx, x_36C26 add dx, 14h cmp ax, dx jg short loc_30F6C diff --git a/th02_main.asm b/th02_main.asm index f259fea1..8aefff2e 100644 --- a/th02_main.asm +++ b/th02_main.asm @@ -4176,7 +4176,7 @@ arg_2 = word ptr 6 add ax, ax mov cx, ax mov word ptr [si], 1 - mov ax, word_205F6 + mov ax, point_205F6.x add ax, [bp+arg_2] shl ax, 4 mov bx, cx @@ -4276,8 +4276,8 @@ var_2 = word ptr -2 xor si, si xor di, di mov [bp+var_2], 0 - mov ax, word_205F8 - add ax, 20h ; ' ' + mov ax, point_205F6.y + add ax, 32 shl ax, 4 mov word_205E4, ax mov word_205E2, 0 @@ -4591,8 +4591,8 @@ var_2 = word ptr -2 xor di, di mov [bp+var_2], 0 mov [bp+var_3], 0 - mov ax, word_205F8 - add ax, 20h ; ' ' + mov ax, point_205F6.y + add ax, 32 shl ax, 4 mov word_205E4, ax mov word_205E2, 0 @@ -4775,11 +4775,11 @@ loc_CE5B: cmp word_205DA, 0 jle short loc_CE96 mov ax, word_205DA - sub ax, word_205F8 - add ax, 0FFE0h + sub ax, point_205F6.y + add ax, -32 push ax mov ax, word_205D8 - sub ax, word_205F6 + sub ax, point_205F6.x push ax call iatan2 mov [bp+var_2], ax @@ -4805,12 +4805,12 @@ loc_CE9F: cmp word_205DA, 0 jle short loc_CED8 mov ax, word_205DA - sub ax, word_205F8 - add ax, 0FFE0h + sub ax, point_205F6.y + add ax, -32 push ax mov ax, word_205D8 - sub ax, word_205F6 - add ax, 0FFF0h + sub ax, point_205F6.x + add ax, -16 push ax call iatan2 mov [bp+var_2], ax @@ -5077,8 +5077,8 @@ var_2 = word ptr -2 xor di, di mov [bp+var_3], 0 inc byte_20350 - mov ax, word_205F8 - add ax, 20h ; ' ' + mov ax, point_205F6.y + add ax, 32 shl ax, 4 mov word_205E4, ax cmp shot_level, 2 @@ -6090,14 +6090,14 @@ arg_2 = word ptr 6 mov [bp+var_16], ax mov al, byte_1E596 mov [bp+var_14], al - cmp word_205F6, 80h + cmp point_205F6.x, 128 jg short loc_D794 mov al, 0FFh jmp short loc_D7A2 ; --------------------------------------------------------------------------- loc_D794: - cmp word_205F6, 100h + cmp point_205F6.x, 256 jg short loc_D7A0 mov al, 0 jmp short loc_D7A2 @@ -6308,10 +6308,10 @@ arg_0 = word ptr 4 push di mov ax, word_2189C mov [bp+var_2], ax - cmp ax, word_205F8 + cmp ax, point_205F6.y jl loc_DADE - mov ax, word_205F8 - add ax, 18h + mov ax, point_205F6.y + add ax, 24 cmp ax, [bp+var_2] jl loc_DADE mov ax, word_2189A @@ -6597,12 +6597,12 @@ loc_DB9D: inc word ptr [si+0Ah] cmp _player_is_hit, 0 jnz short loc_DBCA - mov ax, word_205F6 - add ax, 0FFF8h + mov ax, point_205F6.x + add ax, -8 cmp ax, word_2189A jg short loc_DBCA - mov ax, word_205F6 - add ax, 18h + mov ax, point_205F6.x + add ax, 24 cmp ax, word_2189A jl short loc_DBCA push si @@ -8775,43 +8775,43 @@ arg_2 = word ptr 6 mov bp, sp mov bx, word_205F0 mov ax, [bx] - mov word_205F8, ax + mov point_205F6.y, ax mov ax, [bp+arg_0] - add word_205F8, ax - cmp word_205F8, 10h + add point_205F6.y, ax + cmp point_205F6.y, 16 jge short loc_EEE5 - mov word_205F8, 10h + mov point_205F6.y, 16 jmp short loc_EEF3 ; --------------------------------------------------------------------------- loc_EEE5: - cmp word_205F8, 158h + cmp point_205F6.y, 344 jle short loc_EEF3 - mov word_205F8, 158h + mov point_205F6.y, 344 loc_EEF3: mov bx, word_205F0 - mov ax, word_205F8 + mov ax, point_205F6.y mov [bx], ax mov bx, word_205EE mov ax, [bx] - mov word_205F6, ax + mov point_205F6.x, ax mov ax, [bp+arg_2] - add word_205F6, ax - cmp word_205F6, 186h + add point_205F6.x, ax + cmp point_205F6.x, 390 jl short loc_EF1C - mov word_205F6, 186h + mov point_205F6.x, 390 jmp short loc_EF29 ; --------------------------------------------------------------------------- loc_EF1C: - cmp word_205F6, 1Ch + cmp point_205F6.x, 28 jg short loc_EF29 - mov word_205F6, 1Ch + mov point_205F6.x, 28 loc_EF29: mov bx, word_205EE - mov ax, word_205F6 + mov ax, point_205F6.x mov [bx], ax pop bp retn 4 @@ -8859,17 +8859,14 @@ loc_EF7F: and ax, 3 cmp ax, 3 jge short loc_EFAC - mov si, word_205F8 + mov si, point_205F6.y add si, _scroll_line cmp si, RES_Y jl short loc_EF9E sub si, RES_Y loc_EF9E: - push word_205F6 - push si - push word_1E512 - call super_roll_put + call super_roll_put pascal, point_205F6.x, si, word_1E512 loc_EFAC: cmp power, 8 @@ -8940,10 +8937,10 @@ var_2 = word ptr -2 loc_F03D: mov bx, word_205EE mov ax, [bx] - mov word_205F6, ax + mov point_205F6.x, ax mov bx, word_205F0 mov ax, [bx] - mov word_205F8, ax + mov point_205F6.y, ax inc byte_20609 cmp byte_20609, 18h jnb short loc_F08A @@ -9274,13 +9271,13 @@ loc_F2FB: push si push di call sub_EEC3 - mov ax, word_205F6 - add ax, 0FFF0h + mov ax, point_205F6.x + add ax, -16 sub ax, si mov bx, word_205F2 mov [bx], ax - mov ax, word_205F8 - add ax, 10h + mov ax, point_205F6.y + add ax, 16 sub ax, di mov bx, word_205F4 mov [bx], ax @@ -10439,11 +10436,11 @@ arg_6 = dword ptr 0Ah mov bx, ax mov ax, [bx+si+4] mov [bp+var_4], ax - mov ax, word_205F8 - add ax, 14h + mov ax, point_205F6.y + add ax, 20 mov [bp+var_6], ax - mov ax, word_205F6 - add ax, 0Ch + mov ax, point_205F6.x + add ax, 12 mov [bp+var_8], ax mov al, _page_back mov ah, 0 @@ -11231,14 +11228,14 @@ arg_0 = word ptr 4 mov ax, [bx] sar ax, 4 mov di, ax - mov ax, word_205F8 + mov ax, point_205F6.y add ax, 8 mov [bp+var_2], ax mov bx, word_2174E mov ax, [bx] sar ax, 4 mov [bp+var_4], ax - mov ax, word_205F6 + mov ax, point_205F6.x add ax, 8 mov [bp+var_6], ax mov al, [si+0Fh] @@ -11569,40 +11566,40 @@ loc_10C72: cbw cmp ax, 1 jnz short loc_10CA9 - mov ax, word_205F6 + mov ax, point_205F6.x add ax, 7 cmp ax, word_21740 jg short loc_10CDC - mov ax, word_205F6 - add ax, 11h + mov ax, point_205F6.x + add ax, 17 cmp ax, word_21740 jle short loc_10CDC - mov ax, word_205F8 - add ax, 0Ch + mov ax, point_205F6.y + add ax, 12 cmp ax, di jg short loc_10CDC - mov ax, word_205F8 - add ax, 16h + mov ax, point_205F6.y + add ax, 22 cmp ax, di jl short loc_10CDC jmp short loc_10CD5 ; --------------------------------------------------------------------------- loc_10CA9: - mov ax, word_205F6 - add ax, 0FFFDh + mov ax, point_205F6.x + add ax, -3 cmp ax, word_21740 jg short loc_10CDC - mov ax, word_205F6 - add ax, 13h + mov ax, point_205F6.x + add ax, 19 cmp ax, word_21740 jle short loc_10CDC - mov ax, word_205F8 + mov ax, point_205F6.y add ax, 4 cmp ax, di jg short loc_10CDC - mov ax, word_205F8 - add ax, 18h + mov ax, point_205F6.y + add ax, 24 cmp ax, di jl short loc_10CDC @@ -13120,7 +13117,7 @@ loc_11970: jl short loc_1194A loc_11975: - cmp word_205F8, 60h + cmp point_205F6.y, 96 jge short loc_11993 push word_22D98 push word_22D9A @@ -13499,8 +13496,8 @@ var_2 = word ptr -2 or dx, dx jnz short loc_11C7A mov byte_23A70, 1Eh - mov ax, word_205F6 - add ax, 10h + mov ax, point_205F6.x + add ax, 16 and ax, 0FFF0h mov [bp+var_2], ax push ax @@ -13539,10 +13536,10 @@ var_1 = byte ptr -1 idiv bx or dx, dx jnz locret_11D2E - mov ax, word_205F8 - add ax, 0FFE0h + mov ax, point_205F6.y + add ax, -32 push ax - mov ax, word_205F6 + mov ax, point_205F6.x sub ax, word_22D8C push ax call iatan2 @@ -13582,10 +13579,10 @@ loc_11CF5: idiv bx or dx, dx jnz short locret_11D2E - mov ax, word_205F8 - add ax, 0FFE0h + mov ax, point_205F6.y + add ax, -32 push ax - mov ax, word_205F6 + mov ax, point_205F6.x sub ax, word_22D8C push ax call iatan2 @@ -13979,12 +13976,12 @@ sub_1200F proc near ; --------------------------------------------------------------------------- loc_1202D: - mov ax, word_205F8 - add ax, 0FFE0h + mov ax, point_205F6.y + add ax, -32 push ax mov bx, si add bx, bx - mov ax, word_205F6 + mov ax, point_205F6.x sub ax, [bx+5314h] push ax call iatan2 @@ -15413,14 +15410,14 @@ loc_12B5E: cmp byte ptr [di+1], 4 jnz short loc_12B98 mov ax, word_23A6C - add ax, 0FFE8h - cmp ax, word_205F6 + add ax, -24 + cmp ax, point_205F6.x jge short loc_12B98 mov ax, word_23A6C add ax, 8 - cmp ax, word_205F6 + cmp ax, point_205F6.x jle short loc_12B98 - mov ax, word_205F8 + mov ax, point_205F6.y cmp ax, word_23A6E jl short loc_12B98 cmp _player_is_hit, 0 @@ -15593,17 +15590,14 @@ sub_12CE5 proc near push bp mov bp, sp push si - mov si, word_205F8 + mov si, point_205F6.y add si, _scroll_line cmp si, RES_Y jl short loc_12CFB sub si, RES_Y loc_12CFB: - push word_205F6 - push si - push 0 - call super_roll_put + call super_roll_put pascal, point_205F6.x, si, 0 mov al, _page_back mov ah, 0 shl ax, 2 @@ -18636,16 +18630,16 @@ var_2 = word ptr -2 mov si, [bx] mov bx, word_2065C mov ax, [bx] - cmp ax, word_205F6 + cmp ax, point_205F6.x jg short loc_1461A - add ax, 20h ; ' ' - cmp ax, word_205F6 + add ax, 32 + cmp ax, point_205F6.x jle short loc_1461A lea ax, [si-10h] - cmp ax, word_205F8 + cmp ax, point_205F6.y jge short loc_1461A lea ax, [si+20h] - cmp ax, word_205F8 + cmp ax, point_205F6.y jle short loc_1461A mov _player_is_hit, 1 @@ -18831,18 +18825,18 @@ loc_14757: call super_roll_put_tiny dec byte ptr [si+0Ah] mov ax, [si+2] - add ax, 0FFF0h - cmp ax, word_205F6 + add ax, -16 + cmp ax, point_205F6.x jg loc_14829 mov ax, [si+2] - cmp ax, word_205F6 + cmp ax, point_205F6.x jl loc_14829 mov ax, [si+4] - add ax, 0FFF0h - cmp ax, word_205F8 + add ax, -16 + cmp ax, point_205F6.y jge loc_14829 mov ax, [si+4] - cmp ax, word_205F8 + cmp ax, point_205F6.y jle loc_14829 mov _player_is_hit, 1 jmp loc_14829 @@ -19040,8 +19034,8 @@ sub_148FD proc near jnz short loc_14954 mov bx, word_2065C mov ax, [bx] - add ax, 10h - cmp ax, word_205F6 + add ax, 16 + cmp ax, point_205F6.x jge short loc_1492B mov ax, 1 jmp short loc_1492D @@ -19424,8 +19418,8 @@ sub_14C76 proc near jnz short loc_14CBE mov bx, word_2065C mov ax, [bx] - add ax, 10h - cmp ax, word_205F6 + add ax, 16 + cmp ax, point_205F6.x jge short loc_14C9D mov ax, 1 jmp short loc_14C9F @@ -21360,7 +21354,7 @@ var_1 = byte ptr -1 cmp word_20650, 14h jnz short loc_15D83 mov byte_25596, 0 - cmp word_205F6, 0D0h + cmp point_205F6.x, 208 jge short loc_15D7E mov al, 1 jmp short loc_15D80 @@ -21568,7 +21562,7 @@ sub_15EF7 proc near loc_15F06: cmp word_20650, 32h ; '2' jnz short loc_15F1E - cmp word_205F6, 0D0h + cmp point_205F6.x, 208 jge short loc_15F19 mov al, 1 jmp short loc_15F1B @@ -21683,11 +21677,11 @@ loc_15FB7: loc_15FCF: cmp word_20650, 64h ; 'd' jnz short loc_15FFD - mov ax, word_205F6 - add ax, 10h + mov ax, point_205F6.x + add ax, 16 mov word_2559A, ax - mov ax, word_205F8 - add ax, 10h + mov ax, point_205F6.y + add ax, 16 mov word_2559C, ax mov byte_2558C, 3 mov byte_2558D, 0FCh @@ -22144,20 +22138,20 @@ loc_16458: jnz short loc_164AD push word_253B6 push word_253B8 - mov ax, word_205F6 - add ax, 10h + mov ax, point_205F6.x + add ax, 16 push ax - mov ax, word_205F8 - add ax, 10h + mov ax, point_205F6.y + add ax, 16 push ax push 0 push ds - push offset word_255A4 + push offset point_255A4.x push ds - push offset word_255A6 - push 30h ; '0' + push offset point_255A4.y + push 48 call vector_between - mov ax, word_255A4 + mov ax, point_255A4.x neg ax mov word_255AC, ax mov word_2064E, 80h @@ -22188,14 +22182,14 @@ loc_164AD: mov word_20650, 0 loc_164E3: - mov ax, word_255A4 + mov ax, point_255A4.x add word_255A8, ax mov ax, word_255AC add word_255AE, ax - mov ax, word_255A6 + mov ax, point_255A4.y add word_255AA, ax - mov ax, word_205F6 - add ax, 10h + mov ax, point_205F6.x + add ax, 16 cmp ax, word_255A8 jle short loc_1650B add word_255A8, 10h @@ -22203,15 +22197,15 @@ loc_164E3: ; --------------------------------------------------------------------------- loc_1650B: - mov ax, word_205F6 - add ax, 10h + mov ax, point_205F6.x + add ax, 16 cmp ax, word_255A8 jge short loc_1651C sub word_255A8, 10h loc_1651C: - mov ax, word_205F6 - add ax, 10h + mov ax, point_205F6.x + add ax, 16 cmp ax, word_255AE jle short loc_1652F sub word_255AE, 10h @@ -22219,8 +22213,8 @@ loc_1651C: ; --------------------------------------------------------------------------- loc_1652F: - mov ax, word_205F6 - add ax, 10h + mov ax, point_205F6.x + add ax, 16 cmp ax, word_255AE jge short loc_16540 add word_255AE, 10h @@ -22259,11 +22253,11 @@ loc_1656B: and ax, 3Fh cmp ax, 20h ; ' ' jnz short loc_16589 - mov ax, word_205F6 - add ax, 10h + mov ax, point_205F6.x + add ax, 16 push ax - mov ax, word_205F8 - add ax, 10h + mov ax, point_205F6.y + add ax, 16 push ax push 30h ; '0' call sub_155C5 @@ -22302,7 +22296,7 @@ sub_165A5 proc near loc_165B4: cmp word_20650, 32h ; '2' jnz short loc_165CC - cmp word_205F6, 0D0h + cmp point_205F6.x, 208 jge short loc_165C7 mov al, 2 jmp short loc_165C9 @@ -22365,11 +22359,11 @@ sub_16606 proc near loc_1661C: test byte ptr word_20650, 3Fh jnz short loc_16636 - mov ax, word_205F6 - add ax, 10h + mov ax, point_205F6.x + add ax, 16 push ax - mov ax, word_205F8 - add ax, 10h + mov ax, point_205F6.y + add ax, 16 push ax push 30h ; '0' call sub_155C5 @@ -22440,11 +22434,11 @@ sub_1668E proc near loc_166A4: test byte ptr word_20650, 1Fh jnz short loc_166BE - mov ax, word_205F6 - add ax, 10h + mov ax, point_205F6.x + add ax, 16 push ax - mov ax, word_205F8 - add ax, 10h + mov ax, point_205F6.y + add ax, 16 push ax push 30h ; '0' call sub_155C5 @@ -22919,15 +22913,15 @@ var_2 = word ptr -2 push bp mov bp, sp sub sp, 6 - mov ax, word_205F8 - add ax, 10h + mov ax, point_205F6.y + add ax, 16 mov [bp+var_2], ax mov bx, word_26C4A push word ptr [bx] mov bx, word_26C4C push word ptr [bx] - mov ax, word_205F6 - add ax, 18h + mov ax, point_205F6.x + add ax, 24 push ax push [bp+var_2] push 0 @@ -24184,10 +24178,10 @@ var_2 = word ptr -2 cmp [bx+2B76h], dx jge short loc_175D1 lea ax, [si-10h] - cmp ax, word_205F8 + cmp ax, point_205F6.y jge short loc_175D1 lea ax, [si+10h] - cmp ax, word_205F8 + cmp ax, point_205F6.y jle short loc_175D1 mov bx, word_26C46 mov word ptr [bx+0Ah], 0 @@ -25557,8 +25551,8 @@ var_1 = byte ptr -1 mov word_2064E, 80h mov bx, word_2065C mov ax, [bx] - add ax, 40h - cmp ax, word_205F6 + add ax, 64 + cmp ax, point_205F6.x jge short loc_181E5 mov ax, 2 jmp short loc_181E8 @@ -25668,12 +25662,12 @@ loc_182DD: call grcg_off mov bx, word_2065C mov ax, [bx] - add ax, 10h - cmp ax, word_205F6 + add ax, 16 + cmp ax, point_205F6.x jge short loc_1834B mov ax, [bx] - add ax, 60h - cmp ax, word_205F6 + add ax, 96 + cmp ax, point_205F6.x jle short loc_1834B mov _player_is_hit, 1 @@ -26248,23 +26242,13 @@ var_2 = word ptr -2 mov ax, [bx] add ax, 40h mov [bp+var_4], ax - push [bp+var_2] - push ax - push word_205F6 - push word_205F8 - push 0 - push ds - push offset unk_26CD6 - push ds - push offset unk_26CD8 - push 30h ; '0' - call vector_between + call vector_between pascal, [bp+var_2], ax, point_205F6.x, point_205F6.y, 0, ds, offset point_26CD6.x, ds, offset point_26CD6.y, 48 loc_188F8: push ds - push offset unk_26CD6 + push offset point_26CD6.x push ds - push offset unk_26CD8 + push offset point_26CD6.y call sub_183D0 locret_18903: @@ -26287,8 +26271,8 @@ sub_18905 proc near mov word_2064E, 80h mov bx, word_2065C mov ax, [bx] - add ax, 40h - cmp ax, word_205F6 + add ax, 64 + cmp ax, point_205F6.x jge short loc_18932 mov ax, 2 jmp short loc_18935 @@ -26403,8 +26387,8 @@ sub_18A1B proc near mov word_2064E, 80h mov bx, word_2065C mov ax, [bx] - add ax, 40h - cmp ax, word_205F6 + add ax, 64 + cmp ax, point_205F6.x jge short loc_18A48 mov ax, 2 jmp short loc_18A4B @@ -26552,23 +26536,13 @@ var_2 = word ptr -2 mov ax, [bx] add ax, 40h mov [bp+var_4], ax - push [bp+var_2] - push ax - push word_205F6 - push word_205F8 - push 0 - push ds - push offset unk_26CDE - push ds - push offset unk_26CE0 - push 34h ; '4' - call vector_between + call vector_between pascal, [bp+var_2], ax, point_205F6.x, point_205F6.y, 0, ds, offset point_26CDE.x, ds, offset point_26CDE.y, 52 loc_18B99: push ds - push offset unk_26CDE + push offset point_26CDE.x push ds - push offset unk_26CE0 + push offset point_26CDE.y call sub_183D0 locret_18BA4: @@ -26657,8 +26631,8 @@ sub_18C4A proc near mov word_2064E, 80h mov bx, word_2065C mov ax, [bx] - add ax, 40h - cmp ax, word_205F6 + add ax, 64 + cmp ax, point_205F6.x jge short loc_18C77 mov ax, 2 jmp short loc_18C7A @@ -26690,15 +26664,15 @@ loc_18C9B: jnz short loc_18CEE call _snd_se_play c, 10 mov word_2064E, 86h - mov ax, word_205F8 + mov ax, point_205F6.y sub ax, word_26C62 push ax - mov ax, word_205F6 + mov ax, point_205F6.x sub ax, word_26C5A push ax call iatan2 mov byte_26CE2, al - cmp word_205F6, 0D0h + cmp point_205F6.x, 208 jg short loc_18CDF mov al, 0FFh jmp short loc_18CE1 @@ -26823,8 +26797,8 @@ sub_18DE0 proc near mov word_2064E, 80h mov bx, word_2065C mov ax, [bx] - add ax, 40h - cmp ax, word_205F6 + add ax, 64 + cmp ax, point_205F6.x jge short loc_18E0D mov ax, 2 jmp short loc_18E10 @@ -27216,12 +27190,12 @@ sub_191CC proc near jl loc_19351 cmp word_20650, 32h ; '2' jnz short loc_1920E - mov ax, word_205F8 - add ax, 0Ch + mov ax, point_205F6.y + add ax, 12 sub ax, word_26C64 push ax - mov ax, word_205F6 - add ax, 0Ch + mov ax, point_205F6.x + add ax, 12 sub ax, word_26C5C push ax call iatan2 @@ -27951,7 +27925,7 @@ loc_1988A: cmp word_20650, 1Eh jge short loc_198A8 mov ax, word_26C5C - cmp ax, word_205F6 + cmp ax, point_205F6.x jge short loc_1989F mov ax, 1 jmp short loc_198A2 @@ -28164,10 +28138,7 @@ mima_init proc far add ax, 2 push ax call super_put_rect - push word_205F6 - push word_205F8 - push 0 - call super_roll_put + call super_roll_put pascal, point_205F6.x, point_205F6.y, 0 mov al, _page_back mov ah, 0 shl ax, 2 @@ -29376,10 +29347,7 @@ loc_1A613: call grcg_off push 600000h call sub_1A423 - push word_205F6 - push word_205F8 - push 0 - call super_roll_put + call super_roll_put pascal, point_205F6.x, point_205F6.y, 0 mov al, _page_back mov ah, 0 shl ax, 2 @@ -29443,7 +29411,7 @@ sub_1A6C5 proc near mov al, _page_front mov ah, 0 add ax, ax - mov dx, word_205F8 + mov dx, point_205F6.y mov bx, ax mov [bx+2B7Ah], dx mov _scroll_line, 0 @@ -29457,22 +29425,19 @@ sub_1A6C5 proc near call frame_delay call graph_scrollup pascal, 0 graph_accesspage _page_front - push word_205F6 - push word_205F8 - push 0 - call super_roll_put + call super_roll_put pascal, point_205F6.x, point_205F6.y, 0 mov al, _page_back mov ah, 0 shl ax, 2 - mov dx, word_205F6 - add dx, 0FFF0h + mov dx, point_205F6.x + add dx, -16 mov bx, ax mov [bx+2B8Ah], dx mov al, _page_back mov ah, 0 shl ax, 2 - mov dx, word_205F8 - add dx, 10h + mov dx, point_205F6.y + add dx, 16 mov bx, ax mov [bx+2B8Ch], dx mov al, _page_back @@ -29585,10 +29550,7 @@ marisa_init proc far inc ax push ax call super_put_rect - push word_205F6 - push word_205F8 - push 0 - call super_roll_put + call super_roll_put pascal, point_205F6.x, point_205F6.y, 0 mov al, _page_back mov ah, 0 shl ax, 2 @@ -29638,10 +29600,7 @@ marisa_init proc far inc ax push ax call super_put_rect - push word_205F6 - push word_205F8 - push 0 - call super_roll_put + call super_roll_put pascal, point_205F6.x, point_205F6.y, 0 mov al, _page_back mov ah, 0 shl ax, 2 @@ -30975,8 +30934,8 @@ sub_1B555 proc near cmp word_20650, 0Ah jnz short loc_1B592 mov ax, word_26D76 - add ax, 20h ; ' ' - cmp ax, word_205F6 + add ax, 32 + cmp ax, point_205F6.x jge short loc_1B579 mov al, 1 jmp short loc_1B57B @@ -31997,8 +31956,8 @@ sub_1BE72 proc near cmp word_20650, 2 jnz short loc_1BEC5 mov ax, word_26D76 - add ax, 20h ; ' ' - cmp ax, word_205F6 + add ax, 32 + cmp ax, point_205F6.x jge short loc_1BE94 mov ax, 1 jmp short loc_1BE97 @@ -35605,8 +35564,7 @@ word_205EE dw ? word_205F0 dw ? word_205F2 dw ? word_205F4 dw ? -word_205F6 dw ? -word_205F8 dw ? +point_205F6 Point dd ? ; dd ? ; playchar_shot_func dw ? @@ -39946,8 +39904,7 @@ byte_2559E db ? word_255A0 dw ? byte_255A2 db ? byte_255A3 db ? -word_255A4 dw ? -word_255A6 dw ? +point_255A4 Point word_255A8 dw ? word_255AA dw ? word_255AC dw ? @@ -41470,16 +41427,10 @@ byte_26CD2 db ? byte_26CD3 db ? byte_26CD4 db ? db ? -unk_26CD6 db ? ; - db ? ; -unk_26CD8 db ? ; - db ? ; +point_26CD6 Point word_26CDA dw ? word_26CDC dw ? -unk_26CDE db ? ; - db ? ; -unk_26CE0 db ? ; - db ? ; +point_26CDE Point byte_26CE2 db ? byte_26CE3 db ? byte_26CE4 db ? diff --git a/th03/math/math.h b/th03/math/math.h new file mode 100644 index 00000000..9390cd54 --- /dev/null +++ b/th03/math/math.h @@ -0,0 +1,24 @@ +// Vectors +// ------- +#if GAME == 3 +// (different calling convention parameter order than the TH04/TH05 one) +int __cdecl far vector1_at(int angle, int length, int origin) +#endif + +int pascal far vector2( + int far *ret_x, int far *ret_y, unsigned char angle, int length +); + +// Constructs a vector from (x1, y1) to (x2, y2), and additionally applies +// [plus_angle] to the resulting angle between the two points. +int pascal far vector2_between_plus( + int x1, + int y1, + int x2, + int y2, + unsigned char plus_angle, + int *ret_x, + int *ret_y, + int length +); +// ------- diff --git a/th03/math/vector1_at.asm b/th03/math/vector1_at.asm index a5fdc2f7..e43ac528 100644 --- a/th03/math/vector1_at.asm +++ b/th03/math/vector1_at.asm @@ -1,5 +1,3 @@ -; int __cdecl far vector1_at(int angle, int length, int origin) -; (different calling convention than the TH04/TH05 one) vector1_at proc far @@origin = word ptr 6 diff --git a/th03/math/vector2.asm b/th03/math/vector2.asm index 2df78256..5b66469f 100644 --- a/th03/math/vector2.asm +++ b/th03/math/vector2.asm @@ -1,4 +1,3 @@ -; int pascal far vector2(int r, unsigned char angle, int far *dx, int far *dy) vector2 proc far @@r = word ptr 6 diff --git a/th03/math/vector2_between_plus.asm b/th03/math/vector2_between_plus.asm index 52c02837..a37eb884 100644 --- a/th03/math/vector2_between_plus.asm +++ b/th03/math/vector2_between_plus.asm @@ -1,7 +1,3 @@ -; Constructs a vector from (x1|y1) to (x2|y2), and additionally applies -; [plus_angle] to the resulting angle between the two points. - -; int pascal far vector2(int r, int far *dx, int far *dy, char plus_angle, int y2, int x2, int y1, int x1) vector2_between_plus proc far @@r = word ptr 6 diff --git a/th03_main.asm b/th03_main.asm index 7702763f..bf141ecb 100644 --- a/th03_main.asm +++ b/th03_main.asm @@ -3572,20 +3572,14 @@ loc_BD00: mov ah, 0 add ax, ax mov bx, ax - push _CosTable8[bx] - push 500000h - call vector1_at - add sp, 6 + call vector1_at c, large (80 shl 16) or 0, _CosTable8[bx] mov di, ax mov bx, word_20CE4 mov al, [bx+6] mov ah, 0 add ax, ax mov bx, ax - push _SinTable8[bx] - push 500000h - call vector1_at - add sp, 6 + call vector1_at c, large (80 shl 16) or 0, _SinTable8[bx] mov [bp+var_2], ax mov bx, word_20CE4 add [bx], di @@ -4147,11 +4141,7 @@ arg_2 = byte ptr 6 mov ah, 0 add ax, ax mov bx, ax - push _CosTable8[bx] - push word_20E42 - push word_20E3E - call vector1_at - add sp, 6 + call vector1_at c, word_20E3E, word_20E42, _CosTable8[bx] mov dl, byte ptr word_23AF0 mov dh, 0 add dx, dx @@ -4162,11 +4152,7 @@ arg_2 = byte ptr 6 mov ah, 0 add ax, ax mov bx, ax - push _SinTable8[bx] - push word_20E42 - push word_20E40 - call vector1_at - add sp, 6 + call vector1_at c, word_20E40, word_20E42, _SinTable8[bx] mov [bp+var_4], ax push [bp+var_2] push ax @@ -6105,7 +6091,7 @@ loc_D06E: push ds lea ax, [si+6] push ax - push 40h + push 64 mov al, [si+8] mov ah, 0 push ax @@ -9893,22 +9879,14 @@ loc_F26E: mov ah, 0 add ax, ax mov bx, ax - push _CosTable8[bx] - push [bp+arg_0] - push di - call vector1_at - add sp, 6 + call vector1_at c, di, [bp+arg_0], _CosTable8[bx] add ax, 0FFE8h mov [bp+var_2], ax mov al, [bp+var_5] mov ah, 0 add ax, ax mov bx, ax - push _SinTable8[bx] - push [bp+arg_0] - push [bp+arg_2] - call vector1_at - add sp, 6 + call vector1_at c, [bp+arg_2], [bp+arg_0], _SinTable8[bx] add ax, 0FFE8h mov [bp+var_4], ax push [bp+var_2] @@ -10007,10 +9985,7 @@ sub_F356 proc near mov ah, 0 add ax, ax mov bx, ax - push _SinTable8[bx] - push 100000h - call vector1_at - add sp, 6 + call vector1_at c, large (16 shl 16) or 0, _SinTable8[bx] mov word_1F348, ax cmp word_1F33E, 300h jg short loc_F399 @@ -11279,21 +11254,13 @@ loc_FE54: mov ah, 0 add ax, ax mov bx, ax - push _CosTable8[bx] - push 300h - push word_1F33E - call vector1_at - add sp, 6 + call vector1_at c, word_1F33E, (48 shl 4), _CosTable8[bx] mov word_23E3E, ax mov al, byte_20E2B mov ah, 0 add ax, ax mov bx, ax - push _SinTable8[bx] - push 300h - push word_1F340 - call vector1_at - add sp, 6 + call vector1_at c, word_1F340, (48 shl 4), _SinTable8[bx] mov word_23E40, ax mov al, byte_20E2B add al, 40h @@ -11658,21 +11625,13 @@ arg_2 = word ptr 6 mov ah, 0 add ax, ax mov bx, ax - push _CosTable8[bx] - push si - push [bp+var_2] - call vector1_at - add sp, 6 + call vector1_at c, [bp+var_2], si, _CosTable8[bx] mov di, ax mov al, [bp+arg_0] mov ah, 0 add ax, ax mov bx, ax - push _SinTable8[bx] - push si - push [bp+var_4] - call vector1_at - add sp, 6 + call vector1_at c, [bp+var_4], si, _SinTable8[bx] mov [bp+var_6], ax push di push ax @@ -11687,21 +11646,13 @@ arg_2 = word ptr 6 mov ah, 0 add ax, ax mov bx, ax - push _CosTable8[bx] - push si - push [bp+var_2] - call vector1_at - add sp, 6 + call vector1_at c, [bp+var_2], si, _CosTable8[bx] mov di, ax mov al, [bp+arg_0] mov ah, 0 add ax, ax mov bx, ax - push _SinTable8[bx] - push si - push [bp+var_4] - call vector1_at - add sp, 6 + call vector1_at c, [bp+var_4], si, _SinTable8[bx] mov [bp+var_6], ax push di push ax @@ -12889,21 +12840,13 @@ loc_10C8D: mov ah, 0 add ax, ax mov bx, ax - push _CosTable8[bx] - push 200h - push word_1F33E - call vector1_at - add sp, 6 + call vector1_at c, word_1F33E, (32 shl 4), _CosTable8[bx] mov word_23E3E, ax mov al, [bp+var_1] mov ah, 0 add ax, ax mov bx, ax - push _SinTable8[bx] - push 200h - push word_1F340 - call vector1_at - add sp, 6 + call vector1_at c, word_1F340, (32 shl 4), _SinTable8[bx] mov word_23E40, ax call sub_17730 mov al, [bp+var_1] @@ -12916,21 +12859,13 @@ loc_10C8D: mov ah, 0 add ax, ax mov bx, ax - push _CosTable8[bx] - push 200h - push word_1F33E - call vector1_at - add sp, 6 + call vector1_at c, word_1F33E, (32 shl 4), _CosTable8[bx] mov word_23E3E, ax mov al, [bp+var_1] mov ah, 0 add ax, ax mov bx, ax - push _SinTable8[bx] - push 200h - push word_1F340 - call vector1_at - add sp, 6 + call vector1_at c, word_1F340, (32 shl 4), _SinTable8[bx] mov word_23E40, ax call sub_17730 @@ -12948,11 +12883,7 @@ loc_10D62: mov ah, 0 add ax, ax mov bx, ax - push _SinTable8[bx] - push 300h - push word_1F344 - call vector1_at - add sp, 6 + call vector1_at c, word_1F344, (48 shl 4), _SinTable8[bx] mov word_1F340, ax cmp word_1F3B0, 80h jb short locret_10D9E @@ -13116,11 +13047,7 @@ loc_10EC9: mov ah, 0 add ax, ax mov bx, ax - push _CosTable8[bx] - push 300h - push word_1F33E - call vector1_at - add sp, 6 + call vector1_at c, word_1F33E, (48 shl 4), _CosTable8[bx] mov bx, si add bx, bx mov [bx+686Ah], ax @@ -13128,11 +13055,7 @@ loc_10EC9: mov ah, 0 add ax, ax mov bx, ax - push _SinTable8[bx] - push 300h - push word_1F340 - call vector1_at - add sp, 6 + call vector1_at c, word_1F340, (48 shl 4), _SinTable8[bx] mov bx, si add bx, bx mov [bx+6876h], ax @@ -13611,21 +13534,13 @@ loc_11330: mov ah, 0 add ax, ax mov bx, ax - push _CosTable8[bx] - push [bp+arg_0] - push word_1F33E - call vector1_at - add sp, 6 + call vector1_at c, word_1F33E, [bp+arg_0], _CosTable8[bx] mov di, ax mov al, [bp+arg_2] mov ah, 0 add ax, ax mov bx, ax - push _SinTable8[bx] - push [bp+arg_0] - push word_1F340 - call vector1_at - add sp, 6 + call vector1_at c, word_1F340, [bp+arg_0], _SinTable8[bx] mov [bp+var_2], ax push di mov al, [bp+var_6] @@ -14380,21 +14295,13 @@ loc_11978: mov ah, 0 add ax, ax mov bx, ax - push _CosTable8[bx] - push [bp+arg_4] - push word_1F33E - call vector1_at - add sp, 6 + call vector1_at c, word_1F33E, [bp+arg_4], _CosTable8[bx] mov di, ax mov al, [bp+arg_0] mov ah, 0 add ax, ax mov bx, ax - push _SinTable8[bx] - push [bp+arg_4] - push word_1F340 - call vector1_at - add sp, 6 + call vector1_at c, word_1F340, [bp+arg_4], _SinTable8[bx] mov [bp+var_2], ax push di push [bp+var_4] @@ -14572,21 +14479,13 @@ loc_11ADD: mov ah, 0 add ax, ax mov bx, ax - push _CosTable8[bx] - push word_1F356 - push word_1F33E - call vector1_at - add sp, 6 + call vector1_at c, word_1F33E, word_1F356, _CosTable8[bx] mov [bp+var_2], ax mov al, [bp+var_5] mov ah, 0 add ax, ax mov bx, ax - push _SinTable8[bx] - push word_1F356 - push word_1F340 - call vector1_at - add sp, 6 + call vector1_at c, word_1F340, word_1F356, _SinTable8[bx] mov [bp+var_4], ax mov ax, [bp+var_2] mov word_23E3E, ax @@ -14836,21 +14735,13 @@ loc_11D77: mov ah, 0 add ax, ax mov bx, ax - push _CosTable8[bx] - push word_1F356 - push word_1F33E - call vector1_at - add sp, 6 + call vector1_at c, word_1F33E, word_1F356, _CosTable8[bx] mov [bp+var_2], ax mov al, [bp+var_5] mov ah, 0 add ax, ax mov bx, ax - push _SinTable8[bx] - push word_1F356 - push word_1F340 - call vector1_at - add sp, 6 + call vector1_at c, word_1F340, word_1F356, _SinTable8[bx] mov [bp+var_4], ax mov ax, [bp+var_2] mov word_23E3E, ax @@ -15149,21 +15040,13 @@ loc_12021: mov ah, 0 add ax, ax mov bx, ax - push _CosTable8[bx] - push [bp+var_6] - push word_1F33E - call vector1_at - add sp, 6 + call vector1_at c, word_1F33E, [bp+var_6], _CosTable8[bx] mov di, ax mov al, [bp+var_7] mov ah, 0 add ax, ax mov bx, ax - push _SinTable8[bx] - push [bp+var_6] - push word_1F340 - call vector1_at - add sp, 6 + call vector1_at c, word_1F340, [bp+var_6], _SinTable8[bx] mov [bp+var_2], ax push di mov al, byte ptr word_1FE88 @@ -16197,21 +16080,13 @@ loc_129A0: mov ah, 0 add ax, ax mov bx, ax - push _CosTable8[bx] - push [bp+var_8] - push word_1F33E - call vector1_at - add sp, 6 + call vector1_at c, word_1F33E, [bp+var_8], _CosTable8[bx] mov di, ax mov al, [bp+var_9] mov ah, 0 add ax, ax mov bx, ax - push _SinTable8[bx] - push [bp+var_8] - push word_1F340 - call vector1_at - add sp, 6 + call vector1_at c, word_1F340, [bp+var_8], _SinTable8[bx] mov [bp+var_2], ax push di push [bp+var_6] @@ -17243,21 +17118,13 @@ loc_13286: mov ah, 0 add ax, ax mov bx, ax - push _CosTable8[bx] - push [bp+var_6] - push word_1F33E - call vector1_at - add sp, 6 + call vector1_at c, word_1F33E, [bp+var_6], _CosTable8[bx] mov di, ax mov al, [bp+var_7] mov ah, 0 add ax, ax mov bx, ax - push _SinTable8[bx] - push [bp+var_6] - push word_1F340 - call vector1_at - add sp, 6 + call vector1_at c, word_1F340, [bp+var_6], _SinTable8[bx] mov [bp+var_2], ax push di mov al, byte ptr word_1FE88 @@ -17456,21 +17323,13 @@ loc_13426: mov ah, 0 add ax, ax mov bx, ax - push _CosTable8[bx] - push 300h - push word_1F33E - call vector1_at - add sp, 6 + call vector1_at c, word_1F33E, (48 shl 4), _CosTable8[bx] mov word_23E3E, ax mov al, [bp+var_1] mov ah, 0 add ax, ax mov bx, ax - push _SinTable8[bx] - push 300h - push word_1F340 - call vector1_at - add sp, 6 + call vector1_at c, word_1F340, (48 shl 4), _SinTable8[bx] mov word_23E40, ax mov al, [bp+var_1] add al, [bp+var_2] @@ -17922,21 +17781,13 @@ loc_1383D: mov ah, 0 add ax, ax mov bx, ax - push _CosTable8[bx] - push 30h ; '0' - push [bp+var_2] - call vector1_at - add sp, 6 + call vector1_at c, [bp+var_2], 48, _CosTable8[bx] mov [bp+var_6], ax mov al, [bp+var_9] mov ah, 0 add ax, ax mov bx, ax - push _SinTable8[bx] - push 30h ; '0' - push [bp+var_4] - call vector1_at - add sp, 6 + call vector1_at c, [bp+var_4], 48, _SinTable8[bx] mov [bp+var_8], ax test di, 3 jz short loc_1388B @@ -18026,21 +17877,13 @@ loc_13910: mov ah, 0 add ax, ax mov bx, ax - push _CosTable8[bx] - push [bp+var_6] - push word_1F33E - call vector1_at - add sp, 6 + call vector1_at c, word_1F33E, [bp+var_6], _CosTable8[bx] mov di, ax mov al, [bp+var_7] mov ah, 0 add ax, ax mov bx, ax - push _SinTable8[bx] - push [bp+var_6] - push word_1F340 - call vector1_at - add sp, 6 + call vector1_at c, word_1F340, [bp+var_6], _SinTable8[bx] mov [bp+var_2], ax push di mov al, byte ptr word_1FE88 @@ -21393,9 +21236,9 @@ loc_1541D: cwd idiv bx mov bx, dx - mov al, [bx+678h] + mov al, angles_1DBD8[bx] push ax - push 0B0h ; '°' + push 176 call vector2 mov bx, word_20E22 mov byte ptr [bx+1], 0 @@ -22174,11 +22017,7 @@ loc_15A91: mov ah, 0 add ax, ax mov bx, ax - push _CosTable8[bx] - push di - push 90h - call vector1_at - add sp, 6 + call vector1_at c, 144, di, _CosTable8[bx] add ax, [bp+var_2] mov bx, si add bx, bx @@ -22189,11 +22028,7 @@ loc_15A91: mov ah, 0 add ax, ax mov bx, ax - push _SinTable8[bx] - push di - push 0C8h - call vector1_at - add sp, 6 + call vector1_at c, 200, di, _SinTable8[bx] cwd sub ax, dx sar ax, 1 @@ -22226,11 +22061,7 @@ loc_15B29: mov ah, 0 add ax, ax mov bx, ax - push _CosTable8[bx] - push di - push 90h - call vector1_at - add sp, 6 + call vector1_at c, 144, di, _CosTable8[bx] add ax, [bp+var_2] mov bx, si add bx, bx @@ -22241,11 +22072,7 @@ loc_15B29: mov ah, 0 add ax, ax mov bx, ax - push _SinTable8[bx] - push di - push 0C8h - call vector1_at - add sp, 6 + call vector1_at c, 200, di, _SinTable8[bx] cwd sub ax, dx sar ax, 1 @@ -24283,22 +24110,14 @@ loc_16BEC: mov ah, 0 add ax, ax mov bx, ax - push _CosTable8[bx] - push [bp+arg_2] - push [bp+var_6] - call vector1_at - add sp, 6 + call vector1_at c, [bp+var_6], [bp+arg_2], _CosTable8[bx] mov di, ax mov al, [bp+var_A] add al, [bp+arg_0] mov ah, 0 add ax, ax mov bx, ax - push _SinTable8[bx] - push [bp+arg_2] - push [bp+var_8] - call vector1_at - add sp, 6 + call vector1_at c, [bp+var_8], [bp+arg_2], _SinTable8[bx] mov [bp+var_2], ax push di mov al, byte ptr word_1FE88 @@ -25634,9 +25453,9 @@ loc_1767D: add al, byte ptr word_23E42+1 push ax push ds - push offset word_23E48 + push offset point_23E48.x push ds - push offset word_23E4A + push offset point_23E48.y mov al, [bp+var_9] mov ah, 0 push ax @@ -25646,9 +25465,9 @@ loc_1767D: loc_176A8: push ds - push offset word_23E48 + push offset point_23E48.x push ds - push offset word_23E4A + push offset point_23E48.y mov al, byte ptr [bp+var_2] add al, byte ptr word_23E42+1 push ax @@ -25941,9 +25760,9 @@ loc_17914: push [bp+var_4] call sub_173A2 mov [bp+var_B], al - mov ax, word_23E48 + mov ax, point_23E48.x mov [si+0Ah], ax - mov ax, word_23E4A + mov ax, point_23E48.y mov [si+0Ch], ax mov al, byte_26352 mov [si+0Fh], al @@ -27593,7 +27412,7 @@ loc_18667: push ax call randring_far_next16 push ax - push 0E0h + push 224 call vector2 loc_18692: @@ -28025,7 +27844,7 @@ loc_18A68: add ax, ax mov bx, ax push _CosTable8[bx] - push 900090h + push (144 shl 16) or 144 call vector1_at add sp, 6 mov si, ax @@ -28034,7 +27853,7 @@ loc_18A68: add ax, ax mov bx, ax push _SinTable8[bx] - push 9000B8h + push (144 shl 16) or 184 call vector1_at add sp, 6 mov di, ax @@ -28055,7 +27874,7 @@ loc_18A68: add ax, ax mov bx, ax push _CosTable8[bx] - push 900090h + push (144 shl 16) or 144 call vector1_at add sp, 6 mov si, ax @@ -28064,7 +27883,7 @@ loc_18A68: add ax, ax mov bx, ax push _SinTable8[bx] - push 9000B8h + push (144 shl 16) or 184 call vector1_at add sp, 6 mov di, ax @@ -33977,7 +33796,7 @@ loc_1B7BC: cmp byte ptr [bx+1], 0 jnz short loc_1B855 mov al, [bx+3] - add al, 0FEh + add al, -2 mov [bp+var_9], al push ds mov ax, word_1F868 @@ -33985,7 +33804,7 @@ loc_1B7BC: push ax push ds mov ax, word_1F868 - add ax, 0Ah + add ax, 10 push ax push word ptr [bx+2] mov al, [bp+var_9] @@ -34013,10 +33832,10 @@ loc_1B7BC: push ax push ds mov ax, word_1F868 - add ax, 0Ah + add ax, 10 push ax push word ptr [bx+2] - push 0A0h + push 160 call vector2 jmp short loc_1B896 ; --------------------------------------------------------------------------- @@ -36463,7 +36282,8 @@ a00ch_bf2 db '00ch.bf2',0 db 0FEh aEnedat_dat db 'ENEDAT.DAT',0 db 0 - db 'Ŕ¶ĘŔ°Đ',0 +angles_1DBD8 db 192, 182, 202, 192, 176, 208 + db 0 db 4 db 8 db 0 @@ -42468,8 +42288,7 @@ word_23E42 dw ? word_23E44 dw ? byte_23E46 db ? byte_23E47 db ? -word_23E48 dw ? -word_23E4A dw ? +point_23E48 Point word_23E4C dw ? byte_23E4E db ? byte_23E4F db ? diff --git a/th03_op.asm b/th03_op.asm index 309075bc..83c5fd50 100644 --- a/th03_op.asm +++ b/th03_op.asm @@ -3461,11 +3461,7 @@ loc_B6CF: mov ah, 0 add ax, ax mov bx, ax - push _CosTable8[bx] - push si - push 140h - call vector1_at - add sp, 6 + call vector1_at c, (RES_X / 2), si, _CosTable8[bx] mov [bp+var_2], ax mov al, byte ptr [bp+var_6] add al, [bp+arg_6] @@ -3479,11 +3475,7 @@ loc_B6CF: mov ah, 0 add ax, ax mov bx, ax - push _SinTable8[bx] - push si - push 0C8h ; 'Č' - call vector1_at - add sp, 6 + call vector1_at c, (RES_Y / 2), si, _SinTable8[bx] mov [bp+var_4], ax push [bp+var_2] push ax diff --git a/th04/math/math.h b/th04/math/math.h new file mode 100644 index 00000000..0a5070c3 --- /dev/null +++ b/th04/math/math.h @@ -0,0 +1,13 @@ +#include "th03/math/math.h" + +// Vectors +// ------- +// (different calling convention and parameter order than the TH03 one) +int pascal far vector1_at(int angle, int length, int origin); + +int pascal near vector2_near(Point near *ret, int angle, int length); + +int pascal far vector2_at( + Point near *ret, int origin_x, int origin_y, int length, int angle +); +// ------- diff --git a/th04/math/vector1_at.asm b/th04/math/vector1_at.asm index b85215b9..96dab5a3 100644 --- a/th04/math/vector1_at.asm +++ b/th04/math/vector1_at.asm @@ -1,5 +1,4 @@ -; int pascal far vector1_at(int angle, int length, int origin) -; (different calling convention than the TH03 one) +public VECTOR1_AT vector1_at proc far @@angle = word ptr 6 diff --git a/th04/math/vector2_at.asm b/th04/math/vector2_at.asm index 85608cd0..779eb624 100644 --- a/th04/math/vector2_at.asm +++ b/th04/math/vector2_at.asm @@ -1,6 +1,3 @@ -; int pascal far vector2_at( -; Point *ret, int origin_x, int origin_y, int length, int angle -; ); public VECTOR2_AT vector2_at proc far diff --git a/th04/shared.hpp b/th04/shared.hpp index 8c216714..be13a4c5 100644 --- a/th04/shared.hpp +++ b/th04/shared.hpp @@ -54,11 +54,6 @@ typedef struct { } } motion_t; -// Vectors -// ------- -int pascal near vector2_near(Point near *ret, unsigned char angle, int r); -// ------- - #include "th03/math/randring.h" inline char randring_angle(char random_range, char offset) diff --git a/th04_main.asm b/th04_main.asm index 22c1330f..da0fa873 100644 --- a/th04_main.asm +++ b/th04_main.asm @@ -5604,9 +5604,9 @@ loc_DEA3: push ax push 7 call main_01:randring1_next16_and - add al, 0BCh + add al, 188 push ax - push 100h + push (16 shl 4) call vector2 mov byte ptr [si+10h], 6 @@ -5674,9 +5674,9 @@ loc_DF23: push ax push 7 call main_01:randring1_next16_and - add al, 0BCh + add al, 188 push ax - push 100h + push (16 shl 4) call vector2 mov word ptr [si+0Eh], 24h ; '$' mov byte ptr [si+10h], 5 @@ -9983,8 +9983,8 @@ loc_10096: shl al, 2 mov [bp+var_1], al push offset _drawpoint - push 0C000B80h - push 800h + push (((PLAYFIELD_W / 2) shl 4) shl 16) or ((PLAYFIELD_H / 2) shl 4) + push (128 shl 4) mov ah, 0 push ax call vector2_at @@ -9995,8 +9995,8 @@ loc_10096: sub al, [bp+var_1] mov [bp+var_1], al push offset _drawpoint - push 0C000B80h - push 800h + push (((PLAYFIELD_W / 2) shl 4) shl 16) or ((PLAYFIELD_H / 2) shl 4) + push (128 shl 4) mov ah, 0 push ax call vector2_at @@ -12300,17 +12300,17 @@ loc_11AC4: push _SinTable8[bx] call vector1_at mov di, ax - cmp di, 0FF00h + cmp di, (-16 shl 4) jle short loc_11B2F - cmp di, 1800h + cmp di, ((PLAYFIELD_H + 16) shl 4) jge short loc_11B2F - cmp si, 0FF00h + cmp si, (-16 shl 4) jle short loc_11B2F - cmp si, 1900h + cmp si, ((PLAYFIELD_W + 16) shl 4) jge short loc_11B2F mov ax, si sar ax, 4 - add ax, 10h + add ax, (PLAYFIELD_X - 16) mov si, ax call main_01:scroll_subpixel_y_to_vram_seg1 pascal, di mov di, ax @@ -15648,9 +15648,9 @@ loc_13BE9: push si call sub_13BB3 mov ax, [si+2] - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, [si+4] - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax call fp_2D000 loc_13C25: @@ -16087,10 +16087,10 @@ loc_1422D: mov si, ax mov byte_266E2, 1 mov ax, _midboss_pos.cur.x - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _midboss_pos.cur.y add ax, (-1 shl 4) - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax call sub_13FB2 or si, si jz short loc_142E4 @@ -16349,10 +16349,10 @@ loc_144F1: inc _midboss_phase_frame mov byte_266E2, 1 mov ax, _midboss_pos.cur.x - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _midboss_pos.cur.y add ax, (-16 shl 4) - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov al, byte_25598 mov ah, 0 mov [bp+var_4], ax @@ -16439,13 +16439,7 @@ loc_145A5: mov [bp+var_1], al loc_145C9: - push ds - push offset _midboss_pos.velocity.x - push ds - push offset _midboss_pos.velocity.y - push word ptr [bp+var_1] - push 20h ; ' ' - call vector2 + call vector2 pascal, ds, offset _midboss_pos.velocity.x, ds, offset _midboss_pos.velocity.y, word ptr [bp+var_1], (2 shl 4) inc byte_2559A mov _midboss_sprite, 1 mov word_2A8D0, 8 @@ -16831,9 +16825,9 @@ midbossx_update proc far push bp mov bp, sp mov ax, _midboss_pos.cur.x - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _midboss_pos.cur.y - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov byte_266E2, 1 mov al, _midboss_phase mov ah, 0 @@ -17312,10 +17306,10 @@ loc_14D5D: inc _midboss_phase_frame mov byte_266E2, 1 mov ax, _midboss_pos.cur.x - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _midboss_pos.cur.y - add ax, 0FF00h - mov word ptr dword_266E4+2, ax + add ax, (-16 shl 4) + mov point_266E4.y, ax mov al, byte_255B2 mov ah, 0 mov [bp+var_2], ax @@ -17926,10 +17920,10 @@ loc_15314: inc _midboss_phase_frame mov byte_266E2, 1 mov ax, _midboss_pos.cur.x - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _midboss_pos.cur.y add ax, (-16 shl 4) - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov al, byte_255C6 mov ah, 0 mov [bp+var_2], ax @@ -18490,10 +18484,10 @@ loc_157EB: mov byte_266E3, al mov ax, [si+2Eh] add ax, [si+2] - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, [si+30h] add ax, [si+4] - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov al, [si+36h] mov byte_266EC, al mov al, [si+37h] @@ -19465,9 +19459,9 @@ loc_1607E: cmp dx, 15 jnz short loc_160A3 mov ax, word_25662 - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _boss_pos.cur.y - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax call fp_2D000 call snd_se_play pascal, 3 @@ -19615,9 +19609,9 @@ loc_161F6: jmp word ptr cs:[bx+8] ; switch jump loc_161FA: - mov ax, word ptr dword_266E4 ; jumptable 000161F6 case 1 + mov ax, point_266E4.x ; jumptable 000161F6 case 1 mov word ptr dword_2A8C6, ax - mov ax, word ptr dword_266E4+2 + mov ax, point_266E4.y mov word ptr dword_2A8C6+2, ax mov word_2A8D0, 20h ; ' ' mov byte_2A8D2, 0Bh @@ -19635,9 +19629,7 @@ loc_16221: ; --------------------------------------------------------------------------- loc_16228: - push word ptr dword_266E4 ; jumptable 000161F6 case 17 - push word ptr dword_266E4+2 - call circles_add_shrinking + call circles_add_shrinking pascal, point_266E4.x, point_266E4.y mov _circles_color, 0Fh mov byte_266E2, 2 mov byte_266EE, 10h @@ -19733,10 +19725,10 @@ sub_1630D proc near cmp _boss_phase_frame, 1 jnz short loc_16353 mov ax, _player_pos.cur.y - sub ax, word ptr dword_266E4+2 + sub ax, point_266E4.y push ax mov ax, _player_pos.cur.x - sub ax, word ptr dword_266E4 + sub ax, point_266E4.x push ax call iatan2 mov byte_266ED, al @@ -19815,17 +19807,15 @@ loc_163B5: loc_163C6: mov _circles_color, 0Fh ; jumptable 000163A9 cases 56,64,72,80 - push word ptr dword_266E4 - push word ptr dword_266E4+2 - call circles_add_shrinking + call circles_add_shrinking pascal, point_266E4.x, point_266E4.y loc_163D8: mov al, byte_2A8D3 ; jumptable 000163A9 case 40 neg al mov byte_2A8D3, al - mov ax, word ptr dword_266E4 + mov ax, point_266E4.x mov word ptr dword_2A8C6, ax - mov ax, word ptr dword_266E4+2 + mov ax, point_266E4.y mov word ptr dword_2A8C6+2, ax mov word_2A8D0, 8 mov byte_2A8D2, 9 @@ -19842,9 +19832,9 @@ loc_16402: ; --------------------------------------------------------------------------- loc_16409: - mov ax, word ptr dword_266E4 ; jumptable 000163A9 case 96 + mov ax, point_266E4.x ; jumptable 000163A9 case 96 mov word_2561A, ax - mov ax, word ptr dword_266E4+2 + mov ax, point_266E4.y mov word_2561C, ax mov al, byte_2D01E mov ah, 0 @@ -19956,9 +19946,7 @@ sub_1653D proc near mov bp, sp cmp _boss_phase_frame, 48 jnz short loc_1656A - push word ptr dword_266E4 - push word ptr dword_266E4+2 - call circles_add_shrinking + call circles_add_shrinking pascal, point_266E4.x, point_266E4.y mov _circles_color, 0Fh mov _boss_angle, 16 mov byte_2D02D, 10h @@ -19983,17 +19971,17 @@ loc_1656A: mov byte_266E3, 39h ; '9' mov byte_266EE, 28h ; '(' call fp_2D004 - add word ptr dword_266E4, 200h + add point_266E4.x, (32 shl 4) mov al, _boss_angle mov byte_266ED, al call fp_2D002 - sub word ptr dword_266E4, 400h - mov al, 80h + sub point_266E4.x, (64 shl 4) + mov al, 128 sub al, _boss_angle mov byte_266ED, al call fp_2D002 mov al, _boss_angle - add al, 0F0h + add al, -16 mov _boss_angle, al mov byte_266E2, 1 mov byte_266EF, 3 @@ -20002,8 +19990,8 @@ loc_1656A: mov al, byte_2D02D mov byte_266ED, al call fp_2D002 - add word ptr dword_266E4, 400h - mov al, 80h + add point_266E4.x, (64 shl 4) + mov al, 128 sub al, byte_2D02D mov byte_266ED, al call fp_2D002 @@ -20029,10 +20017,10 @@ var_2 = word ptr -2 enter 4, 0 mov ax, _boss_pos.cur.x - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _boss_pos.cur.y add ax, (16 shl 4) - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov al, _boss_phase mov ah, 0 mov bx, ax @@ -21006,7 +20994,7 @@ loc_16E2E: mov al, byte_266ED add al, 0F8h mov byte_266ED, al - sub word ptr dword_266E4, 60h + sub point_266E4.x, (6 shl 4) call fp_2D000 push 3 call randring2_next16_and @@ -21016,7 +21004,7 @@ loc_16E2E: call randring2_next16_and add al, 20h ; ' ' mov byte_266EE, al - add word ptr dword_266E4, 0C0h + add point_266E4.x, (12 shl 4) call fp_2D000 loc_16E84: @@ -21140,7 +21128,7 @@ loc_16F44: add al, [bp+var_1] mov byte_266ED, al mov eax, [si+2] - mov dword_266E4, eax + mov point_266E4, eax call fp_2D000 pop si leave @@ -21269,7 +21257,7 @@ arg_0 = word ptr 4 push si mov si, [bp+4] mov eax, [si+2] - mov dword_266E4, eax + mov point_266E4, eax call fp_2D000 pop si pop bp @@ -21551,7 +21539,7 @@ loc_172D0: loc_172D5: mov byte_266ED, al - sub word ptr dword_266E4, 60h + sub point_266E4.x, (6 shl 4) call fp_2D000 push 3 call randring2_next16_and @@ -21561,7 +21549,7 @@ loc_172D5: call randring2_next16_and add al, 10h mov byte_266EE, al - add word ptr dword_266E4, 0C0h + add point_266E4.x, (12 shl 4) call fp_2D000 cmp byte_266ED, 0 jz short loc_1730D @@ -21688,13 +21676,13 @@ loc_17409: mov dx, _boss_pos.cur.x add dx, (-52 shl 4) add ax, dx - mov word ptr dword_266E4, ax + mov point_266E4.x, ax push (64 shl 4) call randring2_next16_mod mov dx, _boss_pos.cur.y add dx, (-40 shl 4) add ax, dx - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax push 60h call randring2_next16_mod add ax, 10h @@ -22013,10 +22001,10 @@ loc_17707: jg loc_17794 cmp frame_mod4, 0 jnz locret_17811 - mov word ptr dword_266E4, 0 + mov point_266E4.x, 0 push 0C00h call randring2_next16_mod - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax push 1Fh call randring2_next16_and add al, 10h @@ -22027,10 +22015,10 @@ loc_17707: sub dl, al mov byte_266ED, dl call fp_2D002 - mov word ptr dword_266E4, 1800h + mov point_266E4.x, (384 shl 4) push 0C00h call randring2_next16_mod - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax push 1Fh call randring2_next16_and add al, 10h @@ -22042,8 +22030,8 @@ loc_17707: call fp_2D002 push 1800h call randring2_next16_mod - mov word ptr dword_266E4, ax - mov word ptr dword_266E4+2, 0 + mov point_266E4.x, ax + mov point_266E4.y, 0 push 1Fh call randring2_next16_and add al, 10h @@ -22342,10 +22330,10 @@ var_2 = word ptr -2 enter 4, 0 mov ax, _boss_pos.cur.x add ax, (-20 shl 4) - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _boss_pos.cur.y add ax, (-8 shl 4) - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov al, _boss_phase mov ah, 0 mov bx, ax @@ -22986,9 +22974,9 @@ loc_17FD1: push si call sub_17E3E mov ax, [si+2] - add word ptr dword_266E4, ax + add point_266E4.x, ax mov ax, [si+4] - add word ptr dword_266E4+2, ax + add point_266E4.y, ax call fp_2D004 call fp_2D000 @@ -23695,13 +23683,13 @@ loc_184D9: mov dx, _boss_pos.cur.x add dx, (-32 shl 4) add ax, dx - mov word ptr dword_266E4, ax + mov point_266E4.x, ax push (32 shl 4) call randring2_next16_mod mov dx, _boss_pos.cur.y add dx, (-26 shl 4) add ax, dx - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov byte_266ED, 0 mov byte_2CFF8, 40h call fp_2D002 @@ -23770,13 +23758,13 @@ loc_18580: mov dx, _boss_pos.cur.x add dx, (-32 shl 4) add ax, dx - mov word ptr dword_266E4, ax + mov point_266E4.x, ax push 200h call randring2_next16_mod mov dx, _boss_pos.cur.y add dx, (-26 shl 4) add ax, dx - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax call randring2_next16 mov byte_266ED, al call fp_2D000 @@ -23955,10 +23943,10 @@ loc_186FB: loc_18706: mov ax, _boss_pos.cur.x - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _boss_pos.cur.y add ax, (-10 shl 4) - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov byte_266E2, 1 mov al, _boss_phase mov ah, 0 @@ -24384,10 +24372,10 @@ loc_18A94: loc_18AC4: mov ax, [si+2] sub ax, [si+0Ah] - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, [si+4] sub ax, [si+0Ch] - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov byte_266F2, 82h mov byte_2CFF7, 1 mov [bp+var_4], 0 @@ -24408,9 +24396,7 @@ loc_18AFA: inc byte ptr [si] call snd_se_play pascal, 6 mov _circles_color, GC_RG - push word ptr dword_266E4 - push word ptr dword_266E4+2 - call circles_add_growing + call circles_add_growing pascal, point_266E4.x, point_266E4.y jmp short loc_18B4D ; --------------------------------------------------------------------------- @@ -24466,7 +24452,7 @@ sub_18A79 endp sub_18B68 proc near push bp mov bp, sp - push 0C000400h + push ((192 shl 4) shl 16) or (64 shl 4) mov al, _boss_angle mov ah, 0 add ax, ax @@ -24474,7 +24460,7 @@ sub_18B68 proc near push _CosTable8[bx] call vector1_at mov _boss_pos.cur.x, ax - push 5B00140h + push ((91 shl 4) shl 16) or (20 shl 4) mov al, _boss_angle mov ah, 0 add ax, ax @@ -24495,7 +24481,7 @@ sub_18B68 endp sub_18BA7 proc near push bp mov bp, sp - push 0C000400h + push ((192 shl 4) shl 16) or (64 shl 4) mov al, _boss_angle mov ah, 0 add ax, ax @@ -24503,7 +24489,7 @@ sub_18BA7 proc near push _CosTable8[bx] call vector1_at mov _boss_pos.cur.x, ax - push 5B00140h + push ((91 shl 4) shl 16) or (20 shl 4) mov al, _boss_angle mov ah, 0 add ax, ax @@ -24753,7 +24739,7 @@ loc_18DCF: mov byte_266E2, 2 mov byte_266E3, 37h ; '7' mov eax, _boss_pos.cur - mov dword_266E4, eax + mov point_266E4, eax mov byte_266EC, 2Ch ; ',' mov byte_266EF, 10h mov byte_266F2, 81h @@ -25100,14 +25086,14 @@ loc_190DE: mov byte_266EC, 0 mov ax, _boss_pos.cur.y add ax, (-10 shl 4) - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov ax, _boss_pos.cur.x add ax, (12 shl 4) - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov al, byte_2D02D mov byte_266ED, al call sub_1CFA2 - sub word ptr dword_266E4, 180h + sub point_266E4.x, (24 shl 4) mov al, byte_2D02C mov byte_266ED, al call sub_1CFA2 @@ -25264,9 +25250,9 @@ loc_19279: ja short loc_19317 mov byte_266E2, 1 mov ax, _boss_pos.cur.x - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _boss_pos.cur.y - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov byte_266E3, 37h ; '7' mov byte_266EC, 26h ; '&' mov byte_266EF, 16h @@ -25388,9 +25374,9 @@ loc_19387: ja short loc_19425 mov byte_266E2, 1 mov ax, _boss_pos.cur.x - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _boss_pos.cur.y - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov byte_266E3, 37h ; '7' mov byte_266EC, 26h ; '&' mov byte_266EF, 16h @@ -25759,9 +25745,9 @@ loc_196C2: jnz short loc_19712 mov byte_266E2, 1 mov ax, _boss_pos.cur.x - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _boss_pos.cur.y - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov byte_266EC, 26h ; '&' mov byte_266EF, 2 mov al, _boss_angle @@ -25816,9 +25802,9 @@ loc_19751: mov byte_266E2, 4 mov byte_266E3, 34h ; '4' mov ax, _boss_pos.cur.x - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _boss_pos.cur.y - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov byte_266EC, 2Dh ; '-' mov byte_266EF, 3 mov byte_266F0, 0Ch @@ -25863,9 +25849,9 @@ sub_197BB proc near mov byte_266E2, 2 mov byte_266E3, 34h ; '4' mov ax, _boss_pos.cur.x - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _boss_pos.cur.y - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov byte_266EC, 2Ch ; ',' mov byte_266EF, 10h mov byte_266EE, 20h ; ' ' @@ -25900,9 +25886,9 @@ sub_19814 proc near mov byte_266E2, 1 mov ax, _boss_pos.cur.x add ax, (-32 shl 4) - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _boss_pos.cur.y - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov byte_266EC, 26h ; '&' mov byte_266EF, 8 mov byte_266EE, 1Eh @@ -25911,7 +25897,7 @@ sub_19814 proc near mov byte_266ED, al call fp_2D004 call fp_2D000 - add word ptr dword_266E4, 400h + add point_266E4.x, (64 shl 4) call fp_2D000 call snd_se_play pascal, 9 @@ -25994,9 +25980,9 @@ loc_19909: mov byte_266E3, 34h ; '4' mov ax, _boss_pos.cur.x add ax, (-32 shl 4) - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _boss_pos.cur.y - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov byte_266EC, 1Bh mov byte_266EF, 1 cmp _boss_hp, 700 @@ -26029,7 +26015,7 @@ loc_19956: mov byte_266ED, al call fp_2D004 call fp_2D000 - add word ptr dword_266E4, 400h + add point_266E4.x, (64 shl 4) push 1 call randring2_next16_and or ax, ax @@ -26070,9 +26056,9 @@ sub_1998B proc near jnz short loc_199BC loc_199AD: - mov ax, word ptr dword_266E4 + mov ax, point_266E4.x mov word ptr dword_2A8C6, ax - mov ax, word ptr dword_266E4+2 + mov ax, point_266E4.y mov word ptr dword_2A8C6+2, ax call sub_13B21 @@ -26087,9 +26073,7 @@ loc_199BC: jnz short loc_199ED loc_199DB: - push word ptr dword_266E4 - push word ptr dword_266E4+2 - call circles_add_shrinking + call circles_add_shrinking pascal, point_266E4.x, point_266E4.y mov _circles_color, 0Fh loc_199ED: @@ -26256,9 +26240,9 @@ loc_19B88: mov _boss_sprite, al mov byte_266E2, 1 mov ax, _boss_pos.cur.x - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _boss_pos.cur.y - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov byte_266EC, 26h ; '&' mov byte_266EF, 10h mov byte_266EE, 40h @@ -26395,10 +26379,10 @@ loc_19CC8: loc_19CF0: mov ax, _boss_pos.cur.x add ax, (8 shl 4) - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _boss_pos.cur.y add ax, (-16 shl 4) - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov al, _boss_mode mov ah, 0 or ax, ax @@ -26411,18 +26395,16 @@ loc_19CF0: loc_19D15: cmp _boss_phase_frame, 96 jnz short loc_19D2B - mov ax, word ptr dword_266E4 + mov ax, point_266E4.x mov word ptr dword_2A8C6, ax - mov ax, word ptr dword_266E4+2 + mov ax, point_266E4.y mov word ptr dword_2A8C6+2, ax call sub_13B21 loc_19D2B: cmp _boss_phase_frame, 112 jnz short loc_19D44 - push word ptr dword_266E4 - push word ptr dword_266E4+2 - call circles_add_shrinking + call circles_add_shrinking pascal, point_266E4.x, point_266E4.y mov _circles_color, 0Fh loc_19D44: @@ -27126,10 +27108,10 @@ loc_1A2BE: test byte ptr [si+0Eh], 1Fh jnz short loc_1A309 mov ax, _boss_pos.cur.x - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _boss_pos.cur.y - add ax, 200h - mov word ptr dword_266E4+2, ax + add ax, (32 shl 4) + mov point_266E4.y, ax mov byte_266E2, 2 mov byte_266E3, 3Ch ; '<' mov byte_266EC, 2Ch ; ',' @@ -27159,7 +27141,7 @@ loc_1A32D: mov al, [bp+var_5] add al, [bp+var_6] mov byte_266ED, al - push 53A4h + push offset point_266E4 push word ptr [si+2] push word ptr [si+4] push [bp+var_2] @@ -27167,14 +27149,14 @@ loc_1A32D: mov ah, 0 push ax call vector2_at - sub word ptr dword_266E4, 20h ; ' ' - sub word ptr dword_266E4+2, 10h - mov ax, 10h - imul word ptr dword_266E4 - mov word ptr dword_266E4, ax - mov ax, 10h - imul word ptr dword_266E4+2 - mov word ptr dword_266E4+2, ax + sub point_266E4.x, (2 shl 4) + sub point_266E4.y, (1 shl 4) + mov ax, (1 shl 4) + imul point_266E4.x + mov point_266E4.x, ax + mov ax, (1 shl 4) + imul point_266E4.y + mov point_266E4.y, ax mov byte_266EC, 2Fh ; '/' mov byte_266EF, 8 mov byte_266EE, 10h @@ -27380,7 +27362,7 @@ loc_1A4D4: mov _boss_pos.velocity.x, ax loc_1A4DE: - push 5000300h + push ((80 shl 4) shl 16) or (48 shl 4) mov al, _boss_angle mov ah, 0 add ax, ax @@ -28417,10 +28399,10 @@ loc_1AB86: mov byte_266E2, 2 mov byte_266E3, 3Bh ; ';' mov ax, _boss_pos.cur.x - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _boss_pos.cur.y add ax, (-4 shl 4) - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov byte_266ED, 0 mov byte_266EC, 26h ; '&' mov byte_266F2, 81h @@ -28481,7 +28463,7 @@ loc_1ABFF: mov byte_266EE, 28h ; '(' mov al, [bp+var_1] mov byte_266ED, al - push 53A4h + push offset point_266E4 push _boss_pos.cur.x push _boss_pos.cur.y push (34 shl 4) @@ -28492,7 +28474,7 @@ loc_1ABFF: mov al, 80h sub al, [bp+var_1] mov [bp+var_1], al - push 53A4h + push offset point_266E4 push _boss_pos.cur.x push _boss_pos.cur.y push (34 shl 4) @@ -28570,7 +28552,7 @@ loc_1ACD9: mov byte_266E3, 3Ch ; '<' mov ax, _boss_pos.cur.y add ax, (-4 shl 4) - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov byte_266EC, 1Ch mov byte_266EF, 4 mov byte_266F2, 88h @@ -28580,7 +28562,7 @@ loc_1ACD9: mov byte_266EE, al mov ax, _boss_pos.cur.x add ax, (-20 shl 4) - mov word ptr dword_266E4, ax + mov point_266E4.x, ax call randring2_next16 mov byte_266ED, al mov byte_2CFF7, 1 @@ -28588,7 +28570,7 @@ loc_1ACD9: call sub_1CFB5 call randring2_next16 mov byte_266ED, al - add word ptr dword_266E4, 2C0h + add point_266E4.x, (44 shl 4) call sub_1CFB5 call snd_se_play pascal, 9 jmp short loc_1AD6A @@ -28676,9 +28658,9 @@ sub_1ADDB proc near cmp frame_mod16, 0 jnz loc_1AE8D mov ax, _boss_pos.cur.x - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _boss_pos.cur.y - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax cmp _boss_phase, 6 jnz short loc_1AE40 mov byte_266E2, 2 @@ -28762,9 +28744,9 @@ loc_1AEB7: cmp frame_mod8, 0 jnz loc_1AF59 mov ax, _boss_pos.cur.x - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _boss_pos.cur.y - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov byte_266E2, 4 mov byte_266E3, 4Ch ; 'L' mov byte_266EC, 2Dh ; '-' @@ -28776,7 +28758,7 @@ loc_1AEB7: mov byte_266ED, 20h ; ' ' call fp_2D000 mov ax, word_25A0C - mov word ptr dword_266E4, ax + mov point_266E4.x, ax call fp_2D000 mov byte_266ED, 60h call fp_2D000 @@ -28868,7 +28850,7 @@ loc_1AFD0: jnz loc_1B094 mov ax, _boss_pos.cur.y add ax, (32 shl 4) - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov byte_266E2, 2 mov byte_266E3, 5Ch mov byte_266EC, 2Dh ; '-' @@ -28888,7 +28870,7 @@ loc_1AFD0: add al, dl mov byte_266ED, al mov ax, _boss_pos.cur.x - mov word ptr dword_266E4, ax + mov point_266E4.x, ax call fp_2D000 mov al, byte_2D02D mov ah, 0 @@ -28900,7 +28882,7 @@ loc_1AFD0: add al, dl mov byte_266ED, al mov ax, word_25A0C - mov word ptr dword_266E4, ax + mov point_266E4.x, ax call fp_2D000 call snd_se_play pascal, 9 mov al, byte_2D02D @@ -29022,9 +29004,9 @@ loc_1B13C: mov byte_266E2, 4 mov byte_266E3, 3Dh ; '=' mov ax, _boss_pos.cur.x - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _boss_pos.cur.y - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov byte_266EC, 26h ; '&' mov byte_266EF, 8 mov byte_266EE, 90h @@ -29190,9 +29172,9 @@ var_1 = byte ptr -1 test [bp+var_1], 3 jnz short loc_1B2ED mov ax, _boss_pos.cur.x - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _boss_pos.cur.y - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov al, 3 sub al, byte_266E2 mov byte_266E2, al @@ -29281,12 +29263,12 @@ loc_1B382: loc_1B391: mov ax, _boss_pos.cur.y add ax, (32 shl 4) - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov ax, _boss_pos.cur.x - mov word ptr dword_266E4, ax + mov point_266E4.x, ax call fp_2D000 mov ax, word_25A0C - mov word ptr dword_266E4, ax + mov point_266E4.x, ax call fp_2D000 call snd_se_play pascal, 3 jmp short loc_1B3DD @@ -30914,23 +30896,23 @@ sub_1C1CF proc near mov byte_266EF, 10h call randring2_next16 mov byte_266ED, al - sub word ptr dword_266E4, 200h + sub point_266E4.x, (32 shl 4) call fp_2D004 call fp_2D000 call randring2_next16 mov byte_266ED, al - add word ptr dword_266E4, 400h + add point_266E4.x, (64 shl 4) call fp_2D000 call randring2_next16 loc_1C21B: mov byte_266ED, al - sub word ptr dword_266E4, 200h - sub word ptr dword_266E4+2, 200h + sub point_266E4.x, (32 shl 4) + sub point_266E4.y, (32 shl 4) call fp_2D000 call randring2_next16 mov byte_266ED, al - add word ptr dword_266E4+2, 400h + add point_266E4.y, (64 shl 4) call fp_2D000 call snd_se_play pascal, 9 @@ -31138,9 +31120,9 @@ loc_1C400: loc_1C445: mov ax, _boss_pos.cur.x - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _boss_pos.cur.y - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov al, _boss_mode mov ah, 0 mov [bp+var_2], ax @@ -33000,16 +32982,16 @@ loc_1D186: loc_1D18D: mov ax, _player_pos.cur.y - sub ax, word ptr dword_266E4+2 + sub ax, point_266E4.y push ax mov ax, _player_pos.cur.x - sub ax, word ptr dword_266E4 + sub ax, point_266E4.x push ax call iatan2 add [bp+var_2], ax loc_1D1A5: - push 53A8h + push offset point_266E8 mov al, byte ptr [bp+var_2] add al, byte_266ED push ax @@ -33108,23 +33090,23 @@ sub_1D230 proc near jbe short loc_1D282 loc_1D241: - cmp word ptr dword_266E4, 0FF80h + cmp point_266E4.x, (-8 shl 4) jle short loc_1D282 - cmp word ptr dword_266E4, 1880h + cmp point_266E4.x, ((PLAYFIELD_W + 8) shl 4) jge short loc_1D282 - cmp word ptr dword_266E4+2, 0FF80h + cmp point_266E4.y, (-8 shl 4) jle short loc_1D282 - cmp word ptr dword_266E4+2, 1780h + cmp point_266E4.y, ((PLAYFIELD_H + 8) shl 4) jge short loc_1D282 - mov ax, word ptr dword_266E4 + mov ax, point_266E4.x sub ax, _player_pos.cur.x - add ax, 40h - cmp ax, 80h + add ax, (4 shl 4) + cmp ax, (8 shl 4) ja short loc_1D286 - mov ax, word ptr dword_266E4+2 + mov ax, point_266E4.y sub ax, _player_pos.cur.y - add ax, 40h - cmp ax, 80h + add ax, (4 shl 4) + cmp ax, (8 shl 4) ja short loc_1D286 mov byte_259A9, 1 @@ -33164,7 +33146,7 @@ var_2 = word ptr -2 push di cmp byte_266E2, 3 jnz short loc_1D2D5 - mov eax, dword_266E4 + mov eax, point_266E4 mov dword_2A8C6, eax mov dword_2A8CA, 0 mov word_2A8CE, 400h @@ -33240,7 +33222,7 @@ loc_1D33C: sub al, byte_266EE mov [si+17h], al mov byte ptr [si+1], 0 - mov eax, dword_266E4 + mov eax, point_266E4 mov [si+2], eax mov al, byte_266EC mov [si+0Eh], al @@ -33260,7 +33242,7 @@ loc_1D33C: add [si+18h], ax loc_1D391: - mov eax, dword_266E8 + mov eax, point_266E8 mov [si+0Ah], eax mov al, byte ptr word_2D008 mov [si+11h], al @@ -33351,7 +33333,7 @@ loc_1D40A: mov al, byte_2CFF8 mov [si+17h], al mov byte ptr [si+1], 0 - mov eax, dword_266E4 + mov eax, point_266E4 mov [si+2], eax mov al, byte_266EC mov [si+0Eh], al @@ -33371,7 +33353,7 @@ loc_1D40A: add [si+18h], ax loc_1D460: - mov eax, dword_266E8 + mov eax, point_266E8 mov [si+0Ah], eax mov al, byte ptr word_2D008 mov [si+11h], al @@ -35986,13 +35968,13 @@ var_1 = byte ptr -1 mov dx, _boss_pos.cur.x add dx, (-32 shl 4) add ax, dx - mov word ptr dword_266E4, ax + mov point_266E4.x, ax push (64 shl 4) call randring2_next16_mod mov dx, _boss_pos.cur.y add dx, (-32 shl 4) add ax, dx - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax call randring2_next16 mov byte_266ED, al mov byte_266E2, 5 @@ -36019,13 +36001,13 @@ loc_1EEF5: mov dx, _boss_pos.cur.x add dx, (-32 shl 4) add ax, dx - mov word ptr dword_266E4, ax + mov point_266E4.x, ax push (64 shl 4) call randring2_next16_mod mov dx, _boss_pos.cur.y add dx, (-32 shl 4) add ax, dx - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax call randring2_next16 mov byte_266ED, al mov byte_266E2, 1 @@ -36106,13 +36088,13 @@ var_1 = byte ptr -1 mov dx, _boss_pos.cur.x add dx, (-32 shl 4) add ax, dx - mov word ptr dword_266E4, ax + mov point_266E4.x, ax push (64 shl 4) call randring2_next16_mod mov dx, _boss_pos.cur.y add dx, (-32 shl 4) add ax, dx - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov byte_266EC, 30h ; '0' mov al, _rank add al, 3 @@ -36301,13 +36283,13 @@ loc_1F1AA: mov dx, _boss_pos.cur.x add dx, (-32 shl 4) add ax, dx - mov word ptr dword_266E4, ax + mov point_266E4.x, ax push (64 shl 4) call randring2_next16_mod mov dx, _boss_pos.cur.y add dx, (-32 shl 4) add ax, dx - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax call randring2_next16 mov byte_266ED, al mov byte_266E2, 1 @@ -36394,13 +36376,13 @@ loc_1F263: mov dx, _boss_pos.cur.x add dx, (-32 shl 4) add ax, dx - mov word ptr dword_266E4, ax + mov point_266E4.x, ax push (64 shl 4) call randring2_next16_mod mov dx, _boss_pos.cur.y add dx, (-32 shl 4) add ax, dx - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov al, byte_237F6 add byte_266ED, al call fp_2D002 @@ -36526,10 +36508,10 @@ var_2 = word ptr -2 enter 2, 0 mov ax, _boss_pos.cur.x add ax, (4 shl 4) - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _boss_pos.cur.y add ax, (-28 shl 4) - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov al, _boss_phase mov ah, 0 mov bx, ax @@ -37014,9 +36996,9 @@ loc_1F7E1: loc_1F802: mov ax, _boss_pos.cur.x - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _boss_pos.cur.y - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax call sub_1F17C call sub_1E64E or al, al @@ -37444,10 +37426,10 @@ loc_1FB10: mov byte_266EC, 2Dh ; '-' mov byte_266F0, 8 mov ax, _player_pos.cur.y - sub ax, word ptr dword_266E4+2 + sub ax, point_266E4.y push ax mov ax, _player_pos.cur.x - sub ax, word ptr dword_266E4 + sub ax, point_266E4.x push ax call iatan2 add al, 0C0h @@ -37533,13 +37515,13 @@ loc_1FBAD: mov dx, _boss_pos.cur.x add dx, (-32 shl 4) add ax, dx - mov word ptr dword_266E4, ax + mov point_266E4.x, ax push (32 shl 4) call randring2_next16_mod mov dx, _boss_pos.cur.y add dx, (-32 shl 4) add ax, dx - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov byte_266ED, 0E0h call fp_2D002 push 3Fh ; '?' @@ -37611,13 +37593,13 @@ loc_1FC68: mov dx, _boss_pos.cur.x ; jumptable 0001EA6B case 32792 add dx, (-32 shl 4) add ax, dx - mov word ptr dword_266E4, ax + mov point_266E4.x, ax push (32 shl 4) call randring2_next16_mod mov dx, _boss_pos.cur.y add dx, (-26 shl 4) add ax, dx - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax push 3Fh ; '?' call randring2_next16_and add al, 10h @@ -37637,7 +37619,7 @@ loc_1FCE0: mov word_2A8CE, 400h mov byte_2A8D2, 0Eh mov byte_266E2, 1 - mov ax, word ptr dword_266E4+2 + mov ax, point_266E4.y mov word ptr dword_2A8C6+2, ax push 1400h call randring2_next16_mod @@ -37779,10 +37761,10 @@ loc_1FE17: mov byte_266EF, 1 mov byte_266F0, 6 mov ax, _player_pos.cur.y - sub ax, word ptr dword_266E4+2 + sub ax, point_266E4.y push ax mov ax, _player_pos.cur.x - sub ax, word ptr dword_266E4 + sub ax, point_266E4.x push ax call iatan2 mov byte_266ED, al @@ -37937,10 +37919,10 @@ loc_1FF44: call fp_2D000 call snd_se_play pascal, 3 mov ax, _player_pos.cur.y - sub ax, word ptr dword_266E4+2 + sub ax, point_266E4.y push ax mov ax, _player_pos.cur.x - sub ax, word ptr dword_266E4 + sub ax, point_266E4.x push ax call iatan2 add al, 0D0h @@ -37949,7 +37931,7 @@ loc_1FF44: ; --------------------------------------------------------------------------- loc_1FF93: - mov ax, word ptr dword_266E4 + mov ax, point_266E4.x mov word_2561A, ax mov ax, _boss_pos.cur.y mov word_2561C, ax @@ -37983,7 +37965,7 @@ loc_1FFF8: mov byte_266ED, 40h mov byte_266E3, 34h ; '4' mov byte_266E2, 2 - mov word ptr dword_266E4+2, 0 + mov point_266E4.y, 0 mov byte_266EC, 0 mov si, 0B204h xor di, di @@ -37992,7 +37974,7 @@ loc_1FFF8: loc_2001E: mov ax, [si+2] - mov word ptr dword_266E4, ax + mov point_266E4.x, ax call sub_1CFA2 inc di add si, 1Ah @@ -38038,13 +38020,13 @@ sub_20050 proc near mov dx, _boss_pos.cur.x add dx, (-32 shl 4) add ax, dx - mov word ptr dword_266E4, ax + mov point_266E4.x, ax push (32 shl 4) call randring2_next16_mod mov dx, _boss_pos.cur.y add dx, (-26 shl 4) add ax, dx - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov byte_266EC, 26h ; '&' mov byte_266EF, 10h mov byte_266E2, 2 @@ -38103,12 +38085,12 @@ loc_200F6: mov dx, _boss_pos.cur.y add dx, (-26 shl 4) add ax, dx - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov al, byte_2D02D mov ah, 0 shl ax, 4 add ax, _boss_pos.cur.x - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov al, byte_2D02C mov byte_266ED, al call fp_2D000 @@ -38117,7 +38099,7 @@ loc_200F6: shl ax, 4 mov dx, _boss_pos.cur.x sub dx, ax - mov word ptr dword_266E4, dx + mov point_266E4.x, dx mov al, byte_2D02C neg al mov byte_266ED, al @@ -38174,13 +38156,13 @@ loc_201B4: mov dx, _boss_pos.cur.x add dx, (-32 shl 4) add ax, dx - mov word ptr dword_266E4, ax + mov point_266E4.x, ax push (32 shl 4) call randring2_next16_mod mov dx, _boss_pos.cur.y add dx, (-26 shl 4) add ax, dx - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov byte_266EC, 26h ; '&' mov byte_266EF, 20h ; ' ' call randring2_next16 @@ -38273,10 +38255,10 @@ loc_20279: loc_20284: mov ax, _boss_pos.cur.x add ax, (-13 shl 4) - mov word ptr dword_266E4, ax + mov point_266E4.x, ax mov ax, _boss_pos.cur.y add ax, (-48 shl 4) - mov word ptr dword_266E4+2, ax + mov point_266E4.y, ax mov byte_266E2, 1 mov al, _boss_phase mov ah, 0 @@ -40644,8 +40626,8 @@ byte_266E0 db ? db ? byte_266E2 db ? byte_266E3 db ? -dword_266E4 dd ? -dword_266E8 dd ? +point_266E4 Point +point_266E8 Point byte_266EC db ? byte_266ED db ? byte_266EE db ? diff --git a/th05_main.asm b/th05_main.asm index 3e450320..12200dc0 100644 --- a/th05_main.asm +++ b/th05_main.asm @@ -3506,22 +3506,22 @@ loc_CCAF: ; --------------------------------------------------------------------------- loc_CCB3: - push 38C2h - push 0C000A0h + push offset point_242A2 + push (192 shl 16) or 160 ; No subpixels! push word_242A8 mov al, byte_242AA mov ah, 0 push ax call vector2_at - cmp word_242A2, 0 + cmp point_242A2.x, 0 jl short loc_CCFE - cmp word_242A2, 180h + cmp point_242A2.x, (PLAYFIELD_RIGHT - 32) jg short loc_CCFE - cmp word_242A4, 0 + cmp point_242A2.y, 0 jl short loc_CCFE - cmp word_242A4, 150h + cmp point_242A2.y, (PLAYFIELD_BOTTOM - 48) jg short loc_CCFE - call super_roll_put_1plane pascal, word_242A2, word_242A4, (179 shl 16) or 0, PLANE_PUT or GC_BRGI + call super_roll_put_1plane pascal, point_242A2.x, point_242A2.y, (179 shl 16) or 0, PLANE_PUT or GC_BRGI loc_CCFE: inc si @@ -4561,7 +4561,7 @@ loc_D471: mov word ptr [si+0Ch], 0 lea ax, [si+8] push ax - pushd 0 + pushd (0 shl 16) or 0 push 3Fh ; '?' call randring1_next16_and add ax, 20h ; ' ' @@ -4751,7 +4751,7 @@ loc_D5F1: call sub_D598 add word ptr [si+52h], 40h push si - push 0C000B80h + push ((192 shl 4) shl 16) or (184 shl 4) mov ax, [si+52h] imul ax, 3 mov bx, 4 @@ -4760,7 +4760,7 @@ loc_D5F1: push ax mov al, [si+7Ah] mov ah, 0 - add ax, 0FFC0h + add ax, -64 push ax call vector2_at cmp word ptr [si+52h], 0E00h @@ -5480,13 +5480,13 @@ arg_2 = word ptr 6 loc_DB58: call vector2_at pascal, offset _drawpoint, ((224 shl 4) shl 16) or (200 shl 4), di, si - push 3AB0h + push offset point_24490 push ((224 shl 4) shl 16) or (200 shl 4) push di lea ax, [si+85] push ax call vector2_at - push 3AB4h + push offset point_24494 push ((224 shl 4) shl 16) or (200 shl 4) push di lea ax, [si-85] @@ -5494,13 +5494,13 @@ loc_DB58: call vector2_at sar _drawpoint.x, 4 sar _drawpoint.y, 4 - sar word_24490, 4 - sar word_24492, 4 - sar word_24494, 4 - sar word_24496, 4 - call grcg_line pascal, _drawpoint.x, _drawpoint.y, word_24490, word_24492 - call grcg_line pascal, word_24490, word_24492, word_24494, word_24496 - call grcg_line pascal, _drawpoint.x, _drawpoint.y, word_24494, word_24496 + sar point_24490.x, 4 + sar point_24490.y, 4 + sar point_24494.x, 4 + sar point_24494.y, 4 + call grcg_line pascal, _drawpoint.x, _drawpoint.y, point_24490.x, point_24490.y + call grcg_line pascal, point_24490.x, point_24490.y, point_24494.x, point_24494.y + call grcg_line pascal, _drawpoint.x, _drawpoint.y, point_24494.x, point_24494.y inc [bp+var_2] add si, 2Ah ; '*' @@ -8300,15 +8300,15 @@ loc_F816: mov di, ax cmp di, (-16 shl 4) jle short loc_F881 - cmp di, 1800h + cmp di, ((PLAYFIELD_H + 16) shl 4) jge short loc_F881 cmp si, (-16 shl 4) jle short loc_F881 - cmp si, 1900h + cmp si, ((PLAYFIELD_W + 16) shl 4) jge short loc_F881 mov ax, si sar ax, 4 - add ax, 10h + add ax, (PLAYFIELD_X - 16) mov si, ax call scroll_subpixel_y_to_vram_seg1 pascal, di mov di, ax @@ -13345,7 +13345,7 @@ loc_128CA: loc_128D8: mov eax, [si] - mov dword_25FFC, eax + mov point_25FFC, eax call randring1_next16 mov byte ptr word_26006, al call sub_15DE2 @@ -14561,9 +14561,9 @@ loc_15518: mov word_23F60, dx call sub_15345 mov ax, [si+2] - add word ptr dword_25FFC, ax + add point_25FFC.x, ax mov ax, [si+4] - add word ptr dword_25FFC+2, ax + add point_25FFC.y, ax push es call fp_25344 mov bx, word_23F60 @@ -15413,21 +15413,21 @@ loc_15BDB: jz short loc_15BF8 loc_15BE2: - mov byte ptr word_25349+1, cl - push word ptr dword_25FFC - push word ptr dword_25FFC+2 + mov byte_2534A, cl + push point_25FFC.x + push point_25FFC.y push si call sub_15A24 - mov cl, byte ptr word_25349+1 + mov cl, byte_2534A mov si, ax loc_15BF8: - push 496Bh + push offset point_2534B mov ax, si add al, byte ptr word_26006 push ax - mov byte ptr word_25349, al - mov byte ptr word_25349+1, cl + mov byte_25349, al + mov byte_2534A, cl mov al, cl mov ah, 0 push ax @@ -15471,15 +15471,15 @@ loc_15C44: ; --------------------------------------------------------------------------- loc_15C47: - mov ax, word ptr dword_25FFC - mov dx, word ptr dword_25FFC+2 - cmp ax, 0FF80h + mov ax, point_25FFC.x + mov dx, point_25FFC.y + cmp ax, (-8 shl 4) jle short loc_15C44 - cmp ax, 1880h + cmp ax, ((PLAYFIELD_W + 8) shl 4) jge short loc_15C44 - cmp dx, 0FF80h + cmp dx, (-8 shl 4) jle short loc_15C44 - cmp dx, 1780h + cmp dx, ((PLAYFIELD_H + 8) shl 4) jge short loc_15C44 sub ax, _player_pos.cur.x add ax, 4 * 16 @@ -15512,7 +15512,7 @@ loc_15C94: jnz short loc_15CE5 loc_15CA2: - mov eax, dword_25FFC + mov eax, point_25FFC mov dword_2A722, eax mov dword_2A726, 0 mov word_2A72A, 400h @@ -15592,7 +15592,7 @@ loc_15D48: loc_15D52: mov byte ptr [si+12h], 7Bh - mov eax, dword_25FFC + mov eax, point_25FFC mov [si+2], eax cmp byte_221C0, 0 jnz short loc_15D78 @@ -15627,16 +15627,16 @@ loc_15D95: cmp al, 34h ; '4' jb short loc_15DB5 push ax - push word_25349 + push word ptr byte_25349 call sub_159E6 loc_15DB5: mov [si+18h], ax - mov eax, dword_2534B + mov eax, point_2534B mov [si+0Ah], eax - mov al, byte ptr word_25349 + mov al, byte_25349 mov [si+11h], al - mov al, byte ptr word_25349+1 + mov al, byte_2534A mov [si+15h], al mov [si+10h], al or cl, cl @@ -16231,9 +16231,9 @@ loc_161FC: push ax call sub_16065 mov ax, [si+2] - add word ptr dword_25FFC, ax + add point_25FFC.x, ax mov ax, [si+4] - add word ptr dword_25FFC+2, ax + add point_25FFC.y, ax call fp_25344 call sub_15A5C @@ -17085,9 +17085,9 @@ loc_16ACB: push si call sub_16A95 mov ax, [si+2] - mov word ptr dword_25FFC, ax + mov point_25FFC.x, ax mov ax, [si+4] - mov word ptr dword_25FFC+2, ax + mov point_25FFC.y, ax cmp byte ptr word_25FFA, 0FEh jnb short loc_16B0F call sub_15A5C @@ -18343,7 +18343,7 @@ loc_1769E: jnz short loc_17710 mov bx, [bp+var_4] mov byte ptr [bx], 1 - mov al, byte ptr word_2BC71 + mov al, byte_2BC71 mov [si+1], al mov al, byte_2BC88 mov [si+18h], al @@ -18362,7 +18362,7 @@ loc_1769E: call sub_159E6 mov ah, 0 mov [si+12h], ax - mov eax, dword ptr word_2BC71+1 + mov eax, point_2BC72 mov [si+2], eax xor di, di jmp short loc_17709 @@ -18372,7 +18372,7 @@ loc_176EF: mov bx, di shl bx, 2 add bx, [bp+var_4] - mov eax, dword ptr word_2BC71+1 + mov eax, point_2BC72 mov [bx+2], eax mov al, [si+12h] mov bx, [bp+var_4] @@ -19491,7 +19491,7 @@ loc_18029: mov bx, ax push _CosTable8[bx] call vector1_at - mov word ptr dword_25FFC, ax + mov point_25FFC.x, ax push _midboss_pos.cur.y push (32 shl 4) mov al, byte ptr word_26006 @@ -19500,7 +19500,7 @@ loc_18029: mov bx, ax push _SinTable8[bx] call vector1_at - mov word ptr dword_25FFC+2, ax + mov point_25FFC.y, ax call sub_15A5C loc_180BC: @@ -19519,7 +19519,7 @@ midboss1_update proc far push bp mov bp, sp mov eax, _midboss_pos.cur - mov dword_25FFC, eax + mov point_25FFC, eax inc _midboss_phase_frame mov al, _midboss_phase mov ah, 0 @@ -20176,7 +20176,7 @@ sara_update proc far inc _boss_phase_frame mov byte ptr word_25FFA, 0 mov eax, _boss_pos.cur - mov dword_25FFC, eax + mov point_25FFC, eax mov dword_2A722, eax mov al, _boss_phase mov ah, 0 @@ -20549,7 +20549,7 @@ midboss2_update proc far push bp mov bp, sp mov eax, _midboss_pos.cur - mov dword_25FFC, eax + mov point_25FFC, eax inc _midboss_phase_frame mov al, _midboss_phase mov ah, 0 @@ -20607,16 +20607,7 @@ loc_18ADC: mov _midboss_phase_frame, 0 call sparks_add_circle pascal, _midboss_pos.cur.x, _midboss_pos.cur.y, large (((4 shl 4) shl 16) or 32) call snd_se_play pascal, 15 - push _midboss_pos.cur.x - push _midboss_pos.cur.y - push 0C000400h - push 0 - push ds - push offset _midboss_pos.velocity.x - push ds - push offset _midboss_pos.velocity.y - push 1 - call vector2_between_plus + call vector2_between_plus pascal, _midboss_pos.cur.x, _midboss_pos.cur.y, ((192 shl 4) shl 16) or (64 shl 4), 0, ds, offset _midboss_pos.velocity.x, ds, offset _midboss_pos.velocity.y, 1 jmp short loc_18BA0 ; --------------------------------------------------------------------------- @@ -20685,13 +20676,7 @@ arg_2 = word ptr 6 jnz short loc_18BDC call randring2_next16 mov [bp+var_1], al - push ds - push offset _boss_pos.velocity.x - push ds - push offset _boss_pos.velocity.y - push word ptr [bp+var_1] - push [bp+arg_2] - call vector2 + call vector2 pascal, ds, offset _boss_pos.velocity.x, ds, offset _boss_pos.velocity.y, word ptr [bp+var_1], [bp+arg_2] loc_18BDC: mov ax, _boss_pos.velocity.x @@ -21261,7 +21246,7 @@ louise_update proc far inc _boss_phase_frame mov byte ptr word_25FFA, 0 mov eax, _boss_pos.cur - mov dword_25FFC, eax + mov point_25FFC, eax mov dword_2A722, eax mov al, _boss_phase mov ah, 0 @@ -21786,7 +21771,7 @@ midboss3_update proc far push bp mov bp, sp mov eax, _midboss_pos.cur - mov dword_25FFC, eax + mov point_25FFC, eax mov dword_2A722, eax inc _midboss_phase_frame mov al, _midboss_phase @@ -21921,25 +21906,25 @@ sub_19634 proc near mov bp, sp push 600h push word_2BC80 - mov al, byte ptr word_2BC71 + mov al, byte_2BC71 mov ah, 0 add ax, ax mov bx, ax push _CosTable8[bx] call vector1_at - mov word_2BC71+1, ax + mov point_2BC72.x, ax push 600h push word_2BC80 - mov al, byte ptr word_2BC71 + mov al, byte_2BC71 mov ah, 0 add ax, ax mov bx, ax push _SinTable8[bx] call vector1_at - mov word_2BC74, ax - mov al, byte ptr word_2BC71 + mov point_2BC72.y, ax + mov al, byte_2BC71 add al, 0FEh - mov byte ptr word_2BC71, al + mov byte_2BC71, al sub word_2BC80, 20h ; ' ' push 1200h push word_2BC9A @@ -21949,7 +21934,7 @@ sub_19634 proc near mov bx, ax push _CosTable8[bx] call vector1_at - mov word ptr dword_2BC8C, ax + mov point_2BC8C.x, ax push 600h push word_2BC9A mov al, byte_2BC8B @@ -21958,15 +21943,15 @@ sub_19634 proc near mov bx, ax push _SinTable8[bx] call vector1_at - mov word ptr dword_2BC8C+2, ax + mov point_2BC8C.y, ax mov al, byte_2BC8B add al, 2 mov byte_2BC8B, al sub word_2BC9A, 20h ; ' ' - mov eax, dword ptr word_2BC71+1 + mov eax, point_2BC72 mov dword_2BC76, eax - mov eax, dword_2BC8C - mov dword_2BC90, eax + mov eax, point_2BC8C + mov point_2BC90, eax pop bp retn sub_19634 endp @@ -22240,7 +22225,7 @@ loc_198CF: mov byte ptr word_26006+1, 20h ; ' ' mov byte_26000, 0 mov eax, [si+2] - mov dword_25FFC, eax + mov point_25FFC, eax call randring2_next16 mov byte ptr word_26006, al call fp_25344 @@ -22293,7 +22278,7 @@ loc_19940: jnz short loc_19984 mov byte ptr word_25FFA+1, 0 mov eax, [si+2] - mov dword_25FFC, eax + mov point_25FFC, eax mov byte ptr word_25FFA, 10h mov byte ptr word_26006+1, 18h mov byte_26000, 9 @@ -22350,7 +22335,7 @@ loc_199B2: jnz short loc_199F9 mov byte ptr word_25FFA+1, 0 mov eax, [si+2] - mov dword_25FFC, eax + mov point_25FFC, eax mov byte ptr word_25FFA, 10h mov byte ptr word_26006+1, 20h ; ' ' mov byte_26000, 3 @@ -22407,7 +22392,7 @@ loc_19A27: jnz short loc_19A6E mov byte ptr word_25FFA+1, 0 mov eax, [si+2] - mov dword_25FFC, eax + mov point_25FFC, eax mov byte ptr word_25FFA, 10h mov byte ptr word_26006+1, 20h ; ' ' mov byte_26000, 5 @@ -22462,7 +22447,7 @@ loc_19A9C: jnz short loc_19ADC mov byte ptr word_25FFA+1, 0 mov eax, [si+2] - mov dword_25FFC, eax + mov point_25FFC, eax mov byte ptr word_25FFA, 10h mov byte ptr word_26006+1, 18h mov byte_26000, 3 @@ -22573,12 +22558,12 @@ loc_19B59: call randring2_next16_mod add ax, _boss_pos.cur.x sub ax, (24 shl 4) - mov word ptr dword_25FFC, ax + mov point_25FFC.x, ax push 300h call randring2_next16_mod add ax, _boss_pos.cur.y sub ax, (32 shl 4) - mov word ptr dword_25FFC+2, ax + mov point_25FFC.y, ax call sub_15A5C inc si @@ -22732,11 +22717,11 @@ sub_19CB0 proc near var_2 = word ptr -2 enter 2, 0 - mov eax, dword ptr word_2BC71+1 + mov eax, point_2BC72 cmp eax, dword_2BC76 jnz locret_19E10 - mov eax, dword_2BC8C - cmp eax, dword_2BC90 + mov eax, point_2BC8C + cmp eax, point_2BC90 jnz locret_19E10 inc word_2CE2E cmp word_2CE2E, 10h @@ -22798,7 +22783,7 @@ loc_19D56: call fp_25344 mov word_2CED6, 380h mov word_2CED8, 80h - mov eax, dword ptr word_2BC71+1 + mov eax, point_2BC72 mov dword_2CED2, eax add word ptr dword_2CED2, 400h call sub_12842 @@ -22809,13 +22794,13 @@ loc_19D56: loc_19D9D: mov ax, _player_pos.cur.x - sub ax, word_2BC71+1 - cmp ax, 800h + sub ax, point_2BC72.x + cmp ax, (128 shl 4) jnb short loc_19DBD - mov ax, word_2BC74 + mov ax, point_2BC72.y sub ax, _player_pos.cur.y - add ax, 40h - cmp ax, 80h + add ax, (4 shl 4) + cmp ax, (8 shl 4) jnb short loc_19DBD mov _player_is_hit, 1 @@ -22836,10 +22821,10 @@ loc_19DBD: mov byte_26000, 7 mov byte ptr word_26006, 0 mov ax, _boss_pos.cur.x - mov word ptr dword_25FFC, ax + mov point_25FFC.x, ax mov ax, _boss_pos.cur.y add ax, (-8 shl 4) - mov word ptr dword_25FFC+2, ax + mov point_25FFC.y, ax mov word ptr dword_26002+2, 608h mov byte ptr word_26006+1, 20h ; ' ' call fp_25344 @@ -22879,7 +22864,7 @@ loc_19E43: jnz short loc_19EC6 mov _laser_template.LASER_color, 6 mov _laser_template.coords.LASER_width, 8 - mov eax, dword_25FFC + mov eax, point_25FFC mov _laser_template.coords.origin, eax mov _laser_template.grow_at_age, 40 mov _laser_template.shootout_speed, (5 shl 4) @@ -23088,11 +23073,11 @@ alice_update proc far inc _boss_phase_frame mov byte ptr word_25FFA, 0 mov ax, _boss_pos.cur.x - mov word ptr dword_25FFC, ax + mov point_25FFC.x, ax mov ax, _boss_pos.cur.y add ax, (-8 shl 4) - mov word ptr dword_25FFC+2, ax - mov eax, dword_25FFC + mov point_25FFC.y, ax + mov eax, point_25FFC mov dword_2A722, eax mov al, _boss_phase mov ah, 0 @@ -23251,8 +23236,8 @@ loc_1A23C: loc_1A245: mov word ptr dword_2BC76, 800h mov word ptr dword_2BC76+2, 800h - mov word ptr dword_2BC90, 1000h - mov word ptr dword_2BC90+2, 800h + mov point_2BC90.x, (256 shl 4) + mov point_2BC90.y, (128 shl 4) mov word_2BC84, 1F4h mov word_2BC9E, 1F4h mov ax, offset sub_19AFB @@ -23268,8 +23253,8 @@ loc_1A245: loc_1A284: mov word ptr dword_2BC76, 800h mov word ptr dword_2BC76+2, 800h - mov word ptr dword_2BC90, 1000h - mov word ptr dword_2BC90+2, 800h + mov point_2BC90.x, (256 shl 4) + mov point_2BC90.y, (128 shl 4) mov word_2BC84, 1F4h mov word_2BC9E, 1F4h mov ax, offset sub_19AFB @@ -23292,8 +23277,8 @@ loc_1A2D7: mov byte_2D07F, 0 mov word ptr dword_2BC76, 1400h mov word ptr dword_2BC76+2, 600h - mov word ptr dword_2BC90, 400h - mov word ptr dword_2BC90+2, 600h + mov point_2BC90.x, (64 shl 4) + mov point_2BC90.y, (96 shl 4) xor ax, ax mov word_2BC98, ax mov word_2BC7E, ax @@ -23305,8 +23290,8 @@ loc_1A2D7: loc_1A315: mov word ptr dword_2BC76, 400h mov word ptr dword_2BC76+2, 800h - mov word ptr dword_2BC90, 1400h - mov word ptr dword_2BC90+2, 800h + mov point_2BC90.x, (320 shl 4) + mov point_2BC90.y, (128 shl 4) mov word_2BC84, 1F4h mov word_2BC9E, 1F4h mov ax, offset sub_19A84 @@ -23329,8 +23314,8 @@ loc_1A359: loc_1A35E: mov word ptr dword_2BC76, 400h mov word ptr dword_2BC76+2, 800h - mov word ptr dword_2BC90, 1400h - mov word ptr dword_2BC90+2, 800h + mov point_2BC90.x, (320 shl 4) + mov point_2BC90.y, (128 shl 4) mov ax, offset sub_19A84 mov fp_2CE2C, ax mov fp_2CE2A, ax @@ -23714,10 +23699,10 @@ sub_1A5EB proc near mov byte ptr word_26006, al mov byte ptr word_25FFA+1, 2Fh ; '/' mov ax, _boss_pos.cur.x - mov word ptr dword_25FFC, ax + mov point_25FFC.x, ax mov ax, _boss_pos.cur.y - add ax, 0FF80h - mov word ptr dword_25FFC+2, ax + add ax, (-8 shl 4) + mov point_25FFC.y, ax mov word ptr dword_26002+2, 602h push 1Fh call randring2_next16_and @@ -23757,10 +23742,10 @@ sub_1A651 proc near mov byte ptr word_26006, 0 mov byte ptr word_25FFA+1, 74h ; 't' mov ax, _boss_pos.cur.x - mov word ptr dword_25FFC, ax + mov point_25FFC.x, ax mov ax, _boss_pos.cur.y - add ax, 0FF80h - mov word ptr dword_25FFC+2, ax + add ax, (-8 shl 4) + mov point_25FFC.y, ax mov word ptr dword_26002, 810h mov byte ptr word_26006+1, 3Ch ; '<' call fp_25344 @@ -23808,10 +23793,10 @@ loc_1A6BA: mov byte_2D085, al mov byte ptr word_25FFA+1, 0 mov ax, _boss_pos.cur.x - mov word ptr dword_25FFC, ax + mov point_25FFC.x, ax mov ax, _boss_pos.cur.y - add ax, 0FF80h - mov word ptr dword_25FFC+2, ax + add ax, (-8 shl 4) + mov point_25FFC.y, ax mov word ptr dword_26002, 0A05h mov byte ptr word_26006+1, 32h ; '2' call fp_25344 @@ -23851,10 +23836,10 @@ sub_1A719 proc near mov byte ptr word_26006, 40h mov byte ptr word_25FFA+1, 2Eh ; '.' mov ax, _boss_pos.cur.x - mov word ptr dword_25FFC, ax + mov point_25FFC.x, ax mov ax, _boss_pos.cur.y - add ax, 0FF80h - mov word ptr dword_25FFC+2, ax + add ax, (-8 shl 4) + mov point_25FFC.y, ax mov word ptr dword_26002, 0C08h mov byte ptr word_26006+1, 40h call fp_25344 @@ -23995,10 +23980,10 @@ loc_1A843: add byte_2D085, al mov byte ptr word_25FFA+1, 2Eh ; '.' mov ax, _boss_pos.cur.x - mov word ptr dword_25FFC, ax + mov point_25FFC.x, ax mov ax, _boss_pos.cur.y - add ax, 0FF80h - mov word ptr dword_25FFC+2, ax + add ax, (-8 shl 4) + mov point_25FFC.y, ax mov byte ptr dword_26002, 4 mov byte ptr word_26006+1, 26h ; '&' call fp_25344 @@ -24058,10 +24043,10 @@ mai_yuki_1A8C9 proc near mov byte ptr word_26006, al mov byte ptr word_25FFA+1, 32h ; '2' mov ax, _yuki_pos.cur.x - mov word ptr dword_25FFC, ax + mov point_25FFC.x, ax mov ax, _yuki_pos.cur.y add ax, (-8 shl 4) - mov word ptr dword_25FFC+2, ax + mov point_25FFC.y, ax mov word ptr dword_26002, 507h mov byte_26001, 0Ah push 31 @@ -24097,10 +24082,10 @@ sub_1A921 proc near mov byte ptr word_26006, al mov byte ptr word_25FFA+1, 32h ; '2' mov ax, _yuki_pos.cur.x - mov word ptr dword_25FFC, ax + mov point_25FFC.x, ax mov ax, _yuki_pos.cur.y add ax, (-8 shl 4) - mov word ptr dword_25FFC+2, ax + mov point_25FFC.y, ax mov byte ptr dword_26002, 20h ; ' ' mov byte ptr word_26006+1, 28h ; '(' call fp_25344 @@ -24131,10 +24116,10 @@ sub_1A96A proc near mov byte ptr word_26006, 0 mov byte ptr word_25FFA+1, 32h ; '2' mov ax, _yuki_pos.cur.x - mov word ptr dword_25FFC, ax + mov point_25FFC.x, ax mov ax, _yuki_pos.cur.y add ax, (-8 shl 4) - mov word ptr dword_25FFC+2, ax + mov point_25FFC.y, ax mov word ptr dword_26002+2, 408h mov byte ptr word_26006+1, 20h ; ' ' call fp_25344 @@ -24165,10 +24150,10 @@ mai_yuki_1A9B3 proc near mov byte ptr word_26006, 40h mov byte ptr word_25FFA+1, 32h ; '2' mov ax, _yuki_pos.cur.x - mov word ptr dword_25FFC, ax + mov point_25FFC.x, ax mov ax, _yuki_pos.cur.y add ax, (-8 shl 4) - mov word ptr dword_25FFC+2, ax + mov point_25FFC.y, ax mov word ptr dword_26002, 0C08h mov byte ptr word_26006+1, 40h call fp_25344 @@ -24200,10 +24185,10 @@ mai_yuki_1AA03 proc near mov byte ptr word_26006, 0 mov byte ptr word_25FFA+1, 30h ; '0' mov ax, _yuki_pos.cur.x - mov word ptr dword_25FFC, ax + mov point_25FFC.x, ax mov ax, _yuki_pos.cur.y add ax, (-8 shl 4) - mov word ptr dword_25FFC+2, ax + mov point_25FFC.y, ax mov word ptr dword_26002+2, 608h mov byte ptr word_26006+1, 20h ; ' ' call fp_25344 @@ -24235,10 +24220,10 @@ mai_yuki_1AA4C proc near mov byte ptr word_26006, al mov byte ptr word_25FFA+1, 0 mov ax, _yuki_pos.cur.x - mov word ptr dword_25FFC, ax + mov point_25FFC.x, ax mov ax, _yuki_pos.cur.y add ax, (-8 shl 4) - mov word ptr dword_25FFC+2, ax + mov point_25FFC.y, ax mov word ptr dword_26002, 202h push 31 call randring2_next16_and @@ -24281,10 +24266,10 @@ loc_1AAAF: add byte_2D084, al mov byte ptr word_25FFA+1, 32h ; '2' mov ax, _yuki_pos.cur.x - mov word ptr dword_25FFC, ax + mov point_25FFC.x, ax mov ax, _yuki_pos.cur.y add ax, (-8 shl 4) - mov word ptr dword_25FFC+2, ax + mov point_25FFC.y, ax mov byte ptr dword_26002, 4 mov byte ptr word_26006+1, 26h ; '&' call fp_25344 @@ -24327,7 +24312,7 @@ var_1 = byte ptr -1 loc_1AB31: mov eax, _yuki_pos.cur - mov dword ptr word_2BC71+1, eax + mov point_2BC72, eax mov word_2BC82, 0Bh mov byte_2BC88, 20h ; ' ' mov ax, _boss_pos.cur.x @@ -24341,11 +24326,11 @@ loc_1AB53: mov [bp+var_1], 0C0h loc_1AB57: - push word_2BC71+1 - push word_2BC74 + push point_2BC72.x + push point_2BC72.y push word ptr [bp+var_1] call sub_15A24 - mov byte ptr word_2BC71, al + mov byte_2BC71, al call sub_17687 call snd_se_play pascal, 15 @@ -24372,7 +24357,7 @@ var_1 = byte ptr -1 loc_1AB88: mov eax, _boss_pos.cur - mov dword ptr word_2BC71+1, eax + mov point_2BC72, eax mov word_2BC82, 9 mov byte_2BC88, 20h ; ' ' mov ax, _boss_pos.cur.x @@ -24386,11 +24371,11 @@ loc_1ABAA: mov [bp+var_1], 0C0h loc_1ABAE: - push word_2BC71+1 - push word_2BC74 + push point_2BC72.x + push point_2BC72.y push word ptr [bp+var_1] call sub_15A24 - mov byte ptr word_2BC71, al + mov byte_2BC71, al call sub_17687 call snd_se_play pascal, 15 @@ -24971,13 +24956,13 @@ loc_1B0FE: push 300h call randring2_next16_mod add ax, _midboss_pos.cur.x - sub ax, 180h - mov word ptr dword_25FFC, ax + sub ax, (24 shl 4) + mov point_25FFC.x, ax push 300h call randring2_next16_mod add ax, _midboss_pos.cur.y - sub ax, 200h - mov word ptr dword_25FFC+2, ax + sub ax, (32 shl 4) + mov point_25FFC.y, ax call sub_15A8E mov al, byte ptr word_26006+1 add al, 10h @@ -25126,7 +25111,7 @@ midboss4_update proc far push bp mov bp, sp mov eax, _midboss_pos.cur - mov dword_25FFC, eax + mov point_25FFC, eax mov dword_2A722, eax inc _midboss_phase_frame mov al, _midboss_phase @@ -25308,14 +25293,11 @@ loc_1B3F6: cmp byte ptr [si], 0 jnz short loc_1B439 mov byte ptr [si], 1 - mov eax, dword ptr word_2BC71+1 + mov eax, point_2BC72 mov [si+2], eax lea ax, [si+0Ah] - push ax - push word_2BC71 - push [bp+var_2] - call vector2_near - mov al, byte ptr word_2BC71 + call vector2_near pascal, ax, word ptr byte_2BC71, [bp+var_2] + mov al, byte_2BC71 mov [si+1], al mov al, byte_2BC88 mov [si+18h], al @@ -25433,7 +25415,7 @@ loc_1B4D2: cmp word ptr [si+4], 0F00h jg short loc_1B52C mov eax, [si+2] - mov dword_25FFC, eax + mov point_25FFC, eax call sub_15A5C loc_1B52C: @@ -25731,27 +25713,27 @@ loc_1B799: add al, 10h mov byte ptr word_26006+1, al call sub_15A5C - push word_2BC71+1 - push word_2BC74 + push point_2BC72.x + push point_2BC72.y push 0 call sub_15A24 - mov byte ptr word_2BC71, al + mov byte_2BC71, al call sub_1B3DD - mov al, byte ptr word_2BC71 + mov al, byte_2BC71 add al, 0F4h - mov byte ptr word_2BC71, al + mov byte_2BC71, al call sub_1B3DD - mov al, byte ptr word_2BC71 + mov al, byte_2BC71 add al, 0F4h - mov byte ptr word_2BC71, al + mov byte_2BC71, al call sub_1B3DD - mov al, byte ptr word_2BC71 + mov al, byte_2BC71 add al, 24h ; '$' - mov byte ptr word_2BC71, al + mov byte_2BC71, al call sub_1B3DD - mov al, byte ptr word_2BC71 + mov al, byte_2BC71 add al, 0Ch - mov byte ptr word_2BC71, al + mov byte_2BC71, al call sub_1B3DD call snd_se_play pascal, 15 @@ -25817,23 +25799,23 @@ loc_1B866: or dx, dx jnz short loc_1B8A6 call sub_1B3DD - mov al, byte ptr word_2BC71 + mov al, byte_2BC71 add al, 40h - mov byte ptr word_2BC71, al + mov byte_2BC71, al call sub_1B3DD - mov al, byte ptr word_2BC71 + mov al, byte_2BC71 add al, 40h - mov byte ptr word_2BC71, al + mov byte_2BC71, al call sub_1B3DD - mov al, byte ptr word_2BC71 + mov al, byte_2BC71 add al, 40h - mov byte ptr word_2BC71, al + mov byte_2BC71, al call sub_1B3DD - mov al, byte ptr word_2BC71 + mov al, byte_2BC71 add al, 40h - mov byte ptr word_2BC71, al + mov byte_2BC71, al mov al, byte_2D083 - add byte ptr word_2BC71, al + add byte_2BC71, al loc_1B8A6: cmp _boss_phase_frame, 64 @@ -26006,9 +25988,9 @@ yuki_update proc far mov bp, sp mov eax, _boss_pos.cur mov _homing_target, eax - mov dword_25FFC, eax + mov point_25FFC, eax mov dword_2A722, eax - mov dword ptr word_2BC71+1, eax + mov point_2BC72, eax inc _boss_phase_frame mov al, _boss_phase mov ah, 0 @@ -26589,7 +26571,7 @@ sub_1BF4D proc near or si, si jnz short loc_1BF9C mov byte_2BC88, 30h ; '0' - mov byte ptr word_2BC71, 80h + mov byte_2BC71, 80h mov word_2BC84, 18h mov word_2BC80, 1 mov word_2BC82, 0D4h @@ -26609,21 +26591,21 @@ loc_1BF9C: idiv bx or dx, dx jnz short loc_1BFD7 - mov al, byte ptr word_2BC71 + mov al, byte_2BC71 add al, 10h - mov byte ptr word_2BC71, al + mov byte_2BC71, al call sub_1B3DD - mov al, byte ptr word_2BC71 + mov al, byte_2BC71 add al, 0F0h - mov byte ptr word_2BC71, al + mov byte_2BC71, al call sub_1B3DD - mov al, byte ptr word_2BC71 + mov al, byte_2BC71 add al, 0F0h - mov byte ptr word_2BC71, al + mov byte_2BC71, al call sub_1B3DD - mov al, byte ptr word_2BC71 + mov al, byte_2BC71 add al, 4 - mov byte ptr word_2BC71, al + mov byte_2BC71, al loc_1BFD7: pop si @@ -26694,19 +26676,19 @@ loc_1C057: idiv bx or dx, dx jnz short loc_1C0AD - push word_2BC71+1 - push word_2BC74 + push point_2BC72.x + push point_2BC72.y push 20h ; ' ' call sub_15A24 - mov byte ptr word_2BC71, al + mov byte_2BC71, al call sub_1B3DD - mov al, byte ptr word_2BC71 + mov al, byte_2BC71 add al, 0E0h - mov byte ptr word_2BC71, al + mov byte_2BC71, al call sub_1B3DD - mov al, byte ptr word_2BC71 + mov al, byte_2BC71 add al, 0E0h - mov byte ptr word_2BC71, al + mov byte_2BC71, al call sub_1B3DD loc_1C0AD: @@ -26825,7 +26807,7 @@ sub_1C194 proc near mov byte_2BC88, 1Ch mov word_2BC84, 6 mov word_2BC80, 1 - mov byte ptr word_2BC71, 80h + mov byte_2BC71, 80h mov word_2BC82, 0D4h jmp short loc_1C239 ; --------------------------------------------------------------------------- @@ -26847,7 +26829,7 @@ loc_1C1C1: or dx, dx jnz short loc_1C239 mov al, byte_2D080 - mov byte ptr word_2BC71, al + mov byte_2BC71, al call sub_1B3DD mov al, byte_2D081 add byte_2D080, al @@ -27210,10 +27192,10 @@ sub_1C518 proc far push si mov eax, _boss_pos.cur mov _homing_target, eax - mov dword_25FFC, eax + mov point_25FFC, eax mov dword_2A722, eax mov _laser_template.coords.origin, eax - mov dword ptr word_2BC71+1, eax + mov point_2BC72, eax inc _boss_phase_frame mov al, _boss_phase mov ah, 0 @@ -27550,20 +27532,17 @@ loc_1C848: cmp byte ptr [si], 0 jnz short loc_1C896 mov byte ptr [si], 1 - mov eax, dword ptr word_2BC71+1 + mov eax, point_2BC72 mov [si+2], eax - push word_2BC71+1 - push word_2BC74 + push point_2BC72.x + push point_2BC72.y call circles_add_shrinking lea ax, [si+0Ah] - push ax - push word_2BC71 - push [bp+var_2] - call vector2_near - mov al, byte ptr word_2BC71 + call vector2_near pascal, ax, word ptr byte_2BC71, [bp+var_2] + mov al, byte_2BC71 mov [si+1], al push 0C1h - push word_2BC71 + push word ptr byte_2BC71 call sub_159E6 mov ah, 0 mov [si+12h], ax @@ -27745,13 +27724,7 @@ arg_2 = word ptr 6 jnz short loc_1C9E7 call randring2_next16 mov [bp+var_1], al - push ds - push offset _boss_pos.velocity.x - push ds - push offset _boss_pos.velocity.y - push word ptr [bp+var_1] - push [bp+arg_2] - call vector2 + call vector2 pascal, ds, offset _boss_pos.velocity.x, ds, offset _boss_pos.velocity.y, word ptr [bp+var_1], [bp+arg_2] mov _boss_sprite, 188 loc_1C9E7: @@ -27809,7 +27782,7 @@ sub_1CA42 proc near mov _boss_sprite, 184 mov word_2BC7E, 30h ; '0' mov byte_2BC88, 50h ; 'P' - mov byte ptr word_2BC71, 70h ; 'p' + mov byte_2BC71, 70h ; 'p' push 1 call randring2_next16_and mov byte_2D085, al @@ -27829,15 +27802,15 @@ loc_1CA6B: cmp byte_2D085, 0 jz short loc_1CA8F mov al, 80h - sub al, byte ptr word_2BC71 - mov byte ptr word_2BC71, al + sub al, byte_2BC71 + mov byte_2BC71, al loc_1CA8F: - push 0B292h + push offset point_2BC72 push _boss_pos.cur.x push _boss_pos.cur.y push (48 shl 4) - mov al, byte ptr word_2BC71 + mov al, byte_2BC71 mov ah, 0 push ax call vector2_at @@ -27845,14 +27818,14 @@ loc_1CA8F: cmp byte_2D085, 0 jz short loc_1CABB mov al, 80h - sub al, byte ptr word_2BC71 - mov byte ptr word_2BC71, al + sub al, byte_2BC71 + mov byte_2BC71, al loc_1CABB: - mov al, byte ptr word_2BC71 + mov al, byte_2BC71 add al, 0FAh - mov byte ptr word_2BC71, al - cmp byte ptr word_2BC71, 0Ch + mov byte_2BC71, al + cmp byte_2BC71, 0Ch ja short loc_1CAD5 mov _boss_phase_frame, 0 mov _boss_mode, 0 @@ -27900,7 +27873,7 @@ loc_1CB23: jnz short loc_1CB5D call randring2_next16 mov byte ptr word_26006, al - push 561Ch + push offset point_25FFC push _boss_pos.cur.x push _boss_pos.cur.y push (32 shl 4) @@ -27970,19 +27943,19 @@ loc_1CBD2: jle short loc_1CC3E test si, 1 jnz short loc_1CC3E - sub word ptr dword_25FFC, 200h - sub word ptr dword_25FFC+2, 100h + sub point_25FFC.x, (32 shl 4) + sub point_25FFC.y, (16 shl 4) or si, si jnz short loc_1CC1F - push word ptr dword_25FFC - push word ptr dword_25FFC+2 + push point_25FFC.x + push point_25FFC.y push 0 call sub_15A24 mov byte_2D085, al - mov ax, word ptr dword_25FFC - add ax, 400h + mov ax, point_25FFC.x + add ax, (64 shl 4) push ax - push word ptr dword_25FFC+2 + push point_25FFC.y push 0 call sub_15A24 mov byte_2D084, al @@ -27991,7 +27964,7 @@ loc_1CC1F: mov al, byte_2D085 mov byte ptr word_26006, al call sub_15A5C - add word ptr dword_25FFC, 400h + add point_25FFC.x, (64 shl 4) mov al, byte_2D084 mov byte ptr word_26006, al call sub_15A5C @@ -28013,16 +27986,16 @@ loc_1CC3E: mov [bp+var_1], al push 600h call randring2_next16_mod - mov word_2BC74, ax + mov point_2BC72.y, ax push 1600h call randring2_next16_mod - add ax, 100h - mov word_2BC71+1, ax + add ax, (16 shl 4) + mov point_2BC72.x, ax push ax - push word_2BC74 + push point_2BC72.y push word ptr [bp+var_1] call sub_15A24 - mov byte ptr word_2BC71, al + mov byte_2BC71, al call sub_1C82A loc_1CC7F: @@ -28090,7 +28063,7 @@ loc_1CD26: or dx, dx jnz loc_1CDF8 mov byte ptr word_25FFA+1, 2Ch ; ',' - push 561Ch + push offset point_25FFC push _boss_pos.cur.x push _boss_pos.cur.y push (48 shl 4) @@ -28102,7 +28075,7 @@ loc_1CD26: add al, byte_2D084 mov byte ptr word_26006, al call sub_15A70 - push 561Ch + push offset point_25FFC push _boss_pos.cur.x push _boss_pos.cur.y push (48 shl 4) @@ -28119,7 +28092,7 @@ loc_1CD26: mov al, byte_2D085 neg al mov byte_2D085, al - push 561Ch + push offset point_25FFC push _boss_pos.cur.x push _boss_pos.cur.y push (32 shl 4) @@ -28130,7 +28103,7 @@ loc_1CD26: sub al, byte_2D084 mov byte ptr word_26006, al call sub_15A70 - push 561Ch + push offset point_25FFC push _boss_pos.cur.x push _boss_pos.cur.y push (32 shl 4) @@ -28202,7 +28175,7 @@ loc_1CE63: idiv bx or dx, dx jnz short loc_1CEC4 - push 561Ch + push offset point_25FFC push _boss_pos.cur.x push _boss_pos.cur.y push (48 shl 4) @@ -28212,7 +28185,7 @@ loc_1CE63: call vector2_at mov byte ptr dword_26002, 5 call sub_15A5C - push 561Ch + push offset point_25FFC push _boss_pos.cur.x push _boss_pos.cur.y push (48 shl 4) @@ -28291,19 +28264,19 @@ loc_1CF57: jle short loc_1CFC3 test di, 1 jnz short loc_1CFC3 - sub word ptr dword_25FFC, 200h - sub word ptr dword_25FFC+2, 100h + sub point_25FFC.x, (32 shl 4) + sub point_25FFC.y, (16 shl 4) or di, di jnz short loc_1CFA4 - push word ptr dword_25FFC - push word ptr dword_25FFC+2 + push point_25FFC.x + push point_25FFC.y push 0 call sub_15A24 mov byte_2D085, al - mov ax, word ptr dword_25FFC - add ax, 400h + mov ax, point_25FFC.x + add ax, (64 shl 4) push ax - push word ptr dword_25FFC+2 + push point_25FFC.y push 0 call sub_15A24 mov byte_2D084, al @@ -28312,7 +28285,7 @@ loc_1CFA4: mov al, byte_2D085 mov byte ptr word_26006, al call sub_15A5C - add word ptr dword_25FFC, 400h + add point_25FFC.x, (64 shl 4) mov al, byte_2D084 mov byte ptr word_26006, al call sub_15A5C @@ -28350,16 +28323,16 @@ loc_1CFFA: mov [bp+var_1], al push 600h call randring2_next16_mod - mov word_2BC74, ax + mov point_2BC72.y, ax push 1600h call randring2_next16_mod - add ax, 100h - mov word_2BC71+1, ax + add ax, (16 shl 4) + mov point_2BC72.x, ax push ax - push word_2BC74 + push point_2BC72.y push word ptr [bp+var_1] call sub_15A24 - mov byte ptr word_2BC71, al + mov byte_2BC71, al call sub_1C82A inc si @@ -28450,19 +28423,19 @@ loc_1D117: or dx, dx jnz loc_1D1C4 mov al, byte_2D084 - mov byte ptr word_2BC71, al + mov byte_2BC71, al cmp byte_2D084, 0 jnz short loc_1D142 - mov word_2BC71+1, 100h + mov point_2BC72.x, (16 shl 4) jmp short loc_1D148 ; --------------------------------------------------------------------------- loc_1D142: - mov word_2BC71+1, 1700h + mov point_2BC72.x, (368 shl 4) loc_1D148: mov ax, _boss2_pos.cur.y - mov word_2BC74, ax + mov point_2BC72.y, ax call sub_1C82A mov al, byte_2D085 mov ah, 0 @@ -28495,8 +28468,8 @@ loc_1D17C: inc byte_2D083 cmp byte_2D083, 5 ja loc_1D110 - push word ptr dword_25FFC - push word ptr dword_25FFC+2 + push point_25FFC.x + push point_25FFC.y push 0 call sub_15A24 mov byte ptr word_26006, al @@ -28589,9 +28562,9 @@ yumeko_update proc far push si mov eax, _boss_pos.cur mov _homing_target, eax - mov dword_25FFC, eax + mov point_25FFC, eax mov dword_2A722, eax - mov dword ptr word_2BC71+1, eax + mov point_2BC72, eax inc _boss_phase_frame mov al, _boss_phase mov ah, 0 @@ -28891,13 +28864,10 @@ loc_1D553: cmp byte ptr [si], 0 jnz short loc_1D57E mov byte ptr [si], 1 - mov eax, dword ptr word_2BC71+1 + mov eax, point_2BC72 mov [si+2], eax lea ax, [si+0Ah] - push ax - push word_2BC71 - push [bp+var_2] - call vector2_near + call vector2_near pascal, ax, word ptr byte_2BC71, [bp+var_2] mov ax, word_2BC82 mov [si+12h], ax mov word ptr [si+10h], 300h @@ -29130,7 +29100,7 @@ loc_1D719: idiv bx or dx, dx jnz short loc_1D766 - push 561Ch + push offset point_25FFC push _boss_pos.cur.x push _boss_pos.cur.y push (32 shl 4) @@ -29231,10 +29201,10 @@ loc_1D805: or dx, dx jnz short loc_1D82E mov byte ptr word_25FFA+1, 34h ; '4' - sub word ptr dword_25FFC, 100h + sub point_25FFC.x, (16 shl 4) call sub_15A5C mov byte ptr word_25FFA+1, 74h ; 't' - add word ptr dword_25FFC, 200h + add point_25FFC.x, (32 shl 4) call sub_15A5C loc_1D82E: @@ -29363,13 +29333,13 @@ loc_1D972: call randring2_next16_mod add ax, _boss_pos.cur.x sub ax, (128 shl 4) - mov word ptr dword_25FFC, ax + mov point_25FFC.x, ax push 400h call randring2_next16_mod mov dx, _boss_pos.cur.y sub dx, ax add dx, (16 shl 4) - mov word ptr dword_25FFC+2, dx + mov point_25FFC.y, dx push 60h call randring2_next16_mod add al, 10h @@ -29462,12 +29432,12 @@ sub_1DA1C proc near jnz short loc_1DA6A push 1800h call randring2_next16_mod - mov word_2BC71+1, ax + mov point_2BC72.x, ax push 400h call randring2_next16_mod - add ax, 200h - mov word_2BC74, ax - mov byte ptr word_2BC71, 40h + add ax, (32 shl 4) + mov point_2BC72.y, ax + mov byte_2BC71, 40h push 1Fh call randring2_next16_and add al, 30h ; '0' @@ -29487,12 +29457,12 @@ loc_1DA6A: call randring2_next16_mod add ax, _boss_pos.cur.x sub ax, (128 shl 4) - mov word ptr dword_25FFC, ax + mov point_25FFC.x, ax push (64 shl 4) call randring2_next16_mod mov dx, _boss_pos.cur.y sub dx, ax - mov word ptr dword_25FFC+2, dx + mov point_25FFC.y, dx mov byte ptr word_25FFA, 12h mov byte ptr word_25FFA+1, 2Ch ; ',' mov byte_26000, 3 @@ -29563,7 +29533,7 @@ loc_1DB10: push 3 call randring2_next16_mod shl al, 6 - mov byte ptr word_2BC71, al + mov byte_2BC71, al call sub_17687 call snd_se_play pascal, 3 @@ -29619,18 +29589,18 @@ loc_1DBCA: push (256 shl 4) call randring2_next16_mod add ax, _boss_pos.cur.x - sub ax, 800h - mov word_2BC71+1, ax + sub ax, (128 shl 4) + mov point_2BC72.x, ax push (64 shl 4) call randring2_next16_mod mov dx, _boss_pos.cur.y sub dx, ax add dx, (16 shl 4) - mov word_2BC74, dx + mov point_2BC72.y, dx push 40h call randring2_next16_mod add al, 20h ; ' ' - mov byte ptr word_2BC71, al + mov byte_2BC71, al push 3Fh ; '?' call randring2_next16_and add al, 20h ; ' ' @@ -29694,11 +29664,11 @@ loc_1DC59: idiv bx or dx, dx jnz short loc_1DC93 - push word_2BC71+1 - push word_2BC74 + push point_2BC72.x + push point_2BC72.y push 0 call sub_15A24 - mov byte ptr word_2BC71, al + mov byte_2BC71, al mov byte_2BC88, 40h mov word_2BC82, 0C9h call sub_1D53A @@ -29710,7 +29680,7 @@ loc_1DC93: idiv bx or dx, dx jnz short loc_1DCFD - sub word ptr dword_25FFC, 800h + sub point_25FFC.x, (128 shl 4) mov byte_26000, 2 mov byte_26001, 0Ah mov word ptr dword_26002, 203h @@ -29737,7 +29707,7 @@ loc_1DCE1: mov al, 80h sub al, byte ptr word_26006 mov byte ptr word_26006, al - add word ptr dword_25FFC, 1000h + add point_25FFC.x, (256 shl 4) call sub_15A70 call snd_se_play pascal, 15 @@ -29829,20 +29799,20 @@ loc_1DDF2: loc_1DDF7: mov byte ptr dword_26002+1, 30h ; '0' mov byte ptr word_26006+1, 70h ; 'p' - add word ptr dword_25FFC, 600h + add point_25FFC.x, (96 shl 4) mov al, byte_2D085 mov byte ptr word_26006, al call sub_15A8E - sub word ptr dword_25FFC, 400h + sub point_25FFC.x, (64 shl 4) mov al, byte_2D084 mov byte ptr word_26006, al call sub_15A8E - sub word ptr dword_25FFC, 400h + sub point_25FFC.x, (64 shl 4) mov al, 80h sub al, byte_2D084 mov byte ptr word_26006, al call sub_15A8E - sub word ptr dword_25FFC, 400h + sub point_25FFC.x, (64 shl 4) mov al, 80h sub al, byte_2D085 mov byte ptr word_26006, al @@ -29865,19 +29835,19 @@ loc_1DE5D: mov al, byte_2D085 add al, 80h mov byte ptr word_26006, al - add word ptr dword_25FFC, 0C00h + add point_25FFC.x, (192 shl 4) call sub_15A8E - sub word ptr dword_25FFC, 400h + sub point_25FFC.x, (64 shl 4) mov al, byte_2D084 add al, 80h mov byte ptr word_26006, al call sub_15A8E - sub word ptr dword_25FFC, 400h + sub point_25FFC.x, (64 shl 4) mov al, 0 sub al, byte_2D084 mov byte ptr word_26006, al call sub_15A8E - sub word ptr dword_25FFC, 400h + sub point_25FFC.x, (64 shl 4) mov al, 0 sub al, byte_2D085 mov byte ptr word_26006, al @@ -29919,18 +29889,18 @@ loc_1DEEA: call randring2_next16_mod add ax, _boss_pos.cur.x sub ax, (128 shl 4) - mov word_2BC71+1, ax + mov point_2BC72.x, ax push (64 shl 4) call randring2_next16_mod mov dx, _boss_pos.cur.y sub dx, ax add dx, (16 shl 4) - mov word_2BC74, dx - push word_2BC71+1 + mov point_2BC72.y, dx + push point_2BC72.x push dx push 0 call sub_15A24 - mov byte ptr word_2BC71, al + mov byte_2BC71, al mov byte_2BC88, 3Ch ; '<' mov word_2BC82, 0C9h call sub_1D53A @@ -30035,7 +30005,7 @@ sub_1E022 proc near jl loc_1E15A cmp _boss_phase_frame, 128 jnz short loc_1E047 - mov byte ptr word_2BC71, 0 + mov byte_2BC71, 0 mov byte_2D085, 0 mov byte_2D084, 0 @@ -30047,19 +30017,19 @@ loc_1E047: or dx, dx jnz short loc_1E0A6 mov word_2BC82, 0C8h - push 0B292h + push offset point_2BC72 push _boss_pos.cur.x push _boss_pos.cur.y push (64 shl 4) - mov al, byte ptr word_2BC71 + mov al, byte_2BC71 mov ah, 0 push ax call vector2_at call sub_1D53A - mov al, byte ptr word_2BC71 + mov al, byte_2BC71 add al, 80h - mov byte ptr word_2BC71, al - push 0B292h + mov byte_2BC71, al + push offset point_2BC72 push _boss_pos.cur.x push _boss_pos.cur.y push (64 shl 4) @@ -30067,9 +30037,9 @@ loc_1E047: push ax call vector2_at call sub_1D53A - mov al, byte ptr word_2BC71 + mov al, byte_2BC71 add al, 88h - mov byte ptr word_2BC71, al + mov byte_2BC71, al call snd_se_play pascal, 3 loc_1E0A6: @@ -30189,10 +30159,10 @@ shinki_update proc far push di mov eax, _boss_pos.cur mov _homing_target, eax - mov dword_25FFC, eax + mov point_25FFC, eax mov dword_2A722, eax mov _laser_template.coords.origin, eax - mov dword ptr word_2BC71+1, eax + mov point_2BC72, eax inc _boss_phase_frame mov al, _boss_phase mov ah, 0 @@ -30584,7 +30554,7 @@ loc_1E580: mov si, ax push offset _midboss_pos.velocity push word ptr _midboss_angle - mov ax, 40h + mov ax, (4 shl 4) sub ax, si push ax call vector2_near @@ -30813,7 +30783,7 @@ midbossx_update proc far push bp mov bp, sp mov eax, _midboss_pos.cur - mov dword_25FFC, eax + mov point_25FFC, eax mov dword_2A722, eax inc _midboss_phase_frame mov al, _midboss_phase @@ -31242,13 +31212,13 @@ loc_1EAA9: jnz short loc_1EAE3 push 600h call randring2_next16_mod - add ax, word ptr dword_25FFC - sub ax, 300h + add ax, point_25FFC.x + sub ax, (48 shl 4) mov word_2CE52, ax push 400h call randring2_next16_mod - add ax, word ptr dword_25FFC+2 - sub ax, 200h + add ax, point_25FFC.y + sub ax, (32 shl 4) mov word_2CE54, ax push word_2CE52 push ax @@ -31258,9 +31228,9 @@ loc_1EAA9: loc_1EAE3: mov ax, word_2CE52 - mov word ptr dword_25FFC, ax + mov point_25FFC.x, ax mov ax, word_2CE54 - mov word ptr dword_25FFC+2, ax + mov point_25FFC.y, ax mov byte ptr word_25FFA, 12h mov al, byte_2D085 mov byte ptr word_26006, al @@ -31349,14 +31319,14 @@ sub_1EB52 proc near mov byte ptr word_25FFA, 12h push 600h call randring2_next16_mod - sub ax, 300h - add ax, word ptr dword_25FFC - mov word ptr dword_25FFC, ax + sub ax, (48 shl 4) + add ax, point_25FFC.x + mov point_25FFC.x, ax push 400h call randring2_next16_mod - sub ax, 200h - add ax, word ptr dword_25FFC+2 - mov word ptr dword_25FFC+2, ax + sub ax, (32 shl 4) + add ax, point_25FFC.y + mov point_25FFC.y, ax mov byte ptr word_25FFA+1, 0 mov byte_26000, 7 mov byte ptr word_26006+1, 30h ; '0' @@ -31615,9 +31585,9 @@ sub_1EDC1 proc near mov byte ptr word_25FFA+1, 44h ; 'D' push 300h call randring2_next16_mod - sub ax, 180h - add ax, word ptr dword_25FFC - mov word ptr dword_25FFC, ax + sub ax, (24 shl 4) + add ax, point_25FFC.x + mov point_25FFC.x, ax mov byte ptr word_26006, 0 call sub_15A70 call snd_se_play pascal, 3 @@ -31754,20 +31724,20 @@ sub_1EEF1 proc near idiv bx or dx, dx jnz short loc_1EF54 - push word_2BC71+1 - push word_2BC74 + push point_2BC72.x + push point_2BC72.y push 20h ; ' ' jmp short loc_1EF5F ; --------------------------------------------------------------------------- loc_1EF54: - push word_2BC71+1 - push word_2BC74 + push point_2BC72.x + push point_2BC72.y push 0E0h loc_1EF5F: call sub_15A24 - mov byte ptr word_2BC71, al + mov byte_2BC71, al call sub_17687 call snd_se_play pascal, 15 @@ -31808,20 +31778,20 @@ sub_1EF80 proc near idiv bx or dx, dx jnz short loc_1EFB4 - push word_2BC71+1 - push word_2BC74 + push point_2BC72.x + push point_2BC72.y push 40h jmp short loc_1EFBF ; --------------------------------------------------------------------------- loc_1EFB4: - push word_2BC71+1 - push word_2BC74 + push point_2BC72.x + push point_2BC72.y push 0C0h loc_1EFBF: call sub_15A24 - mov byte ptr word_2BC71, al + mov byte_2BC71, al call sub_17687 call snd_se_play pascal, 15 @@ -31854,13 +31824,13 @@ sub_1EF80 endp sub_1EFED proc near push bp mov bp, sp - add word ptr dword_25FFC+2, 680h + add point_25FFC.y, (104 shl 4) mov ax, word_22872 - mov word ptr dword_25FFC, ax + mov point_25FFC.x, ax mov word ptr dword_2A722, ax cmp _boss_phase_frame, 64 jnz short loc_1F045 - mov byte ptr word_2BC71, 0C4h + mov byte_2BC71, 0C4h mov byte ptr word_26006, 20h ; ' ' mov byte_2BC88, 50h ; 'P' mov byte ptr word_26006+1, 30h ; '0' @@ -31883,7 +31853,7 @@ loc_1F045: or dx, dx jnz loc_1F137 mov byte_2A72E, 0Eh - mov ax, word ptr dword_25FFC+2 + mov ax, point_25FFC.y mov word ptr dword_2A722+2, ax mov word_2A72A, 1000h mov ax, _boss_phase_frame @@ -31917,7 +31887,7 @@ loc_1F08C: idiv bx or dx, dx jnz short loc_1F0D0 - mov ax, word ptr dword_25FFC+2 + mov ax, point_25FFC.y mov word ptr dword_2A722+2, ax mov word_2A72A, 800h mov ax, _boss_phase_frame @@ -32145,10 +32115,10 @@ exalice_update proc far loc_1F298: mov eax, _boss_pos.cur mov _homing_target, eax - mov dword_25FFC, eax + mov point_25FFC, eax mov dword_2A722, eax mov _laser_template.coords.origin, eax - mov dword ptr word_2BC71+1, eax + mov point_2BC72, eax inc _boss_phase_frame mov al, _boss_phase mov ah, 0 @@ -32713,13 +32683,13 @@ sub_1F7BA proc near push 400h call randring2_next16_mod sub ax, 200h - add ax, word ptr dword_25FFC - mov word ptr dword_25FFC, ax + add ax, point_25FFC.x + mov point_25FFC.x, ax push 400h call randring2_next16_mod - sub ax, 200h - add ax, word ptr dword_25FFC+2 - mov word ptr dword_25FFC+2, ax + sub ax, (32 shl 4) + add ax, point_25FFC.y + mov point_25FFC.y, ax call randring2_next16 mov byte ptr word_26006, al call sub_15A5C @@ -32788,7 +32758,7 @@ midboss5_update proc far push bp mov bp, sp mov eax, _midboss_pos.cur - mov dword_25FFC, eax + mov point_25FFC, eax mov dword_2A722, eax inc _midboss_phase_frame mov al, _midboss_phase @@ -34420,8 +34390,7 @@ fp_2429C dw ? include th04/formats/bb_playchar[bss].asm db ? ; db ? ; -word_242A2 dw ? -word_242A4 dw ? +point_242A2 Point dw ? word_242A8 dw ? byte_242AA db ? @@ -34550,10 +34519,8 @@ byte_242AA db ? db ? ; db ? ; db ? ; -word_24490 dw ? -word_24492 dw ? -word_24494 dw ? -word_24496 dw ? +point_24490 Point +point_24494 Point byte_24498 db ? db ? include th04/boss/backdrop[bss].asm @@ -34996,8 +34963,9 @@ fp_25344 dw ? byte_25346 db ? byte_25347 db ? byte_25348 db ? -word_25349 dw ? -dword_2534B dd ? +byte_25349 db ? +byte_2534A db ? +point_2534B Point db ? lives db ? bombs db ? @@ -35021,7 +34989,7 @@ dword_25FF4 dd ? byte_25FF8 db ? db ? word_25FFA dw ? -dword_25FFC dd ? +point_25FFC Point byte_26000 db ? byte_26001 db ? dword_26002 dd ? @@ -40226,9 +40194,8 @@ include th04/circles[bss].asm dd ? ; include th04/item/items[bss].asm byte_2BC70 db ? -word_2BC71 dw ? - db ? -word_2BC74 dw ? +byte_2BC71 db ? +point_2BC72 Point dword_2BC76 dd ? dd ? ; word_2BC7E dw ? @@ -40240,8 +40207,8 @@ byte_2BC88 db ? db ? byte_2BC8A db ? byte_2BC8B db ? -dword_2BC8C dd ? -dword_2BC90 dd ? +point_2BC8C Point +point_2BC90 Point dd ? word_2BC98 dw ? word_2BC9A dw ? diff --git a/th05_maine.asm b/th05_maine.asm index 97e88276..55afff1c 100644 --- a/th05_maine.asm +++ b/th05_maine.asm @@ -5931,10 +5931,10 @@ loc_D53E: idiv bx add dx, 5Ch mov [si+0Eh], dx - push 50D2h - push word_156E4 - push word_156E8 - push 0C0h + push offset point_151D2 + push x_156E4 + push y_156E8 + push (12 shl 4) mov al, [si+12h] mov ah, 0 push ax @@ -5947,9 +5947,9 @@ loc_D53E: mov ah, 0 push ax call vector2_at - movsx eax, word_151D2 + movsx eax, point_151D2.x mov [si], eax - movsx eax, word_151D4 + movsx eax, point_151D2.y mov [si+4], eax inc di add si, 14h @@ -6228,7 +6228,7 @@ loc_D7F2: loc_D7F8: cmp [bp+var_2], 30h ; '0' jl loc_D73A - mov si, 55E4h + mov si, offset x_156E4 cmp dword ptr [si], 0FFFFC190h jz short loc_D83F mov ax, [si+8] @@ -6283,17 +6283,17 @@ sub_D853 proc near and al, 7Fh mov [si+12h], al mov word ptr [si+0Eh], 30h ; '0' - push 50D2h - push word_156E4 - push word_156E8 - push 0C0h + push offset point_151D2 + push x_156E4 + push y_156E8 + push (12 shl 4) mov al, [si+12h] mov ah, 0 push ax call vector2_at - movsx eax, word_151D2 + movsx eax, point_151D2.x mov [si], eax - movsx eax, word_151D4 + movsx eax, point_151D2.y mov [si+4], eax cmp word_1183C, 40h jl short loc_D8B3 @@ -6335,9 +6335,9 @@ loc_D8BE: loc_D8E3: or dx, dx jge short loc_D8BE - mov ax, word_156E4 + mov ax, x_156E4 mov word_156F8, ax - mov ax, word_156E8 + mov ax, y_156E8 mov word_156FA, ax pop bp retn @@ -11688,8 +11688,7 @@ byte_151CC db ? db ? word_151CE dw ? word_151D0 dw ? -word_151D2 dw ? -word_151D4 dw ? +point_151D2 Point word_151D6 dw ? word_151D8 dw ? word_151DA dw ? @@ -12017,9 +12016,9 @@ word_151E2 dw ? dd ? ; dd ? ; dd ? ; -word_156E4 dw ? +x_156E4 dw ? dw ? -word_156E8 dw ? +y_156E8 dw ? dw ? word_156EC dw ? dd ? ;