Skip to content

Instantly share code, notes, and snippets.

@gwx
gwx / array-list.zh
Created September 29, 2013 21:49
random rooms
// This is a library for array based integer lists.
// Each list is an array.
// The first element is the length.
// The rest of the elements are the contents.
// Because of this, indices are 1-based.
const int SIZE = 0;
void ArrayList_Clear(int list) {
// There is no custom link action - fall back on Link->Action.
const int CLA_NONE = 0;
// Link is pounding with a hammer.
const int CLA_POUND = 1;
// Link is stabbing.
const int CLA_STAB = 2;
// Link is throwing.
const int CLA_THROW = 3;
// Link is slashing.
const int CLA_SLASH = 4;
// The weapon id used for animations.
const int LW_ANIMATION = 31;
// The weapon id used for animations that you don't want to be updated.
const int LW_ANIMATION2 = 32;
// The weapon->Misc index used to store the assigned sprite id.
// If you don't want to use this, set this to -1.
const int ANIMATION_SPRITE_INDEX = 1;
// weapon->Misc index for storing fine X movement.
@gwx
gwx / stairs.zh
Last active December 20, 2015 10:39
Sideview stairs in ZC.
import "std.zh"
////////////////////////////////////////////////////////////////
//// Engine Constants.
// Combo Flag for soft platforms.
const int CF_SOFT = 98;
//// Block Types.
// An empty block.
@gwx
gwx / gist:6116833
Created July 30, 2013 20:51
Sideview stairs in ZC.
import "std.zh"
////////////////////////////////////////////////////////////////
//// Engine Constants.
// Combo Flag for soft platforms.
const int CF_SOFT = 98;
//// Block Types.
// An empty block.
@gwx
gwx / gist:5539989
Created May 8, 2013 11:58
animation.zh
// The weapon id used for animations.
const int LW_ANIMATION = 31;
// The weapon->Misc index used to store the animation id.
const int ANIMATION_ID_INDEX = 0;
// The next animation id to use.
int animationNextId = 0;
// Get the unique id of an animation.
// Slash flags.
const int SF_CAN = 1;
const int SF_ITEM = 2;
const int SF_NEXT = 4;
const int SF_CONTINUOUS = 8;
const int SF_BUSH = 16;
const int SF_FLOWER = 32;
const int SF_GRASS = 64;
// Id of the bush animation to use.