GUI: Icons and IconsAnimation refactoring. Switch assets to new Icon Api (#566)
* GUI: Icons and IconsAnimation refactoring. Switch assets to new Icon API. * Gui: icon and animation draw now do not accept null pointer * Format Sources * Fix no debug build * Furi: stricter checks in memmgr
This commit is contained in:
@@ -104,37 +104,37 @@ void dolphin_scene_render_dolphin(SceneState* state, Canvas* canvas) {
|
||||
furi_assert(canvas);
|
||||
|
||||
if(state->scene_zoom == SCENE_ZOOM) {
|
||||
state->dolphin_gfx = I_DolphinExcited_64x63;
|
||||
state->dolphin_gfx = &I_DolphinExcited_64x63;
|
||||
} else if(state->action == SLEEP && state->player_global.x == 154) { // 2do - sofa x pos getter
|
||||
state->dolphin_gfx = A_FX_Sitting_40x27;
|
||||
state->dolphin_gfx_b = I_FX_SittingB_40x27;
|
||||
state->dolphin_gfx = &A_FX_Sitting_40x27;
|
||||
state->dolphin_gfx_b = &I_FX_SittingB_40x27;
|
||||
} else if(state->action != INTERACT) {
|
||||
if(state->player_v.x < 0 || state->player_flipped) {
|
||||
if(state->player_anim == 0) {
|
||||
state->dolphin_gfx = I_WalkL1_32x32;
|
||||
state->dolphin_gfx_b = I_WalkLB1_32x32;
|
||||
state->dolphin_gfx = &I_WalkL1_32x32;
|
||||
state->dolphin_gfx_b = &I_WalkLB1_32x32;
|
||||
|
||||
} else {
|
||||
state->dolphin_gfx = I_WalkL2_32x32;
|
||||
state->dolphin_gfx_b = I_WalkLB2_32x32;
|
||||
state->dolphin_gfx = &I_WalkL2_32x32;
|
||||
state->dolphin_gfx_b = &I_WalkLB2_32x32;
|
||||
}
|
||||
} else if(state->player_v.x > 0 || !state->player_flipped) {
|
||||
if(state->player_anim == 0) {
|
||||
state->dolphin_gfx = I_WalkR1_32x32;
|
||||
state->dolphin_gfx_b = I_WalkRB1_32x32;
|
||||
state->dolphin_gfx = &I_WalkR1_32x32;
|
||||
state->dolphin_gfx_b = &I_WalkRB1_32x32;
|
||||
|
||||
} else {
|
||||
state->dolphin_gfx = I_WalkR2_32x32;
|
||||
state->dolphin_gfx_b = I_WalkRB2_32x32;
|
||||
state->dolphin_gfx = &I_WalkR2_32x32;
|
||||
state->dolphin_gfx_b = &I_WalkRB2_32x32;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
canvas_set_bitmap_mode(canvas, true);
|
||||
canvas_set_color(canvas, ColorWhite);
|
||||
canvas_draw_icon_name(canvas, state->player.x, state->player.y, state->dolphin_gfx_b);
|
||||
canvas_draw_icon(canvas, state->player.x, state->player.y, state->dolphin_gfx_b);
|
||||
canvas_set_color(canvas, ColorBlack);
|
||||
canvas_draw_icon_name(canvas, state->player.x, state->player.y, state->dolphin_gfx);
|
||||
canvas_draw_icon(canvas, state->player.x, state->player.y, state->dolphin_gfx);
|
||||
canvas_set_bitmap_mode(canvas, false);
|
||||
}
|
||||
|
||||
@@ -158,7 +158,7 @@ void dolphin_scene_render(SceneState* state, Canvas* canvas, uint32_t t) {
|
||||
if(current_scene[i]->draw) current_scene[i]->draw(canvas, state);
|
||||
|
||||
if(l == current_scene[i]->layer) {
|
||||
canvas_draw_icon_name(
|
||||
canvas_draw_icon(
|
||||
canvas,
|
||||
item_pos * PARALLAX(l),
|
||||
current_scene[i]->y,
|
||||
|
||||
Reference in New Issue
Block a user