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
#include <stdio.h> | |
#include <malloc.h> | |
#define MAX_SIZE 500 | |
#define MIN_SIZE 10 | |
#define MAX_SUBS 300 | |
struct list_t | |
{ | |
int nodes[MAX_SUBS]; |
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
private IEnumerator UpdateChunks(){ | |
for (int i = 1; i < VIEW_RANGE; i += ChunkWidth) { | |
float vr = i; | |
for (float x = transform.position.x - vr; x < transform.position.x + vr; x += ChunkWidth) { | |
for (float z = transform.position.z - vr; z < transform.position.z + vr; z += ChunkWidth) { | |
_pos.Set(x, 0, z); // no y, yet | |
_pos.x = Mathf.Floor(_pos.x/ChunkWidth)*ChunkWidth; | |
_pos.z = Mathf.Floor(_pos.z/ChunkWidth)*ChunkWidth; |
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
/** | |
markdeep.js | |
Version 0.10 | |
Copyright 2015-2016, Morgan McGuire, http://casual-effects.com | |
All rights reserved. | |
------------------------------------------------------------- | |
See http://casual-effects.com/markdeep for documentation on how to |