Tweak sandbox bbox rendering
parent
2dde39067e
commit
007211cee8
|
@ -387,6 +387,8 @@ static void render_editor_game_scene(Scene_t* scene)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
execute_render(&data->render_manager);
|
||||||
|
|
||||||
char buffer[64] = {0};
|
char buffer[64] = {0};
|
||||||
if (data->show_grid)
|
if (data->show_grid)
|
||||||
{
|
{
|
||||||
|
@ -428,6 +430,8 @@ static void render_editor_game_scene(Scene_t* scene)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
colour = ColorAlpha(colour, 0.5f);
|
||||||
|
|
||||||
if (p_ent->m_tag == LEVEL_END_TAG)
|
if (p_ent->m_tag == LEVEL_END_TAG)
|
||||||
{
|
{
|
||||||
DrawCircleV(p_ent->position, tilemap.tile_size >> 1, (data->coins.current < data->coins.total)? RED : GREEN);
|
DrawCircleV(p_ent->position, tilemap.tile_size >> 1, (data->coins.current < data->coins.total)? RED : GREEN);
|
||||||
|
@ -444,15 +448,8 @@ static void render_editor_game_scene(Scene_t* scene)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_bbox != NULL)
|
if (p_bbox != NULL)
|
||||||
{
|
|
||||||
if (p_ent->m_tag == BOULDER_ENT_TAG)
|
|
||||||
{
|
|
||||||
DrawCircleV(Vector2Add(p_ent->position, p_bbox->half_size), p_bbox->half_size.x, colour);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
DrawRectangle(p_ent->position.x, p_ent->position.y, p_bbox->size.x, p_bbox->size.y, colour);
|
DrawRectangle(p_ent->position.x, p_ent->position.y, p_bbox->size.x, p_bbox->size.y, colour);
|
||||||
}
|
|
||||||
|
|
||||||
if (p_ent->m_tag == CRATES_ENT_TAG)
|
if (p_ent->m_tag == CRATES_ENT_TAG)
|
||||||
{
|
{
|
||||||
|
@ -507,6 +504,13 @@ static void render_editor_game_scene(Scene_t* scene)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (p_ent->m_tag == BOULDER_ENT_TAG)
|
||||||
|
{
|
||||||
|
CMoveable_t* p_moveable = get_component(p_ent, CMOVEABLE_T);
|
||||||
|
DrawCircleV(Vector2Add(p_ent->position, p_bbox->half_size), 4, p_moveable->gridmove ? GREEN : RED);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
CHurtbox_t* p_hurtbox = get_component(p_ent, CHURTBOX_T);
|
CHurtbox_t* p_hurtbox = get_component(p_ent, CHURTBOX_T);
|
||||||
CHitBoxes_t* p_hitbox = get_component(p_ent, CHITBOXES_T);
|
CHitBoxes_t* p_hitbox = get_component(p_ent, CHITBOXES_T);
|
||||||
if (p_hitbox != NULL)
|
if (p_hitbox != NULL)
|
||||||
|
@ -535,7 +539,6 @@ static void render_editor_game_scene(Scene_t* scene)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
execute_render(&data->render_manager);
|
|
||||||
|
|
||||||
const Color water_colour = ColorAlpha(BLUE, 0.5);
|
const Color water_colour = ColorAlpha(BLUE, 0.5);
|
||||||
for (int tile_y = min.y; tile_y < max.y; tile_y++)
|
for (int tile_y = min.y; tile_y < max.y; tile_y++)
|
||||||
|
|
Loading…
Reference in New Issue