This commit is contained in:
John Landers
2024-01-15 22:15:47 -06:00
parent 683f0133b1
commit c110396954
2 changed files with 7 additions and 3 deletions

View File

@@ -15,12 +15,15 @@ int M_B_Try_Spawn_Blocks_With_Offset(point_offset_t *offsets);
block_t *M_B_Get_Block_At_Point(point_t point);
void M_B_Set_Block_Type(block_t *block, btype_t type);
void M_B_Register_Updated_block(block_t *block);
int M_B_Can_Move_Blocks_Left(block_t **blocks); // I probably don't need **
/* TODO: I don't need ** for these kind of functions */
int M_B_Can_Move_Blocks_Left(block_t **blocks);
int M_B_Can_Move_Block_Left(block_t block);
block_t *M_B_Move_Block_Left(block_t *block);
/* TODO: I don't need ** for these kind of functions */
int M_B_Can_Move_Blocks_Right(block_t **blocks);
int M_B_Can_Move_Block_Right(block_t block);
block_t *M_B_Move_Block_Right(block_t *block);
/* TODO: I don't need ** for these kind of functions */
int M_B_Can_Move_Blocks_Down(block_t **blocks);
int M_B_Can_Move_Block_Down(block_t block);
block_t *M_B_Move_Block_Down(block_t *block);

View File

@@ -48,7 +48,7 @@ void TC_Game_Loop(void) {
int tick_rate = 0, n_updated_blocks = 0;
block_t **updated_blocks = NULL;
while (!TC_Close_Window()) {
while (M_B_Can_Spawn_Blocks()) {
if (M_B_Can_Spawn_Blocks()) {
R_Draw_Ui();
TC_Process_Input_Per_Frame();
if (tick_rate == 0) {
@@ -61,10 +61,11 @@ void TC_Game_Loop(void) {
} else {
tick_rate--;
}
}
} else {
R_Draw_Game_Over(0);
}
}
}
void TC_Stop(void) {
M_B_Destroy_Blocks();