Files
oboe/src/scenario/vehicle.hpp
Celtic Minstrel 8ab663b620 Add a user-defined name to vehicle definitions.
This also adds partial support for a custom vehicle graphic.
2025-03-02 19:13:01 -05:00

46 lines
930 B
C++

/*
* vehicle.h
* BoE
*
* Created by Celtic Minstrel on 20/04/09.
*
*/
#ifndef BOE_DATA_VEHICLE_H
#define BOE_DATA_VEHICLE_H
#include <iosfwd>
#include <string>
#include "location.hpp"
namespace legacy {
struct horse_record_type;
struct boat_record_type;
};
class cTagFile_Page;
class cVehicle {
public:
// Both boats and horses use this type.
// If they demand different member functions, I'll derive from this class.
location loc;
location sector;
short which_town;
bool exists;
bool property;
pic_num_t pic = 0;
std::string name; // For designer use; not stored in save files
cVehicle();
void import_legacy(legacy::horse_record_type& old);
void import_legacy(legacy::boat_record_type& old);
void writeTo(cTagFile_Page& page) const;
void readFrom(const cTagFile_Page& page);
};
bool operator==(const cVehicle& a, const cVehicle& b);
bool operator!=(const cVehicle& a, const cVehicle& b);
#endif