![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
A rouge-like rpg, heavily inspired on the binding of isaac. Running on a FRDM-K64F Mbed board. C++.
Dependencies: mbed MotionSensor
Walls.cpp
00001 #include "Walls.h" 00002 Walls::Walls(int pos_x, int pos_y, int hitbox_width, int hitbox_height) 00003 { 00004 _hitbox.width = hitbox_width; 00005 _hitbox.height = hitbox_height; 00006 00007 _sprite_size.width = hitbox_width; 00008 _sprite_size.height = hitbox_height + 7; 00009 _sprite_size.offset_x = 0; 00010 _sprite_size.offset_y = -7; 00011 00012 _position.x = pos_x; 00013 _position.y = pos_y; 00014 update_prev_pos(); 00015 } 00016 00017 void Walls::move(float unused, float unused1, char * unused2, bool * unused3) // movement control and miscellaneous updates 00018 { 00019 00020 } 00021 00022 void Walls::take_damage(int damage) 00023 { 00024 00025 } 00026 00027 void Walls::draw(N5110 &lcd) 00028 { 00029 lcd.drawRect(_position.x, _position.y + _sprite_size.offset_y, _sprite_size.width, _sprite_size.height, FILL_BLACK); 00030 lcd.drawRect(_position.x+1, _position.y + _sprite_size.offset_y+1, _sprite_size.width-2, _sprite_size.height-2, FILL_WHITE); 00031 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); 00032 }
Generated on Tue Jul 19 2022 23:32:07 by
![doxygen](doxygen.png)