-
-
Save MasterQ32/a9ba424dc7ede969a82b0a85a8af0968 to your computer and use it in GitHub Desktop.
TileMap Node Self Reference
This file contains 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
Node = struct { | |
const This = @This(); | |
const Child = union(enum) { | |
leaf: *Chunk, | |
branch: [2][2]?*This, | |
}; | |
type: Child, | |
left: isize, | |
right: isize, | |
top: isize, | |
bottom: isize, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment