Debug: Include aircraft fields and station XY in debug window
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
#include "../date_func.h"
|
#include "../date_func.h"
|
||||||
#include "../timetable.h"
|
#include "../timetable.h"
|
||||||
#include "../ship.h"
|
#include "../ship.h"
|
||||||
|
#include "../aircraft.h"
|
||||||
|
|
||||||
/* Helper for filling property tables */
|
/* Helper for filling property tables */
|
||||||
#define NIP(prop, base, variable, type, name) { name, (ptrdiff_t)cpp_offsetof(base, variable), cpp_sizeof(base, variable), prop, type }
|
#define NIP(prop, base, variable, type, name) { name, (ptrdiff_t)cpp_offsetof(base, variable), cpp_sizeof(base, variable), prop, type }
|
||||||
@@ -170,6 +171,12 @@ class NIHVehicle : public NIHelper {
|
|||||||
s->lost_count);
|
s->lost_count);
|
||||||
print(buffer);
|
print(buffer);
|
||||||
}
|
}
|
||||||
|
if (v->type == VEH_AIRCRAFT) {
|
||||||
|
const Aircraft *a = Aircraft::From(v);
|
||||||
|
seprintf(buffer, lastof(buffer), " Pos: %u, prev pos: %u, state: %u, flags: 0x%X",
|
||||||
|
a->pos, a->previous_pos, a->state, a->flags);
|
||||||
|
print(buffer);
|
||||||
|
}
|
||||||
|
|
||||||
if (HasBit(v->vehicle_flags, VF_SEPARATION_ACTIVE)) {
|
if (HasBit(v->vehicle_flags, VF_SEPARATION_ACTIVE)) {
|
||||||
std::vector<TimetableProgress> progress_array = PopulateSeparationState(v);
|
std::vector<TimetableProgress> progress_array = PopulateSeparationState(v);
|
||||||
@@ -917,6 +924,8 @@ class NIHStationStruct : public NIHelper {
|
|||||||
print(buffer);
|
print(buffer);
|
||||||
const BaseStation *bst = BaseStation::GetIfValid(index);
|
const BaseStation *bst = BaseStation::GetIfValid(index);
|
||||||
if (!bst) return;
|
if (!bst) return;
|
||||||
|
seprintf(buffer, lastof(buffer), " Tile: %X (%u x %u)", bst->xy, TileX(bst->xy), TileY(bst->xy));
|
||||||
|
print(buffer);
|
||||||
if (bst->rect.IsEmpty()) {
|
if (bst->rect.IsEmpty()) {
|
||||||
print(" rect: empty");
|
print(" rect: empty");
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user