Split the simulation from presentation into an SDL-free library
Sim holds one whole game (tick, snapshots, checksum) and talks to the screen only through Cues, which the client's Scene plays and the server ignores. All drawing moved to scene.cpp. Match takes this screen's wishes as request flags instead of reading the menu, input and settings. The sim library builds without SDL and the server links it, ready to run games itself. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2007fb7edc
commit
465f75f6d7
38 files changed
+2225
-1965
No files matched your search
+1
-18
@@ -5,20 +5,6 @@
|
||||
|
||||
struct Game;
|
||||
|
||||
// Describes a spray of square particles, fanned around angle by spread. Fill is how far their colour takes over their
|
||||
// black middle.
|
||||
struct Burst
|
||||
{
|
||||
float angle = 0;
|
||||
float fill = 0;
|
||||
float gravity = 0;
|
||||
float life = 0.4f;
|
||||
float size = 3;
|
||||
float speed = 100;
|
||||
float spread = PI;
|
||||
int count = 8;
|
||||
};
|
||||
|
||||
struct Particle
|
||||
{
|
||||
Color color;
|
||||
@@ -70,13 +56,10 @@ struct Afterimage
|
||||
float life = 0;
|
||||
};
|
||||
|
||||
// Particles, afterimages, text popups, screen shake and the damage-per-second tally. While muted (during a
|
||||
// rollback replay) it ignores new requests.
|
||||
// Particles, afterimages, text popups, screen shake and the damage-per-second tally.
|
||||
class Effects
|
||||
{
|
||||
public:
|
||||
bool isMuted = false;
|
||||
|
||||
void burst(Burst burst, Vec2 position, float angle, Color color);
|
||||
void afterimage_spawn(Pose pose);
|
||||
void flash_spawn(Vec2 position, float angle, float size, Color color);
|
||||
|
||||
Reference in new issue
Block a user