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 wave_player 4DGL-uLCD-SE MMA8452
city_landscape_private.h@2:a09accf52491, 2022-07-23 (annotated)
- Committer:
- bpritchettjr
- Date:
- Sat Jul 23 03:28:14 2022 +0000
- Revision:
- 2:a09accf52491
- Parent:
- 1:5724f2947554
Final game
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lwills | 0:09aa1ecd6c39 | 1 | //================================================================= |
lwills | 0:09aa1ecd6c39 | 2 | // The header file is for module "city landscape" |
lwills | 0:09aa1ecd6c39 | 3 | // |
lwills | 1:5724f2947554 | 4 | // Copyright 2021 Georgia Tech. All rights reserved. |
lwills | 0:09aa1ecd6c39 | 5 | // The materials provided by the instructor in this course are for |
lwills | 0:09aa1ecd6c39 | 6 | // the use of the students currently enrolled in the course. |
lwills | 0:09aa1ecd6c39 | 7 | // Copyrighted course materials may not be further disseminated. |
lwills | 0:09aa1ecd6c39 | 8 | // This file must not be made publicly available anywhere. |
lwills | 0:09aa1ecd6c39 | 9 | //================================================================= |
lwills | 0:09aa1ecd6c39 | 10 | #ifndef CITY_LANDSCAPE_PRIVATE_H |
lwills | 0:09aa1ecd6c39 | 11 | #define CITY_LANDSCAPE_PRIVATE_H |
lwills | 0:09aa1ecd6c39 | 12 | |
lwills | 0:09aa1ecd6c39 | 13 | #include "mbed.h" |
lwills | 0:09aa1ecd6c39 | 14 | #include "globals.h" |
lwills | 0:09aa1ecd6c39 | 15 | #include "city_landscape_public.h" |
lwills | 0:09aa1ecd6c39 | 16 | |
lwills | 0:09aa1ecd6c39 | 17 | //==== [private type] ==== |
lwills | 0:09aa1ecd6c39 | 18 | // N/A |
lwills | 0:09aa1ecd6c39 | 19 | |
lwills | 0:09aa1ecd6c39 | 20 | |
lwills | 0:09aa1ecd6c39 | 21 | //==== [private function] ==== |
lwills | 0:09aa1ecd6c39 | 22 | // N/A |
lwills | 0:09aa1ecd6c39 | 23 | |
lwills | 0:09aa1ecd6c39 | 24 | |
lwills | 0:09aa1ecd6c39 | 25 | //==== [private macros] ==== |
lwills | 0:09aa1ecd6c39 | 26 | // The bottom of the screen => y=127 |
lwills | 0:09aa1ecd6c39 | 27 | // Gut the landscape grow up from the bottom of the screen. It is awkward. |
lwills | 0:09aa1ecd6c39 | 28 | // Thus, we use a macro to reverse the coordinate for convenience. |
lwills | 0:09aa1ecd6c39 | 29 | #define REVERSE_Y(x) (SIZE_Y-(x)) |
lwills | 0:09aa1ecd6c39 | 30 | |
lwills | 0:09aa1ecd6c39 | 31 | //==== [private settings] ==== |
lwills | 0:09aa1ecd6c39 | 32 | // You could modify these settings, but try to keep them be used only inside city_landscape.cpp |
lwills | 0:09aa1ecd6c39 | 33 | // Here are the settings to define the looking of your city landscape |
lwills | 0:09aa1ecd6c39 | 34 | #define CITY_TO_SCREEN_MARGIN 25 // pixel on the screen |
lwills | 0:09aa1ecd6c39 | 35 | #define CITY_WIDTH 10 // pixel on the screen |
lwills | 0:09aa1ecd6c39 | 36 | #define BUILDING_WIDTH 2 // pixel on the screen |
lwills | 0:09aa1ecd6c39 | 37 | #define NUM_BUILDING (CITY_WIDTH/BUILDING_WIDTH) |
lwills | 0:09aa1ecd6c39 | 38 | #define BUILDING_COLOR 0x00FF00 |
lwills | 0:09aa1ecd6c39 | 39 | #define LANDSCAPE_COLOR 0xCCAA00 |
lwills | 0:09aa1ecd6c39 | 40 | |
lwills | 0:09aa1ecd6c39 | 41 | |
lwills | 0:09aa1ecd6c39 | 42 | |
lwills | 0:09aa1ecd6c39 | 43 | |
lwills | 0:09aa1ecd6c39 | 44 | |
lwills | 0:09aa1ecd6c39 | 45 | #endif //CITY_LANDSCAPE_PRIVATE_H |