Skip to content

Include Files

Narta Xaymar Dirks edited this page Nov 24, 2026 · 2 revisions

Include Files

BlitzLLVM comes with include files of constants, so that a program doesn't have to type the key codes and flags in again. Every name starts with BB_, so it doesn't clash with the constants a program already has. A name in angle brackets inside the quotes includes one of them:

Include "<keys.bb>"
Include "<mouse.bb>"

While Not KeyHit(BB_KEY_ESCAPE)
	If MouseHit(BB_MOUSE_LEFT) Then Print "Click"
Wend
File What it has
keys.bb BB_KEY_* for KeyDown and KeyHit (BB_KEY_ESCAPE, BB_KEY_A, BB_KEY_LEFT, BB_KEY_ENTER, ...), BB_VKEY_* for VKeyDown and VKeyHit, see Scan-Codes. The names are those of the key's position on a US keyboard.
mouse.bb BB_MOUSE_LEFT, BB_MOUSE_RIGHT, BB_MOUSE_MIDDLE, BB_MOUSE_BACK, BB_MOUSE_FORWARD.
joystick.bb BB_JOYTYPE_* for JoyType, BB_JOYHAT_* for JoyHat, BB_JOYDIR_* for JoyXDir and the others. Buttons have no names, because every device numbers them differently.
graphics.bb BB_GRAPHICS_* for the mode of Graphics and Graphics3D.
texture.bb BB_TEXTURE_* flags of CreateTexture and LoadTexture, BB_TEXBLEND_* for TextureBlend, BB_ADDRESS_* and BB_FILTER_* for the sampler commands.
entity.bb BB_FX_* for EntityFX and BrushFX, BB_BLEND_*, BB_LIGHT_*, BB_PROJ_* for CameraProjMode, BB_SPRITE_* for SpriteViewMode, BB_ANIM_* for Animate, BB_COLLIDE_* and BB_RESPONSE_* for Collisions, BB_PICK_* for EntityPickMode.
physics.bb BB_MOTION_*, BB_SHAPE_* for CreatePhysicsBody, BB_ENTITYSHAPE_* for CreatePhysicsBodyFromEntity, and the modes of PhysicsMode, PhysicsSolver, PhysicsContinuous and PhysicsConstraintMotor.
gui.bb BlitzPlus: BB_EVENT_* ids, BB_WINDOW_*, BB_BUTTON_* and BB_LABEL_* styles, BB_GADGET_NO_FOLLOW and BB_EDGE_* for SetGadgetLayout.
all.bb All of the above.

The files are in the include folder of the installation (share/blitzllvm/include for the Linux packages). The compiler looks in the folders given with -I <folder> first, so a project can keep its own shared files there and include them the same way. BLITZLLVM_INCLUDE replaces the folder of the installation. A file is included once, however often and from wherever it is named.

The original Blitz3D stops at such a line with "Unable to open include file": < and > can't be in a Windows file name, so it never opens a different file by mistake. Neither form of Include takes the names that Windows keeps for devices (CON, PRN, AUX, NUL, COM1, LPT1, ..., with any extension), or a folder.

Home · Command Index


Getting started

Language

Tools


Language Features
BlitzBasic
Blitz3D
BlitzPlus
Differences

More

Clone this wiki locally