Skip to content

Commit

Permalink
[Reverse-engineering] [th04] Custom entity structure 1: Kurumi's spaw…
Browse files Browse the repository at this point in the history
…n rays

Part of P0240, funded by JonathKane.
  • Loading branch information
nmlgc committed May 29, 2023
1 parent 8f78fa4 commit 2d4d61f
Show file tree
Hide file tree
Showing 2 changed files with 170 additions and 125 deletions.
38 changes: 38 additions & 0 deletions th04/main/boss/b2.cpp
@@ -0,0 +1,38 @@
/// Stage 2 Boss - Kurumi
/// ---------------------

#include "platform.h"
#include "pc98.h"
#include "th01/math/subpixel.hpp"
#include "th04/main/playfld.hpp"
#include "th04/main/custom.hpp"

// Spawn rays
// ----------

#define KURUMI_SPAWNRAY_COUNT 6

enum kurumi_spawnray_flag_t {
B2SF_FREE = 0,
B2SF_GROW = 1,
B2SF_SHRINK = 2,
};

struct kurumi_spawnray_t {
kurumi_spawnray_flag_t flag;
/* ------------------------- */ int8_t unused;
PlayfieldPoint target;
PlayfieldPoint origin;
PlayfieldPoint velocity;
/* ------------------------- */ int8_t padding[12];
};

#define kurumi_spawnrays (\
reinterpret_cast<kurumi_spawnray_t *>(custom_entities) \
)

void pascal near kurumi_spawnrays_add(
subpixel_t distance_from_center_x, unsigned char angle
)
;
// ----------

0 comments on commit 2d4d61f

Please sign in to comment.