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 wave_player
Fork of missile_command by
globals.h
00001 #ifndef GLOBAL_H 00002 #define GLOBAL_H 00003 00004 // === [global object] === 00005 extern uLCD_4DGL uLCD; 00006 00007 00008 // === [global settings] === 00009 #define BACKGROUND_COLOR 0x000000 //black 00010 #define LANDSCAPE_HEIGHT 4 // number of pixel on the screen 00011 #define MAX_BUILDING_HEIGHT 10 // number of pixel on the screen 00012 00013 00014 // === [define the macro of error heandle function] === 00015 // when the condition (c) is not true, assert the program and show error code 00016 #define ASSERT_P(c,e) do { \ 00017 if(!(c)){ \ 00018 uLCD.printf("\nERROR:%d\n",e); \ 00019 while(1); \ 00020 } \ 00021 } while (0) 00022 00023 00024 // === [error code] === 00025 #define ERROR_MISSILE_INDEX_GET_INFO -1 // make sure your code give the valid index for missile_get_info() 00026 #define ERROR_MISSILE_INDEX_UPDATE_STATUS -2 // make sure your code give the valid index for missile_update_status() 00027 #define ERROR_MISSILE_SPEED -3 // missile speed has to be between 1 and 8 00028 #define ERROR_MISSILE_INTERVAL -4 // missile interval has to be between 1 and 100 00029 // other missile error code ... 00030 #define ERROR_CITY_NUMBER -11 // num_city in city_landscape_init() is larger than MAX_NUM_CITY 00031 #define ERROR_CITY_INDEX_GET_INFO -12 // make sure your code give the valid index for city_get_info() 00032 #define ERROR_CITY_INDEX_DESTROY -13 // make sure your code give the valid index for city_destroy() 00033 // other player-missile error code ... 00034 00035 #endif //GLOBAL_H
Generated on Wed Jul 13 2022 03:12:57 by
1.7.2
