-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackpack_block.cpp
More file actions
26 lines (21 loc) · 1.42 KB
/
backpack_block.cpp
File metadata and controls
26 lines (21 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include "backpack_block.h"
using namespace std;
BackpackBlock::BackpackBlock() : LoadoutBlock() {
}
BackpackBlock::BackpackBlock( String name_to_use, int row_to_use, int column_to_use ) : LoadoutBlock( name_to_use, row_to_use, column_to_use ) {
}
void BackpackBlock::draw( unsigned char *screen_buffer ) {
memcpy( &screen_buffer[AUTO_EQUIP_UI_LINE_SIZE * ( row + 0 ) + column], " ----------- ", 13 );
memcpy( &screen_buffer[AUTO_EQUIP_UI_LINE_SIZE * ( row + 1 ) + column], "| | | |", 13 );
memcpy( &screen_buffer[AUTO_EQUIP_UI_LINE_SIZE * ( row + 2 ) + column], "| | | |", 13 );
memcpy( &screen_buffer[AUTO_EQUIP_UI_LINE_SIZE * ( row + 3 ) + column], " ----------- ", 13 );
memcpy( &screen_buffer[AUTO_EQUIP_UI_LINE_SIZE * ( row + 4 ) + column], "| | | |", 13 );
memcpy( &screen_buffer[AUTO_EQUIP_UI_LINE_SIZE * ( row + 5 ) + column], "| | | |", 13 );
memcpy( &screen_buffer[AUTO_EQUIP_UI_LINE_SIZE * ( row + 6 ) + column], " ----------- ", 13 );
memcpy( &screen_buffer[AUTO_EQUIP_UI_LINE_SIZE * ( row + 7 ) + column], "| | | |", 13 );
memcpy( &screen_buffer[AUTO_EQUIP_UI_LINE_SIZE * ( row + 8 ) + column], "| | | |", 13 );
memcpy( &screen_buffer[AUTO_EQUIP_UI_LINE_SIZE * ( row + 9 ) + column], " ----------- ", 13 );
}
void BackpackBlock::place_cursor( unsigned char *screen_buffer, int cursor ) {
draw_cursor( screen_buffer, row + 1 + ( cursor / 3 * 3 ), column + 2 + cursor % 3 * 4 );
}