Update fizzler docs, and consistent spacing

This commit is contained in:
Matt Penny 2024-03-02 16:06:26 -05:00
parent 74ba106faf
commit 754273d955
6 changed files with 17 additions and 7 deletions

View file

@ -6,5 +6,15 @@ objects and any player-placed portals.
## Name structure
```
@fizzler
@fizzler [CUBE_SIGNAL_NAME]
```
## Arguments
| Name | Description |
| ----------------------------- | ---------------------------------------------------------------------------------------------- |
| `CUBE_SIGNAL_NAME` (optional) | The name of the signal to emit when a cube is fizzled. Use `-1` or omit to indicate no signal. |
## Notes
The cube signal is only set for the frame that fizzling starts.

View file

@ -1,6 +1,6 @@
# Level Signals
Signals are a way to indicate that something has happened in a level. They can
Signals are a way to indicate that something is happening in a level. They can
be emitted by:
* Level objects
* Triggers

View file

@ -239,7 +239,7 @@ struct FizzlerDefinition {
float width;
float height;
short roomIndex;
short cubeSignalIndex;
short cubeSignalIndex;
};
struct ElevatorDefinition {

View file

@ -19,7 +19,7 @@
#define GFX_PER_PARTICLE(particleCount) ((particleCount) + (((particleCount) + 7) >> 3) + 1)
void fizzlerTrigger(void* data, struct CollisionObject* objectEnteringTrigger) {
struct Fizzler* fizzler = (struct Fizzler*)data;
struct Fizzler* fizzler = (struct Fizzler*)data;
if (objectEnteringTrigger->body) {
objectEnteringTrigger->body->flags |= RigidBodyFizzled;
@ -151,7 +151,7 @@ void fizzlerInit(struct Fizzler* fizzler, struct Transform* transform, float wid
fizzler->rigidBody.transform = *transform;
fizzler->rigidBody.currentRoom = room;
fizzler->cubeSignalIndex = cubeSignalIndex;
fizzler->cubeSignalIndex = cubeSignalIndex;
collisionObjectUpdateBB(&fizzler->collisionObject);
collisionSceneAddDynamicObject(&fizzler->collisionObject);

View file

@ -28,7 +28,7 @@ struct Fizzler {
short maxVerticalExtent;
short oldestParticleIndex;
short dynamicId;
short cubeSignalIndex;
short cubeSignalIndex;
};
void fizzlerInit(struct Fizzler* fizzler, struct Transform* transform, float width, float height, int room, short cubeSignalIndex);