![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
200943373MAZE
Dependencies: Gamepad N5110 mbed
Background/Background.cpp@0:df4347043adf, 2017-05-04 (annotated)
- Committer:
- hongyunAHN
- Date:
- Thu May 04 11:25:43 2017 +0000
- Revision:
- 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 | 0:df4347043adf | 97 | Vector2D Player_pos = _player.get_pos(); |
hongyunAHN | 0:df4347043adf | 98 | |
hongyunAHN | 0:df4347043adf | 99 | if((Player_pos.x,Player_pos.y)==(40,24)){ |
hongyunAHN | 0:df4347043adf | 100 | lcd.printString(" GOAL ",0,2); |
hongyunAHN | 0:df4347043adf | 101 | |
hongyunAHN | 0:df4347043adf | 102 | pad.leds_on(); |
hongyunAHN | 0:df4347043adf | 103 | wait(0.5); |
hongyunAHN | 0:df4347043adf | 104 | pad.leds_off(); |
hongyunAHN | 0:df4347043adf | 105 | } |
hongyunAHN | 0:df4347043adf | 106 | |
hongyunAHN | 0:df4347043adf | 107 | if((Player_pos.x,Player_pos.y)==(83,43) ){ |
hongyunAHN | 0:df4347043adf | 108 | lcd.printString(" FAKE ",0,2); |
hongyunAHN | 0:df4347043adf | 109 | lcd.printString(" Find the other way ",0,2); |
hongyunAHN | 0:df4347043adf | 110 | lcd.refresh(); |
hongyunAHN | 0:df4347043adf | 111 | } |
hongyunAHN | 0:df4347043adf | 112 | if((Player_pos.x,Player_pos.y)==(56,4)){ |
hongyunAHN | 0:df4347043adf | 113 | pad.leds_on(); |
hongyunAHN | 0:df4347043adf | 114 | lcd.printString(" trap ",0,2); |
hongyunAHN | 0:df4347043adf | 115 | pad.leds_off(); |
hongyunAHN | 0:df4347043adf | 116 | lcd.printString(" Find the other way ",0,2); |
hongyunAHN | 0:df4347043adf | 117 | lcd.refresh(); |
hongyunAHN | 0:df4347043adf | 118 | Player_pos.x==2; |
hongyunAHN | 0:df4347043adf | 119 | Player_pos.y==2; |
hongyunAHN | 0:df4347043adf | 120 | |
hongyunAHN | 0:df4347043adf | 121 | } |
hongyunAHN | 0:df4347043adf | 122 | if((Player_pos.x,Player_pos.y)==(77,29)){ |
hongyunAHN | 0:df4347043adf | 123 | pad.leds_on(); |
hongyunAHN | 0:df4347043adf | 124 | lcd.printString(" trap ",0,2); |
hongyunAHN | 0:df4347043adf | 125 | lcd.refresh(); |
hongyunAHN | 0:df4347043adf | 126 | pad.leds_off(); |
hongyunAHN | 0:df4347043adf | 127 | Player_pos.x==2; |
hongyunAHN | 0:df4347043adf | 128 | Player_pos.y==2; |
hongyunAHN | 0:df4347043adf | 129 | |
hongyunAHN | 0:df4347043adf | 130 | } |
hongyunAHN | 0:df4347043adf | 131 | if((Player_pos.x,Player_pos.y)==(65,40)){ |
hongyunAHN | 0:df4347043adf | 132 | pad.leds_on(); |
hongyunAHN | 0:df4347043adf | 133 | lcd.printString(" JUMP ",0,2); |
hongyunAHN | 0:df4347043adf | 134 | pad.leds_off(); |
hongyunAHN | 0:df4347043adf | 135 | lcd.refresh(); |
hongyunAHN | 0:df4347043adf | 136 | Player_pos.x==65; |
hongyunAHN | 0:df4347043adf | 137 | Player_pos.y==30; |
hongyunAHN | 0:df4347043adf | 138 | |
hongyunAHN | 0:df4347043adf | 139 | } |
hongyunAHN | 0:df4347043adf | 140 | |
hongyunAHN | 0:df4347043adf | 141 | |
hongyunAHN | 0:df4347043adf | 142 | } |
hongyunAHN | 0:df4347043adf | 143 |