Missile Control Game with uLCD
Dependencies: 4DGL-uLCD-SE SDFileSystem mbed wave_player
Fork of missile_command by
city_landscape/city_landscape_private.h@0:532cb55d6136, 2014-10-29 (annotated)
- Committer:
- arvahsu
- Date:
- Wed Oct 29 01:21:34 2014 +0000
- Revision:
- 0:532cb55d6136
- Child:
- 2:eba4ed0263a4
First public version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
arvahsu | 0:532cb55d6136 | 1 | /* Gatech ECE2035 2014 FALL missile command |
arvahsu | 0:532cb55d6136 | 2 | * Copyright (c) 2014 Gatech ECE2035 |
arvahsu | 0:532cb55d6136 | 3 | * |
arvahsu | 0:532cb55d6136 | 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
arvahsu | 0:532cb55d6136 | 5 | * of this software and associated documentation files (the "Software"), to deal |
arvahsu | 0:532cb55d6136 | 6 | * in the Software without restriction, including without limitation the rights |
arvahsu | 0:532cb55d6136 | 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
arvahsu | 0:532cb55d6136 | 8 | * copies of the Software, and to permit persons to whom the Software is |
arvahsu | 0:532cb55d6136 | 9 | * furnished to do so, subject to the following conditions: |
arvahsu | 0:532cb55d6136 | 10 | * |
arvahsu | 0:532cb55d6136 | 11 | * The above copyright notice and this permission notice shall be included in |
arvahsu | 0:532cb55d6136 | 12 | * all copies or substantial portions of the Software. |
arvahsu | 0:532cb55d6136 | 13 | * |
arvahsu | 0:532cb55d6136 | 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
arvahsu | 0:532cb55d6136 | 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
arvahsu | 0:532cb55d6136 | 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
arvahsu | 0:532cb55d6136 | 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
arvahsu | 0:532cb55d6136 | 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
arvahsu | 0:532cb55d6136 | 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
arvahsu | 0:532cb55d6136 | 20 | * SOFTWARE. |
arvahsu | 0:532cb55d6136 | 21 | */ |
arvahsu | 0:532cb55d6136 | 22 | #ifndef CITY_LANDSCAPE_PRIVATE_H |
arvahsu | 0:532cb55d6136 | 23 | #define CITY_LANDSCAPE_PRIVATE_H |
arvahsu | 0:532cb55d6136 | 24 | |
arvahsu | 0:532cb55d6136 | 25 | #include "mbed.h" |
arvahsu | 0:532cb55d6136 | 26 | #include "uLCD_4DGL.h" |
arvahsu | 0:532cb55d6136 | 27 | #include "globals.h" |
arvahsu | 0:532cb55d6136 | 28 | #include "city_landscape_public.h" |
arvahsu | 0:532cb55d6136 | 29 | |
arvahsu | 0:532cb55d6136 | 30 | //==== [private type] ==== |
arvahsu | 0:532cb55d6136 | 31 | // N/A |
arvahsu | 0:532cb55d6136 | 32 | |
arvahsu | 0:532cb55d6136 | 33 | |
arvahsu | 0:532cb55d6136 | 34 | |
arvahsu | 0:532cb55d6136 | 35 | //==== [private function] ==== |
arvahsu | 0:532cb55d6136 | 36 | // N/A |
arvahsu | 0:532cb55d6136 | 37 | |
arvahsu | 0:532cb55d6136 | 38 | |
arvahsu | 0:532cb55d6136 | 39 | |
arvahsu | 0:532cb55d6136 | 40 | //==== [private macros] ==== |
arvahsu | 0:532cb55d6136 | 41 | // The bottom of the screen => y=127 |
arvahsu | 0:532cb55d6136 | 42 | // Gut the landscape grow up from the bottom of the screen. It is awkward. |
arvahsu | 0:532cb55d6136 | 43 | // Thus, we use a macro to reverse the coordinate for convenience. |
arvahsu | 0:532cb55d6136 | 44 | #define REVERSE_Y(x) (SIZE_Y-(x)) |
arvahsu | 0:532cb55d6136 | 45 | |
arvahsu | 0:532cb55d6136 | 46 | //==== [private settings] ==== |
arvahsu | 0:532cb55d6136 | 47 | // You could modify these settings, but try to keep them be used only inside city_landscape.cpp |
arvahsu | 0:532cb55d6136 | 48 | // Here are the settings to define the looking of your city landscape |
arvahsu | 0:532cb55d6136 | 49 | #define CITY_TO_SCREEN_MARGIN 25 // pixel on the screen |
arvahsu | 0:532cb55d6136 | 50 | #define CITY_WIDTH 10 // pixel on the screen |
arvahsu | 0:532cb55d6136 | 51 | #define BUILDING_WIDTH 2 // pixel on the screen |
arvahsu | 0:532cb55d6136 | 52 | #define NUM_BUILDING (CITY_WIDTH/BUILDING_WIDTH) |
arvahsu | 0:532cb55d6136 | 53 | #define BUILDING_COLOR 0x00FF00 |
arvahsu | 0:532cb55d6136 | 54 | #define LANDSCAPE_COLOR 0xCCAA00 |
arvahsu | 0:532cb55d6136 | 55 | |
arvahsu | 0:532cb55d6136 | 56 | |
arvahsu | 0:532cb55d6136 | 57 | |
arvahsu | 0:532cb55d6136 | 58 | |
arvahsu | 0:532cb55d6136 | 59 | |
arvahsu | 0:532cb55d6136 | 60 | #endif //CITY_LANDSCAPE_PRIVATE_H |