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
import "ecere" | |
class SlidingPanel : Window | |
{ | |
bool dragging; | |
Point startScroll, startDrag; | |
bool OnLeftButtonDown(int x, int y, Modifiers mods) | |
{ | |
startScroll = scroll; | |
startDrag = { x, y }; |
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
import "ecere" | |
class Form1 : Window | |
{ | |
caption = "Form1"; | |
background = activeBorder; | |
borderStyle = sizable; | |
hasMaximize = true; | |
hasMinimize = true; | |
hasClose = true; |
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
import "ecere" | |
void SomeFunction(Form1 form, void method(Form1, int)) | |
{ | |
method(form, 3); | |
} | |
class Form1 : Window | |
{ | |
caption = "Form1"; |
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
public Type ProcessType(OldList specs, Declarator decl) | |
{ | |
return _ProcessType(specs, decl, null); | |
} | |
public Type _ProcessType(OldList specs, Declarator decl, Type parentType) | |
{ | |
Type type = parentType; | |
Declarator subDecl = decl ? decl.declarator : null; | |
if(!parentType) |
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 PUTXWORD(b, w) \ | |
(b)[0] = (byte)(((w) >> 8) & 0xFF); \ | |
(b)[1] = (byte)(((w) ) & 0xFF); | |
#define GETXWORD(b) (uint16)(((b)[0] << 8) | (b)[1]) |
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
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; | |
} |
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
public Declarator GetFuncDecl(Declarator decl) | |
{ | |
Declarator funcDecl = null; | |
while(decl && decl.type != identifierDeclarator) | |
{ | |
decl = decl.declarator; | |
if(decl.type == functionDeclarator) | |
funcDecl = decl; | |
} | |
return funcDecl; |
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
public Declarator GetFuncDecl(Declarator decl) | |
{ | |
while(decl && decl.type != functionDeclarator && decl.type != identifierDeclarator) | |
decl = decl.declarator; | |
return (decl && decl.type == functionDeclarator) ? decl : null; | |
} |
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
//VESA FUNCTION 02 | |
/* | |
================= | |
VID_SetMode | |
================= | |
*/ | |
void VID_SetMode(WORD mode) | |
{ | |
__dpmi_regs r; |
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
public struct Light | |
{ | |
LightFlags flags; | |
ColorRGB ambient; | |
ColorRGB diffuse; | |
ColorRGB specular; | |
Vector3D direction; | |
Quaternion orientation; | |
Object lightObject; | |
Object target; |