Compare commits
2 Commits
a6326a3944
...
f4a6d6c768
Author | SHA1 | Date |
---|---|---|
|
f4a6d6c768 | |
|
3408fb8086 |
|
@ -26,6 +26,30 @@ static void level_scene_render_func(Scene_t* scene)
|
|||
BeginTextureMode(scene->layers.render_layers[CONTROL_LAYER].layer_tex);
|
||||
ClearBackground(BLANK);
|
||||
|
||||
if (data->camera.mode == CAMERA_RANGED_MOVEMENT)
|
||||
{
|
||||
// TL
|
||||
DrawLineEx((Vector2){32,32},
|
||||
(Vector2){64,32}, 5, WHITE);
|
||||
DrawLineEx((Vector2){32,32},
|
||||
(Vector2){32,64}, 5, WHITE);
|
||||
//TR
|
||||
DrawLineEx((Vector2){data->game_rec.width - 64,32},
|
||||
(Vector2){data->game_rec.width - 32, 32}, 5, WHITE);
|
||||
DrawLineEx((Vector2){data->game_rec.width - 32,32},
|
||||
(Vector2){data->game_rec.width - 32, 64}, 5, WHITE);
|
||||
//BL
|
||||
DrawLineEx((Vector2){32,data->game_rec.height-32},
|
||||
(Vector2){64,data->game_rec.height - 32}, 5, WHITE);
|
||||
DrawLineEx((Vector2){32,data->game_rec.height-64},
|
||||
(Vector2){32, data->game_rec.height - 32}, 5, WHITE);
|
||||
//BR
|
||||
DrawLineEx((Vector2){data->game_rec.width - 64,data->game_rec.height-32},
|
||||
(Vector2){data->game_rec.width - 32,data->game_rec.height - 32}, 5, WHITE);
|
||||
DrawLineEx((Vector2){data->game_rec.width - 32,data->game_rec.height-64},
|
||||
(Vector2){data->game_rec.width - 32, data->game_rec.height - 32}, 5, WHITE);
|
||||
}
|
||||
|
||||
Entity_t* p_ent;
|
||||
sc_map_foreach_value(&scene->ent_manager.entities_map[PLAYER_ENT_TAG], p_ent)
|
||||
{
|
||||
|
|
|
@ -238,7 +238,7 @@ bool load_level_tilemap(LevelScene_t* scene, unsigned int level_num)
|
|||
|
||||
uint8_t spd_encoding = lvl_map.tiles[i].tile_type - 25;
|
||||
float angle = 45.0f / 180.0f * PI * ((spd_encoding >> 2) & 7);
|
||||
float mag = 100 * (spd_encoding & 3);
|
||||
float mag = 75 * (spd_encoding & 3);
|
||||
|
||||
CTransform_t* p_ct = get_component(ent, CTRANSFORM_COMP_T);
|
||||
p_ct->velocity = Vector2Scale(
|
||||
|
@ -338,7 +338,7 @@ void change_a_tile(TileGrid_t* tilemap, unsigned int tile_idx, TileType_t new_ty
|
|||
tilemap->tiles[tile_idx].offset = (Vector2){0,tilemap->tile_size - SPIKE_HITBOX_SHORTSIDE};
|
||||
tilemap->tiles[tile_idx].size = (Vector2){SPIKE_HITBOX_LONGSIDE, SPIKE_HITBOX_SHORTSIDE};
|
||||
}
|
||||
else if (tile_idx - tilemap->width >= 0 && tilemap->tiles[tile_idx - tilemap->width].tile_type == SOLID_TILE)
|
||||
else if (tile_idx >= tilemap->width && tilemap->tiles[tile_idx - tilemap->width].tile_type == SOLID_TILE)
|
||||
{
|
||||
tilemap->tiles[tile_idx].offset = (Vector2){0,0};
|
||||
tilemap->tiles[tile_idx].size = (Vector2){SPIKE_HITBOX_LONGSIDE, SPIKE_HITBOX_SHORTSIDE};
|
||||
|
|
Loading…
Reference in New Issue