thpatch / thtk

Touhou Toolkit
https://thtk.thpatch.net/
Other
313 stars 42 forks source link

thecl: recompiling deletes difficulty flags #117

Closed ffd000 closed 1 year ago

ffd000 commented 1 year ago
thecl -d8 -m ../th08.eclm ../dat/ecldata1.ecl ecldata1.tecl
thecl -c8 -m ../th08.eclm ecldata1.tecl ecldata1_recomp.ecl
thecl -d8 -m ../th08.eclm ecldata1_recomp.ecl ecldata1_recomp.tecl

Instructions with difficulty flags now look like this:

!-    etFanAimed(0, 6, 1, 1, 1.0f, 0.5f, 0.0f, 0.18479957f, 515);
    etFanAimed(0, 6, 1, 1, 1.8f, 0.5f, 0.0f, 0.18479957f, 515);
    etFanAimed(0, 6, 1, 1, 2.2f, 0.5f, 0.0f, 0.18479957f, 515);
!*    fset_add(%F2, %ANGLE_PLAYER, 3.1415927f);
...
!-    etFanAimed(1, 2, 1, 1, 1.6f, 0.5f, 0.0f, 0.18479957f, 515);
    etFanAimed(1, 2, 1, 1, 2.6f, 0.5f, 0.0f, 0.18479957f, 515);
!*    etOn();
!-    etOnAutoDelay(90);
    etOnAutoDelay(30);
+5000: //5061
!*    delete();

And enemies don't work. Eclmap from here but the same thing happens without one

Edit after debugging: The parser thinks th8 has numeric difficulties (state->has_numeric_difficulties is true in parse_rank) even though I'm specifying version 8.

Priw8 commented 1 year ago

thanks for the report, has_numeric_difficulties was not being initialized in the th06 module