working restart button
This commit is contained in:
@@ -26,8 +26,6 @@ constexpr int PLAYER_X = 29;
|
|||||||
constexpr int PLAYER_Y = 6;
|
constexpr int PLAYER_Y = 6;
|
||||||
constexpr int STACK_SIZE = 4096;
|
constexpr int STACK_SIZE = 4096;
|
||||||
|
|
||||||
Thread logic_thread(osPriorityNormal, STACK_SIZE);
|
|
||||||
Thread render_thread(osPriorityNormal, STACK_SIZE);
|
|
||||||
void logic_loop(void *arg) {
|
void logic_loop(void *arg) {
|
||||||
int speed = *(int *)arg;
|
int speed = *(int *)arg;
|
||||||
MovementState player_state;
|
MovementState player_state;
|
||||||
@@ -189,6 +187,9 @@ void render_loop(int speed) {
|
|||||||
|
|
||||||
int *speed_ptr = new int(speed);
|
int *speed_ptr = new int(speed);
|
||||||
|
|
||||||
|
Thread logic_thread(osPriorityNormal, STACK_SIZE);
|
||||||
|
Thread render_thread(osPriorityNormal, STACK_SIZE);
|
||||||
|
|
||||||
logic_thread.start(callback(logic_loop, (void *)speed_ptr));
|
logic_thread.start(callback(logic_loop, (void *)speed_ptr));
|
||||||
render_thread.start(render_loop_thread);
|
render_thread.start(render_loop_thread);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user