Wannabe RPG which failed because of some problem with planning
Dependencies: Charachters N5110 Obstacles mbed
Map/Map.cpp@0:111e3e4bea66, 2017-05-04 (annotated)
- Committer:
- el15lm
- Date:
- Thu May 04 08:41:39 2017 +0000
- Revision:
- 0:111e3e4bea66
uncomplete but working
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
el15lm | 0:111e3e4bea66 | 1 | #include "Map.h" |
el15lm | 0:111e3e4bea66 | 2 | |
el15lm | 0:111e3e4bea66 | 3 | Map::Map() |
el15lm | 0:111e3e4bea66 | 4 | { |
el15lm | 0:111e3e4bea66 | 5 | |
el15lm | 0:111e3e4bea66 | 6 | } |
el15lm | 0:111e3e4bea66 | 7 | |
el15lm | 0:111e3e4bea66 | 8 | Map::~Map() |
el15lm | 0:111e3e4bea66 | 9 | { |
el15lm | 0:111e3e4bea66 | 10 | |
el15lm | 0:111e3e4bea66 | 11 | } |
el15lm | 0:111e3e4bea66 | 12 | |
el15lm | 0:111e3e4bea66 | 13 | void Map::init(int heigth, |
el15lm | 0:111e3e4bea66 | 14 | int length) |
el15lm | 0:111e3e4bea66 | 15 | { |
el15lm | 0:111e3e4bea66 | 16 | _Heigth = heigth; |
el15lm | 0:111e3e4bea66 | 17 | _Length = length; |
el15lm | 0:111e3e4bea66 | 18 | |
el15lm | 0:111e3e4bea66 | 19 | wall1.init(0, 0, 33, 12); |
el15lm | 0:111e3e4bea66 | 20 | wall2.init(68, 16, 9, 12); |
el15lm | 0:111e3e4bea66 | 21 | wall3.init(135, 6, 12, 9); |
el15lm | 0:111e3e4bea66 | 22 | wall4.init(50, 51, 9, 8); |
el15lm | 0:111e3e4bea66 | 23 | wall5.init(70, 70, 10, 10); |
el15lm | 0:111e3e4bea66 | 24 | wall6.init(130, 60, 20, 20); |
el15lm | 0:111e3e4bea66 | 25 | |
el15lm | 0:111e3e4bea66 | 26 | column1.init(50, 16, 7); |
el15lm | 0:111e3e4bea66 | 27 | column2.init(15, 30, 6); |
el15lm | 0:111e3e4bea66 | 28 | column3.init(72, 8, 8); |
el15lm | 0:111e3e4bea66 | 29 | column4.init(70, 42, 6); |
el15lm | 0:111e3e4bea66 | 30 | column5.init(90, 20, 3); |
el15lm | 0:111e3e4bea66 | 31 | column6.init(144, 40, 6); |
el15lm | 0:111e3e4bea66 | 32 | column7.init(100, 63, 4); |
el15lm | 0:111e3e4bea66 | 33 | //pc.printf("gameMap ahs been initialised"); |
el15lm | 0:111e3e4bea66 | 34 | } |
el15lm | 0:111e3e4bea66 | 35 | |
el15lm | 0:111e3e4bea66 | 36 | void Map::draw(N5110 &lcd) |
el15lm | 0:111e3e4bea66 | 37 | { |
el15lm | 0:111e3e4bea66 | 38 | wall1.draw(lcd); |
el15lm | 0:111e3e4bea66 | 39 | wall2.draw(lcd); |
el15lm | 0:111e3e4bea66 | 40 | wall3.draw(lcd); |
el15lm | 0:111e3e4bea66 | 41 | wall4.draw(lcd); |
el15lm | 0:111e3e4bea66 | 42 | wall5.draw(lcd); |
el15lm | 0:111e3e4bea66 | 43 | wall6.draw(lcd); |
el15lm | 0:111e3e4bea66 | 44 | |
el15lm | 0:111e3e4bea66 | 45 | column1.draw(lcd); |
el15lm | 0:111e3e4bea66 | 46 | column2.draw(lcd); |
el15lm | 0:111e3e4bea66 | 47 | column3.draw(lcd); |
el15lm | 0:111e3e4bea66 | 48 | column4.draw(lcd); |
el15lm | 0:111e3e4bea66 | 49 | column5.draw(lcd); |
el15lm | 0:111e3e4bea66 | 50 | column6.draw(lcd); |
el15lm | 0:111e3e4bea66 | 51 | column7.draw(lcd); |
el15lm | 0:111e3e4bea66 | 52 | } |