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

SpriteList.move() code needs to be cleaned up #169

Closed
Aareon opened this Issue Dec 22, 2017 · 5 comments

Comments

Projects
2 participants
@Aareon
Contributor

Aareon commented Dec 22, 2017

def move(self, change_x: float, change_y: float):

Here we set dirty equal to self.vbo_dirty. We then perform a check, maybe do some stuff with OpenGL or what have you, then at the end of it all, we reset self.vbo_dirty to the value in dirty when it doesn’t seem it’s been touched at all.

If it is a pointless modification, I’d suggest modifying the conditional to match

if not self.vbo_dirty:
    ...
@Aareon

This comment has been minimized.

Contributor

Aareon commented Dec 22, 2017

@pvcraven this does need your input

@pvcraven

This comment has been minimized.

Owner

pvcraven commented Dec 22, 2017

I think that was supposed to be code to move a set of sprites in the same direction. It would keep the same vertex buffer objects and move them all as one translate operation. I don't think that code was ever finished so now it is kind of a mess.

@pvcraven pvcraven changed the title from Possibly pointless modification to SpriteList.move() code needs to be cleaned up Dec 22, 2017

@pvcraven pvcraven added this to To do in Release 1.2.4 Dec 22, 2017

@Aareon

This comment has been minimized.

Contributor

Aareon commented Dec 22, 2017

Then maybe I can make a couple minor improvements to help with the process?

@pvcraven

This comment has been minimized.

Owner

pvcraven commented Dec 22, 2017

Sure!

@pvcraven pvcraven moved this from To do to Possible in Release 1.2.4 Dec 23, 2017

Aareon added a commit to Aareon/arcade that referenced this issue Dec 23, 2017

SpriteList.move() code needs to be cleaned up
pvcraven#169

Apart from this, I don't really see what else I can change without breaking things

pvcraven added a commit that referenced this issue Dec 25, 2017

SpriteList.move() code needs to be cleaned up (#171)
* SpriteList.move() code needs to be cleaned up

#169

Apart from this, I don't really see what else I can change without breaking things

* As you wish

Deleted lines 659-671

@pvcraven pvcraven added this to Done in Release 1.3 Feb 11, 2018

@pvcraven

This comment has been minimized.

Owner

pvcraven commented Feb 11, 2018

Delivered as part of 1.3.0.

@pvcraven pvcraven closed this Feb 11, 2018

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