Files
oboe/osx/classes/vehicle.h
Niemand f198b4899d Added include guards to all class headers.
Removed unnecessary or potentially harmful compiler flags. 
Added alignment attribute to all old struct members. 
Removed some unused variables. 
Made some switch statements handle all or more cases. 
Removed using declarations in favor of fully qualified names. 
Fixed a couple of assignments in conditionals that should have been comparisons. 
Eliminated linker warnings by restoring default linking of standard libraries. 
Fixed some comparisons between signed and unsigned integers. 

Note: No testing has been done, in particular of old file I/O. This should be checked for regression caused by alteration of old struct definitions. 


git-svn-id: http://openexile.googlecode.com/svn/trunk@63 4ebdad44-0ea0-11de-aab3-ff745001d230
2009-05-22 03:01:05 +00:00

50 lines
918 B
C++

/*
* vehicle.h
* BoE
*
* Created by Celtic Minstrel on 20/04/09.
*
*/
#ifndef VEHICLE_H
#define VEHICLE_H
#include <iostream>
#include "location.h"
namespace legacy {
struct horse_record_type;
struct boat_record_type;
};
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 loc_in_sec;
location sector;
short which_town;
bool exists;
bool property;
cVehicle();
cVehicle& operator = (legacy::horse_record_type& old);
cVehicle& operator = (legacy::boat_record_type& old);
void writeTo(std::ostream& file);
};
/*
typedef struct {
location horse_loc,horse_loc_in_sec,horse_sector;
short which_town;
bool exists,property;
} horse_record_type;
typedef struct {
location boat_loc,boat_loc_in_sec,boat_sector;
short which_town;
bool exists,property;
} boat_record_type;
*/
#endif