Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpg::Actor Add unknown 3A and 40 chunks found in DynRPG #407

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions generator/csv/fields.csv
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ Actor,exp_correction,f,Int32,0x2B,0,0,0,Integer
Actor,initial_equipment,f,Equipment,0x33,,1,0,Integer x 5
Actor,unarmed_animation,f,Ref<Animation>,0x38,1,0,0,Integer
Actor,class_id,f,Ref<Class>,0x39,0,0,1,Integer - RPG2003
Actor,unknown3A,f,Int32,0x3A,0,0,1,Unknown chunk - only present in RPG2003
Actor,battle_x,f,Int32,0x3B,220,0,1,Integer - RPG2003
Actor,battle_y,f,Int32,0x3C,120,0,1,Integer - RPG2003
Actor,battler_animation,f,Ref<BattlerAnimation>,0x3E,1,0,1,Integer - RPG2003
Actor,skills,f,Array<Learning>,0x3F,,1,0,Array - rpg::Learning
Actor,unknown40,f,Int32,0x40,0,0,1,Unknown chunk - only present in RPG2003
Actor,rename_skill,f,Boolean,0x42,False,0,0,Flag
Actor,skill_name,f,DBString,0x43,,0,0,String
Actor,state_ranks,t,Vector<UInt8>,0x47,,0,0,Integer
Expand Down
4 changes: 4 additions & 0 deletions src/generated/lcf/ldb/chunks.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ namespace LDB_Reader {
unarmed_animation = 0x38,
/** Integer - RPG2003 */
class_id = 0x39,
/** Unknown chunk - only present in RPG2003 */
unknown3A = 0x3A,
/** Integer - RPG2003 */
battle_x = 0x3B,
/** Integer - RPG2003 */
Expand All @@ -80,6 +82,8 @@ namespace LDB_Reader {
battler_animation = 0x3E,
/** Array - rpg::Learning */
skills = 0x3F,
/** Unknown chunk - only present in RPG2003 */
unknown40 = 0x40,
/** Flag */
rename_skill = 0x42,
/** String */
Expand Down
12 changes: 8 additions & 4 deletions src/generated/lcf/rpg/actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@ namespace rpg {
Equipment initial_equipment;
int32_t unarmed_animation = 1;
int32_t class_id = 0;
int32_t unknown3A = 0;
int32_t battle_x = 220;
int32_t battle_y = 120;
int32_t battler_animation = 1;
std::vector<Learning> skills;
int32_t unknown40 = 0;
bool rename_skill = false;
DBString skill_name;
std::vector<uint8_t> state_ranks;
Expand Down Expand Up @@ -88,10 +90,12 @@ namespace rpg {
&& l.initial_equipment == r.initial_equipment
&& l.unarmed_animation == r.unarmed_animation
&& l.class_id == r.class_id
&& l.unknown3A == r.unknown3A
&& l.battle_x == r.battle_x
&& l.battle_y == r.battle_y
&& l.battler_animation == r.battler_animation
&& l.skills == r.skills
&& l.unknown40 == r.unknown40
&& l.rename_skill == r.rename_skill
&& l.skill_name == r.skill_name
&& l.state_ranks == r.state_ranks
Expand Down Expand Up @@ -120,11 +124,11 @@ namespace rpg {
const auto ctx20 = Context<Actor, ParentCtx>{ "initial_equipment", -1, &obj, parent_ctx };
ForEachString(obj.initial_equipment, f, &ctx20);
for (int i = 0; i < static_cast<int>(obj.skills.size()); ++i) {
const auto ctx26 = Context<Actor, ParentCtx>{ "skills", i, &obj, parent_ctx };
ForEachString(obj.skills[i], f, &ctx26);
const auto ctx27 = Context<Actor, ParentCtx>{ "skills", i, &obj, parent_ctx };
ForEachString(obj.skills[i], f, &ctx27);
}
const auto ctx28 = Context<Actor, ParentCtx>{ "skill_name", -1, &obj, parent_ctx };
f(obj.skill_name, ctx28);
const auto ctx30 = Context<Actor, ParentCtx>{ "skill_name", -1, &obj, parent_ctx };
f(obj.skill_name, ctx30);
(void)obj;
(void)f;
(void)parent_ctx;
Expand Down
16 changes: 16 additions & 0 deletions src/generated/ldb_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,13 @@ static TypedField<rpg::Actor, int32_t> static_class_id(
0,
1
);
static TypedField<rpg::Actor, int32_t> static_unknown3A(
&rpg::Actor::unknown3A,
LDB_Reader::ChunkActor::unknown3A,
"unknown3A",
0,
1
);
static TypedField<rpg::Actor, int32_t> static_battle_x(
&rpg::Actor::battle_x,
LDB_Reader::ChunkActor::battle_x,
Expand Down Expand Up @@ -202,6 +209,13 @@ static TypedField<rpg::Actor, std::vector<rpg::Learning>> static_skills(
1,
0
);
static TypedField<rpg::Actor, int32_t> static_unknown40(
&rpg::Actor::unknown40,
LDB_Reader::ChunkActor::unknown40,
"unknown40",
0,
1
);
static TypedField<rpg::Actor, bool> static_rename_skill(
&rpg::Actor::rename_skill,
LDB_Reader::ChunkActor::rename_skill,
Expand Down Expand Up @@ -275,10 +289,12 @@ Field<rpg::Actor> const* Struct<rpg::Actor>::fields[] = {
&static_initial_equipment,
&static_unarmed_animation,
&static_class_id,
&static_unknown3A,
&static_battle_x,
&static_battle_y,
&static_battler_animation,
&static_skills,
&static_unknown40,
&static_rename_skill,
&static_skill_name,
&static_size_state_ranks,
Expand Down
2 changes: 2 additions & 0 deletions src/generated/rpg_actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ std::ostream& operator<<(std::ostream& os, const Actor& obj) {
os << ", initial_equipment="<< obj.initial_equipment;
os << ", unarmed_animation="<< obj.unarmed_animation;
os << ", class_id="<< obj.class_id;
os << ", unknown3A="<< obj.unknown3A;
os << ", battle_x="<< obj.battle_x;
os << ", battle_y="<< obj.battle_y;
os << ", battler_animation="<< obj.battler_animation;
Expand All @@ -47,6 +48,7 @@ std::ostream& operator<<(std::ostream& os, const Actor& obj) {
os << (i == 0 ? "[" : ", ") << obj.skills[i];
}
os << "]";
os << ", unknown40="<< obj.unknown40;
os << ", rename_skill="<< obj.rename_skill;
os << ", skill_name="<< obj.skill_name;
os << ", state_ranks=";
Expand Down