TombEngine/TR5Main/Game/bubble.h

34 lines
829 B
C
Raw Normal View History

2020-04-13 13:36:23 +02:00
#pragma once
#include "effect2.h"
2020-04-24 19:15:05 +02:00
constexpr float MAX_BUBBLES = 256;
2020-04-13 13:36:23 +02:00
constexpr int BUBBLE_FLAG_BIG_SIZE = 0x1;
constexpr int BUBBLE_FLAG_CLUMP = 0x2;
constexpr int BUBBLE_FLAG_HIGH_AMPLITUDE = 0x4;
2020-04-24 19:15:05 +02:00
2020-04-13 13:36:23 +02:00
struct BUBBLE_STRUCT
{
Vector4 color;
Vector4 sourceColor;
Vector4 destinationColor;
Vector3 worldPositionCenter; // goes straight up
Vector3 worldPosition; // actual position with wave motion
Vector3 amplitude;
Vector3 wavePeriod;
Vector3 waveSpeed;
2020-04-13 13:36:23 +02:00
float speed;
float size;
float destinationSize;
float rotation;
int roomNumber;
int spriteNum;
int age;
bool active;
};
2020-04-24 19:15:05 +02:00
2020-04-13 13:36:23 +02:00
extern std::vector<BUBBLE_STRUCT> Bubbles;
2020-04-24 19:15:05 +02:00
void UpdateBubbles();
2020-04-13 13:36:23 +02:00
int GetFreeBubble();//8BEAC(<), 8DEF0(<) (F)
void CreateBubble(PHD_VECTOR* pos, short roomNum, int unk1, int unk2, int flags, int xv, int yv, int zv);//8BF14(<), 8DF58(<) (F)