Skip to content

Commit

Permalink
Map structures - use DBString
Browse files Browse the repository at this point in the history
  • Loading branch information
mateofio committed Aug 18, 2020
1 parent 0b9c260 commit d84cd14
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions generator/csv/fields.csv
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ MoveRoute,move_commands,f,Vector<MoveCommand>,0x0C,,1,0,Array - rpg::MoveCommand
MoveRoute,repeat,f,Boolean,0x15,True,0,0,Flag
MoveRoute,skippable,f,Boolean,0x16,False,0,0,Flag
EventPage,condition,f,EventPageCondition,0x02,,1,0,rpg::EventPageCondition
EventPage,character_name,f,String,0x15,'',0,0,String
EventPage,character_name,f,DBString,0x15,'',0,0,String
EventPage,character_index,f,Int32,0x16,0,0,0,Integer
EventPage,character_direction,f,Enum<EventPage_Direction>,0x17,2,1,0,Integer
EventPage,character_pattern,f,Enum<EventPage_Frame>,0x18,1,0,0,Integer
Expand All @@ -657,7 +657,7 @@ EventPage,move_speed,f,Enum<EventPage_MoveSpeed>,0x25,3,0,0,Integer
EventPage,move_route,f,MoveRoute,0x29,,1,0,rpg::MoveRoute
EventPage,event_commands,t,EventCommand,0x33,,1,0,Integer
EventPage,event_commands,f,Vector<EventCommand>,0x34,,1,0,Array - rpg::EventCommand
Event,name,f,String,0x01,'',0,0,String
Event,name,f,DBString,0x01,'',0,0,String
Event,x,f,Int32,0x02,0,0,0,Integer
Event,y,f,Int32,0x03,0,0,0,Integer
Event,pages,f,Array<EventPage>,0x05,,1,0,Array - rpg::EventPage
Expand All @@ -666,7 +666,7 @@ Map,width,f,Int32,0x02,20,0,0,Integer
Map,height,f,Int32,0x03,15,0,0,Integer
Map,scroll_type,f,Enum<Map_ScrollType>,0x0B,0,1,0,Integer
Map,parallax_flag,f,Boolean,0x1F,False,0,0,Flag
Map,parallax_name,f,String,0x20,'',0,0,String
Map,parallax_name,f,DBString,0x20,'',0,0,String
Map,parallax_loop_x,f,Boolean,0x21,False,0,0,Flag
Map,parallax_loop_y,f,Boolean,0x22,False,0,0,Flag
Map,parallax_auto_loop_x,f,Boolean,0x23,False,0,0,Flag
Expand Down
4 changes: 2 additions & 2 deletions src/generated/lcf/rpg/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

// Headers
#include <stdint.h>
#include <string>
#include <vector>
#include "lcf/dbstring.h"
#include "lcf/rpg/eventpage.h"
#include <ostream>
#include <type_traits>
Expand All @@ -28,7 +28,7 @@ namespace rpg {
class Event {
public:
int ID = 0;
std::string name;
DBString name;
int32_t x = 0;
int32_t y = 0;
std::vector<EventPage> pages;
Expand Down
4 changes: 2 additions & 2 deletions src/generated/lcf/rpg/eventpage.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

// Headers
#include <stdint.h>
#include <string>
#include <vector>
#include "lcf/dbstring.h"
#include "lcf/enum_tags.h"
#include "lcf/rpg/eventcommand.h"
#include "lcf/rpg/eventpagecondition.h"
Expand Down Expand Up @@ -125,7 +125,7 @@ namespace rpg {

int ID = 0;
EventPageCondition condition;
std::string character_name;
DBString character_name;
int32_t character_index = 0;
int32_t character_direction = 2;
int32_t character_pattern = 1;
Expand Down
4 changes: 2 additions & 2 deletions src/generated/lcf/rpg/map.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

// Headers
#include <stdint.h>
#include <string>
#include <vector>
#include "lcf/dbstring.h"
#include "lcf/enum_tags.h"
#include "lcf/rpg/event.h"
#include <ostream>
Expand Down Expand Up @@ -67,7 +67,7 @@ namespace rpg {
int32_t height = 15;
int32_t scroll_type = 0;
bool parallax_flag = false;
std::string parallax_name;
DBString parallax_name;
bool parallax_loop_x = false;
bool parallax_loop_y = false;
bool parallax_auto_loop_x = false;
Expand Down
2 changes: 1 addition & 1 deletion src/generated/lmu_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace lcf {

template <>
char const* const Struct<rpg::Event>::name = "Event";
static TypedField<rpg::Event, std::string> static_name(
static TypedField<rpg::Event, DBString> static_name(
&rpg::Event::name,
LMU_Reader::ChunkEvent::name,
"name",
Expand Down
2 changes: 1 addition & 1 deletion src/generated/lmu_eventpage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ static TypedField<rpg::EventPage, rpg::EventPageCondition> static_condition(
1,
0
);
static TypedField<rpg::EventPage, std::string> static_character_name(
static TypedField<rpg::EventPage, DBString> static_character_name(
&rpg::EventPage::character_name,
LMU_Reader::ChunkEventPage::character_name,
"character_name",
Expand Down
2 changes: 1 addition & 1 deletion src/generated/lmu_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static TypedField<rpg::Map, bool> static_parallax_flag(
0,
0
);
static TypedField<rpg::Map, std::string> static_parallax_name(
static TypedField<rpg::Map, DBString> static_parallax_name(
&rpg::Map::parallax_name,
LMU_Reader::ChunkMap::parallax_name,
"parallax_name",
Expand Down
2 changes: 1 addition & 1 deletion src/rpg_setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void rpg::SaveMapInfo::Setup() {

void rpg::SaveMapInfo::Setup(const rpg::Map& map) {
chipset_id = map.chipset_id;
parallax_name = map.parallax_name;
parallax_name = ToString(map.parallax_name);
parallax_horz = map.parallax_loop_x;
parallax_vert = map.parallax_loop_y;
parallax_horz_auto = map.parallax_auto_loop_x;
Expand Down

0 comments on commit d84cd14

Please sign in to comment.