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

Feature/community 2.0 #1194

Merged
merged 9 commits into from
Oct 14, 2017
Merged

Feature/community 2.0 #1194

merged 9 commits into from
Oct 14, 2017

Conversation

halfnelson
Copy link
Contributor

WIP Fixes for 2.0 builds on linux/windows/webassembly, opened pull request for discussion.

Convert projects to vs2017
Fix easy to solve warnings in vs2017 so that we can keep building as warnings=errors (cast precision and unused code)
MOAIDeck and DrawShape I removed calls that tripped up the warnings in VS2017 that look to me like they just call themselves forever recursively (vs thinks the same)
GFXDevice and STLString are trying to work around fact that tolower takes an int and returns an int but we are using char, so it trips up the loss of precision warning in vs2017
ZLBox looked like it was calling itself recursively,and creating a ZLBox that it didn't use, I changed it to what I thought made sense, but will need to be checked.
zl_replace_stdlib.h system is already declared in one of win10's headers as dllimport, so this guards it. You might have a better fix in mind.
@patrickmeehan
Copy link
Member

@halfnelson Looks good. You said "opening for discussion." I'm fine with pulling this in.

@@ -133,15 +133,14 @@ MOAIDeck::~MOAIDeck () {

//----------------------------------------------------------------//
bool MOAIDeck::Overlap ( u32 idx, const ZLVec2D& vec, u32 granularity, ZLBounds* result ) {

return this->Overlap ( idx, vec, granularity, result );

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@patrickmeehan did this ever work? am I missing some magic overload logic? this looks like it will always be recursive. is it right to just return false instead? or is there another overlap method that this should be delegating to.

Copy link
Member

@patrickmeehan patrickmeehan Oct 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@david-pershouse Looks like I didn't update it to MOAIDeck_Overlap (). I'm bringing in a new naming convention for virtual methods as I refactor/rewrite, but the public-facing methods keep their original names. So a few glitches like this that would result in a recursive call.

@@ -170,7 +170,10 @@ void MOAIDrawShape::DrawPoint ( const ZLVec2D& loc ) {
//----------------------------------------------------------------//
void MOAIDrawShape::DrawPoint ( float x, float y, float z ) {

this->DrawPoint ( x, y, z );

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@patrickmeehan this is the same weird logic where it tries to call itself. I just do nothing here to make the compiler happy, but maybe you know what to do to actually get it to "draw a point"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@david-pershouse My bad, same as the other. Should be MOAIDrawShape_DrawPoint ().

@@ -225,7 +225,7 @@ void ZLBox::Grow ( const ZLRect& rect, bool first, u32 plane ) {

ZLBox grow;
grow.Init ( rect, plane );
this->Grow ( rect, first );
this->Grow ( grow, first );

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@patrickmeehan I assume that this was the correct fix here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@david-pershouse Looks right.

@david-pershouse
Copy link

I have commented on the lines that would be good to double check. Thanks

@patrickmeehan patrickmeehan merged commit bde3b86 into develop Oct 14, 2017
@patrickmeehan patrickmeehan deleted the feature/community-2.0 branch October 14, 2017 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants