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 "KGStagePlayerComponent.h" | |
#include "glfw.h" | |
KGStagePlayerComponent* KGStagePlayerComponentNew(void){ | |
KGStagePlayerComponent* self = calloc(1, sizeof(KGStagePlayerComponent)); | |
return self; | |
} | |
void KGStagePlayerComponentDelete(KGStagePlayerComponent* self){ | |
if(not self) return; |
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
//This: | |
variant UniformValue (Array[GLfloat, 16], GLfloat, Array[GLubyte, 4], …); | |
record Uniform | |
( | |
name: String, | |
location: GLint, | |
value: ShaderUniformValue | |
); | |
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
NSBitmapImageRep* bitmapImageRep = [[NSBitmapImageRep alloc] | |
initWithBitmapDataPlanes: NULL | |
pixelsWide: targetImage.width | |
pixelsHigh: targetImage.height | |
bitsPerSample: 8 | |
samplesPerPixel: 4 | |
hasAlpha: YES | |
isPlanar: NO | |
colorSpaceName: NSDeviceRGBColorSpace | |
bytesPerRow: 0 |
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
Containable: interface { | |
getRawValue: func<T> -> T//Not really used... | |
} | |
Cell: class<T> implements Containable { | |
value: T | |
init: func(=value) {} | |
} |
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
Features (I don't care about the syntax for this at this point): | |
1. Ignore the underlying ABI that is compiled to | |
Reasoning: Portability. A good example of how to handle things like this is with .NET/C#, where any name can be used as an identifier, but if it has other syntax nastiness around it (like being a keyword or having spaces in between) it can be prefixed with a @ or surrounded with []. Obviously we'd have to go with something different, but the same concept can be applied. This would allow compatibility with other languages that may (will!) have a different set of keywords than the ones we use in ooc | |
Alternative: We could just ignore the idea of a direct name mapping of structures/functions and create a JSON "interface" file, blah, blah, blah or do really nasty name mangling. | |
2. GC built into the language as a language triggered automatic reference counting system | |
Reasoning: GC is nice, but for applications where it's crucial to make sure that no sudden pauses of any duration occur, such as |
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 <stdbool.h> | |
#include <iso646.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <ctype.h> | |
typedef enum{ | |
LX1LexerErrorNone, | |
LX1LexerErrorUnknown |
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
Object = {} | |
local ObjectMetatables = {} | |
function Object:new(...) | |
local clone = {} | |
local meta=ObjectMetatables[self] | |
if meta == nil then | |
meta = {__index=self} | |
ObjectMetatables[self] = meta |
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); |
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
#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 | |
} |
NewerOlder