Remove iscomparable from structs.csv
MODIFY
generator/csv/structs.csv
generator/csv/structs.csv
-#Type,Structure,Base,Index available?,Comparable?
-ldb,Parameters,,,1
-ldb,Equipment,,,1
-ldb,EventCommand,,,1
-ldb,MoveCommand,,,1
-ldb,Learning,,1,1
-ldb,Actor,,1,1
-ldb,Sound,,0,1
-ldb,AnimationTiming,,1,1
-ldb,AnimationCellData,,1,1
-ldb,AnimationFrame,,1,1
-ldb,Animation,,1,1
-ldb,Attribute,,1,1
-ldb,BattleCommand,,1,1
-ldb,BattleCommands,,0,1
-ldb,BattlerAnimationExtension,,1,1
-ldb,BattlerAnimation,,1,1
-ldb,BattlerAnimationData,,1,1
-ldb,Chipset,,1,1
-ldb,Class,,1,1
-ldb,CommonEvent,,1,1
-ldb,Skill,,1,1
-ldb,ItemAnimation,,1,1
-ldb,Item,,1,1
-ldb,EnemyAction,,1,1
-ldb,Enemy,,1,1
-ldb,TroopMember,,1,1
-ldb,TroopPageCondition,,0,1
-ldb,TroopPage,,1,1
-ldb,Troop,,1,1
-ldb,Terrain,,1,1
-ldb,State,,1,1
-ldb,Terms,,0,1
-ldb,Music,,0,1
-ldb,TestBattler,,1,1
-ldb,System,,0,1
-ldb,Switch,,1,1
-ldb,Variable,,1,1
-ldb,Database,,0,1
-lmu,EventPageCondition,,0,1
-lmu,MoveRoute,,0,1
-lmu,EventPage,,1,1
-lmu,Event,,1,1
-lmu,Map,,0,1
-lsd,SaveTitle,,0,1
-lsd,SaveSystem,,0,1
-lsd,SaveScreen,,0,1
-lsd,SavePicture,,1,1
-lsd,SavePartyLocation,SaveMapEventBase,0,1
-lsd,SaveVehicleLocation,SaveMapEventBase,0,1
-lsd,SaveActor,,1,1
-lsd,SaveInventory,,0,1
-lsd,SaveTarget,,1,1
-lsd,SaveEventCommands,,1,1
-lsd,SaveEventData,,0,1
-lsd,SaveMapEventBase,,0,1
-lsd,SaveMapEvent,SaveMapEventBase,1,1
-lsd,SaveMapInfo,,0,1
-lsd,SaveCommonEvent,,1,1
-lsd,SavePanorama,,0,1
-lsd,Save,,0,1
-lmt,Rect,,,1
-lmt,Encounter,,1,1
-lmt,MapInfo,,1,1
-lmt,Start,,0,1
-lmt,TreeMap,,,1
+#Type,Structure,Base,Index available?
+ldb,Parameters,,
+ldb,Equipment,,
+ldb,EventCommand,,
+ldb,MoveCommand,,
+ldb,Learning,,1
+ldb,Actor,,1
+ldb,Sound,,0
+ldb,AnimationTiming,,1
+ldb,AnimationCellData,,1
+ldb,AnimationFrame,,1
+ldb,Animation,,1
+ldb,Attribute,,1
+ldb,BattleCommand,,1
+ldb,BattleCommands,,0
+ldb,BattlerAnimationExtension,,1
+ldb,BattlerAnimation,,1
+ldb,BattlerAnimationData,,1
+ldb,Chipset,,1
+ldb,Class,,1
+ldb,CommonEvent,,1
+ldb,Skill,,1
+ldb,ItemAnimation,,1
+ldb,Item,,1
+ldb,EnemyAction,,1
+ldb,Enemy,,1
+ldb,TroopMember,,1
+ldb,TroopPageCondition,,0
+ldb,TroopPage,,1
+ldb,Troop,,1
+ldb,Terrain,,1
+ldb,State,,1
+ldb,Terms,,0
+ldb,Music,,0
+ldb,TestBattler,,1
+ldb,System,,0
+ldb,Switch,,1
+ldb,Variable,,1
+ldb,Database,,0
+lmu,EventPageCondition,,0
+lmu,MoveRoute,,0
+lmu,EventPage,,1
+lmu,Event,,1
+lmu,Map,,0
+lsd,SaveTitle,,0
+lsd,SaveSystem,,0
+lsd,SaveScreen,,0
+lsd,SavePicture,,1
+lsd,SavePartyLocation,SaveMapEventBase,0
+lsd,SaveVehicleLocation,SaveMapEventBase,0
+lsd,SaveActor,,1
+lsd,SaveInventory,,0
+lsd,SaveTarget,,1
+lsd,SaveEventCommands,,1
+lsd,SaveEventData,,0
+lsd,SaveMapEventBase,,0
+lsd,SaveMapEvent,SaveMapEventBase,1
+lsd,SaveMapInfo,,0
+lsd,SaveCommonEvent,,1
+lsd,SavePanorama,,0
+lsd,Save,,0
+lmt,Rect,,
+lmt,Encounter,,1
+lmt,MapInfo,,1
+lmt,Start,,0
+lmt,TreeMap,,

MODIFY
generator/generate.py
generator/generate.py
@@ -216,7 +216,7 @@ def process_file(filename, namedtup):
return result
def get_structs(filename='structs.csv'):
- Struct = namedtuple("Struct", "name base hasid iscomparable")
+ Struct = namedtuple("Struct", "name base hasid")
result = process_file(filename, Struct)
@@ -226,7 +226,7 @@ def get_structs(filename='structs.csv'):
processed_result[k] = []
for elem in struct:
- elem = Struct(elem.name, elem.base, bool(int(elem.hasid)) if elem.hasid else None, bool(int(elem.iscomparable)))
+ elem = Struct(elem.name, elem.base, bool(int(elem.hasid)) if elem.hasid else None)
processed_result[k].append(elem)
return processed_result
@@ -350,8 +350,7 @@ def generate():
f.write(rpg_header_tmpl.render(
struct_name=struct.name,
struct_base=struct.base,
- has_id=struct.hasid,
- is_comparable=struct.iscomparable
+ has_id=struct.hasid
))
if struct.name in flags:

MODIFY
generator/templates/rpg_header.tmpl
generator/templates/rpg_header.tmpl
@@ -97,7 +97,6 @@ namespace RPG {
{%- endif %}
{%- endif %}
{%- endfor %}
- {%- if is_comparable %}
inline bool operator==(const {{ struct_name }}& l, const {{ struct_name }}& r) {
{%- for field in fields[struct_name]|field_is_used -%}
@@ -112,7 +111,6 @@ namespace RPG {
inline bool operator!=(const {{ struct_name }}& l, const {{ struct_name }}& r) {
return !(l == r);
}
- {%- endif %}
}
#endif

Remove iscomparable from structs.csv