Skip to content

Instantly share code, notes, and snippets.

#include <sys/nearptr.h>
#include <sys/farptr.h>
#include <go32.h>
#include <pc.h>
#include <math.h>
#include <conio.h>
int main(int argc, char **argv)
{
asm(
Iron Maiden - Flight of Icarus
Iron Maiden - Aces High
Blue Oyster Cult - Me 262
Byafra - Sonho de Icaro
Kenny Loggins - Danger Zone
Sabaton - Aces in Exile
Sabaton - No Bullets Fly
Sabaton - Night Wiches
Sabaton - The Red Baron
Sabaton - Metal Machine
#include <math.h>
#include <stdio.h>
#include <allegro.h>
#define ONE_DEG (M_PI / 180.0)
typedef struct surfdata
{
double
/*
allocate a child and move down
parent -> null
^
to
parent -> new child
^
EXPANDED FORMS OF QUATERNION PRODUCTS
HAMILTON'S
with
s1=w
s2=w'
v1=[x,y,z]
v2=[x',y',z']
qp = [s1,v1][s2,v2] = [s1s2 - v1.v2, s1v2 + s2v1 + v1 x v2]
@kdrnic
kdrnic / coq.md
Last active February 27, 2024 17:33
kdrnic's Caves of Qud beginner notes

kdrnic's Caves of Qud beginner notes

The guide below I wrote mostly for myself as a "notebook" of info I found, but then slightly expanded it with stuff that may be useful to others.

As of finishing writing, I have 16 hours of CoQ playtime and have a level 20 character, definitelly still a beginner as well, perhaps a slightly seasoned beginner.

My previous roguelike experience included beating DCSS with a minotaur berserker and playing a good amount of POWDER on my celphone.

Justification

The game is a tad opaque. As this Qud denizen explains (I don't agree with his overall opinion):

#ifndef ARR_H
#define ARR_H
#include <assert.h>
//Usage: arr_t(type) a arr_cleanup;
#define arr_cleanup __attribute__ ((__cleanup__(arr_cleanup_func)))
#define arr_t(t) \
struct \
@kdrnic
kdrnic / fix.md
Last active June 29, 2021 23:46
Finding and fixing a bug in a Lua JSON parser

Engine entities

This is a comparison of data structures for game entities (aka objects, actors...) across different games and game engines.

Game engine choices

  1. Source code has to be at least partly available, either in original form or through reverse-engineering or a remake
  2. The complexity of a 3D game makes those generally more interesting
  3. Similarly, a game in the action genre has more interesting architectural challenges than other genres - complex AI, several different object behaviours, all data structures must be highly performant, etc.
  4. The code is preferentially in the C/C++ languages
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<script src="ace.js" type="text/javascript" charset="utf-8"></script>
<script>
var allegro_code = `
ceil = Math.ceil;
floor = Math.floor;
sin = Math.sin;