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

Call Actor::Setup() when writing ldb file #235

Merged
merged 1 commit into from Sep 30, 2018

Conversation

Projects
None yet
4 participants
@fmatthew5876
Contributor

fmatthew5876 commented Sep 25, 2018

reader_struct doesn't call Actor::Setup() to properly default the initial and final levels. The result is that liblcf writes some bytes where it shouldn't.

This adds a DefaultStruct() wrapper which lets you customize how a default object is created. For most it's just a constructor, but for Actor you need to call Setup().

Part of #234

@Ghabry

Ghabry approved these changes Sep 27, 2018

@Ghabry

This comment has been minimized.

Member

Ghabry commented Sep 27, 2018

0.5.4 will be released soon (tm), therefore I want to avoid LCF-changes that can break stuff in the Player by accident which is not the case for LDB-writes, therefore I'm fine with merging this at anytime.

@carstene1ns carstene1ns added the Chunks label Sep 27, 2018

@carstene1ns carstene1ns added this to the 0.5.4 milestone Sep 27, 2018

@carstene1ns

Gives us more compatibility with the editor, so is very nice!
Also, as @Ghabry said, does not affect Player, so merging is fine.

However, the usual style nits ;-)

@@ -36,6 +36,22 @@ void Struct<S>::MakeTagMap() {
tag_map[fields[i]->name] = fields[i];
}
template <typename T>
struct StructDefault {
static T make() {

This comment has been minimized.

@carstene1ns

carstene1ns Sep 27, 2018

Member

liblcf uses tabs, not spaces for indentation.

Call Actor::Setup() when writing ldb file
- Correctly writes default initial and final levels.
@fmatthew5876

This comment has been minimized.

Contributor

fmatthew5876 commented Sep 27, 2018

fixed style nits.

@carstene1ns

This comment has been minimized.

Member

carstene1ns commented Sep 30, 2018

jenkins: test this please... </3

@Ghabry Ghabry merged commit 9f0d390 into EasyRPG:master Sep 30, 2018

5 checks passed

GCW0 Build finished.
Details
GNU/Linux Build finished.
Details
OSX Build finished.
Details
Windows Build finished.
Details
web Build finished.
Details

@fmatthew5876 fmatthew5876 deleted the fmatthew5876:ldb_copy branch Oct 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment