void filesystem_link( void(*rtSym)(const char*,void*) ){ rtSym( "%OpenFile$filename",(void*)bbOpenFile ); rtSym( "%ReadFile$filename",(void*)bbReadFile ); rtSym( "%WriteFile$filename",(void*)bbWriteFile ); rtSym( "CloseFile%file_stream",(void*)bbCloseFile ); rtSym( "%FilePos%file_stream",(void*)bbFilePos ); rtSym( "%SeekFile%file_stream%pos",(void*)bbSeekFile ); rtSym( "%ReadDir$dirname",(void*)bbReadDir ); rtSym( "CloseDir%dir",(void*)bbCloseDir ); rtSym( "$NextFile%dir",(void*)bbNextFile ); rtSym( "$CurrentDir",(void*)bbCurrentDir ); rtSym( "ChangeDir$dir",(void*)bbChangeDir ); rtSym( "CreateDir$dir",(void*)bbCreateDir ); rtSym( "DeleteDir$dir",(void*)bbDeleteDir ); rtSym( "%FileSize$file",(void*)bbFileSize ); rtSym( "%FileType$file",(void*)bbFileType ); rtSym( "CopyFile$file$to",(void*)bbCopyFile ); rtSym( "DeleteFile$file",(void*)bbDeleteFile ); }
void basic_link( void (*rtSym)( const char *sym,void *pc ) ){ rtSym( "_bbIntType",&_bbIntType ); rtSym( "_bbFltType",&_bbFltType ); rtSym( "_bbStrType",&_bbStrType ); rtSym( "_bbCStrType",&_bbCStrType ); rtSym( "_bbStrLoad",_bbStrLoad ); rtSym( "_bbStrRelease",_bbStrRelease ); rtSym( "_bbStrStore",_bbStrStore ); rtSym( "_bbStrCompare",_bbStrCompare ); rtSym( "_bbStrConcat",_bbStrConcat ); rtSym( "_bbStrToInt",_bbStrToInt ); rtSym( "_bbStrFromInt",_bbStrFromInt ); rtSym( "_bbStrToFloat",_bbStrToFloat ); rtSym( "_bbStrFromFloat",_bbStrFromFloat ); rtSym( "_bbStrConst",_bbStrConst ); rtSym( "_bbDimArray",_bbDimArray ); rtSym( "_bbUndimArray",_bbUndimArray ); rtSym( "_bbArrayBoundsEx",_bbArrayBoundsEx ); rtSym( "_bbVecAlloc",_bbVecAlloc ); rtSym( "_bbVecFree",_bbVecFree ); rtSym( "_bbVecBoundsEx",_bbVecBoundsEx ); rtSym( "_bbObjNew",_bbObjNew ); rtSym( "_bbObjDelete",_bbObjDelete ); rtSym( "_bbObjDeleteEach",_bbObjDeleteEach ); rtSym( "_bbObjRelease",_bbObjRelease ); rtSym( "_bbObjStore",_bbObjStore ); rtSym( "_bbObjCompare",_bbObjCompare ); rtSym( "_bbObjNext",_bbObjNext ); rtSym( "_bbObjPrev",_bbObjPrev ); rtSym( "_bbObjFirst",_bbObjFirst ); rtSym( "_bbObjLast",_bbObjLast ); rtSym( "_bbObjInsBefore",_bbObjInsBefore ); rtSym( "_bbObjInsAfter",_bbObjInsAfter ); rtSym( "_bbObjEachFirst",_bbObjEachFirst ); rtSym( "_bbObjEachNext",_bbObjEachNext ); rtSym( "_bbObjEachFirst2",_bbObjEachFirst2 ); rtSym( "_bbObjEachNext2",_bbObjEachNext2 ); rtSym( "_bbObjToStr",_bbObjToStr ); rtSym( "_bbObjToHandle",_bbObjToHandle ); rtSym( "_bbObjFromHandle",_bbObjFromHandle ); rtSym( "_bbNullObjEx",_bbNullObjEx ); rtSym( "_bbRestore",_bbRestore ); rtSym( "_bbReadInt",_bbReadInt ); rtSym( "_bbReadFloat",_bbReadFloat ); rtSym( "_bbReadStr",_bbReadStr ); rtSym( "_bbAbs",_bbAbs ); rtSym( "_bbSgn",_bbSgn ); rtSym( "_bbMod",_bbMod ); rtSym( "_bbFAbs",_bbFAbs ); rtSym( "_bbFSgn",_bbFSgn ); rtSym( "_bbFMod",_bbFMod ); rtSym( "_bbFPow",_bbFPow ); rtSym( "RuntimeStats",bbRuntimeStats ); }
void string_link( void(*rtSym)(const char*,void*) ){ rtSym( "$String$string%repeat",(void*)bbString ); rtSym( "$Left$string%count",(void*)bbLeft ); rtSym( "$Right$string%count",(void*)bbRight ); rtSym( "$Replace$string$from$to",(void*)bbReplace ); rtSym( "%Instr$string$find%from=1",(void*)bbInstr ); rtSym( "$Mid$string%start%count=-1",(void*)bbMid ); rtSym( "$Upper$string",(void*)bbUpper ); rtSym( "$Lower$string",(void*)bbLower ); rtSym( "$Trim$string",(void*)bbTrim ); rtSym( "$LSet$string%size",(void*)bbLSet ); rtSym( "$RSet$string%size",(void*)bbRSet ); rtSym( "$Chr%ascii",(void*)bbChr ); rtSym( "%Asc$string",(void*)bbAsc ); rtSym( "%Len$string",(void*)bbLen ); rtSym( "$Hex%value",(void*)bbHex ); rtSym( "$Bin%value",(void*)bbBin ); rtSym( "$CurrentDate",(void*)bbCurrentDate ); rtSym( "$CurrentTime",(void*)bbCurrentTime ); }
void sockets_link( void(*rtSym)(const char*,void*) ){ rtSym( "$DottedIP%IP",bbDottedIP ); rtSym( "%CountHostIPs$host_name",bbCountHostIPs ); rtSym( "%HostIP%host_index",bbHostIP ); rtSym( "%CreateUDPStream%port=0",bbCreateUDPStream ); rtSym( "CloseUDPStream%udp_stream",bbCloseUDPStream ); rtSym( "SendUDPMsg%udp_stream%dest_ip%dest_port=0",bbSendUDPMsg ); rtSym( "%RecvUDPMsg%udp_stream",bbRecvUDPMsg ); rtSym( "%UDPStreamIP%udp_stream",bbUDPStreamIP ); rtSym( "%UDPStreamPort%udp_stream",bbUDPStreamPort ); rtSym( "%UDPMsgIP%udp_stream",bbUDPMsgIP ); rtSym( "%UDPMsgPort%udp_stream",bbUDPMsgPort ); rtSym( "UDPTimeouts%recv_timeout",bbUDPTimeouts ); rtSym( "%OpenTCPStream$server%server_port%local_port=0",bbOpenTCPStream ); rtSym( "CloseTCPStream%tcp_stream",bbCloseTCPStream ); rtSym( "%CreateTCPServer%port",bbCreateTCPServer ); rtSym( "CloseTCPServer%tcp_server",bbCloseTCPServer ); rtSym( "%AcceptTCPStream%tcp_server",bbAcceptTCPStream ); rtSym( "%TCPStreamIP%tcp_stream",bbTCPStreamIP ); rtSym( "%TCPStreamPort%tcp_stream",bbTCPStreamPort ); rtSym( "TCPTimeouts%read_millis%accept_millis",bbTCPTimeouts ); }
void graphics_link( void (*rtSym)( const char *sym,void *pc ) ){ //gfx driver info rtSym( "%CountGfxDrivers",(void*)bbCountGfxDrivers ); rtSym( "$GfxDriverName%driver",(void*)bbGfxDriverName ); rtSym( "SetGfxDriver%driver",(void*)bbSetGfxDriver ); //gfx mode info rtSym( "%CountGfxModes",(void*)bbCountGfxModes ); rtSym( "%GfxModeExists%width%height%depth",(void*)bbGfxModeExists ); rtSym( "%GfxModeWidth%mode",(void*)bbGfxModeWidth ); rtSym( "%GfxModeHeight%mode",(void*)bbGfxModeHeight ); rtSym( "%GfxModeDepth%mode",(void*)bbGfxModeDepth ); rtSym( "%AvailVidMem",(void*)bbAvailVidMem ); rtSym( "%TotalVidMem",(void*)bbTotalVidMem ); #ifdef PRO rtSym( "%GfxDriver3D%driver",(void*)bbGfxDriver3D ); rtSym( "%CountGfxModes3D",(void*)bbCountGfxModes3D ); rtSym( "%GfxMode3DExists%width%height%depth",(void*)bbGfxMode3DExists ); rtSym( "%GfxMode3D%mode",(void*)bbGfxMode3D ); rtSym( "%Windowed3D",(void*)bbWindowed3D ); #endif //display mode rtSym( "Graphics%width%height%depth=0%mode=0",(void*)bbGraphics ); #ifdef PRO rtSym( "Graphics3D%width%height%depth=0%mode=0",(void*)bbGraphics3D ); #endif rtSym( "EndGraphics",(void*)bbEndGraphics ); rtSym( "%GraphicsLost",(void*)bbGraphicsLost ); rtSym( "SetGamma%src_red%src_green%src_blue#dest_red#dest_green#dest_blue",(void*)bbSetGamma ); rtSym( "UpdateGamma%calibrate=0",(void*)bbUpdateGamma ); rtSym( "#GammaRed%red",(void*)bbGammaRed ); rtSym( "#GammaGreen%green",(void*)bbGammaGreen ); rtSym( "#GammaBlue%blue",(void*)bbGammaBlue ); rtSym( "%FrontBuffer",(void*)bbFrontBuffer ); rtSym( "%BackBuffer",(void*)bbBackBuffer ); rtSym( "%ScanLine",(void*)bbScanLine ); rtSym( "VWait%frames=1",(void*)bbVWait ); rtSym( "Flip%vwait=1",(void*)bbFlip ); rtSym( "%GraphicsWidth",(void*)bbGraphicsWidth ); rtSym( "%GraphicsHeight",(void*)bbGraphicsHeight ); rtSym( "%GraphicsDepth",(void*)bbGraphicsDepth ); //buffer management rtSym( "SetBuffer%buffer",(void*)bbSetBuffer ); rtSym( "%GraphicsBuffer",(void*)bbGraphicsBuffer ); rtSym( "%LoadBuffer%buffer$bmpfile",(void*)bbLoadBuffer ); rtSym( "%SaveBuffer%buffer$bmpfile",(void*)bbSaveBuffer ); rtSym( "BufferDirty%buffer",(void*)bbBufferDirty ); //fast pixel reads/write rtSym( "LockBuffer%buffer=0",(void*)bbLockBuffer ); rtSym( "UnlockBuffer%buffer=0",(void*)bbUnlockBuffer ); rtSym( "%ReadPixel%x%y%buffer=0",(void*)bbReadPixel ); rtSym( "WritePixel%x%y%argb%buffer=0",(void*)bbWritePixel ); rtSym( "%ReadPixelFast%x%y%buffer=0",(void*)bbReadPixelFast ); rtSym( "WritePixelFast%x%y%argb%buffer=0",(void*)bbWritePixelFast ); rtSym( "CopyPixel%src_x%src_y%src_buffer%dest_x%dest_y%dest_buffer=0",(void*)bbCopyPixel ); rtSym( "CopyPixelFast%src_x%src_y%src_buffer%dest_x%dest_y%dest_buffer=0",(void*)bbCopyPixelFast ); //rendering rtSym( "Origin%x%y",(void*)bbOrigin ); rtSym( "Viewport%x%y%width%height",(void*)bbViewport ); rtSym( "Color%red%green%blue",(void*)bbColor ); rtSym( "GetColor%x%y",(void*)bbGetColor ); rtSym( "%ColorRed",(void*)bbColorRed ); rtSym( "%ColorGreen",(void*)bbColorGreen ); rtSym( "%ColorBlue",(void*)bbColorBlue ); rtSym( "ClsColor%red%green%blue",(void*)bbClsColor ); rtSym( "SetFont%font",(void*)bbSetFont ); rtSym( "Cls",(void*)bbCls ); rtSym( "Plot%x%y",(void*)bbPlot ); rtSym( "Rect%x%y%width%height%solid=1",(void*)bbRect ); rtSym( "Oval%x%y%width%height%solid=1",(void*)bbOval ); rtSym( "Line%x1%y1%x2%y2",(void*)bbLine ); rtSym( "Text%x%y$text%centre_x=0%centre_y=0",(void*)bbText ); rtSym( "CopyRect%source_x%source_y%width%height%dest_x%dest_y%src_buffer=0%dest_buffer=0",(void*)bbCopyRect ); //fonts rtSym( "%LoadFont$fontname%height=12%bold=0%italic=0%underline=0",(void*)bbLoadFont ); rtSym( "FreeFont%font",(void*)bbFreeFont ); rtSym( "%FontWidth",(void*)bbFontWidth ); rtSym( "%FontHeight",(void*)bbFontHeight ); rtSym( "%StringWidth$string",(void*)bbStringWidth ); rtSym( "%StringHeight$string",(void*)bbStringHeight ); //movies rtSym( "%OpenMovie$file",(void*)bbOpenMovie ); rtSym( "%DrawMovie%movie%x=0%y=0%w=-1%h=-1",(void*)bbDrawMovie ); rtSym( "%MovieWidth%movie",(void*)bbMovieWidth ); rtSym( "%MovieHeight%movie",(void*)bbMovieHeight ); rtSym( "%MoviePlaying%movie",(void*)bbMoviePlaying ); rtSym( "CloseMovie%movie",(void*)bbCloseMovie ); rtSym( "%LoadImage$bmpfile",(void*)bbLoadImage ); rtSym( "%LoadAnimImage$bmpfile%cellwidth%cellheight%first%count",(void*)bbLoadAnimImage ); rtSym( "%CopyImage%image",(void*)bbCopyImage ); rtSym( "%CreateImage%width%height%frames=1",(void*)bbCreateImage ); rtSym( "FreeImage%image",(void*)bbFreeImage ); rtSym( "%SaveImage%image$bmpfile%frame=0",(void*)bbSaveImage ); rtSym( "GrabImage%image%x%y%frame=0",(void*)bbGrabImage ); rtSym( "%ImageBuffer%image%frame=0",(void*)bbImageBuffer ); rtSym( "DrawImage%image%x%y%frame=0",(void*)bbDrawImage ); rtSym( "DrawBlock%image%x%y%frame=0",(void*)bbDrawBlock ); rtSym( "TileImage%image%x=0%y=0%frame=0",(void*)bbTileImage ); rtSym( "TileBlock%image%x=0%y=0%frame=0",(void*)bbTileBlock ); rtSym( "DrawImageRect%image%x%y%rect_x%rect_y%rect_width%rect_height%frame=0",(void*)bbDrawImageRect ); rtSym( "DrawBlockRect%image%x%y%rect_x%rect_y%rect_width%rect_height%frame=0",(void*)bbDrawBlockRect ); rtSym( "MaskImage%image%red%green%blue",(void*)bbMaskImage ); rtSym( "HandleImage%image%x%y",(void*)bbHandleImage ); rtSym( "MidHandle%image",(void*)bbMidHandle ); rtSym( "AutoMidHandle%enable",(void*)bbAutoMidHandle ); rtSym( "%ImageWidth%image",(void*)bbImageWidth ); rtSym( "%ImageHeight%image",(void*)bbImageHeight ); rtSym( "%ImageXHandle%image",(void*)bbImageXHandle ); rtSym( "%ImageYHandle%image",(void*)bbImageYHandle ); rtSym( "ScaleImage%image#xscale#yscale",(void*)bbScaleImage ); rtSym( "ResizeImage%image#width#height",(void*)bbResizeImage ); rtSym( "RotateImage%image#angle",(void*)bbRotateImage ); rtSym( "TFormImage%image#a#b#c#d",(void*)bbTFormImage ); rtSym( "TFormFilter%enable",(void*)bbTFormFilter ); rtSym( "%ImagesOverlap%image1%x1%y1%image2%x2%y2",(void*)bbImagesOverlap ); rtSym( "%ImagesCollide%image1%x1%y1%frame1%image2%x2%y2%frame2",(void*)bbImagesCollide ); rtSym( "%RectsOverlap%x1%y1%width1%height1%x2%y2%width2%height2",(void*)bbRectsOverlap ); rtSym( "%ImageRectOverlap%image%x%y%rect_x%rect_y%rect_width%rect_height",(void*)bbImageRectOverlap ); rtSym( "%ImageRectCollide%image%x%y%frame%rect_x%rect_y%rect_width%rect_height",(void*)bbImageRectCollide ); rtSym( "Write$string",(void*)bbWrite ); rtSym( "Print$string=\"\"",(void*)bbPrint ); rtSym( "$Input$prompt=\"\"",(void*)bbInput ); rtSym( "Locate%x%y",(void*)bbLocate ); rtSym( "ShowPointer",(void*)bbShowPointer ); rtSym( "HidePointer",(void*)bbHidePointer ); }
void math_link( void (*rtSym)( const char *sym,void *pc ) ){ rtSym( "#Sin#degrees",(void*)bbSin ); rtSym( "#Cos#degrees",(void*)bbCos ); rtSym( "#Tan#degrees",(void*)bbTan ); rtSym( "#ASin#float",(void*)bbASin ); rtSym( "#ACos#float",(void*)bbACos ); rtSym( "#ATan#float",(void*)bbATan ); rtSym( "#ATan2#floata#floatb",(void*)bbATan2 ); rtSym( "#Sqr#float",(void*)bbSqr ); rtSym( "#Floor#float",(void*)bbFloor ); rtSym( "#Ceil#float",(void*)bbCeil ); rtSym( "#Exp#float",(void*)bbExp ); rtSym( "#Log#float",(void*)bbLog ); rtSym( "#Log10#float",(void*)bbLog10 ); rtSym( "#Rnd#from#to=0",(void*)bbRnd ); rtSym( "%Rand%from%to=1",(void*)bbRand ); rtSym( "SeedRnd%seed",(void*)bbSeedRnd ); rtSym( "%RndSeed",(void*)bbRndSeed ); }
void input_link( void (*rtSym)( const char *sym,void *pc ) ) { rtSym( "%KeyDown%key",bbKeyDown ); rtSym( "%KeyHit%key",bbKeyHit ); rtSym( "%GetKey",bbGetKey ); rtSym( "%WaitKey",bbWaitKey ); rtSym( "FlushKeys",bbFlushKeys ); rtSym( "%MouseDown%button",bbMouseDown ); rtSym( "%MouseHit%button",bbMouseHit ); rtSym( "%GetMouse",bbGetMouse ); rtSym( "%WaitMouse",bbWaitMouse ); rtSym( "%MouseWait",bbWaitMouse ); rtSym( "%MouseX",bbMouseX ); rtSym( "%MouseY",bbMouseY ); rtSym( "%MouseZ",bbMouseZ ); rtSym( "%MouseXSpeed",bbMouseXSpeed ); rtSym( "%MouseYSpeed",bbMouseYSpeed ); rtSym( "%MouseZSpeed",bbMouseZSpeed ); rtSym( "FlushMouse",bbFlushMouse ); rtSym( "MoveMouse%x%y",bbMoveMouse ); rtSym( "%JoyType%port=0",bbJoyType ); rtSym( "%JoyDown%button%port=0",bbJoyDown ); rtSym( "%JoyHit%button%port=0",bbJoyHit ); rtSym( "%GetJoy%port=0",bbGetJoy ); rtSym( "%WaitJoy%port=0",bbWaitJoy ); rtSym( "%JoyWait%port=0",bbWaitJoy ); rtSym( "#JoyX%port=0",bbJoyX ); rtSym( "#JoyY%port=0",bbJoyY ); rtSym( "#JoyZ%port=0",bbJoyZ ); rtSym( "#JoyU%port=0",bbJoyU ); rtSym( "#JoyV%port=0",bbJoyV ); rtSym( "#JoyPitch%port=0",bbJoyPitch ); rtSym( "#JoyYaw%port=0",bbJoyYaw ); rtSym( "#JoyRoll%port=0",bbJoyRoll ); rtSym( "%JoyHat%port=0",bbJoyHat ); rtSym( "%JoyXDir%port=0",bbJoyXDir ); rtSym( "%JoyYDir%port=0",bbJoyYDir ); rtSym( "%JoyZDir%port=0",bbJoyZDir ); rtSym( "%JoyUDir%port=0",bbJoyUDir ); rtSym( "%JoyVDir%port=0",bbJoyVDir ); rtSym( "FlushJoy",bbFlushJoy ); rtSym( "EnableDirectInput%enable",bbEnableDirectInput ); rtSym( "%DirectInputEnabled",bbDirectInputEnabled ); }
void stream_link(void (*rtSym)(const char*, void*)) { rtSym("%Eof%stream", bbEof); rtSym("%ReadAvail%stream", bbReadAvail); rtSym("%ReadByte%stream", bbReadByte); rtSym("%ReadShort%stream", bbReadShort); rtSym("%ReadInt%stream", bbReadInt); rtSym("#ReadFloat%stream", bbReadFloat); rtSym("$ReadString%stream", bbReadString); rtSym("$ReadLine%stream", bbReadLine); rtSym("WriteByte%stream%byte", bbWriteByte); rtSym("WriteShort%stream%short", bbWriteShort); rtSym("WriteInt%stream%int", bbWriteInt); rtSym("WriteFloat%stream#float", bbWriteFloat); rtSym("WriteString%stream$string", bbWriteString); rtSym("WriteLine%stream$string", bbWriteLine); rtSym("CopyStream%src_stream%dest_stream%buffer_size=16384", bbCopyStream); }
void audio_link( void(*rtSym)(const char*,void*) ){ rtSym( "%LoadSound$filename",bbLoadSound ); rtSym( "FreeSound%sound",bbFreeSound ); rtSym( "LoopSound%sound",bbLoopSound ); rtSym( "SoundPitch%sound%pitch",bbSoundPitch ); rtSym( "SoundVolume%sound#volume",bbSoundVolume ); rtSym( "SoundPan%sound#pan",bbSoundPan ); rtSym( "%PlaySound%sound",bbPlaySound ); rtSym( "%PlayMusic$midifile",bbPlayMusic ); rtSym( "%PlayCDTrack%track%mode=1",bbPlayCDTrack ); rtSym( "StopChannel%channel",bbStopChannel ); rtSym( "PauseChannel%channel",bbPauseChannel ); rtSym( "ResumeChannel%channel",bbResumeChannel ); rtSym( "ChannelPitch%channel%pitch",bbChannelPitch ); rtSym( "ChannelVolume%channel#volume",bbChannelVolume ); rtSym( "ChannelPan%channel#pan",bbChannelPan ); rtSym( "%ChannelPlaying%channel",bbChannelPlaying ); #ifdef PRO rtSym( "%Load3DSound$filename",bbLoad3DSound ); #endif }