mirror of https://github.com/nmlgc/ReC98.git
[Maintenance] [th04/th05] Bullets: Move clear/zap declarations to new header
Part of P0188, funded by [Anonymous] and nrook.
This commit is contained in:
parent
5206311da3
commit
83ff3c9ec9
|
@ -15,6 +15,7 @@ extern "C" {
|
|||
#include "th04/main/playperf.hpp"
|
||||
#include "th04/main/player/player.hpp"
|
||||
#include "th04/main/bullet/bullet.hpp"
|
||||
#include "th04/main/bullet/clearzap.hpp"
|
||||
#include "th04/main/gather.hpp"
|
||||
|
||||
#pragma option -a2
|
||||
|
|
|
@ -200,23 +200,6 @@ extern union {
|
|||
SubpixelLength8 speed_delta;
|
||||
} bullet_special_motion;
|
||||
|
||||
// Set to `true` to clear all on-screen bullets, giving out a semi-exponential
|
||||
// bonus for all bullets that were alive on the first frame of activity.
|
||||
// Lasts for BULLET_ZAP_FRAMES and resets to `false` afterwards.
|
||||
extern union {
|
||||
bool active;
|
||||
unsigned char frames; // doubles as the animation timer
|
||||
} bullet_zap;
|
||||
static const int BULLET_ZAP_FRAMES_PER_CEL = 4;
|
||||
// ZUN bug: Effectively 1 in TH05, see bullets_update() for the cause.
|
||||
static const int BULLET_ZAP_FRAMES = (
|
||||
BULLET_ZAP_CELS * BULLET_ZAP_FRAMES_PER_CEL
|
||||
);
|
||||
|
||||
// # of frames left during which all on-screen bullets should decay.
|
||||
// Gives a constant point bonus for every bullet decayed during that time.
|
||||
extern unsigned char bullet_clear_time;
|
||||
|
||||
/// Rendering
|
||||
/// ---------
|
||||
union pellet_render_t {
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
// Set to `true` to clear all on-screen bullets, giving out a semi-exponential
|
||||
// bonus for all bullets that were alive on the first frame of activity.
|
||||
// Lasts for BULLET_ZAP_FRAMES and resets to `false` afterwards.
|
||||
extern union {
|
||||
bool active;
|
||||
unsigned char frames; // doubles as the animation timer
|
||||
} bullet_zap;
|
||||
|
||||
static const int BULLET_ZAP_FRAMES_PER_CEL = 4;
|
||||
|
||||
#ifdef BULLET_ZAP_CELS
|
||||
// ZUN bug: Effectively 1 in TH05, see bullets_update() for the cause.
|
||||
static const int BULLET_ZAP_FRAMES = (
|
||||
BULLET_ZAP_CELS * BULLET_ZAP_FRAMES_PER_CEL
|
||||
);
|
||||
#endif
|
||||
|
||||
// # of frames left during which all on-screen bullets should decay.
|
||||
// Gives a constant point bonus for every bullet decayed during that time.
|
||||
extern unsigned char bullet_clear_time;
|
|
@ -19,6 +19,7 @@ extern "C" {
|
|||
#include "th04/main/slowdown.hpp"
|
||||
#include "th04/main/spark.hpp"
|
||||
#include "th04/main/bullet/bullet.hpp"
|
||||
#include "th04/main/bullet/clearzap.hpp"
|
||||
#include "th04/main/player/player.hpp"
|
||||
}
|
||||
#include "th04/main/hud/hud.h"
|
||||
|
|
|
@ -10,6 +10,7 @@ extern "C" {
|
|||
#include "th04/main/playfld.hpp"
|
||||
#include "th04/main/player/player.hpp"
|
||||
#include "th04/main/bullet/bullet.hpp"
|
||||
#include "th04/main/bullet/clearzap.hpp"
|
||||
#include "th05/main/playperf.hpp"
|
||||
|
||||
bool near bullet_template_clip(void)
|
||||
|
|
Loading…
Reference in New Issue