'Allmodex FreeBasic Library header #IFNDEF ALLMODEX_BI #DEFINE ALLMODEX_BI #include "udts.bi" #include "compat.bi" 'Library routines DECLARE SUB setmodex () DECLARE SUB restoremode () DECLARE SUB copypage (BYVAL page1, BYVAL page2) DECLARE SUB clearpage (BYVAL page) DECLARE SUB setvispage (BYVAL page) DECLARE SUB setpal (pal() as RGBcolor) DECLARE SUB fadeto (BYVAL red, BYVAL green, BYVAL blue) DECLARE SUB fadetopal (pal() as RGBcolor) DECLARE SUB setmapdata (array(), pas(), BYVAL t, BYVAL b) DECLARE SUB setmapblock (BYVAL x, BYVAL y, byval l, BYVAL v) DECLARE FUNCTION readmapblock (BYVAL x, BYVAL y, byval l) DECLARE SUB setpassblock (BYVAL x, BYVAL y, BYVAL v) DECLARE FUNCTION readpassblock (BYVAL x, BYVAL y) DECLARE SUB drawmap (BYVAL x, BYVAL y, BYVAL l, BYVAL t, BYVAL p, byval trans as integer = 0) DECLARE SUB setanim (BYVAL cycle1, BYVAL cycle2) DECLARE SUB setoutside (BYVAL defaulttile) DECLARE SUB drawsprite (pic(), BYVAL picoff, pal(), BYVAL po, BYVAL x, BYVAL y, BYVAL page, BYVAL trans = -1) DECLARE SUB wardsprite (pic(), BYVAL picoff, pal(), BYVAL po, BYVAL x, BYVAL y, BYVAL page, BYVAL trans = -1) DECLARE SUB getsprite (pic(), BYVAL picoff, BYVAL x, BYVAL y, BYVAL w, BYVAL h, BYVAL page) DECLARE SUB stosprite (pic(), BYVAL picoff, BYVAL x, BYVAL y, BYVAL page) DECLARE SUB loadsprite (pic(), BYVAL picoff, BYVAL x, BYVAL y, BYVAL w, BYVAL h, BYVAL page) DECLARE SUB bigsprite (pic(), pal(), BYVAL p, BYVAL x, BYVAL y, BYVAL page, BYVAL trans = -1) DECLARE SUB hugesprite (pic(), pal(), BYVAL p, BYVAL x, BYVAL y, BYVAL page, BYVAL trans = -1) DECLARE FUNCTION keyval (BYVAL a) DECLARE FUNCTION getkey () DECLARE SUB waitforkey () DECLARE SUB setkeys () DECLARE SUB clearkey(byval k as integer) DECLARE SUB putpixel (BYVAL x, BYVAL y, BYVAL c, BYVAL p) DECLARE FUNCTION readpixel (BYVAL x, BYVAL y, BYVAL p) DECLARE SUB rectangle (BYVAL x, BYVAL y, BYVAL w, BYVAL h, BYVAL c, BYVAL p) DECLARE SUB fuzzyrect (BYVAL x, BYVAL y, BYVAL w, BYVAL h, BYVAL c, BYVAL p) DECLARE SUB drawline (BYVAL x1, BYVAL y1, BYVAL x2, BYVAL y2, BYVAL c, BYVAL p) DECLARE SUB paintat (BYVAL x, BYVAL y, BYVAL c, BYVAL page, buf(), BYVAL max) DECLARE SUB storepage (fil$, BYVAL i, BYVAL p) DECLARE SUB loadpage (fil$, BYVAL i, BYVAL p) DECLARE SUB setdiskpages (buf(), BYVAL h, BYVAL l) DECLARE SUB setwait overload (b(), BYVAL t) DECLARE SUB setwait overload (BYVAL t) DECLARE SUB dowait () DECLARE SUB printstr (s$, BYVAL x, BYVAL y, BYVAL p) DECLARE SUB textcolor (BYVAL f, BYVAL b) DECLARE SUB setfont (f()) DECLARE SUB setbit (b(), BYVAL w, BYVAL b, BYVAL v) DECLARE FUNCTION readbit (b(), BYVAL w, BYVAL b) DECLARE SUB storeset (fil$, BYVAL i, BYVAL l) DECLARE SUB loadset (fil$, BYVAL i, BYVAL l) DECLARE SUB setpicstuf (buf(), BYVAL b, BYVAL p) DECLARE FUNCTION loadrecord overload (buf(), fh, recordsize, record = -1) DECLARE FUNCTION loadrecord overload (buf(), filename$, recordsize, record = 0) DECLARE SUB storerecord overload (buf(), fh, recordsize, record = -1) DECLARE SUB storerecord overload (buf(), filename$, recordsize, record = 0) DECLARE SUB fixspriterecord (buf(), w, h) DECLARE SUB bitmap2page (pal() as RGBcolor, bmp$, BYVAL p) DECLARE SUB findfiles overload(fmask$, BYVAL attrib, outfile$, buf()) DECLARE SUB findfiles (fmask$, BYVAL attrib, outfile$) DECLARE SUB lumpfiles overload(listf$, lump$, path$, buffer()) DECLARE SUB lumpfiles (listf$, lump$, path$) DECLARE SUB unlump overload (lump$, ulpath$, buffer()) DECLARE SUB unlump(lump$, ulpath$) DECLARE SUB unlumpfile overload (lump$, fmask$, path$, buf()) DECLARE SUB unlumpfile(lump$, fmask$, path$) DECLARE FUNCTION islumpfile (lump$, fmask$) DECLARE FUNCTION isfile (n$) DECLARE FUNCTION isdir (sDir$) DECLARE FUNCTION drivelist (d$()) DECLARE FUNCTION drivelabel$ (drive$) DECLARE FUNCTION isremovable (drive$) DECLARE FUNCTION hasmedia (drive$) DECLARE SUB setupmusic DECLARE SUB closemusic () DECLARE SUB loadsong (f$) DECLARE SUB pausesong () DECLARE SUB resumesong () DECLARE SUB fademusic (BYVAL vol) DECLARE FUNCTION getfmvol () DECLARE SUB setfmvol (BYVAL vol) DECLARE SUB copyfile (s$, d$) DECLARE SUB screenshot (f$, BYVAL p, maspal() as RGBcolor) DECLARE SUB loadbmp (f$, BYVAL x, BYVAL y, BYVAL p) DECLARE SUB bitmap2pal (bmp$, pal() as RGBcolor) DECLARE FUNCTION loadbmppal (f$, pal() as RGBcolor) DECLARE SUB convertbmppal (f$, mpal() as RGBcolor, pal(), BYVAL o) DECLARE FUNCTION bmpinfo (f$, dat()) DECLARE FUNCTION setmouse (mbuf()) DECLARE SUB readmouse (mbuf()) DECLARE SUB movemouse (BYVAL x, BYVAL y) DECLARE SUB mouserect (BYVAL xmin, BYVAL xmax, BYVAL ymin, BYVAL ymax) DECLARE FUNCTION readjoy (joybuf(), BYVAL jnum) DECLARE SUB array2str (arr(), BYVAL o, s$) DECLARE SUB str2array (s$, arr(), BYVAL o) DECLARE SUB setupstack () DECLARE SUB pushw (BYVAL word) DECLARE FUNCTION popw () DECLARE SUB pushdw (BYVAL word) DECLARE FUNCTION popdw () DECLARE SUB releasestack () DECLARE FUNCTION stackpos () DECLARE FUNCTION readstackdw (BYVAL off) DECLARE SUB drawbox(BYVAL x, BYVAL y, BYVAL w, BYVAL h, BYVAL c, BYVAL p) DECLARE FUNCTION isawav(fi$) DECLARE FUNCTION fileisreadable(f$) DECLARE FUNCTION fileiswriteable(f$) DECLARE SUB setupsound () DECLARE SUB closesound () DECLARE SUB playsfx (BYVAL num, BYVAL l=0) 'l is loop count. -1 for infinite loop DECLARE SUB stopsfx (BYVAL num) DECLARE SUB pausesfx (BYVAL num) DECLARE SUB freesfx (BYVAL num) ' only used by custom's importing interface DECLARE FUNCTION sfxisplaying (BYVAL num) DECLARE FUNCTION getmusictype (file$) 'DECLARE SUB getsfxvol (BYVAL num) 'DECLARE SUB setsfxvol (BYVAL num, BYVAL vol) 'DECLARE FUNCTION getsoundvol () 'DECLARE SUB setsoundvol (BYVAL vol) #ENDIF