/* Kitsune's Curse Copyright (C) 2020-2023 Juan J. Martinez This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #ifndef _PLAYER_H #define _PLAYER_H #include #define WALK 0 #define WALK_CYCLE 3 #define CROUCH 4 #define JUMP 5 #define DIR_RIGHT 0 #define DIR_LEFT 1 #define DIR_DOWN 2 #define DIR_UP 3 #ifndef LOCAL #define LOCAL extern extern const uint8_t player_frames[]; extern const uint8_t jump_seq[]; #else const uint8_t player_frames[6] = { 1, 0, 1, 2, 3, 3 }; const uint8_t jump_seq[8] = { 14, 12, 4, 2, 0, 4, 8, 12 }; #endif #define JUMP_SEQ 8 #define IS_GOING_DOWN(x) ((x) > 5) #define COOL_DOWN 10 #define RESPAWN_DELAY 16 #define WAS_HIT 24 #define GAMEOVER_DELAY 48 #define MAX_LIFE 5 void player_checkpoint(); void draw_player(); void update_player(); void player_hit(uint8_t h); uint8_t check_for_player(uint8_t h) __z88dk_fastcall; #undef LOCAL #endif // _PLAYER_H