Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

game: vs - Add financial report #515

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/game/gui/dialog.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ void dialog_create(dialog *dlg, dialog_style style, const char *text, int x, int
text_settings tconf;
text_defaults(&tconf);
tconf.font = FONT_BIG;
tconf.cforeground = color_create(0, 121, 0, 255);
tconf.cforeground = COLOR_DARK_GREEN;

text_settings tconf_desc;
text_defaults(&tconf_desc);
tconf_desc.font = FONT_SMALL;
tconf_desc.cforeground = color_create(0, 121, 0, 255);
tconf_desc.cforeground = COLOR_DARK_GREEN;

dlg->x = x;
dlg->y = y;
Expand Down
2 changes: 1 addition & 1 deletion src/game/gui/textbutton.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ static void textbutton_render(component *c) {
} else if(component_is_disabled(c)) {
tb->tconf.cforeground = color_create(121, 121, 121, 255);
} else {
tb->tconf.cforeground = color_create(0, 121, 0, 255);
tb->tconf.cforeground = COLOR_DARK_GREEN;
}
text_render(&tb->tconf, c->x, c->y, c->w, c->h, tb->text);

Expand Down
2 changes: 1 addition & 1 deletion src/game/gui/textinput.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static void textinput_render(component *c) {
}
} else {
if(chars > 0) {
tb->tconf.cforeground = color_create(0, 121, 0, 255);
tb->tconf.cforeground = COLOR_DARK_GREEN;
text_render(&tb->tconf, c->x, c->y, c->w, c->h, tb->buf);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/game/gui/textselector.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static void textselector_render(component *c) {
} else if(component_is_disabled(c)) {
tb->tconf.cforeground = color_create(121, 121, 121, 255);
} else {
tb->tconf.cforeground = color_create(0, 121, 0, 255);
tb->tconf.cforeground = COLOR_DARK_GREEN;
}
text_render(&tb->tconf, c->x, c->y, c->w, c->h, buf);
}
Expand Down
2 changes: 1 addition & 1 deletion src/game/gui/textslider.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ static void textslider_render(component *c) {
} else if(component_is_disabled(c)) {
tb->tconf.cforeground = color_create(121, 121, 121, 255);
} else {
tb->tconf.cforeground = color_create(0, 121, 0, 255);
tb->tconf.cforeground = COLOR_DARK_GREEN;
}
text_render(&tb->tconf, c->x, c->y, c->w, c->h, str_c(&txt));
str_free(&txt);
Expand Down
4 changes: 2 additions & 2 deletions src/game/scenes/arena.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ void arena_har_defeat_hook(int player_id, scene *scene) {
local->over = 1;
if(is_singleplayer(scene)) {
player_winner->sp_wins |= 2 << player_loser->pilot->pilot_id;
if(player_loser->pilot->pilot_id == 10) {
if(player_loser->pilot->pilot_id == PILOT_KREISSACK) {
// can't scrap/destruct kreissack
winner_har->state = STATE_DONE;
// major go boom
Expand Down Expand Up @@ -1336,7 +1336,7 @@ int arena_create(scene *scene) {
text_settings tconf;
text_defaults(&tconf);
tconf.font = FONT_BIG;
tconf.cforeground = color_create(0, 121, 0, 255);
tconf.cforeground = COLOR_DARK_GREEN;
tconf.halign = TEXT_CENTER;

// Arena menu
Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/mainmenu/menu_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ component *menu_audio_create(scene *s) {
text_defaults(&tconf);
tconf.font = FONT_BIG;
tconf.halign = TEXT_CENTER;
tconf.cforeground = color_create(0, 121, 0, 255);
tconf.cforeground = COLOR_DARK_GREEN;

// Create menu and its header
component *menu = menu_create(11);
Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/mainmenu/menu_configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ component *menu_configuration_create(scene *s) {
text_defaults(&tconf);
tconf.font = FONT_BIG;
tconf.halign = TEXT_CENTER;
tconf.cforeground = color_create(0, 121, 0, 255);
tconf.cforeground = COLOR_DARK_GREEN;

component *menu = menu_create(11);
menu_attach(menu, label_create(&tconf, "CONFIGURATION"));
Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/mainmenu/menu_connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ component *menu_connect_create(scene *s) {
text_defaults(&tconf);
tconf.font = FONT_BIG;
tconf.halign = TEXT_CENTER;
tconf.cforeground = color_create(0, 121, 0, 255);
tconf.cforeground = COLOR_DARK_GREEN;

component *menu = menu_create(11);
menu_attach(menu, label_create(&tconf, "CONNECT TO SERVER"));
Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/mainmenu/menu_gameplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ component *menu_gameplay_create(scene *s) {
text_defaults(&tconf);
tconf.font = FONT_BIG;
tconf.halign = TEXT_CENTER;
tconf.cforeground = color_create(0, 121, 0, 255);
tconf.cforeground = COLOR_DARK_GREEN;

component *menu = menu_create(11);
menu_attach(menu, label_create(&tconf, "GAMEPLAY"));
Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/mainmenu/menu_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ component *menu_input_create(scene *s, int player_id) {
text_defaults(&tconf);
tconf.font = FONT_BIG;
tconf.halign = TEXT_CENTER;
tconf.cforeground = color_create(0, 121, 0, 255);
tconf.cforeground = COLOR_DARK_GREEN;

component *menu = menu_create(11);
menu_attach(menu, label_create(&tconf, "CHOOSE INPUT"));
Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/mainmenu/menu_keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ guiframe *menu_keyboard_create(scene *s, int selected_player) {
text_defaults(&tconf);
tconf.font = FONT_BIG;
tconf.halign = TEXT_CENTER;
tconf.cforeground = color_create(0, 121, 0, 255);
tconf.cforeground = COLOR_DARK_GREEN;

local->frame = guiframe_create(25, 5, 270, 140);
component *menu = menu_create(11);
Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/mainmenu/menu_listen.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ component *menu_listen_create(scene *s) {
text_defaults(&tconf);
tconf.font = FONT_BIG;
tconf.halign = TEXT_CENTER;
tconf.cforeground = color_create(0, 121, 0, 255);
tconf.cforeground = COLOR_DARK_GREEN;

// Create the menu
component *menu = menu_create(11);
Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/mainmenu/menu_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ component *menu_main_create(scene *s) {
text_defaults(&tconf);
tconf.font = FONT_BIG;
tconf.halign = TEXT_CENTER;
tconf.cforeground = color_create(0, 121, 0, 255);
tconf.cforeground = COLOR_DARK_GREEN;

component *menu = menu_create(11);
menu_attach(menu, textbutton_create(&tconf, "ONE PLAYER GAME", COM_ENABLED, mainmenu_1v1, s));
Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/mainmenu/menu_net.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ component *menu_net_create(scene *s) {
text_defaults(&tconf);
tconf.font = FONT_BIG;
tconf.halign = TEXT_CENTER;
tconf.cforeground = color_create(0, 121, 0, 255);
tconf.cforeground = COLOR_DARK_GREEN;

component *menu = menu_create(11);
menu_attach(menu, label_create(&tconf, "NETWORK PLAY"));
Expand Down
4 changes: 2 additions & 2 deletions src/game/scenes/mainmenu/menu_presskey.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void menu_presskey_tick(component *c) {
if(local->warn_timeout == 0) {
for(int i = 0; i < 2; i++) {
text_settings *tconf = label_get_text_settings(local->text[i]);
tconf->cforeground = color_create(0, 121, 0, 255);
tconf->cforeground = COLOR_DARK_GREEN;
}
}
}
Expand Down Expand Up @@ -114,7 +114,7 @@ component *menu_presskey_create(char **key) {
text_defaults(&tconf);
tconf.font = FONT_BIG;
tconf.halign = TEXT_CENTER;
tconf.cforeground = color_create(0, 121, 0, 255);
tconf.cforeground = COLOR_DARK_GREEN;

component *menu = menu_create(11);
local->text[0] = label_create(&tconf, "PRESS A KEY FOR");
Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/mainmenu/menu_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ component *menu_video_create(scene *s) {
text_defaults(&tconf);
tconf.font = FONT_BIG;
tconf.halign = TEXT_CENTER;
tconf.cforeground = color_create(0, 121, 0, 255);
tconf.cforeground = COLOR_DARK_GREEN;

// Create menu and its header
component *menu = menu_create(11);
Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/mainmenu/menu_video_confirm.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ component *menu_video_confirm_create(scene *s, settings_video *old_settings) {
text_defaults(&tconf);
tconf.font = FONT_BIG;
tconf.halign = TEXT_CENTER;
tconf.cforeground = color_create(0, 121, 0, 255);
tconf.cforeground = COLOR_DARK_GREEN;

component *menu = menu_create(11);
menu_attach(menu, label_create(&tconf, "ACCEPT RESOLUTION?"));
Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/mechlab/lab_dash_newplayer.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ component *lab_dash_newplayer_create(scene *s, newplayer_widgets *nw) {
xysizer_attach(xy, label_create(&tconf, lang_get(192)), 110, 43, 100, 50);

// Input field
tconf.cforeground = color_create(0, 121, 0, 255);
tconf.cforeground = COLOR_DARK_GREEN;
nw->input = textinput_create(&tconf, "Name", "");
component_select(nw->input, 1);
textinput_enable_background(nw->input, 0);
Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/mechlab/lab_menu_confirm.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ component *lab_menu_confirm_create(scene *s, lab_menu_select_cb yes, void *yesda
trnmenu_attach(menu, button);

// Add text label
tconf.cforeground = color_create(0, 121, 0, 255);
tconf.cforeground = COLOR_DARK_GREEN;
component *label = label_create(&tconf, title);
component_set_pos_hints(label, 10, 155);
component_set_size_hints(label, 300, 10);
Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/mechlab/lab_menu_difficultyselect.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ component *lab_menu_difficultyselect_create(scene *s) {
}

// Add text label
tconf.cforeground = color_create(0, 121, 0, 255);
tconf.cforeground = COLOR_DARK_GREEN;
component *label = label_create(&tconf, "SELECT A DIFFICULTY LEVEL");
component_set_pos_hints(label, 87, 155);
component_set_size_hints(label, 150, 10);
Expand Down
2 changes: 1 addition & 1 deletion src/game/scenes/mechlab/lab_menu_select.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ component *lab_menu_select_create(scene *s, lab_menu_select_cb select, void *sel
// TODO the left-right buttons apply on focus, not select

// Add text label
tconf.cforeground = color_create(0, 121, 0, 255);
tconf.cforeground = COLOR_DARK_GREEN;
// TODO interpolate %s in the string here with blank
component *label = label_create(&tconf, lang_get(title));
component_set_pos_hints(label, 87, 155);
Expand Down
4 changes: 2 additions & 2 deletions src/game/scenes/melee.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ void handle_action(scene *scene, int player, int action) {
player2->pilot->pilot_id = local->pilot_id_b;
} else {
if(player1->sp_wins == (2046 ^ (2 << player1->pilot->pilot_id))) {
// everyone but kriessack
player2->pilot->pilot_id = 10;
// everyone but kreissack
player2->pilot->pilot_id = PILOT_KREISSACK;
player2->pilot->har_id = HAR_NOVA;
} else {
// pick an opponent we have not yet beaten
Expand Down
4 changes: 2 additions & 2 deletions src/game/scenes/newsroom.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,8 @@ void newsroom_input_tick(scene *scene) {
game_state_set_next(scene->gs, SCENE_END);
} else {
if(p1->sp_wins == (2046 ^ (2 << p1->pilot->pilot_id))) {
// everyone but kriessack
p2->pilot->pilot_id = 10;
// everyone but kreissack
p2->pilot->pilot_id = PILOT_KREISSACK;
p2->pilot->har_id = HAR_NOVA;
} else {
// pick an opponent we have not yet beaten
Expand Down
10 changes: 8 additions & 2 deletions src/game/scenes/vs.c
Original file line number Diff line number Diff line change
Expand Up @@ -278,14 +278,20 @@ void vs_render(scene *scene) {
font_render_wrapped(&font_small, lang_get(66 + local->arena), 56 + 72, 160, (211 - 72) - 4, COLOR_GREEN);
} else if(player2->pilot && player2->pilot->pilot_id == PILOT_KREISSACK &&
settings_get()->gameplay.difficulty < 2) {
// kriessack, but not on Veteran or higher
// kreissack, but not on Veteran or higher
font_render_wrapped(&font_small, lang_get(747), 59, 160, 200, COLOR_YELLOW);
} else if(player1->chr && player2->pilot) {
font_render_wrapped(&font_small, player2->pilot->quotes[0], 320 - (59 + 150), 165, 120, COLOR_YELLOW);
} else if(!player2->pilot) {
// render plug's bitching
font_render_wrapped(&font_small, "Hmph. you'd think this remake would've been done by now, huh?", 59, 165, 220,
COLOR_YELLOW);
font_render_wrapped(&font_small, "FINANCIAL REPORT", 190, 6, 100, COLOR_GREEN);
font_render(&font_small, "WINNINGS:", 190, 16, COLOR_DARK_GREEN);
font_render(&font_small, "BONUSES:", 196, 24, COLOR_DARK_GREEN);
font_render(&font_small, "REPAIR COST:", 172, 32, COLOR_DARK_GREEN);
font_render(&font_small, "PROFIT:", 202, 40, COLOR_DARK_GREEN);
font_render_wrapped(&font_small, "FIGHT STATISTICS", 210, 60, 60, COLOR_GREEN);
} else {
font_render_wrapped(&font_small, lang_get(749 + (11 * player1->pilot->pilot_id) + player2->pilot->pilot_id), 59,
160, 150, COLOR_YELLOW);
Expand Down Expand Up @@ -532,7 +538,7 @@ int vs_create(scene *scene) {
local->too_pathetic_dialog.clicked = vs_too_pathetic_dialog_clicked;

if(player2->pilot && player2->pilot->pilot_id == PILOT_KREISSACK && settings_get()->gameplay.difficulty < 2) {
// kriessack, but not on Veteran or higher
// kreissack, but not on Veteran or higher
dialog_show(&local->too_pathetic_dialog, 1);
}

Expand Down
1 change: 1 addition & 0 deletions src/video/color.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#define COLOR_RED color_create(255, 0, 0, 255)
#define COLOR_GREEN color_create(0, 255, 0, 255)
#define COLOR_DARK_GREEN color_create(0, 121, 0, 255)
katajakasa marked this conversation as resolved.
Show resolved Hide resolved
#define COLOR_BLUE color_create(0, 0, 255, 255)
#define COLOR_YELLOW color_create(255, 255, 0, 255)
#define COLOR_WHITE color_create(255, 255, 255, 255)
Expand Down
Loading