Commit Graph

7 Commits

Author SHA1 Message Date
nmlgc dea40ad770 [Decompilation] [th05] Stage setup
"Yeah, let's do this real quick, how can this possibly be hard, it's
just MOVs and a few function calls"…

…except that these MOVs access quite a lot of data, which we now all
have to declare in the C world, hooray.
Once it came to midbosses and bosses, I just turned them into C structs
after all. Despite what I said in 260edd8… after all, the ASM world
doesn't care about the representation in the C world, so they don't
necessarily have to be the same.

Since these structs can't contain everything related to midbosses and
bosses (really, why did all those variables have to be spread out like
this, ZUN?), it also made for a nice occasion to continue the "stuff"
naming scheme, describing "an obviously incomplete collection of
variables related to a thing", first seen in 160d4eb.

Also, PROCDESC apparently is the only syntactically correct option to
declare an extern near proc?

Also, that `boss_phase_timed_out` variable only needs to be here
already because TCC enforces word alignment for the .data segment…
yeah, it's technically not related to this commit, but why waste time
working around it if we can just include that one variable.

Completes P0030, funded by zorg.
2019-09-15 20:35:15 +02:00
nmlgc 0abf84f450 [Maintenance] Add a few missing exports
Part of P0030, funded by zorg.
2019-09-15 20:29:52 +02:00
nmlgc 3b7561a711 [Maintenance] Export all pascal functions with their proper uppercase names
Yup, that was one massive screw-up.

Part of P0030, funded by zorg.
2019-09-15 20:29:47 +02:00
nmlgc 6ff427aa0a [Reverse-engineering] [th04/th05] Remaining generic boss variables
… yeah, I don't really like these ambiguous "mode" and "mode change"
variable names either, but what's the alternative? Something something
"sub-phase", to distinguish them from regular phases? Feels way too
early to decide on something more specific. And pretty much nothing I
could come up with right now would have made their inconsistent use any
clearer.
But I need to decide on *something* before moving on, so… eh, let's
just go with what uth05win chose.

Also, yeah, dealing with those 0xFE and 0xFD boss_phase constants some
other time 😛

Also, today in "Weird TASM crashes": Trailing commas at the end of
`public` lines…

Completes P0028, funded by zorg.
2019-09-11 23:19:10 +02:00
nmlgc 308d1bc785 [Reverse-engineering] [th04/th05] Boss explosions
So apparently, this way of distorting a circle into an ellipse (?) by
adding a value to the angle for one of the two coordinates isn't
actually widely known in math and doesn't have a name. Fair enough.

Funded by -Tom-.
2019-03-03 14:03:41 +01:00
nmlgc b02147b5c0 [Reverse-engineering] [th05] Yumeko's Phase 4/7 knife/laser intervals
Which are set in the regular stage init function for some reason,
which is why I have to cover them right now.

Funded by -Tom-.
2019-03-01 23:20:52 +01:00
nmlgc 17a05b1b71 [Reverse-engineering] [th05] Secondary boss position and sprite ID
Sure, I like me some global variables too. If you have to temporarily
replace them for a single function call though, it's pretty much the
textbook example of where *not* to use them.

Funded by -Tom-.
2019-03-01 23:07:41 +01:00