Add music, beach fishing, catching, and selectable creature partners
This commit is contained in:
1 parent
3469f2e6dd
commit
cb77683a87
24 files changed
+1307
-104
No files matched your search
+33
-7
@@ -7,21 +7,27 @@ typedef unsigned short u16;
|
||||
#define WIDTH 240
|
||||
#define HEIGHT 160
|
||||
|
||||
enum { A = 1, B = 2, SELECT = 4, START = 8, RIGHT = 16, LEFT = 32, UP = 64, DOWN = 128 };
|
||||
enum { A = 1, B = 2, SELECT = 4, START = 8, RIGHT = 16, LEFT = 32, UP = 64, DOWN = 128,
|
||||
R_BUTTON = 256 };
|
||||
enum { MOVEMENT_HZ = 60, MOVEMENT_CLOCK_HZ = 16384, WALK_SPEED = 2, MAX_MOVEMENT_TICKS = 5 };
|
||||
enum { NPC_X = 146, NPC_Y = 106, PROF_X = 113, PROF_Y = 92, RANGER_X = 83, RANGER_Y = 97 };
|
||||
enum Room { OUTSIDE, COTTAGE, ROUTE, MELLON_GARDEN, MELLON_HOUSE };
|
||||
enum Room { OUTSIDE, COTTAGE, ROUTE, MELLON_GARDEN, MELLON_HOUSE, BEACH };
|
||||
enum Facing { FACING_DOWN, FACING_UP, FACING_LEFT, FACING_RIGHT };
|
||||
enum CharacterStyle { BOY_STYLE, GIRL_STYLE };
|
||||
enum { DIALOGUE_X = 8, DIALOGUE_Y = 96, DIALOGUE_W = 224, DIALOGUE_H = 44 };
|
||||
enum { FOLLOW_STEPS = 14, SPROUT_HP = 24, GOLDEN_HP = 18 };
|
||||
enum BattlePhase { BATTLE_OFF, BATTLE_TURN, BATTLE_WON, BATTLE_LOST, BATTLE_FLED };
|
||||
enum Species { GOLDEN, FERNFOX, EMBERWING, PEBBLIT, SPECIES_COUNT };
|
||||
enum BattlePhase { BATTLE_OFF, BATTLE_TURN, BATTLE_WON, BATTLE_LOST, BATTLE_FLED, BATTLE_CAUGHT };
|
||||
enum Species { GOLDEN, FERNFOX, EMBERWING, PEBBLIT, TIDEFIN, SPECIES_COUNT };
|
||||
enum { FISHER_X = 178, FISHER_Y = 80 };
|
||||
enum { CAUGHT_CAPACITY = 5, SAVE_RECORD_SIZE = 15 };
|
||||
enum BattleNotice { NOTICE_NONE, NOTICE_NO_BALLS, NOTICE_TEAM_FULL, NOTICE_BROKE_FREE };
|
||||
enum WalkResult { WALK_NORMAL, WALK_MAP_CHANGED, WALK_ENCOUNTER };
|
||||
|
||||
struct BattleState {
|
||||
enum BattlePhase phase;
|
||||
enum Species enemy;
|
||||
int sprout_hp, enemy_hp, move, turns;
|
||||
enum BattleNotice notice;
|
||||
};
|
||||
extern struct BattleState battle;
|
||||
|
||||
@@ -53,6 +59,19 @@ extern unsigned random_state;
|
||||
extern int grass_steps;
|
||||
extern int partner_owned;
|
||||
extern int ball_count, balls_given;
|
||||
extern int rod_owned;
|
||||
int near_water(int x, int y);
|
||||
int cast_rod(int x, int y);
|
||||
int start_battle(enum Species enemy);
|
||||
extern int caught_count;
|
||||
extern int active_member;
|
||||
int choose_partner(int member);
|
||||
int partner_hp(void);
|
||||
const char *partner_name(void);
|
||||
const char *partner_move(void);
|
||||
void draw_member(int member, int x, int y, int small);
|
||||
extern unsigned char caught_species[CAUGHT_CAPACITY];
|
||||
extern const struct SpeciesInfo species[SPECIES_COUNT];
|
||||
|
||||
void reset_dirty_rows(void);
|
||||
void mark_dirty(int x, int y, int w, int h);
|
||||
@@ -64,6 +83,8 @@ void blit_sprite(int x, int y, const char *const *art, int width, int rows,
|
||||
void sprite(int x, int y, const char *const *art, int rows, const u16 *palette,
|
||||
int mirrored);
|
||||
int in_tall_grass(int x, int y);
|
||||
int beach_shoreline(int x);
|
||||
u16 beach_scenery(int x, int y);
|
||||
void restore(int x, int y, int w, int h);
|
||||
void pause_movement_at(unsigned now);
|
||||
int movement_ticks_at(unsigned now);
|
||||
@@ -86,6 +107,8 @@ int battle_input(unsigned pressed);
|
||||
void draw_battle_hud(void);
|
||||
void draw_battle(void);
|
||||
void load_progress(void);
|
||||
void save_progress(void);
|
||||
int has_caught(enum Species kind);
|
||||
int near_npc(int x, int y);
|
||||
int begin_conversation(int x, int y);
|
||||
int advance_conversation(int page);
|
||||
@@ -94,6 +117,7 @@ void status(const char *message);
|
||||
void location_status(int x, int y);
|
||||
void draw_scene(int x, int y);
|
||||
void draw_team(void);
|
||||
void draw_team_member(int member);
|
||||
|
||||
#ifdef GAME_TEST
|
||||
extern const unsigned char large_alphabet[26][7];
|
||||
@@ -107,7 +131,7 @@ extern const char *const creature_art[16];
|
||||
extern const char *const person_art[20];
|
||||
extern const char *const person_back_art[20];
|
||||
extern const char *const person_side_art[20];
|
||||
extern const struct SpeciesInfo species[SPECIES_COUNT];
|
||||
extern const char *const girl_art[20], *const girl_back_art[20], *const girl_side_art[20];
|
||||
extern int gift_conversation;
|
||||
extern const char *const dialogue[][2];
|
||||
extern const char *const professor_dialogue[][2];
|
||||
@@ -118,7 +142,8 @@ extern int trail_head, ball_gift_conversation;
|
||||
extern unsigned rectangle_calls, sprite_decodes, sprite_row_marks;
|
||||
extern const int DIALOGUE_PAGES;
|
||||
extern const char *const fernfox_art[24], *const emberwing_art[24], *const pebblit_art[24];
|
||||
extern const struct WildArt wild_art[3];
|
||||
extern const char *const tidefin_art[24];
|
||||
extern const struct WildArt wild_art[4];
|
||||
u16 cottage_scenery(int x, int y);
|
||||
u16 route_scenery(int x, int y);
|
||||
u16 village_scenery(int x, int y);
|
||||
@@ -129,8 +154,9 @@ enum Facing facing_for_keys(unsigned keys, enum Facing previous);
|
||||
int use_map_exit(int *x, int *y, unsigned keys);
|
||||
int can_walk(int x, int y);
|
||||
void person(int x, int y, int step, u16 clothes, u16 hat, enum Facing facing);
|
||||
void styled_person(int x, int y, int step, u16 clothes, u16 hair_or_hat,
|
||||
enum Facing facing, enum CharacterStyle style);
|
||||
unsigned next_random(void);
|
||||
int start_battle(enum Species enemy);
|
||||
int next_dialogue_page(int page);
|
||||
int receive_partner(void);
|
||||
int receive_balls(void);
|
||||
|
||||
Reference in new issue
Block a user