MCPcopy Create free account
hub / github.com/DFHack/dfhack / get_tile_char

Function get_tile_char

plugins/dig.cpp:2430–2449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2428}
2429
2430static char get_tile_char(const df::coord &pos, char desig_char, bool draw_priority) {
2431 if (!draw_priority)
2432 return desig_char;
2433
2434 std::vector<df::block_square_event_designation_priorityst *> priorities;
2435 Maps::SortBlockEvents(Maps::getTileBlock(pos), NULL, NULL, NULL, NULL, NULL, NULL, NULL, &priorities);
2436 if (priorities.empty())
2437 return desig_char;
2438 switch (priorities[0]->priority[pos.x % 16][pos.y % 16] / 1000) {
2439 case 1: return '1';
2440 case 2: return '2';
2441 case 3: return '3';
2442 case 4: return '4';
2443 case 5: return '5';
2444 case 6: return '6';
2445 case 7: return '7';
2446 default:
2447 return '4';
2448 }
2449}
2450
2451static void paintScreenDesignated() {
2452 TRACE(log).print("entering paintScreenDesignated\n");

Callers 1

paintScreenDesignatedFunction · 0.85

Calls 2

getTileBlockFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected