Skip to content

Instantly share code, notes, and snippets.

/.
/usr
/usr/include
/usr/include/jpegint.h
/usr/include/jerror.h
/usr/include/jmorecfg.h
/usr/include/jconfig.h
/usr/include/jpeglib.h
/usr/lib
/usr/lib/x86_64-linux-gnu
void TestLoopOptimizations()
{
Map<int, char> map { [ { 1, '1' }, { 2, '2' }, { 3, '3' } ] };
for(i : map) PrintLn(&i), PrintLn(i);
delete map;
}
void TestManualLoops()
{
Map<int, char> map { [ { 1, '1' }, { 2, '2' }, { 3, '3' } ] };
import "ecere"
class Form1 : Window
{
caption = "Form1";
background = activeBorder;
borderStyle = sizable;
hasMaximize = true;
hasMinimize = true;
hasClose = true;
import "ecere"
// double scale = 6380997;
double scale = 63809; // This is already broken
// double scale = 6380; // This works
class MyApp : GuiApplication
{
driver = "OpenGL";
// driver = "Direct3D";
public struct Light
{
LightFlags flags;
ColorRGB ambient;
ColorRGB diffuse;
ColorRGB specular;
Vector3D direction;
Quaternion orientation;
Object lightObject;
Object target;
//VESA FUNCTION 02
/*
=================
VID_SetMode
=================
*/
void VID_SetMode(WORD mode)
{
__dpmi_regs r;
public Declarator GetFuncDecl(Declarator decl)
{
while(decl && decl.type != functionDeclarator && decl.type != identifierDeclarator)
decl = decl.declarator;
return (decl && decl.type == functionDeclarator) ? decl : null;
}
public Declarator GetFuncDecl(Declarator decl)
{
Declarator funcDecl = null;
while(decl && decl.type != identifierDeclarator)
{
decl = decl.declarator;
if(decl.type == functionDeclarator)
funcDecl = decl;
}
return funcDecl;
void Test()
{
int const * * foo; // this prevents you from doing: **foo = 0;
int * const * bar; // this prevents you from doing: *bar = 0;
int * * const two; // this prevents you from doing: two = 0;
**foo = 0;
*bar = 0;
two = 0;
}
#define PUTXWORD(b, w) \
(b)[0] = (byte)(((w) >> 8) & 0xFF); \
(b)[1] = (byte)(((w) ) & 0xFF);
#define GETXWORD(b) (uint16)(((b)[0] << 8) | (b)[1])