2021-12-25 15:18:17 +00:00
|
|
|
/* ReC98
|
|
|
|
* -----
|
|
|
|
* Code segment #4 of TH02's MAINE.EXE
|
|
|
|
*/
|
|
|
|
|
2024-03-29 14:24:07 +00:00
|
|
|
// Required to ensure the correct order of strings in `th02/score.c`?!
|
|
|
|
#pragma option -d-
|
|
|
|
|
2024-07-04 18:03:57 +00:00
|
|
|
#include "th02/hiscore/regist.cpp"
|
2021-12-25 15:18:17 +00:00
|
|
|
|
|
|
|
#include "th02/score.c"
|
|
|
|
|
2024-03-27 19:07:09 +00:00
|
|
|
score_t score_highest;
|
2021-12-25 15:18:17 +00:00
|
|
|
scoredat_section_t hi;
|
|
|
|
|
|
|
|
void pascal score_highest_get(void)
|
|
|
|
{
|
|
|
|
scoredat_init();
|
|
|
|
score_highest = (hi.score.score[0] >= score) ? hi.score.score[0] : score;
|
|
|
|
}
|
|
|
|
|
[Maintenance] Remove `extern "C"` from more areas of code
Much more than usual, now that we've got a snappy build system! This
commit covers
• All .PI functions across all games
• TH02's High Score entry functions
• TH03's shots_update() and shots_render()
• All functions declared in `th04/op/op.hpp`
• TH04/TH05's bb_txt_put_8_raw(), bullet_template_clip(),
player_pos_update_and_clamp(), score_update_and_render(), and
slowdown_frame_delay()
• TH05's reimu_stars_update_and_render(), score_delta_commit(),
stage2_invalidate(), stage2_update(), and space_window_set()
Part of P0284, funded by [Anonymous] and Blue Bolt.
2024-05-23 20:04:35 +00:00
|
|
|
int scoredat_is_extra_unlocked(void)
|
2021-12-25 15:18:17 +00:00
|
|
|
{
|
|
|
|
int game_clear_constants[SHOTTYPE_COUNT] = GAME_CLEAR_CONSTANTS;
|
|
|
|
char rank_save = rank;
|
|
|
|
for(rank = 0; (int)rank < SHOTTYPE_COUNT; rank++) {
|
|
|
|
scoredat_load();
|
|
|
|
if(game_clear_constants[rank] != hi.score.cleared) {
|
|
|
|
rank = rank_save;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
rank = rank_save;
|
|
|
|
return 1;
|
|
|
|
}
|