Skip to content

Commit

Permalink
Merge pull request #764 from omf2097/new-champion-text
Browse files Browse the repository at this point in the history
Show the 'new champion' text in newsroom
  • Loading branch information
katajakasa authored Nov 8, 2024
2 parents 7c3346c + c352931 commit da97be6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/formats/palette.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ void palette_set_player_expanded_color(int src_row, int dst_row) {
float r = (end.r - start.r) / 32.0;
float g = (end.g - start.g) / 32.0;
float b = (end.b - start.b) / 32.0;
for (int i = 0; i < 32; i++) {
for(int i = 0; i < 32; i++) {
tmp.colors[i].r = start.r + (int)(r * i);
tmp.colors[i].g = start.g + (int)(g * i);
tmp.colors[i].b = start.b + (int)(b * i);
Expand Down
1 change: 0 additions & 1 deletion src/game/scenes/cutscene.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ int cutscene_create(scene *scene) {
for(int i = 0; i < 256; i++) {
if(i >= 10 && i <= 20 && i != 10 + p1->pilot->har_id) {
continue;

}
bk_info *bki = bk_get_info(scene->bk_data, i);
if(bki) {
Expand Down
7 changes: 7 additions & 0 deletions src/game/scenes/newsroom.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,13 @@ void newsroom_overlay_render(scene *scene) {
text_render(&tconf_yellow, TEXT_DEFAULT, 34, 155, 250, 6, str_c(&local->news_str));
}

// If the player has just become a new champion, show the sprite on top of the photo.
if(local->champion && local->screen >= 2) {
animation *photo_overlays = &bk_get_info(scene->bk_data, 4)->ani;
sprite *new_champion = animation_get_sprite(photo_overlays, 1);
video_draw(new_champion->data, new_champion->pos.x, new_champion->pos.y);
}

// Dialog
if(dialog_is_visible(&local->continue_dialog)) {
dialog_render(&local->continue_dialog);
Expand Down

0 comments on commit da97be6

Please sign in to comment.