Last active
August 29, 2015 14:26
-
-
Save byteandahalf/4ed20a655309681575a6 to your computer and use it in GitHub Desktop.
PortalTexture::tick
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
virtual void PortalTexture::tick() { | |
// copy the next frame of the image into the current frame buffer | |
// Left shift by 10 is the same as * 1024 | |
// 0x400 = 1024, which is the number of uchars in one frame | |
// (16*16 pixels, with an RGBA for each pixel) | |
memcpy(currentFramePixels, pixels[currentFrame << 10], 0x400); | |
currentFrame++; | |
if(currentFrame >= frameCount) { | |
currentFrame = 0; | |
} | |
} |
I'll post an example later.
Thanks!All Russia love you :)
Buy you can help me with initialization FoodItem?I get crash
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How make custom entity?