Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
ScreenArray.h
00001 #ifndef SCREENARRAY_H 00002 #define SCREENARRAY_H 00003 00004 #include "mbed.h" 00005 #include "N5110.h" 00006 #include "Gamepad.h" 00007 00008 00009 /** ScreenArray Class 00010 @author Mr Nigel TK Vere, University of Leeds 00011 @brief ScreenArray class used for collision detection and score detection within the badman game 00012 @date April 2019 00013 */ 00014 00015 /**ScreenArray Class 00016 00017 @brief ScreenArray class used for collision detection and score detection within the badman game 00018 00019 @version 1.0 00020 00021 @author Mr Nigel TK Vere 00022 00023 @date April 2019 00024 00025 00026 */ 00027 class ScreenArray 00028 { 00029 00030 public: 00031 /** ScreenArray object donstructor */ 00032 ScreenArray(); 00033 /**ScreenArray object destructor */ 00034 ~ScreenArray(); 00035 /** 00036 * @brief Mutator method initialises the screenarray object by filling the integer array with zeros 00037 00038 */ 00039 void init(); 00040 00041 /** 00042 * @brief //Accessor method returns the value of the element at the array poisiton denoted by the x and y coordinates(columns and rows value) passed as the method parameter 00043 * @param x @details X coordinate value of the screen position whose value we wish to retrieve 00044 * @param y @details Y coordinate value of the screen position whose value we wish to retrieve 00045 00046 */ 00047 int get(int x,int y); 00048 00049 /**@brief Mutator method sets the array element at the position denoted by the x and y coordinates(columns and rows value) to the type(integer value) passed as the method's parameters 00050 * @param x @details Integer X coordinate value of the screen position whose value we wish to alter 00051 * @param y @details Integer Y coordinate value of the screen position whose value we wish to alter 00052 *@param type @details Integer value denoting the type of object at this point in the grid 00053 */ 00054 void set(int x,int y,int type); 00055 00056 /**@brief //Mutator method sets all the elements within the region of elements within the screen array to the type passed as the method parameter call 00057 * @param x @details Integer X coordinate value of the screen position whose value we wish to alter 00058 * @param y @details Integer Y coordinate value of the screen position whose value we wish to alter 00059 *@param width @details Integer value denoting the width of the screen array region that needs to be altered 00060 *@param height @details Integer value denoting the height of the screen array region that needs to be altered 00061 *@param type @details Integer value denoting the type of object at this point in the grid 00062 */ 00063 void setRange(int x,int y,int width,int height,int type); 00064 00065 00066 00067 00068 private: 00069 int Screen[48][84]; 00070 int screen_x; 00071 int screen_y; 00072 00073 00074 00075 00076 00077 }; 00078 #endif
Generated on Thu Aug 4 2022 12:05:20 by
 1.7.2
 1.7.2