Check out Amazon.com!

BlitzCoder Code Archives PageMain Codes Page
Listing: Undocumented Commands (29 Entries)
Title: ActiveTextures() Code Submitted By:
- nawitus
Returns the number of textures used
 
Title: BlitzArrays[tm] Code Submitted By:
- thechange

A refined explanation of the undocumented alternative to normal arrays called BlitzArrays[tm].
 
Title: ChannelPlaying and PlaySound bug Code Submitted By:
- thechange

When using ChannelPlaying and PlaySound in a certain combination, ChannelPlaying will return invalid information, making it impossible to control sounds playing simultaneously.
 
Title: Coloured TEXT with OUTLINE Code Submitted By:
- da_hobo_hen
This function displays your text, in the current drawing colour, then writes it (in your current font), with a 1 pixel thick black background.

I found this code usefull, and hope you do too.

Just call txt(xpos,ypos,txt$,centeredx,centeredy)
xpos is x posisiton (pixels)
ypos is y position (pixels)
txt$ is the text
centeredx is TRUE/FALSE/1/0 - to center horrizontally
centeredy is TRUE/FALSE/1/0 - to center verticallay
 
Title: Constant false conditions will not be compiled Code Submitted By:
- thechange

All IF statements including a resulting constant false condition will be excluded from a compiled Blitz program.
 
Title: Customizing your Blitz IDE Code Submitted By:
- thechange

You can customize your Blitz IDE using the BlitzIDE.Prefs file located in the CFG sub-directory.
 
Title: EnableDirectInput Code Submitted By:
- cloudnine
EnableDirectInput is a undocumented command that was introduced in V1.78 (or thereabouts). DirectInput is now disabled in all programs unless you use this command. Don't worry, you won't be affected, as Blitz now uses Windows messages (a.k.a the dreaded WndProc). The only reason I can see for using DirectInput is that it is slightly faster than Windows messages.
 
Title: Freeing allocated objects and resources Code Submitted By:
- thechange

Normally one has to remove what he has left behind, but with Blitz this is ancient history.
 
Title: Function Overloading Code Submitted By:
- thechange
Blitz supports a simple version of function overloading.
 
Title: GetEnv and SetEnv functions Code Submitted By:
- thechange

Use the GetEnv() and SetEnv() functions to access and modify the Windows environment variables such as the path specification for console applications.
 
Title: Google Search Bar for BlitzPlus Interface Code Submitted By:
- tails

This code demonstates how to add a Google Search Bar feature into a BlitzPlus application.
 
Title: IDE - Using the Debugger with Include files. Code Submitted By:
- myke-p

When Debug is enabled in the IDE, you can Stop the program and have a peek at what the variables are doing. Except when you have Include files it seems... Not a problem! :D
 
Title: Limitations with large images or animated images Code Submitted By:
- thechange

This is actually a DirectX related issue dealing with the maximum size of an image. This limitation exists when using the CreateImage, CreateAnimImage, LoadImage, LoadAnimImage and SaveImage commands.
 
Title: Local [] arrays are OBJECTS Code Submitted By:
- ashcroftman

Shows how useful this is, and how it brings blitz a little closer to OOP.
 
Title: Map scroll based on large tiled image Code Submitted By:
- begemoth

I included little bit comments.
Please post comments to this code.
 
Title: MilliSecs - The Solution Code Submitted By:
- thechange
Explains the problem and solution to effectively using the MilliSecs () command.
 
Title: Object and Handle (polymorphism) Code Submitted By:
- thechange

How to use Object and Handle commands in general and creating your own (hardcoded) polymorphic functions, being able to handle multiple object structures in a single call (!).
 
Title: OpenTCPStream Code Submitted By:
- thechange

This command has a 3rd parameter to specify the client's local TCP port.
 
Title: Optional Parameters in Functions Code Submitted By:
- ghost dancer
Not sure if this is undocumented, but it is certainly difficult to find! Anyway, it shows you how to use optional parameters in your functions!
 
Title: Panels have borders Code Submitted By:
- cyberseth
BlitzPlus undocumented "style" property for panels. Allows the addition of borders to panels.
 
Title: Passing a true RGB value to the Color() function Code Submitted By:
- thechange

There are actually 2 different uses of the Color command.
 
Title: PeekString$(bank,offset,count) Code Submitted By:
- alias jargon
returns a string read from a memory bank.
---
'bank' is the id handle of a memory bank to read from.
'offset' is the offset to begin reading from.
'count' is the length in characters of the string to be read.
 
Title: PokeString(bank,offset,value$) Code Submitted By:
- alias jargon
writes a string into a memory bank.
---
'bank' is the id handle of a memory bank.
'offset' is the position in the memory bank to begin writing at.
'value$' is a string with which to write to the memory bank.
 
Title: Select Case secrets Code Submitted By:
- thechange
The ability to use conditions in case statements.
 
Title: Sorting Type Lists with Insert Code Submitted By:
- bug_face_uk

The Insert command allows you to "move" types around in the list. The command is in the on-line help, but isn't obvious and it is very very useful.

The posted code will generate a sorting routine for any type...
 
Title: The use of parentheses () when calling functions Code Submitted By:
- thechange
This includes the basic rules when using your own custom commands e.g. calling your own functions.
 
Title: True Array size and index Code Submitted By:
- thechange

When creating an array, it contains the specified number of elements plus an *additional* element.
 
Title: Using Locate Code Submitted By:
- luke_skyscraper

Locate simply locates the cursor to an (x,y) position on a graphics context. Very useful for making text input boxes. Of course for printing text you could (and probably should) just use
Text(x,y,"text")
but its still good to know I think
 
Title: Using strange characters in identifiers Code Submitted By:
- thechange
The Blitz IDE and compiler allow the usage of extended characters in identifier names. For example having fake spaces in function names.

Note: This only works with versions of Blitz below somewhere around v1.75 :/
 
Add Your Code!
Copyright(c) 2000-2004, BlitzCoder. All Rights Reserved.

Code software created by Krylar's Kreations