ECE2035 Project 2
Dependencies: mbed mbed-rtos SDFileSystem
player_public.h
- Committer:
- kwengryn3
- Date:
- 2021-04-20
- Revision:
- 10:1994adcfc86f
- Parent:
- 9:f1d34ef049c5
File content as of revision 10:1994adcfc86f:
//================================================================= // The header file is for module "player" // // Copyright 2020 Georgia Tech. All rights reserved. // The materials provided by the instructor in this course are for // the use of the students currently enrolled in the course. // Copyrighted course materials may not be further disseminated. // This file must not be made publicly available anywhere. //================================================================== #ifndef PLAYER_PUBLIC_H #define PLAYER_PUBLIC_H #include "doubly_linked_list.h" typedef struct { int y; // The y-coordinate of knife current position int height; int score; // Current score int knife_length; boundingBox knife_boundingBox; bool player_has_knife; // The knife status: 0->In the air 1->With Player int strikes; } PLAYER; /** getter for user to acquire info without accessing structure */ PLAYER player_get_info(void); /** Initialize all values in the PLAYER struct, then draw the player */ void player_init(void); /** Check if player's current location is valid, then move the player * "player.height" pixels up */ void player_move(double); /** Check if player's current location is valid, then move the player * "player.height" pixels down */ void player_moveDown(void); /** Throw knife by only by changing a value in the PLAYER struct */ void player_throw(void); /** Check the status of the knife in the PLAYER struct and draw the knife * accordingly */ void player_knife_draw(void); /** Draw the player */ void player_draw(int color); /** Reset knife's coordinates so that it comes back to the player's position, * then redraw the knife */ void player_knife_return(void); /** Increment the score by 1 */ void player_score_inc(void); int get_player_strikes(); #endif //PLAYER_PUBLIC_H