Skip to content

Commit

Permalink
SaveVehicleLocation.vehicle use an enum
Browse files Browse the repository at this point in the history
  • Loading branch information
fmatthew5876 committed Oct 17, 2018
1 parent dbbaee4 commit 365cd58
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
4 changes: 4 additions & 0 deletions generator/csv/enums.csv
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ SavePicture,BattleLayer,windows_and_status,4
SavePicture,BattleLayer,timers,5
SaveSystem,AtbMode,atb_active,0
SaveSystem,AtbMode,atb_wait,1
SaveVehicleLocation,VehicleType,none,0
SaveVehicleLocation,VehicleType,skiff,1
SaveVehicleLocation,VehicleType,ship,2
SaveVehicleLocation,VehicleType,airship,3
State,Persistence,ends,0
State,Persistence,persists,1
State,Restriction,normal,0
Expand Down
2 changes: 1 addition & 1 deletion generator/csv/fields.csv
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ SaveVehicleLocation,flash_green,f,Int32,0x52,100,0,0,int
SaveVehicleLocation,flash_blue,f,Int32,0x53,100,0,0,int
SaveVehicleLocation,flash_current_level,f,Double,0x54,0.0,0,0,double
SaveVehicleLocation,flash_time_left,f,Int32,0x55,0,0,0,int
SaveVehicleLocation,vehicle,f,Int32,0x65,0,0,0,Ship ID: 1 = boat; 2 = Ship; 3 = Airship - Maybe the same as Enum<SavePartyLocation_VehicleType>? FIXME
SaveVehicleLocation,vehicle,f,Enum<SaveVehicleLocation_VehicleType>,0x65,0,0,0,Which vehicle
SaveVehicleLocation,original_move_route_index,f,Int32,0x66,0,0,0,Index of custom move route
SaveVehicleLocation,remaining_ascent,f,Int32,0x6A,0,0,0,From 0 to 255 - In flying vehicles; remaining distance to ascend
SaveVehicleLocation,remaining_descent,f,Int32,0x6B,0,0,0,From 0 to 255 - In flying vehicles; remaining distance to descend
Expand Down
2 changes: 1 addition & 1 deletion src/generated/lsd_chunks.h
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ namespace LSD_Reader {
flash_current_level = 0x54,
/** int */
flash_time_left = 0x55,
/** Ship ID: 1 = boat; 2 = Ship; 3 = Airship - Maybe the same as Enum<SavePartyLocation_VehicleType>? FIXME */
/** Which vehicle */
vehicle = 0x65,
/** Index of custom move route */
original_move_route_index = 0x66,
Expand Down
2 changes: 2 additions & 0 deletions src/generated/rpg_enums.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include "rpg_savesystem.h"
#include "rpg_savepicture.h"
#include "rpg_savepartylocation.h"
#include "rpg_savevehiclelocation.h"
#include "rpg_mapinfo.h"
#include "rpg_treemap.h"

Expand Down Expand Up @@ -98,6 +99,7 @@ constexpr decltype(SaveSystem::kAtbModeTags) SaveSystem::kAtbModeTags;
constexpr decltype(SavePicture::kMapLayerTags) SavePicture::kMapLayerTags;
constexpr decltype(SavePicture::kBattleLayerTags) SavePicture::kBattleLayerTags;
constexpr decltype(SavePartyLocation::kVehicleTypeTags) SavePartyLocation::kVehicleTypeTags;
constexpr decltype(SaveVehicleLocation::kVehicleTypeTags) SaveVehicleLocation::kVehicleTypeTags;
constexpr decltype(MapInfo::kMusicTypeTags) MapInfo::kMusicTypeTags;
constexpr decltype(MapInfo::kBGMTypeTags) MapInfo::kBGMTypeTags;
constexpr decltype(MapInfo::kTriStateTags) MapInfo::kTriStateTags;
Expand Down
13 changes: 13 additions & 0 deletions src/generated/rpg_savevehiclelocation.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@
namespace RPG {
class SaveVehicleLocation {
public:
enum VehicleType {
VehicleType_none = 0,
VehicleType_skiff = 1,
VehicleType_ship = 2,
VehicleType_airship = 3
};
static constexpr auto kVehicleTypeTags = makeEnumTags<VehicleType>(
"none",
"skiff",
"ship",
"airship"
);

bool active = true;
int32_t map_id = -1;
int32_t position_x = -1;
Expand Down

0 comments on commit 365cd58

Please sign in to comment.