Steven Mahasin / Mbed 2 deprecated DreamDungeon

Dependencies:   mbed MotionSensor

Committer:
el17sm
Date:
Thu May 09 09:50:19 2019 +0000
Revision:
57:1c12361b6e3d
Parent:
41:0697508a28ba
All protected member has a _ before them

Who changed what in which revision?

UserRevisionLine numberNew contents of line
el17sm 41:0697508a28ba 1 #include "Walls.h"
el17sm 41:0697508a28ba 2 Walls::Walls(int pos_x, int pos_y, int hitbox_width, int hitbox_height)
el17sm 41:0697508a28ba 3 {
el17sm 57:1c12361b6e3d 4 _hitbox.width = hitbox_width;
el17sm 57:1c12361b6e3d 5 _hitbox.height = hitbox_height;
el17sm 41:0697508a28ba 6
el17sm 57:1c12361b6e3d 7 _sprite_size.width = hitbox_width;
el17sm 57:1c12361b6e3d 8 _sprite_size.height = hitbox_height + 7;
el17sm 57:1c12361b6e3d 9 _sprite_size.offset_x = 0;
el17sm 57:1c12361b6e3d 10 _sprite_size.offset_y = -7;
el17sm 41:0697508a28ba 11
el17sm 57:1c12361b6e3d 12 _position.x = pos_x;
el17sm 57:1c12361b6e3d 13 _position.y = pos_y;
el17sm 41:0697508a28ba 14 update_prev_pos();
el17sm 41:0697508a28ba 15 }
el17sm 41:0697508a28ba 16
el17sm 41:0697508a28ba 17 void Walls::move(float unused, float unused1, char * unused2, bool * unused3) // movement control and miscellaneous updates
el17sm 41:0697508a28ba 18 {
el17sm 41:0697508a28ba 19
el17sm 41:0697508a28ba 20 }
el17sm 41:0697508a28ba 21
el17sm 41:0697508a28ba 22 void Walls::take_damage(int damage)
el17sm 41:0697508a28ba 23 {
el17sm 41:0697508a28ba 24
el17sm 41:0697508a28ba 25 }
el17sm 41:0697508a28ba 26
el17sm 41:0697508a28ba 27 void Walls::draw(N5110 &lcd)
el17sm 41:0697508a28ba 28 {
el17sm 57:1c12361b6e3d 29 lcd.drawRect(_position.x, _position.y + _sprite_size.offset_y, _sprite_size.width, _sprite_size.height, FILL_BLACK);
el17sm 57:1c12361b6e3d 30 lcd.drawRect(_position.x+1, _position.y + _sprite_size.offset_y+1, _sprite_size.width-2, _sprite_size.height-2, FILL_WHITE);
el17sm 57:1c12361b6e3d 31 lcd.drawLine(_position.x, _position.y + _sprite_size.offset_y + _hitbox.height - 1, _position.x + _hitbox.width - 1, _position.y + _sprite_size.offset_y + _hitbox.height - 1, 1);
el17sm 41:0697508a28ba 32 }