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
struct Adjacency | |
{ | |
struct Vertex | |
{ | |
// Vertices are shared by a variable number of edges. This indexes the global EdgeRef array. | |
uint32_t edgeStartRef; | |
uint32_t nbEdges; | |
}; | |
union EdgeRef |
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
- Wednesday 25/07 --------------------------------------------------------------- | |
+ Thusrday (all-nighter!) | |
Fixed timer speeding up when wrapping. | |
Improved handling again (no longer get pulled to the side if the road has | |
any form of banking). | |
Replaced white texture allocation in the dreamcast renderer with a mini patch | |
on the stack, also deleted the big vertex buffer in the destructor. |
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
struct GlobalHeapAllocator : public memAllocator | |
{ | |
void* malloc(size_t size) override | |
{ | |
return ::malloc(size); | |
} | |
void free(void* ptr) override | |
{ | |
return ::free(ptr); |
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
struct MEMORY_API memStackAllocatorBlock | |
{ | |
memStackAllocatorBlock(uint32_t size) | |
: data_start(nullptr) | |
, data_end(nullptr) | |
, next(nullptr) | |
{ | |
// Allocate block memory | |
data_start = (uint8_t*)::malloc(size); | |
data_end = data_start + size; |
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
cmp_device_fn SamplePoint TryMarchToSurface(Texture3Du<short> tex_voxel_cache, RayMarch rm) | |
{ | |
// Record an initial sample position for when locating the surface fails | |
SamplePoint initial_sample = rm.sample; | |
// Don't ray march if a normal couldn't be calculated | |
if (rm.ray_dir.x == (float)(1<<17)) | |
return initial_sample; | |
// Want max traversal distance in terms of cells |
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
# <pep8-80 compliant> | |
bl_info = { | |
"name": "Star mesh format (.starmesh)", | |
"author": "Don Williamson", | |
"version": (0, 1), | |
"blender": (2, 6, 3), | |
"location": "File > Import-Export > Star Mesh (.starmesh) ", | |
"description": "Import-Export Star Mesh", |
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
#include "FunctionalPropertyModifiers.h" | |
void fpmCallStore::CallAll(double time) | |
{ | |
for (auto i : m_FunctionCallMap) | |
{ | |
const fpmFunctionCalls& calls = i->value; | |
calls.call_all_fn(i->key, calls, time); |
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
// REPLACE WITH STACK ALLOCATOR !!! | |
#include "ConvexPolygon.h" | |
#include <sdla/SDLWrap.h> | |
#include <algorithm> | |
// This is a non-randomised algorithm that sorts the input points so that each new point added | |
// to the convex polygon is outside the one already defined. Normally this would be grossly |
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
// polygen.cpp : Defines the entry point for the console application. | |
// | |
#include "stdafx.h" | |
#include <stdio.h> | |
#include <string.h> | |
#include <conio.h> | |
#define CHAR_VALUE(c, x, y) (c[y] & (1 << (7 - x))) |
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
// LIB | |
using Buffer = std::vector<uint8_t>; | |
// LIB | |
struct Command | |
{ | |
int size; | |
// NOTE: This *does not* need to be virtual - it's just the way std::function achieves it... | |
virtual void Call() = 0; |