Title: Curved Text & RLE vector routines (part 2)
| Code Submitted By: - andy_a
| This code snippet will run as is, but you'll need part 1 for creating and saving images in your own program. The new functions are:
makeData() - makes a text file of data statements that can be copy & pasted into your source code.
getImgData() - once you've pasted the data statements into your source, use this function to load into memory for further processing.
data2buffer() - like the above, but will re-create the image at 0, 90, 180, 270 degrees (user specified) in a Blitz image buffer. Use the Blitz image buffer just like you would use any loaded external image file.
dat2curv2buf() - reads the image in the data statements, wraps the image around a curve, and stores in a Blitz image buffer.
Simple usage demo included. |
|
|
Title: Bit Fields
| Code Submitted By: - poedboy
| BitFields allow you to store multiple on/off values within a single byte. 2 Functions : GetBit() and SetBit() |
|
|
Title: Create Directory View In Blitz+
| Code Submitted By: - lattyware
 | Here is some code I was working on to create a Directory View - please use as much as you want, and adapt it likewise, but I do request some sort of small credit (You don't have to, but it would be nice) and If you use the code, do tell me, as I am interested in how it could be used. It could be set to read a cirtain are only and get a level selector, there are many possiblities.
Lattyware (info@lattyware.co.uk) |
|
|
Title: Extract filename functions
| Code Submitted By: - kefir
 | ExtractFileName$() , ExtractFileExt$() , ExtractFileNameWithoutExt$() , ExtractFilePath$() , ExtractRelativeFileName$() , UnExtractRelativeFileName$() |
|
|
Title: Fast Image Information
| Code Submitted By: - code_666
 | At the moment, the only way to get an image's width/height is to first load it and then use the ImageWidth()/ImageHeight() commands. If you are using code that makes a decision whether to use an image based on this information, loading the whole image into memory - just to then discard it - is slow and wasteful, not to mention time consuming!
What my code does is to jump into the file stream and pull out the information directly and then calculate the width and the height - thus negating the need to load the whole file into memory first. This is a much faster way of doing things, especially with large images.
An added bonus is that the code does not determine the image's type based on the file extension you feed the function, it checks the file for it's signature and then acts accordingly. Room has been left in the logic for coders to add their own formats and/or formats not supported by this code. The code's logic differentiates between header and footer signatures, primarily for ease of use and speed.
Code is free to use - all I ask is for recognition in the program. |
|
|
Title: File Name Functions
| Code Submitted By: - poedboy
 | 3 Functions to extract the: pathname, extension, and actual name of a given filename string. Returns a string. |
|
|
Title: How to read RPG dialogs from a text file
| Code Submitted By: - dragonmood
 | Say you want to read characters dialogs that you want to use in a game. You ll need : 1- a way to store it -> I propose text file in this format : [0.0.1] This is chapter 0,section 0,conversation 1,line 1 This is chapter 0,section 0,conversation 1,line 2 [0.0.2] This is chapter 0,section 0,conversation 2,line 1 etc... 2 - and a function to read it from a blitz application -> my code. Feel free touse,Any comment is welcome.
|
|
|
Title: Including external files in sourcecode as Data
| Code Submitted By: - thechange
| Featuring: * Custom Print Library * Custom Print Documentation * Binary Data Tutorial * Binary Data Library * Binary Data Documentation
The Custom Print Library is a flexible replacement for Print, Write and Locate commands. In other words a wrapper for the Text command. The Binary Data Library can be used to include your external files, such as graphics and sounds, inside your BlitzBasic sourcecode. |
|
|
Title: Join and Split Banks
| Code Submitted By: - poedboy
| Two functions for merging two banks into a single Bank, or splitting a single bank into two seperate banks. |
|
|
Title: Mantra: quotes.bb function module
| Code Submitted By: - alias jargon
| publisher: 666 Network program: Mantra module: quotes.bb purpose: realtime .wav .mp3 .m3u .pls demonic distortion |
|
|
|
|
Title: Parse
| Code Submitted By: - poedboy
 | Let's you parse strings with a chosen delimiter(defaults to comma(,)). Allows multiple strings to be parsed at the same time.
|
|
|
Title: Preferences (revised)
| Code Submitted By: - poedboy
 | Basic include for loading and retrieving values from a file to be used as settings in your blitz apps. |
|
|
Title: Recursion without functions
| Code Submitted By: - thechange
 | Search through directory structure without making use of functions or types. |
|
|
|
|
Title: TGA's
| Code Submitted By: - poedboy
| Allows you to Create, Modify, Save, and Load tga's with alpha information. Works in blitz 2d, 3d, and plus. |
|
|
Title: Terabit Datapak resource loader
| Code Submitted By: - peejay
 | To load files from a resource file if present, if not, to look for the files in a subdirectory - I've found it useful during game dev. For those without the Datapak routines, everything (including demo graphic) can be downloaded from www.peejays-remakes.co.uk/pakloader.zip |
|
|
Title: Tile Map Engine
| Code Submitted By: - phoenix
 | This is a code for a basic tilemap editor. It΄s nothig big. It will ask for a filename to save as if you press delete. And don΄t write "mylevel.dat" write instead "mylevel". |
|
|
Title: Word Counter
| Code Submitted By: - surreal
 | This nifty little algorithm will scan a text file for you and count the number of words in it. |
|
|
Add Your Code! |