Skip to content

Instantly share code, notes, and snippets.

View aap's full-sized avatar

aap

  • Berlin
  • X @akero_p
View GitHub Profile
.cpu "6502"
; move word
movw .macro
lda \2
sta \1
lda \2+1
sta \1+1
.endm
; move immediate word
#define THING_ELEMENTS\
E(int, a)\
E_x(int, b)\
E(int, c)\
EB(int, A, 1)\
EB(int, B, 3)\
EB(int, C, 1)\
EB_x(int, D, 1)\
E(float, d)
struct MemoryBlock
{
size_t sz;
uint32 hint;
void *origPtr;
LLLink inAllocList;
};
LinkList allocations;
size_t totalMemoryAllocated;
(defparameter *grammar*
'((accept list nil)
(list list 'comma element)
(list element)
(element 'a)
(element 'b)))
(defvar *rules*) ; vector of *grammar*
(defvar *sets*)
@aap
aap / 24h.cpp
Last active July 22, 2017 09:26
24h timecycle for GTA SA
#define _CRT_SECURE_NO_WARNINGS
#pragma warning(disable: 4244) // int to float
#pragma warning(disable: 4800) // int to bool
#pragma warning(disable: 4838) // narrowing conversion
#include <windows.h>
// use https://github.com/aap/skygfx_vc/blob/master/src/MemoryMgr.h
#include "MemoryMgr.h"
#define NUMWEATHERS 23