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
Could NOT find BZip2 (missing: BZIP2_LIBRARIES BZIP2_INCLUDE_DIR) | |
Could NOT find JPEG (missing: JPEG_LIBRARY JPEG_INCLUDE_DIR) | |
Could NOT find ZLIB (missing: ZLIB_LIBRARY ZLIB_INCLUDE_DIR) | |
Could NOT find GME (missing: GME_LIBRARIES GME_INCLUDE_DIR) | |
Using internal zlib | |
Using internal jpeg library | |
Using internal bzip2 library | |
Using internal gme library | |
c:/app/gzdoom/zlib | |
c:/app/gzdoom/bzip2 |
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
One of the primary benefits of using a fixed-width | |
programming font is that things line up in columns | |
if they are the same length in characters. (Please | |
note that monospacing is not just for indentation; | |
indentation works fine with proportional fonts. It | |
is only once you have a non-blank character on the | |
line that proportional vs. monospace differ much.) | |
In my experience, lining code up so features align | |
vertically makes it a lot easier to avoid the bugs |
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
#define GDRAW_GL_EXTENSION_LIST \ | |
/* identifier import procname */ \ | |
/* GL_ARB_multitexture */ \ | |
GLE(ActiveTexture, "ActiveTextureARB", ACTIVETEXTUREARB) \ | |
/* GL_ARB_texture_compression */ \ | |
GLE(CompressedTexImage2D, "CompressedTexImage2DARB", COMPRESSEDTEXIMAGE2DARB) \ | |
/* GL_ARB_vertex_buffer_object */ \ | |
GLE(GenBuffers, "GenBuffersARB", GENBUFFERSARB) \ | |
GLE(DeleteBuffers, "DeleteBuffersARB", DELETEBUFFERSARB) \ | |
GLE(BindBuffer, "BindBufferARB", BINDBUFFERARB) \ |
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
#define atom_array_ref_preshifted(arr,offset) ((svmatom *) (((uint8 *) (arr)) + (offset))) | |
#define atom_array_ref_naive(arr,offset) (&(arr)[offset]) | |
#ifdef STB_VM_CONFIG_PRESHIFTED_BYTESTREAM_CPOOL | |
#define atom_cpool_ref atom_array_ref_preshifted | |
#else | |
#define atom_cpool_ref atom_array_ref_naive | |
#endif | |
#ifdef STB_VM_CONFIG_PRESHIFTED_BYTESTREAM_REG |
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
////////////////////////////////////////////////////////////////////////////// | |
// | |
// Easy-to-use API: | |
// | |
// * "input pixels" points to an array of image data with 'num_channels' channels (e.g. RGB=3, RGBA=4) | |
// * input_w is input image width (x-axis), input_h is input image height (y-axis) | |
// * stride is the offset between successive rows of image data in memory, in bytes. you can | |
// specify 0 to mean packed continuously in memory | |
// * alpha channel is treated identically to other channels. | |
// * colorspace is linear or sRGB as specified by function name |
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
// idle, over, down, over&down, selected, sel&over, disabled | |
static int stbte__color_table[STBTE__num_color_modes][STBTE__num_color_aspects][STBTE__num_color_states] = | |
{ | |
{ | |
{ 0x000000, 0x60d060, 0xc0ffc0, 0xc0ffc0, 0x40c040, 0x60d060, 0x505050, }, | |
{ 0x40ff40, 0x80ff80, 0x80ff80, 0x80ff80, 0x80ff80, 0x80ff80, 0x606060, }, | |
{ 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0x909090, }, | |
}, { | |
{ 0x808890, 0x606060, 0x606060, 0x606060, 0x606060, 0x606060, 0x606060, }, | |
{ 0x605860, 0x606060, 0x606060, 0x606060, 0x606060, 0x606060, 0x606060, }, |
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
Thinking about this some more: the decimal expansion of the halfway point between two numbers is always going to be either | |
...xyz000000 | |
or | |
...xyz500000 | |
We don't want to deal with the 5s if we can avoid it. Say the longest decimal expansion of a binary float is N digits (it's somewhere around 770, haven't calculated it exactly). Then the halfway point is gonna be all zeros after N+1 decimal digits, guaranteed. |
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
Concerning "Modeling Real-World Terrain with Exponentially Distributed Noise" | |
http://jcgt.org/published/0004/02/01/ | |
Comments by Sean Barrett (sean at nothings dot org, @nothings on twitter) | |
Table of contents: | |
1. Proof of "mu" in section 3 loses a negation partway | |
through, thus giving an obviously nonsensical result. |
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
JMP L1 | |
MOV UP,DOWN | |
L1: JRO RIGHT | |
MOV UP,ACC | |
MOV ACC,RIGHT | |
MOV ACC,DOWN | |
JMP L1 | |
MOV DOWN,UP |
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
#### Are there other single-file public-domain libraries out there? | |
Yes. Here are some: | |
- [nanoSVG](https://github.com/memononen/nanosvg): 1-file SVG parser; 1-file SVG rasterizer (zlib license) | |
- [DG_misc.h](https://github.com/DanielGibson/Snippets/): Daniel Gibson's stb.h-esque cross-platform helpers: path/file, strings (public domain) | |
- [jo_gif.cpp](http://www.jonolick.com/home/gif-writer): tiny GIF writer (public domain) | |
- [gif.h](https://github.com/ginsweater/gif-h): animated GIF writer (public domain) | |
- [MakeID.h](http://www.humus.name/3D/MakeID.h): allocate/deallocate small integer IDs efficiently (public domain) |
OlderNewer