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: 4DGL-uLCD-SE SDFileSystem mbed-rtos mbed wave_player
releaser.h
00001 #ifndef RELEASER_H 00002 #define RELEASER_H 00003 00004 00005 #include "mbed.h" 00006 #include "arrows.h" 00007 00008 //releaser.h: responsible for keeping track of arrows that are active on the screen 00009 00010 class ArrowReleaser { 00011 private: 00012 int terminate; 00013 public: 00014 Arrow ActiveArrows [10]; 00015 ArrowReleaser(){ 00016 for(int i=0; i< 10; i++){ 00017 ActiveArrows[i] = Arrow(-1); 00018 } 00019 terminate = 0; 00020 } 00021 int ReleaseArrow(Arrow songArrows[], int indexSongArray, int screens){ 00022 for(int i=0; i< 10; i++){ 00023 if(!ActiveArrows[i].getActive()){ 00024 //Empty space 00025 ActiveArrows[i] = songArrows[indexSongArray]; 00026 if(ActiveArrows[i].getType() == -1){ 00027 ActiveArrows[i].setActive(0); 00028 } 00029 else { 00030 ActiveArrows[i].setActive(1); 00031 } 00032 ActiveArrows[i].init(screens); 00033 return 1; 00034 } 00035 } 00036 return 0; 00037 } 00038 int ReleaseArrow2(Arrow songArrows[], int indexSongArray){ 00039 for(int i=0; i< 7; i++){ 00040 if(!ActiveArrows[i].getActive()){ 00041 //Empty space 00042 ActiveArrows[i] = songArrows[indexSongArray]; 00043 if(ActiveArrows[i].getType() == -1){ 00044 ActiveArrows[i].setActive(0); 00045 } 00046 else { 00047 ActiveArrows[i].setActive(1); 00048 } 00049 ActiveArrows[i].init2(); 00050 return 1; 00051 } 00052 } 00053 return 0; 00054 } 00055 int getTermStatus(){ 00056 return terminate; 00057 } 00058 void setTermStatus(int status){ 00059 terminate = status; 00060 } 00061 00062 }; 00063 00064 #endif
Generated on Tue Jul 12 2022 21:13:59 by
1.7.2