2019-12-07 10:37:53 +00:00
|
|
|
/* ReC98
|
|
|
|
* -----
|
2020-09-20 17:31:17 +00:00
|
|
|
* 2nd part of code segment #1 of TH05's OP.EXE
|
2019-12-07 10:37:53 +00:00
|
|
|
*/
|
|
|
|
|
2021-03-21 18:35:04 +00:00
|
|
|
#pragma option -zCop_01_TEXT
|
2020-09-20 17:31:17 +00:00
|
|
|
|
2019-12-07 10:37:53 +00:00
|
|
|
extern "C" {
|
2020-10-15 10:31:09 +00:00
|
|
|
#include "platform.h"
|
2021-01-13 13:44:49 +00:00
|
|
|
#include "master.hpp"
|
2021-11-22 10:48:24 +00:00
|
|
|
#include "th01/rank.h"
|
2020-09-20 16:20:31 +00:00
|
|
|
#include "th04/common.h"
|
2019-12-26 16:19:44 +00:00
|
|
|
#include "th04/formats/scoredat.h"
|
2021-12-18 15:48:20 +00:00
|
|
|
#include "th05/playchar.h"
|
2020-09-20 16:20:31 +00:00
|
|
|
#include "th05/resident.hpp"
|
|
|
|
#include "th05/op/op.h"
|
2019-12-07 10:37:53 +00:00
|
|
|
|
2019-12-26 16:19:44 +00:00
|
|
|
scoredat_section_t hi;
|
|
|
|
scoredat_section_t hi2;
|
|
|
|
static uint8_t scoredat_unused;
|
2019-12-07 10:37:53 +00:00
|
|
|
|
2020-09-20 13:57:10 +00:00
|
|
|
unsigned char rank;
|
2019-12-07 10:37:53 +00:00
|
|
|
unsigned char cleared_with[PLAYCHAR_COUNT][RANK_COUNT];
|
|
|
|
bool extra_unlocked;
|
2020-09-19 17:18:59 +00:00
|
|
|
|
2020-09-20 16:20:31 +00:00
|
|
|
void near cleardata_and_regist_view_sprites_load(void)
|
|
|
|
{
|
|
|
|
int playchar;
|
|
|
|
|
|
|
|
extra_unlocked = false;
|
|
|
|
for(playchar = PLAYCHAR_REIMU; playchar < PLAYCHAR_COUNT; playchar++) {
|
|
|
|
rank = RANK_EASY;
|
|
|
|
while(rank < RANK_COUNT) {
|
|
|
|
if(scoredat_load_for(playchar)) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
cleared_with[playchar][rank] = hi.score.cleared;
|
|
|
|
if(cleared_with[playchar][rank] != SCOREDAT_CLEARED) {
|
|
|
|
cleared_with[playchar][rank] = false;
|
|
|
|
}
|
|
|
|
if(rank < RANK_EXTRA) {
|
|
|
|
extra_unlocked |= cleared_with[playchar][rank];
|
|
|
|
}
|
|
|
|
rank++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
rank = resident->rank;
|
|
|
|
super_entry_bfnt("scnum.bft");
|
|
|
|
super_entry_bfnt("hi_m.bft");
|
|
|
|
|
|
|
|
for(playchar = PLAYCHAR_REIMU; playchar < PLAYCHAR_COUNT; playchar++) {
|
|
|
|
// MODDERS: Iterate over ranks instead
|
|
|
|
extra_playable_with[playchar] = (
|
|
|
|
cleared_with[playchar][RANK_EASY] |
|
|
|
|
cleared_with[playchar][RANK_NORMAL] |
|
|
|
|
cleared_with[playchar][RANK_HARD] |
|
|
|
|
cleared_with[playchar][RANK_LUNATIC]
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
2019-12-07 10:37:53 +00:00
|
|
|
|
|
|
|
}
|