A new little teaser for you, just to show I'm taking demo coders seriously

I've started on a 'bare bones' engine, based around the ptc stuff I've seen in other parts of the forum.. It's pretty basic at the moment, but it runs shocky's raster code reasonably well so far, while still retaining a lot of cobra functionality (as in core functionality, rather than gfx engine functionality).
At present it provides the ability to create frambuffers and read/write to them on a pixel by pixel basis, that's about it at the moment (full keyboard support is in there though).
Here is an example of the raster code:
// RASTER EFFECT BY SHOCKWAVE.
// ---------------------------
// FEBRUARY 2007.
// LAME I KNOW, BUT FROM LITTLE ACORNS ETC....!!!!
// updated to test the use of 'cobramini', a new low level lib for cobra.
//----------------------------------------------------------------------------------------------------------------------------------
PROGRAM USES cobramini, KEYSET
//----------------------------------------------------------------------------------------------------------------------------------
CONST XRES = 640
CONST YRES = 480
VAR
GADD : REAL =0
GADD2: REAL =0
GADD3: REAL =0
v,r,j:integer
//----------------------------------------------------------------------------------------------------------------------------------
PROCEDURE INITIALISE()
BEGIN
OPENSCREEN( XRES , YRES)
END
//----------------------------------------------------------------------------------------------------------------------------------
//----------------------------------------------------------------------------------------------------------------------------------
// MAIN PROGRAM
//----------------------------------------------------------------------------------------------------------------------------------
VAR
Y : INTEGER
RD,GR,BL : REAL
t1,t2,d:real
frames,fps:integer
ImagePointer:integer
BEGIN
INITIALISE()
frames = 0
t1 = millisecs
WHILE NOT KEYDOWN (VK_ESCAPE)
GADD=GADD+1
GADD2=GADD2+2
GADD3=GADD3+3
if Millisecs-t1< 1000 then
inc(frames)
else
fps = frames
frames = 0
t1 = millisecs
endif
ImagePointer = currentmembuffer
FOR Y=0 TO YRES-1
RD = 125+((SIN(Y+GADD3)*50)+(COS(Y+GADD2)*50)-(SIN(Y+GADD)*24))
GR = 125+((SIN(Y+GADD2)*50)+(COS(Y+GADD)*50)+(SIN(Y+GADD3)*24))
BL = 125+((SIN(Y+GADD)*50)-(COS(Y+GADD3)*50)-(SIN(Y+GADD2)*24))
r = ToRGB(rd,gr,bl)
v = ImagePointer + (y*xres*4)
j=xres
asm
@mov eax,[!r]
@mov ecx,[!j]
@mov edi,[!v]
@rep stosd
endasm
NEXT
FLIP
WEND
MessageBox('FPS:'+fps)
END
Nice thing is, it also compiles down much smaller, ok not the 40k you can get with freebasic, 271k which is still a quarter of the usual exe size for cobra.
So, the question is... If I develop this further, what features would you, as demo coders, want in there ? (remembering that I would want to try and keep this as a low level library).
Things on the list so far (note excessive use of the word "simple")
1. Simple sound engine (probably just mod's, maybe wave files)
2. Simple drawing commands (including writing text to a buffer, as that can be a pain)
3. Simple image loader (probably restricted to bmp, or at a push include png)
I've attached the above code as an exe for you to have a look at.



