2017-01-22 20:22:00 +00:00
|
|
|
AS = tasm32 /m /mx /kh32768 /t
|
|
|
|
CXX32 = bcc32
|
|
|
|
|
|
|
|
# Silence incorrect warnings for Borland C++ 5.5
|
|
|
|
# ----------------------------------------------
|
|
|
|
# 'identifier' is assigned a value that is never used
|
|
|
|
CXX32FLAGS += -w-8004
|
|
|
|
# Comparing signed and unsigned values
|
|
|
|
CXX32FLAGS += -w-8012
|
|
|
|
# ----------------------------------------------
|
|
|
|
|
|
|
|
CXX32FLAGS += -O2 -v- -x-
|
|
|
|
|
2020-08-31 12:12:20 +00:00
|
|
|
# Backslashes necessary for the .bat file generated by `tup generate`!
|
|
|
|
BMP2ARR = bin\\Pipeline\\bmp2arr.exe
|
2017-01-22 20:22:00 +00:00
|
|
|
|
|
|
|
: Pipeline\\bmp2arr.c Pipeline\\bmp2arrl.c \
|
|
|
|
|> $(CXX32) $(CXX32FLAGS) -nbin/Pipeline/ %f \
|
|
|
|
|> bin/Pipeline/bmp2arrl.obj \
|
|
|
|
bin/Pipeline/bmp2arr.obj \
|
|
|
|
bin/Pipeline/bmp2arr.tds \
|
|
|
|
$(BMP2ARR)
|
|
|
|
|
2020-09-04 20:50:16 +00:00
|
|
|
!bmp2arr = | $(BMP2ARR) |> $(BMP2ARR) -q -i %f -o %o |> %o
|
2017-01-22 20:22:00 +00:00
|
|
|
|
2020-09-27 19:45:32 +00:00
|
|
|
: th01/sprites/ileave_m.bmp |> !bmp2arr -sym _sINTERLEAVE_MASKS -of asm -sw 8 -sh 8 |> th01/sprites/ileave_m.asp
|
2020-10-03 14:46:14 +00:00
|
|
|
|
|
|
|
# ZUN bug: Supposed to be 8 preshifted sprites, with a height of 1 and a width
|
|
|
|
# of SHOOTOUT_LASER_MAX_W pixels each, but ZUN messed up a single pixel in the
|
|
|
|
# first pre-shifted sprite. So, we're forced to manually unroll them…
|
|
|
|
: th01/sprites/laser_s.bmp |> !bmp2arr -sym _sSHOOTOUT_LASER -of asm -sw 16 -sh 8 |> th01/sprites/laser_s.asp
|
|
|
|
|
2017-01-22 20:22:00 +00:00
|
|
|
: th01/sprites/pellet.bmp |> !bmp2arr -sym sPELLET -of c -sw 8 -sh 8 -pshf inner |> th01/sprites/pellet.csp
|
|
|
|
: th01/sprites/pellet_c.bmp |> !bmp2arr -sym _sPELLET_CLOUD -of asm -sw 16 -sh 16 |> th01/sprites/pellet_c.asp
|
|
|
|
: th01/sprites/shape8x8.bmp |> !bmp2arr -sym _sSHAPE8X8 -of asm -sw 8 -sh 8 |> th01/sprites/shape8x8.asp
|
2020-09-25 17:27:33 +00:00
|
|
|
: th01/sprites/shape_in.bmp |> !bmp2arr -sym _sSHAPE_INVINCIBILITY -of asm -sw 8 -sh 8 |> th01/sprites/shape_in.asp
|
2017-01-22 20:22:00 +00:00
|
|
|
: th02/sprites/pellet.bmp |> !bmp2arr -sym _sPELLET -of asm -sw 8 -sh 8 -pshf outer |> th02/sprites/pellet.asp
|
|
|
|
: th02/sprites/sparks.bmp |> !bmp2arr -sym _sSPARKS -of asm -sw 8 -sh 8 -pshf outer |> th02/sprites/sparks.asp
|
|
|
|
: th02/sprites/pointnum.bmp |> !bmp2arr -sym _sPOINTNUMS -of asm -sw 8 -sh 8 |> th02/sprites/pointnum.asp
|
|
|
|
: th03/sprites/score.bmp |> !bmp2arr -sym _sSCORE_FONT -of asm -sw 8 -sh 8 -u |> th03/sprites/score.asp
|
|
|
|
: th04/sprites/pelletbt.bmp |> !bmp2arr -sym _sPELLET_BOTTOM -of asm -sw 8 -sh 4 -pshf outer |> th04/sprites/pelletbt.asp
|
|
|
|
: th04/sprites/pointnum.bmp |> !bmp2arr -sym _sPOINTNUMS -of asm -sw 8 -sh 8 -pshf inner |> th04/sprites/pointnum.asp
|
|
|
|
: th05/sprites/gaiji.bmp |> !bmp2arr -sym _sGAIJI -of asm -sw 16 -sh 16 |> th05/sprites/gaiji.asp
|
|
|
|
: th05/sprites/piano_l.bmp |> !bmp2arr -sym _sPIANO_LABEL_FONT -of asm -sw 8 -sh 8 |> th05/sprites/piano_l.asp
|
|
|
|
|
2020-09-05 23:12:42 +00:00
|
|
|
!as = |> $(AS) %f %o |> bin\\%B.obj
|
2020-12-20 17:47:43 +00:00
|
|
|
!as2 = |> $(AS) /dGAME=2 th02\%b %o |> bin\\th02\\%B.obj
|
2020-09-05 23:40:03 +00:00
|
|
|
!as3 = |> $(AS) /dGAME=3 th03\%b %o |> bin\\th03\\%B.obj
|
2020-09-05 23:12:42 +00:00
|
|
|
!as4 = |> $(AS) /dGAME=4 th04\%b %o |> bin\\th04\\%B.obj
|
|
|
|
!as5 = |> $(AS) /dGAME=5 th05\%b %o |> bin\\th05\\%B.obj
|
|
|
|
|
|
|
|
# Third-party libraries
|
|
|
|
: libs\\piloadc\\piloadc.asm |> $(AS) /ml libs\piloadc\%b %o |> bin\\%B.obj
|
|
|
|
|
|
|
|
# ZUN.COM
|
|
|
|
: zuncom\\zun_stub.asm |> $(AS) zuncom\%b %o |> bin\\zuncom\\%B.obj
|
|
|
|
: zuncom\\cstmstub.asm |> $(AS) zuncom\%b %o |> bin\\zuncom\\%B.obj
|
2017-01-22 20:22:00 +00:00
|
|
|
|
|
|
|
: th01_op.asm |> !as |> bin\\th01\\op.obj
|
|
|
|
: th01_reiiden.asm | \
|
2020-09-27 19:45:32 +00:00
|
|
|
th01/sprites/ileave_m.asp \
|
2020-10-03 14:46:14 +00:00
|
|
|
th01/sprites/laser_s.asp \
|
2017-01-22 20:22:00 +00:00
|
|
|
th01/sprites/pellet_c.asp \
|
|
|
|
th01/sprites/shape8x8.asp \
|
2020-09-25 17:27:33 +00:00
|
|
|
th01/sprites/shape_in.asp \
|
2017-01-22 20:22:00 +00:00
|
|
|
|> !as |> bin\\th01\\reiiden.obj
|
|
|
|
: th01_fuuin.asm |> !as |> bin\\th01\\fuuin.obj
|
|
|
|
|
|
|
|
: th02_zuninit.asm |> !as |> bin\\th02\\zuninit.obj
|
2020-12-20 17:47:43 +00:00
|
|
|
: th02\\snd_se.asm |> !as2 |>
|
2021-01-28 19:43:49 +00:00
|
|
|
: th02\\snd_mmdr.asm |> !as2 |>
|
2017-01-22 20:22:00 +00:00
|
|
|
: th02_op.asm |> !as |> bin\\th02\\op.obj
|
|
|
|
: th02_main.asm | \
|
|
|
|
th02/sprites/pellet.asp \
|
|
|
|
th02/sprites/sparks.asp \
|
|
|
|
th02/sprites/pointnum.asp \
|
|
|
|
|> !as |> bin\\th02\\main.obj
|
|
|
|
: th02_maine.asm |> !as |> bin\\th02\\maine.obj
|
|
|
|
|
|
|
|
: libs/sprite16/sprite16.asm |> $(AS) /DTHIEF libs\sprite16\sprite16.asm %o |> bin\\th03\\zunsp.obj
|
2020-09-05 23:40:03 +00:00
|
|
|
: th03\\cdg_p_na.asm |> !as3 |>
|
[Build] [th03] Keep hflip_lut_generate() in ASM due to alignment issues
Nooooo, gotta throw away that decompilation for the stupidest of
reasons :( Turns out that a function may also be "undecompilable" if
the original code layout places it at a word-aligned address, but the
last byte of the previous function in just one of the original binaries
(TH03's MAIN.EXE, in this case) also lies at a word-aligned address.
There's simply no way to enforce per-function word alignment in Turbo
C++ alone. You *could* fake it with `#pragma codestring`, but of course
that won't work for functions that are part of the SHARED segment, and
where the alignment previously would have been correct. Conditionally
emitting that codestring would work, but then we'd also have to compile
that translation unit at least twice.
Now, I could have created a dummy .ASM file that just contains a single
zero-length but word-aligned SHARED segment, which could be placed
anywhere on the link command line where word alignment is needed… but
the decompilation of this function was a mess anyway, and probably
helped nobody.
Part of P0127, funded by [Anonymous].
2020-11-12 16:16:35 +00:00
|
|
|
: th03\\hfliplut.asm |> $(AS) th03\\hfliplut.asm %o |> bin\\%B.obj
|
2017-01-22 20:22:00 +00:00
|
|
|
: th03_op.asm |> !as |> bin\\th03\\op.obj
|
|
|
|
: th03_main.asm | \
|
|
|
|
th03/sprites/score.asp \
|
|
|
|
|> !as |> bin\\th03\\main.obj
|
|
|
|
: th03_mainl.asm |> !as |> bin\\th03\\mainl.obj
|
|
|
|
|
2020-09-14 14:21:24 +00:00
|
|
|
: th04_zuninit.asm |> !as |> bin\\th04\\zuninit.obj
|
2020-09-14 15:59:20 +00:00
|
|
|
: th04_memchk.asm |> !as |> bin\\th04\\memchk.obj
|
2020-09-05 23:12:42 +00:00
|
|
|
: th04\\scoreupd.asm |> !as4 |>
|
2020-11-14 16:24:04 +00:00
|
|
|
: th04\\cdg_load.asm |> !as4 |>
|
2021-02-26 10:52:52 +00:00
|
|
|
: th04\\bgimager.asm |> !as4 |>
|
2017-01-22 20:22:00 +00:00
|
|
|
: th04_op.asm |> !as |> bin\\th04\\op.obj
|
|
|
|
: th04_main.asm | \
|
|
|
|
th02/sprites/pellet.asp \
|
|
|
|
th04/sprites/pelletbt.asp \
|
|
|
|
th02/sprites/sparks.asp \
|
|
|
|
th04/sprites/pointnum.asp \
|
|
|
|
|> !as |> bin\\th04\\main.obj
|
|
|
|
: th04_maine.asm |> !as |> bin\\th04\\maine.obj
|
|
|
|
|
2020-09-14 15:19:11 +00:00
|
|
|
: th05_zuninit.asm |> !as |> bin\\th05\\zuninit.obj
|
2020-09-14 17:53:58 +00:00
|
|
|
: th05_gjinit.asm | \
|
|
|
|
th05/sprites/gaiji.asp \
|
|
|
|
|> !as |> bin\\th05\\gjinit.obj
|
2020-09-14 17:32:10 +00:00
|
|
|
: th05_memchk.asm |> !as |> bin\\th05\\memchk.obj
|
2021-01-18 19:47:07 +00:00
|
|
|
: th04\\input_s.asm |> $(AS) /dGAME=5 th04\%b %o |> bin\\th05\\%B.obj
|
2020-09-05 23:12:42 +00:00
|
|
|
: th04\\scoreupd.asm |> $(AS) /dGAME=5 th04\%b %o |> bin\\th05\\%B.obj
|
|
|
|
: th05\\player.asm |> !as5 |>
|
|
|
|
: th05\\hud_bar.asm |> !as5 |>
|
|
|
|
: th05\\bullet.asm |> !as5 |>
|
2021-02-26 10:52:52 +00:00
|
|
|
: th05\\bgimager.asm |> !as5 |>
|
2021-02-18 18:40:37 +00:00
|
|
|
: th05\\pi_asm_1.asm |> !as5 |>
|
2021-02-12 16:39:51 +00:00
|
|
|
: th05\\pi_asm_2.asm |> !as5 |>
|
2021-02-22 14:11:05 +00:00
|
|
|
: th05\\snd_kaja.asm |> !as5 |>
|
2017-01-22 20:22:00 +00:00
|
|
|
: th05_op.asm | \
|
|
|
|
th05/sprites/piano_l.asp \
|
|
|
|
|> !as |> bin\\th05\\op.obj
|
|
|
|
: th05_main.asm | \
|
|
|
|
th02/sprites/pellet.asp \
|
|
|
|
th04/sprites/pelletbt.asp \
|
|
|
|
th02/sprites/sparks.asp \
|
|
|
|
th04/sprites/pointnum.asp \
|
|
|
|
|> !as |> bin\\th05\\main.obj
|
|
|
|
: th05_maine.asm |> !as |> bin\\th05\\maine.obj
|