loading works!!
This commit is contained in:
@@ -38,7 +38,7 @@ namespace Generated
|
||||
}
|
||||
const StaticPuzzleCard& GetCard(const StaticPuzzleData& data, StaticPuzzleCardHandle H)
|
||||
{
|
||||
// assert(IsValid(H));
|
||||
assert(IsValid(H));
|
||||
return data.Cards[H.Idx];
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ namespace Generated
|
||||
if (dataChanged)
|
||||
{
|
||||
char path[128]{0};
|
||||
bx::snprintf(path, sizeof(path), "game/data/%s.pzl", obj.PuzzleName);
|
||||
bx::snprintf(path, sizeof(path), "game/data/puzzles/%s.pzl", obj.PuzzleName);
|
||||
Serializer ser;
|
||||
ser.Init(path);
|
||||
if (Save(&obj, 1, ser))
|
||||
@@ -231,4 +231,15 @@ namespace Generated
|
||||
lhs += rhs;
|
||||
return lhs;
|
||||
}
|
||||
PuzPos operator-=(PuzPos lhs, const PuzPos& rhs)
|
||||
{
|
||||
lhs.X -= rhs.X;
|
||||
lhs.Y -= rhs.Y;
|
||||
return lhs;
|
||||
}
|
||||
PuzPos operator-(PuzPos lhs, const PuzPos& rhs)
|
||||
{
|
||||
lhs -= rhs;
|
||||
return lhs;
|
||||
}
|
||||
} // namespace Generated
|
||||
|
||||
Reference in New Issue
Block a user