Version 1.5.0
Big Refactor
This commit is contained in:
parent
3b2a0f4de8
commit
d2f7796b79
49 changed files with 5306 additions and 3590 deletions
28
source/Synchronizer.h
Normal file
28
source/Synchronizer.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
#pragma once
|
||||
|
||||
#include <3ds.h>
|
||||
|
||||
//2-3 seem be optimal (at least for 2 players)
|
||||
#define SYNCHRONIZER_TICKS_PER_TURN 2
|
||||
|
||||
void synchronizerInit(int seed, int initPlayerCount, int initPlayerLocalID);
|
||||
|
||||
void synchronizerSendUID();
|
||||
void synchronizerSetPlayerUID(int playerID, u32 uid);
|
||||
void synchronizerSendIfReady();
|
||||
void synchronizerSetPlayerReady(int playerID);
|
||||
bool synchronizerAllReady();
|
||||
|
||||
void synchronizerStart();
|
||||
|
||||
void synchronizerTick(void (*gtick)(void));
|
||||
|
||||
void synchronizerReset();
|
||||
|
||||
void synchronizerOnInputPacket(u8 playerID, u32 turnNumber, void *data, size_t dataSize);
|
||||
|
||||
// values used ingame
|
||||
u32 syncTickCount;
|
||||
|
||||
// helpers for random numbers
|
||||
double gaussrand(bool reset);
|
Loading…
Add table
Add a link
Reference in a new issue