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
Vec3: class{ | |
x, y, z: Float | |
allocWith: static func(allocator: Func(SizeT)->Pointer) -> This{ | |
object := allocator(Vec3 as Class instanceSize) as This | |
if(object) object class = This | |
return object | |
} | |
init: func(=x,=y,=z) -> This { this } |
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
/* | |
Platform Independent Endian Converter | |
Copyright (c) 2010 Oliver Daids | |
3-clause BSD | |
Note: This was not designed for speed, nor cleanliness, it was just a quick experiment to see if I could get a platform independent endian converter. | |
*/ | |
#include <stdint.h> |
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
AEArray(int) ints; | |
AEArrayInit(&ints); | |
AEArrayAdd(&ints, 1); | |
AEArrayAdd(&ints, 2); | |
AEArrayAdd(&ints, 3); | |
for(size_t i=0; i<AEArrayLength(&ints); i++) | |
printf("At Index %lu, we have %i\n", (unsigned long)i, AEArrayAsCArray(&ints)[i]); | |
AEArrayDeinit(&ints); |
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
@interface UI : NSObject { | |
AEVec2 windowSize; | |
UIFont* font; | |
AEVec2 mouse; | |
struct{ | |
char left, middle, right, upwheel, downwheel; | |
}mouseButtons; | |
AETable* cache; | |
struct{ | |
AETextBuffer* textBuffer; |
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
//Triangulated Mesh Editing Utility | |
#pragma once | |
#include "AE.h" | |
typedef struct AEMesh AEMesh; | |
typedef struct AEMeshVertex AEMeshVertex; | |
typedef struct AEMeshTriangle AEMeshTriangle; | |
typedef enum{ | |
AEMeshTypeTriangles, |
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
init: func ~withAllArgs(=ano, =mes, =dia){} | |
init: func (ano := 2011, mes := 1, dia := 1) { | |
init~withAllArgs(ano, mes, dia) | |
} |
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 "AE.h" | |
typedef struct{ | |
AEStringHashTable(AETexture) textures; | |
}ResourceManager; | |
void ResourceManagerInit(ResourceManager* self); | |
void ResourceManagerDeinit(ResourceManager* self); | |
AETexture ResourceManagerLookup(ResourceManager* self, const char* filename); | |
void ResourceManagerRemove(ResourceManager* self, const char* filename); |
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 "AE.h" | |
#include "AESDL.h" | |
static void FrameUpdate(AEWindow* window, double seconds){ | |
//Do something here | |
} | |
static void FixedUpdate(AEWindow* window, double seconds){ | |
//Do something here | |
} |
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
typedef struct{ | |
ALuint ID; | |
stb_vorbis* stream; | |
stb_vorbis_info info; | |
ALuint buffers[2]; | |
ALuint source; | |
ALenum format; |
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
#pragma once | |
#include "AECore.h" | |
#include "AEMath.h" | |
#include "AEArray.h" | |
typedef struct AERenderer AERenderer; | |
AERenderer* AERendererNew(void); | |
void AERendererDelete(AERenderer* self); |