200943373MAZE
Dependencies: mbed
Fork of 200943373MAZE by
Background/Background.cpp@1:bd92ef8d00ac, 2017-05-04 (annotated)
- Committer:
- hongyunAHN
- Date:
- Thu May 04 14:08:31 2017 +0000
- Revision:
- 1:bd92ef8d00ac
- Parent:
- 0:df4347043adf
200943373 hongyun AHN
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hongyunAHN | 0:df4347043adf | 1 | #include "Background.h" |
hongyunAHN | 0:df4347043adf | 2 | |
hongyunAHN | 0:df4347043adf | 3 | Background::Background() |
hongyunAHN | 0:df4347043adf | 4 | { |
hongyunAHN | 0:df4347043adf | 5 | |
hongyunAHN | 0:df4347043adf | 6 | } |
hongyunAHN | 0:df4347043adf | 7 | |
hongyunAHN | 0:df4347043adf | 8 | Background::~Background() |
hongyunAHN | 0:df4347043adf | 9 | { |
hongyunAHN | 0:df4347043adf | 10 | |
hongyunAHN | 0:df4347043adf | 11 | } |
hongyunAHN | 0:df4347043adf | 12 | |
hongyunAHN | 0:df4347043adf | 13 | void Background::init() |
hongyunAHN | 0:df4347043adf | 14 | { |
hongyunAHN | 0:df4347043adf | 15 | |
hongyunAHN | 0:df4347043adf | 16 | |
hongyunAHN | 0:df4347043adf | 17 | } |
hongyunAHN | 0:df4347043adf | 18 | |
hongyunAHN | 0:df4347043adf | 19 | void Background::read_input(Gamepad &pad) |
hongyunAHN | 0:df4347043adf | 20 | { |
hongyunAHN | 0:df4347043adf | 21 | _d = pad.get_direction(); |
hongyunAHN | 0:df4347043adf | 22 | _mag = pad.get_mag(); |
hongyunAHN | 0:df4347043adf | 23 | } |
hongyunAHN | 0:df4347043adf | 24 | |
hongyunAHN | 0:df4347043adf | 25 | void Background::draw(N5110 &lcd) |
hongyunAHN | 0:df4347043adf | 26 | { |
hongyunAHN | 0:df4347043adf | 27 | const char array[48][85]={ |
hongyunAHN | 0:df4347043adf | 28 | {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,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1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}, |
hongyunAHN | 0:df4347043adf | 76 | |
hongyunAHN | 0:df4347043adf | 77 | }; |
hongyunAHN | 0:df4347043adf | 78 | |
hongyunAHN | 0:df4347043adf | 79 | } |
hongyunAHN | 0:df4347043adf | 80 | |
hongyunAHN | 0:df4347043adf | 81 | void Background::update(Gamepad &pad,N5110 &lcd) |
hongyunAHN | 0:df4347043adf | 82 | { |
hongyunAHN | 0:df4347043adf | 83 | check_goal(pad,lcd); |
hongyunAHN | 0:df4347043adf | 84 | |
hongyunAHN | 0:df4347043adf | 85 | |
hongyunAHN | 0:df4347043adf | 86 | |
hongyunAHN | 0:df4347043adf | 87 | |
hongyunAHN | 0:df4347043adf | 88 | |
hongyunAHN | 0:df4347043adf | 89 | } |
hongyunAHN | 0:df4347043adf | 90 | |
hongyunAHN | 0:df4347043adf | 91 | |
hongyunAHN | 0:df4347043adf | 92 | |
hongyunAHN | 0:df4347043adf | 93 | |
hongyunAHN | 0:df4347043adf | 94 | |
hongyunAHN | 0:df4347043adf | 95 | void Background::check_goal(Gamepad &pad ,N5110 &lcd) |
hongyunAHN | 0:df4347043adf | 96 | { |
hongyunAHN | 1:bd92ef8d00ac | 97 | //Vector2D Player_pos = _player.get_pos(); |
hongyunAHN | 0:df4347043adf | 98 | |
hongyunAHN | 1:bd92ef8d00ac | 99 | if((//Player_pos.x,Player_pos.y)==(40,24) |
hongyunAHN | 1:bd92ef8d00ac | 100 | ){ |
hongyunAHN | 0:df4347043adf | 101 | lcd.printString(" GOAL ",0,2); |
hongyunAHN | 0:df4347043adf | 102 | |
hongyunAHN | 0:df4347043adf | 103 | pad.leds_on(); |
hongyunAHN | 0:df4347043adf | 104 | wait(0.5); |
hongyunAHN | 0:df4347043adf | 105 | pad.leds_off(); |
hongyunAHN | 0:df4347043adf | 106 | } |
hongyunAHN | 0:df4347043adf | 107 | |
hongyunAHN | 1:bd92ef8d00ac | 108 | if((//Player_pos.x,Player_pos.y)==(83,43) |
hongyunAHN | 1:bd92ef8d00ac | 109 | ){ |
hongyunAHN | 0:df4347043adf | 110 | lcd.printString(" FAKE ",0,2); |
hongyunAHN | 0:df4347043adf | 111 | lcd.printString(" Find the other way ",0,2); |
hongyunAHN | 0:df4347043adf | 112 | lcd.refresh(); |
hongyunAHN | 0:df4347043adf | 113 | } |
hongyunAHN | 1:bd92ef8d00ac | 114 | if(//(Player_pos.x,Player_pos.y)==(56,4) |
hongyunAHN | 1:bd92ef8d00ac | 115 | ){ |
hongyunAHN | 0:df4347043adf | 116 | pad.leds_on(); |
hongyunAHN | 0:df4347043adf | 117 | lcd.printString(" trap ",0,2); |
hongyunAHN | 0:df4347043adf | 118 | pad.leds_off(); |
hongyunAHN | 0:df4347043adf | 119 | lcd.printString(" Find the other way ",0,2); |
hongyunAHN | 0:df4347043adf | 120 | lcd.refresh(); |
hongyunAHN | 1:bd92ef8d00ac | 121 | // Player_pos.x==2; |
hongyunAHN | 1:bd92ef8d00ac | 122 | //Player_pos.y==2; |
hongyunAHN | 0:df4347043adf | 123 | |
hongyunAHN | 0:df4347043adf | 124 | } |
hongyunAHN | 1:bd92ef8d00ac | 125 | if((//Player_pos.x,Player_pos.y)==(77,29) |
hongyunAHN | 1:bd92ef8d00ac | 126 | ){ |
hongyunAHN | 0:df4347043adf | 127 | pad.leds_on(); |
hongyunAHN | 0:df4347043adf | 128 | lcd.printString(" trap ",0,2); |
hongyunAHN | 0:df4347043adf | 129 | lcd.refresh(); |
hongyunAHN | 0:df4347043adf | 130 | pad.leds_off(); |
hongyunAHN | 1:bd92ef8d00ac | 131 | //Player_pos.x==2; |
hongyunAHN | 1:bd92ef8d00ac | 132 | //Player_pos.y==2; |
hongyunAHN | 0:df4347043adf | 133 | |
hongyunAHN | 0:df4347043adf | 134 | } |
hongyunAHN | 1:bd92ef8d00ac | 135 | if((//Player_pos.x,Player_pos.y)==(65,40) |
hongyunAHN | 1:bd92ef8d00ac | 136 | ){ |
hongyunAHN | 0:df4347043adf | 137 | pad.leds_on(); |
hongyunAHN | 0:df4347043adf | 138 | lcd.printString(" JUMP ",0,2); |
hongyunAHN | 0:df4347043adf | 139 | pad.leds_off(); |
hongyunAHN | 0:df4347043adf | 140 | lcd.refresh(); |
hongyunAHN | 1:bd92ef8d00ac | 141 | //Player_pos.x==65; |
hongyunAHN | 1:bd92ef8d00ac | 142 | // Player_pos.y==30; |
hongyunAHN | 0:df4347043adf | 143 | |
hongyunAHN | 0:df4347043adf | 144 | } |
hongyunAHN | 0:df4347043adf | 145 | |
hongyunAHN | 0:df4347043adf | 146 | |
hongyunAHN | 0:df4347043adf | 147 | } |
hongyunAHN | 0:df4347043adf | 148 |