#include "game.h" void status(const char *message) { rectangle(0, 0, WIDTH, 18, RGB(29, 30, 25)); rectangle(0, 16, WIDTH, 2, RGB(10, 18, 14)); text(8, 6, message, RGB(5, 9, 11)); } void location_status(int x, int y) { if (near_map_exit(x, y)) { if (current_room == MELLON_GARDEN) status(x < 25 ? "WALK LEFT TO GREENLEAF VILLAGE" : "WALK DOWN TO SEASHELL BEACH"); else if (current_room == BEACH) status("WALK UP TO MELLONS GARDEN"); else if (current_room == ROUTE) status("WALK UP TO GREENLEAF VILLAGE"); else status(x >= 216 ? "WALK RIGHT TO PROFESSOR MELLON" : "WALK DOWN TO SUNPETAL TRAIL"); } else if (near_route_sign(x, y)) status("A READ SIGN"); else if (current_room == ROUTE && near_npc(x, y)) status("A TALK TO RANGER FINN"); else if (current_room == ROUTE) status("SUNPETAL TRAIL"); else if (near_door(x, y)) status(indoors() ? "A GO OUTSIDE" : "A OPEN DOOR"); else if (current_room == MELLON_GARDEN) status("PROFESSOR MELLONS GARDEN"); else if (current_room == MELLON_HOUSE) status("PROFESSOR MELLONS HOUSE"); else if (current_room == BEACH && near_npc(x, y)) status("A TALK TO FISHER CORAL"); else if (near_water(x, y)) status(rod_owned ? "FACE DOWN A USE POKE ROD" : "ASK FISHER CORAL FOR A POKE ROD"); else if (current_room == BEACH) status("SEASHELL BEACH"); else if (partner_owned && near_golden(x, y) && !near_npc(x, y)) status("A BATTLE THE GOLDEN CREATURE"); else status(current_room == COTTAGE ? "INSIDE THE COTTAGE" : "GREENLEAF VILLAGE"); } void draw_scene(int x, int y) { restore(0, 0, WIDTH, HEIGHT); location_status(x, y); text(8, 148, "ARROWS MOVE A USE SELECT TEAM START RESET R MUSIC", RGB(5, 9, 11)); actors(x, y, 0); } void draw_team(void) { draw_team_member(0); } void draw_team_member(int member) { if (member < 0 || member > caught_count || (member > 0 && caught_species[member - 1] >= SPECIES_COUNT)) member = 0; u16 ink = RGB(5, 8, 11), cream = RGB(30, 30, 26); rectangle(0, 0, WIDTH, HEIGHT, RGB(15, 24, 20)); status("YOUR TEAM"); rectangle(8, 25, 224, 112, ink); rectangle(10, 27, 220, 108, cream); if (partner_owned) { if (member == 0) { draw_sprout(50, 105, 3); large_text(94, 42, "SPROUT", ink); large_text(94, 58, "GRASS TYPE", RGB(7, 17, 11)); large_text(94, 73, "LEVEL FIVE", ink); } else { enum Species kind = (enum Species)caught_species[member - 1]; if (kind == GOLDEN) { static const u16 gold[] = { 0, RGB(9, 8, 6), RGB(23, 15, 5), RGB(30, 23, 7), RGB(31, 28, 14), RGB(31, 31, 28), RGB(29, 13, 10), RGB(17, 8, 7) }; scaled_creature(50, 105, 3, gold); } else draw_wild_creature(kind, 50, 105); large_text(94, 42, species[kind].name, ink); large_text(94, 58, species[kind].type, RGB(7, 17, 11)); large_text(94, 73, species[kind].level, ink); } char position[] = {(char)('1' + member), ' ', 'O', 'F', ' ', (char)('1' + caught_count), 0}; text(194, 32, position, ink); text(94, 89, "HEALTH FULL", ink); if (member == active_member) text(94, 109, "FOLLOWING AND BATTLING", ink); rectangle(94, 99, 106, 6, RGB(7, 14, 11)); rectangle(95, 100, 104, 4, RGB(10, 25, 12)); } else { large_text(28, 57, "NO PARTNER YET", ink); large_text(28, 76, "VISIT PROFESSOR MELLON", ink); text(28, 96, "HER HOUSE IS EAST OF GREENLEAF VILLAGE", ink); } /* A small bag summary is visible even before you receive Sprout. */ rectangle(24, 118, 8, 8, ink); rectangle(25, 119, 6, 3, RGB(29, 8, 9)); rectangle(25, 122, 6, 3, RGB(31, 31, 28)); rectangle(27, 121, 2, 2, ink); text(38, 119, "POKE BALLS", ink); char count_text[3]; int count_index = 0; if (ball_count >= 10) count_text[count_index++] = (char)('0' + ball_count / 10); count_text[count_index++] = (char)('0' + ball_count % 10); count_text[count_index] = 0; text(88, 119, count_text, ink); if (rod_owned) text(133, 119, "POKE ROD", ink); rectangle(0, 142, WIDTH, 18, cream); text(8, 148, "ARROWS TEAM A CHOOSE PARTNER B BACK", ink); }