[Maintenance] [th02] Start a new header for player performance metrics

All of these are scalar values with at most a dependency on
`platform.h`. Since these item-related values are mainly read by
score/skill calculation code, it makes sense to declare them in a
dedicated header along with the upcoming metrics.

Part of P0279, funded by Yanga and Blue Bolt.
This commit is contained in:
nmlgc 2024-04-06 00:09:00 +02:00
parent 50afb0afa6
commit 610df17856
3 changed files with 9 additions and 6 deletions

View File

@ -15,6 +15,7 @@ extern "C" {
}
#include "th02/main/entity.hpp"
#include "th02/main/playfld.hpp"
#include "th02/main/playperf.hpp"
#include "th02/main/score.hpp"
#include "th02/main/scroll.hpp"
#include "th02/main/hud/hud.hpp"

View File

@ -15,12 +15,6 @@ enum item_type_t {
// items. Used for recharging power after using a continue after a Game Over.
extern unsigned int item_bigpower_override;
// Increases by varying amounts depending on how well items are collected,
// decrements for every 16 dropped items.
extern int item_skill;
extern int point_items_collected;
// Spawns the Game Over item set on the next call to items_miss_add().
// ZUN bloat: Both turning this into a parameter or hardcoding the condition
// (as TH04 and TH05 do it) would have been better than this.

8
th02/main/playperf.hpp Normal file
View File

@ -0,0 +1,8 @@
// Player performance metrics
// --------------------------
// Increases by varying amounts depending on how well items are collected,
// decrements for every 16 dropped items.
extern int item_skill;
extern int point_items_collected;