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
#define WIN32_LEAN_AND_MEAN | |
#define WIN32_EXTRA_LEAN | |
#include <windows.h> | |
#include <mmsystem.h> | |
#include <GL/gl.h> | |
#include "glext.h" | |
#define XRES 1280 | |
#define YRES 720 |
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
(defun-68k integer-rotate-verts (input :reg a0 | |
output :reg a1 | |
matrix :reg a2 as MatrixInt | |
count :reg d7) | |
(loop dec count | |
(move.w (++ input) x) | |
(move.w (++ input) y) | |
(move.w (++ input) z) | |
(move.l x temp_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
; Pure Lisp based assembler | |
(def my-fun (input1 :in d1 | |
input2 :in d2 | |
output :out d0) | |
(move.l input1 output) | |
(add.l input2 output)) | |
---------------------------------------------------------------------------------------- | |
; We can also have loop constructions by doing a macro (no need for it to be 'built-in') |
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
VBox | |
{ | |
PushButton { label = "Test", onPush = "MyNativePush" }, | |
PushButton { label = "Test 2", onPush = function() print("Meh") end }, | |
ComboBox | |
{ | |
label = "test 4", | |
items = { "test", "test2" }, |
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
RSRESET | |
Window_Next RS.L 1 ; offset 0 | |
Window_LeftEdge RS.W 1 ; offset 4 | |
.. | |
Window_SIZEOF RS.B 0 | |
move.w #4,d7 ; 4 windows to process | |
lea Window,a0 | |
.loop | |
move.w Window_LeftEdge(a0),d0 |
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
1 .section __TEXT,__text,regular,pure_instructions | |
2 .globl _main | |
3 .align 4, 0x90 | |
4 _main: ## @main | |
5 .cfi_startproc | |
6 ## BB#0: | |
7 push RBP | |
8 Ltmp2: | |
9 .cfi_def_cfa_offset 16 | |
10 Ltmp3: |
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
;--------------------------------------------- | |
;create sintab 34 bytes, d7 contains $0000ffff | |
;--------------------------------------------- | |
lea Sin1024(pc),a0 | |
moveq #0,d0 ;a=0 | |
move.l #12500000,d1 ;b=d | |
lsr.w #5,d7 ;2048 values | |
.slop1 |
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
extern unsigned int a; | |
extern unsigned int b; | |
int main(int c, const char** v) | |
{ | |
if (a-b<0) | |
return 0; | |
return 1; | |
} |
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 <intrin.h> | |
#include <emmintrin.h> | |
#include <float.h> | |
#include <assert.h> | |
#include <stdlib.h> | |
int main(int argc, char* argv[]) | |
{ | |
const float a[] = { 1, 2, 3, 4, 1.5f, 4, 2, 12, 3, 9, 5, 9, 1, 2, 12, 3, 1, 59, 3, 4, 9 }; | |
const size_t acount = sizeof(a)/sizeof(a[0]); |
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
typedef struct Poly | |
{ | |
int x, y, z, .. // etc values | |
struct Poly* next; | |
} Poly; | |
Poly* g_sortArray[MaxBuckets]; | |
static void addPoly(Poly* poly, int z) | |
{ |