From 09cfa2dc815e59a376aedc58788bebac4a14e9a4 Mon Sep 17 00:00:00 2001 From: Matthew Fioravante Date: Sun, 16 Aug 2020 07:21:12 -0400 Subject: [PATCH] MapInfo - use DBString --- generator/csv/fields.csv | 2 +- src/generated/lcf/rpg/mapinfo.h | 3 ++- src/generated/lmt_mapinfo.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/generator/csv/fields.csv b/generator/csv/fields.csv index 26afff237..ed4e63ced 100644 --- a/generator/csv/fields.csv +++ b/generator/csv/fields.csv @@ -598,7 +598,7 @@ Database,classes,f,Array,0x1E,,1,1,rpg::Class - RPG2003 Database,classD1,f,EmptyBlock,0x1F,,1,1,Duplicated? - Not used - RPG2003 Database,battleranimations,f,Array,0x20,,1,1,rpg::BattlerAnimation - RPG2003 Encounter,troop_id,f,Ref,0x01,0,0,0,Integer -MapInfo,name,f,String,0x01,'',0,0,String. Note: Map ID 0 used to be game title but it should be ignored (TreeCtrl dummy editor dumped data); always use RPG_RT.ini GameTitle instead +MapInfo,name,f,DBString,0x01,'',0,0,String. Note: Map ID 0 used to be game title but it should be ignored (TreeCtrl dummy editor dumped data); always use RPG_RT.ini GameTitle instead MapInfo,parent_map,f,Ref,0x02,0,0,0,Integer. Used to inherit parent map properties MapInfo,indentation,f,Int32,0x03,0,0,0,Integer. Dummy editor dumped data. Branch indentation level in TreeCtrl MapInfo,type,f,Enum,0x04,-1,0,0,Integer diff --git a/src/generated/lcf/rpg/mapinfo.h b/src/generated/lcf/rpg/mapinfo.h index 8fd9614e2..6462153c7 100644 --- a/src/generated/lcf/rpg/mapinfo.h +++ b/src/generated/lcf/rpg/mapinfo.h @@ -16,6 +16,7 @@ #include #include #include +#include "lcf/dbstring.h" #include "lcf/enum_tags.h" #include "lcf/rpg/encounter.h" #include "lcf/rpg/music.h" @@ -62,7 +63,7 @@ namespace rpg { ); int ID = 0; - std::string name; + DBString name; int32_t parent_map = 0; int32_t indentation = 0; int32_t type = -1; diff --git a/src/generated/lmt_mapinfo.cpp b/src/generated/lmt_mapinfo.cpp index 8ad6c1ca4..f1db95e21 100644 --- a/src/generated/lmt_mapinfo.cpp +++ b/src/generated/lmt_mapinfo.cpp @@ -20,7 +20,7 @@ namespace lcf { template <> char const* const Struct::name = "MapInfo"; -static TypedField static_name( +static TypedField static_name( &rpg::MapInfo::name, LMT_Reader::ChunkMapInfo::name, "name",