Just wanted to post an update.
Been poking around the forums a bit looking at other's works. I feel like an ant crawling amongst giants, there are so many great creations here. Mine will never compare to a 3D game but I have this idea for a game I feel I need to get out.
I'm still struggling with the core engine. It's pretty good so far. The functions accept values passed to them and almost everything runs off a set of settings that start as defaults and get overwritten later by a user config. Just big arrays and data files. I made an interface as a bitmap and mapped all the sprite coordinates in the defaults file. This way others can make custom skins for the interface and switch between them or simply overwrite the old with the new.
The text-based content is pretty special. The system idea I am building around is to make it easier to add more content to the game later on. I used to write all the text strings that got printed to the screen within the code using multiple lines of TEXT commands. THis system simply reads in text files to an array section and prints them from there condensing many lines of code into simple FOR / NEXT and WHILE / ENDWHILE control loops.
I'm wrestling with a dynamic menu system right now that will change, expand or contract the options listed on the menu based upon what should be available to you. The idea is nice and should flow smoothly with future updates. I was also thinking about allowing a stats section to be docked in the menu. I am also working out a paging system and a word-wrap for when a text file or menu selection list is longer than the screen height.
I also plan to make text files for NPC's or non-playing characters that you could connect to and chat with. I was hoping to work out a system that would scan your text string input for keywords and use those words to dictate a response from the NPC.
I also have a basis for an interesting storyline for this.Lots of good ideas, just need the time to get it all put together. I suppose I should post a screenshot so you have something to look at =)
This is the initial interface I've made. It will run in the default 640x480. Support for larger resolutions and skins will be added in time. This has the 640x480 default background first, then a small collection of sprites that are used on top of it. I also collect the default 'screens' and use those to paste over text to 'clear' a screen.
I'll try to bring by a screenshot of it doing something in a couple weeks, little busy with other things right now. =)
Here, take a look at the crazy defaults file and see how I'm trying to associate literally every number in the game with a setting that could be configured by the user.
` ._______________________________________________________________________,
` |¤ Cyber Cowboy - Game Of Computers - by: Aaron Mann - www.AaronMann.com|
` '¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯`
` This is the function that loads the core defaults each boot.
` ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
FUNCTION S_LOAD_DEFAULTS()
` ___________________________________
` These are the core system defaults.
` ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
` (1,1,1,1,#)
` Default background / paper color
A_SETTING(1,1,1,1,1) = 0
` Default screen width
A_SETTING(1,1,1,1,2) = 640
` Default screen height
A_SETTING(1,1,1,1,3) = 480
` Default color depth
A_SETTING(1,1,1,1,4) = 16
` System SYNC RATE default
A_SETTING(1,1,1,1,5) = 32
` Sleep delay multiplier.
A_SETTING(1,1,1,1,6) = 3
` Mouse cursor image number to use
A_SETTING(1,1,1,1,7) = 1
` Mouse cursor image offset X
A_SETTING(1,1,1,1,8) = 7
` Mouse cursor image offset Y
A_SETTING(1,1,1,1,9) = 7
` Cursor's file name
A_SETTING_$(1,1,1,1,1) = "Grafix\Cursors\Cursor-1.bmp"
` ___________________________________
` Text formatting.
` ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
` (1,1,1,2,#)
` Default font size
A_SETTING(1,1,1,2,1) = 14
` Text line spacing (height)
A_SETTING(1,1,1,2,2) = 14
` Text spacing (width) / est. max chars. per line
A_SETTING(1,1,1,2,3) = 60
` Max text lines to print
A_SETTING(1,1,1,2,4) = 40
` Font name to use
A_SETTING_$(1,1,1,2,1) = "System"
` ___________________________________
` Trackers and flags.
` ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
` (1,1,1,3,#)
` This is a simple success/fail flag.
A_SETTING(1,1,1,3,1) = 0
` ___________________________________
` Skin measurements and defaults.
` ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
` (1,1,1,4,#)
` * I need to get these stored in a config file for the skin.
` Core skin defaults:
` Skin Name / Title
A_SETTING_$(1,1,1,4,1) = "Interface-1"
` Path / location to skin file
A_SETTING_$(1,1,1,4,2) = "Grafix\Skins\Interface-1.bmp"
` Skin Author
A_SETTING_$(1,1,1,4,3) = "Aaron Mann"
` URL
A_SETTING_$(1,1,1,4,4) = "http://www.aaronmann.com"
` Email
A_SETTING_$(1,1,1,4,5) = "am@aaronmann.com"
` Uses custom font?
A_SETTING_$(1,1,1,4,6) = "no"
` Font to use, if yes
A_SETTING_$(1,1,1,4,7) = ""
` Uses custom cursor?
A_SETTING_$(1,1,1,4,8) = "no"
` Cursor to use, if yes
A_SETTING_$(1,1,1,4,9) = ""
` Skin number
A_SETTING(1,1,1,4,1) = 1
` Screen width designed for
A_SETTING(1,1,1,4,2) = 640
` Screen height designed for
A_SETTING(1,1,1,4,3) = 480
` Image number to start at
A_SETTING(1,1,1,4,4) = 100
` Total number of images used (Limit = 100)
A_SETTING(1,1,1,4,5) = 23
` Image number threshold, limit to image numbers for interface use.
A_SETTING(1,1,1,4,6) = 199
` Individual image locations:
` Image number association for whole screen
A_SETTING(1,1,1,4,11) = 100
` Entire screen X start coordinate
A_SETTING(1,1,1,4,12) = 0
` Entire screen Y start coordinate
A_SETTING(1,1,1,4,13) = 0
` Entire screen X end coordinate
A_SETTING(1,1,1,4,14) = 639
` Entire screen Y end coordinate
A_SETTING(1,1,1,4,15) = 479
` Image paste X start coordinate
A_SETTING(1,1,1,4,16) = 0
` Image paste Y start coordinate
A_SETTING(1,1,1,4,17) = 0
` Image number association for main screen
A_SETTING(1,1,1,4,21) = 101
` Main screen X start coordinate
A_SETTING(1,1,1,4,22) = 0
` Main screen Y start coordinate
A_SETTING(1,1,1,4,23) = 0
` Main screen X end coordinate
A_SETTING(1,1,1,4,24) = 439
` Main screen Y end coordinate
A_SETTING(1,1,1,4,25) = 419
` Image paste X start coordinate
A_SETTING(1,1,1,4,26) = 0
` Image paste Y start coordinate
A_SETTING(1,1,1,4,27) = 0
` Top text margin for main screen
A_SETTING(1,1,1,4,28) = 8
` Left text margin for main screen
A_SETTING(1,1,1,4,29) = 18
` Image number association for main menu
A_SETTING(1,1,1,4,31) = 102
` Main menu X start coordinate
A_SETTING(1,1,1,4,32) = 440
` Main menu Y start coordinate
A_SETTING(1,1,1,4,33) = 0
` Main menu X end coordinate
A_SETTING(1,1,1,4,34) = 639
` Main menu Y end coordinate
A_SETTING(1,1,1,4,35) = 419
` Image paste X start coordinate
A_SETTING(1,1,1,4,36) = 440
` Image paste Y start coordinate
A_SETTING(1,1,1,4,37) = 0
` Top text margin for menu screen
A_SETTING(1,1,1,4,38) = 8
` Left text margin for menu screen
A_SETTING(1,1,1,4,39) = 458
` Image number association for closed main menu
A_SETTING(1,1,1,4,41) = 103
` Closed menu X start coordinate
A_SETTING(1,1,1,4,42) = 641
` Closed menu Y start coordinate
A_SETTING(1,1,1,4,43) = 0
` Closed menu X end coordinate
A_SETTING(1,1,1,4,44) = 840
` Closed menu Y end coordinate
A_SETTING(1,1,1,4,45) = 418
` Image paste X start coordinate
A_SETTING(1,1,1,4,46) = 440
` Image paste Y start coordinate
A_SETTING(1,1,1,4,47) = 0
` Image number association for sub-screen
A_SETTING(1,1,1,4,51) = 104
` Sub-screen X start coordinate
A_SETTING(1,1,1,4,52) = 0
` Sub-screen Y start coordinate
A_SETTING(1,1,1,4,53) = 417
` Sub-screen X end coordinate
A_SETTING(1,1,1,4,54) = 439
` Sub-screen Y end coordinate
A_SETTING(1,1,1,4,55) = 448
` Image paste X start coordinate
A_SETTING(1,1,1,4,56) = 0
` Image paste Y start coordinate
A_SETTING(1,1,1,4,57) = 417
` Top text margin for sub screen
A_SETTING(1,1,1,4,58) = 424
` Left text margin for sub screen
A_SETTING(1,1,1,4,59) = 18
` Image number association for input bar
A_SETTING(1,1,1,4,61) = 105
` Input bar X start coordinate
A_SETTING(1,1,1,4,62) = 0
` Input bar Y start coordinate
A_SETTING(1,1,1,4,63) = 447
` Input bar X end coordinate
A_SETTING(1,1,1,4,64) = 439
` Input bar Y end coordinate
A_SETTING(1,1,1,4,65) = 479
` Image paste X start coordinate
A_SETTING(1,1,1,4,66) = 0
` Image paste Y start coordinate
A_SETTING(1,1,1,4,67) = 447
` Top text margin for input screen
A_SETTING(1,1,1,4,68) = 455
` Left text margin for input screen
A_SETTING(1,1,1,4,69) = 18
` Image number association for closed input bar
A_SETTING(1,1,1,4,71) = 106
` Closed input bar X start coordinate
A_SETTING(1,1,1,4,72) = 0
` Closed input bar Y start coordinate
A_SETTING(1,1,1,4,73) = 481
` Closed input bar X end coordinate
A_SETTING(1,1,1,4,74) = 438
` Closed input bar Y end coordinate
A_SETTING(1,1,1,4,75) = 513
` Image paste X start coordinate
A_SETTING(1,1,1,4,76) = 0
` Image paste Y start coordinate
A_SETTING(1,1,1,4,77) = 447
` Image number association for exposed hardware bar
A_SETTING(1,1,1,4,81) = 107
` Hardware power bar exposed X start coordinate
A_SETTING(1,1,1,4,82) = 440
` Hardware power bar exposed Y start coordinate
A_SETTING(1,1,1,4,83) = 420
` Hardware power bar exposed X end coordinate
A_SETTING(1,1,1,4,84) = 639
` Hardware power bar exposed Y end coordinate
A_SETTING(1,1,1,4,85) = 479
` Image paste X start coordinate
A_SETTING(1,1,1,4,86) = 440
` Image paste Y start coordinate
A_SETTING(1,1,1,4,87) = 420
` Image number association for closed hardware bar
A_SETTING(1,1,1,4,91) = 108
` X start coordinate
A_SETTING(1,1,1,4,92) = 440
` Y start coordinate
A_SETTING(1,1,1,4,93) = 481
` X end coordinate
A_SETTING(1,1,1,4,94) = 639
` Y end coordinate
A_SETTING(1,1,1,4,95) = 540
` Image paste X start coordinate
A_SETTING(1,1,1,4,96) = 440
` Image paste Y start coordinate
A_SETTING(1,1,1,4,97) = 420
` Image number association for green power
A_SETTING(1,1,1,4,101) = 109
` X start coordinate
A_SETTING(1,1,1,4,102) = 806
` Y start coordinate
A_SETTING(1,1,1,4,103) = 429
` X end coordinate
A_SETTING(1,1,1,4,104) = 828
` Y end coordinate
A_SETTING(1,1,1,4,105) = 473
` Image paste X start coordinate
A_SETTING(1,1,1,4,106) = 605
` Image paste Y start coordinate
A_SETTING(1,1,1,4,107) = 429
` Image number association for red power
A_SETTING(1,1,1,4,111) = 110
` X start coordinate
A_SETTING(1,1,1,4,112) = 806
` Y start coordinate
A_SETTING(1,1,1,4,113) = 490
` X end coordinate
A_SETTING(1,1,1,4,114) = 828
` Y end coordinate
A_SETTING(1,1,1,4,115) = 534
` Image paste X start coordinate
A_SETTING(1,1,1,4,116) = 605
` Image paste Y start coordinate
A_SETTING(1,1,1,4,117) = 429
` Image number association for black jack
A_SETTING(1,1,1,4,121) = 111
` X start coordinate
A_SETTING(1,1,1,4,122) = 685
` Y start coordinate
A_SETTING(1,1,1,4,123) = 429
` X end coordinate
A_SETTING(1,1,1,4,124) = 707
` Y end coordinate
A_SETTING(1,1,1,4,125) = 479
` Image paste X start coordinate 1
A_SETTING(1,1,1,4,126) = 462
` Image paste Y start coordinate 1
A_SETTING(1,1,1,4,127) = 429
` Image paste X start coordinate 2
A_SETTING(1,1,1,4,128) = 484
` Image paste Y start coordinate 2
A_SETTING(1,1,1,4,129) = 429
` Image number association for green jack
A_SETTING(1,1,1,4,131) = 112
` X start coordinate
A_SETTING(1,1,1,4,132) = 663
` Y start coordinate
A_SETTING(1,1,1,4,133) = 429
` X end coordinate
A_SETTING(1,1,1,4,134) = 685
` Y end coordinate
A_SETTING(1,1,1,4,135) = 479
` Image paste X start coordinate 1
A_SETTING(1,1,1,4,136) = 462
` Image paste Y start coordinate 1
A_SETTING(1,1,1,4,137) = 429
` Image paste X start coordinate 2
A_SETTING(1,1,1,4,138) = 484
` Image paste Y start coordinate 2
A_SETTING(1,1,1,4,139) = 429
` Image number association for yellow jack
A_SETTING(1,1,1,4,141) = 113
` X start coordinate
A_SETTING(1,1,1,4,142) = 685
` Y start coordinate
A_SETTING(1,1,1,4,143) = 490
` X end coordinate
A_SETTING(1,1,1,4,144) = 707
` Y end coordinate
A_SETTING(1,1,1,4,145) = 540
` Image paste X start coordinate 1
A_SETTING(1,1,1,4,146) = 462
` Image paste Y start coordinate 1
A_SETTING(1,1,1,4,147) = 429
` Image paste X start coordinate 2
A_SETTING(1,1,1,4,148) = 484
` Image paste Y start coordinate 2
A_SETTING(1,1,1,4,149) = 429
` Image number association for red jack
A_SETTING(1,1,1,4,151) = 114
` X start coordinate
A_SETTING(1,1,1,4,152) = 663
` Y start coordinate
A_SETTING(1,1,1,4,153) = 490
` X end coordinate
A_SETTING(1,1,1,4,154) = 685
` Y end coordinate
A_SETTING(1,1,1,4,155) = 540
` Image paste X start coordinate 1
A_SETTING(1,1,1,4,156) = 462
` Image paste Y start coordinate 1
A_SETTING(1,1,1,4,157) = 429
` Image paste X start coordinate 2
A_SETTING(1,1,1,4,158) = 484
` Image paste Y start coordinate 2
A_SETTING(1,1,1,4,159) = 429
` Image number association for black plug
A_SETTING(1,1,1,4,161) = 115
` X start coordinate
A_SETTING(1,1,1,4,162) = 729
` Y start coordinate
A_SETTING(1,1,1,4,163) = 429
` X end coordinate
A_SETTING(1,1,1,4,164) = 751
` Y end coordinate
A_SETTING(1,1,1,4,165) = 473
` Image paste X start coordinate 1
A_SETTING(1,1,1,4,166) = 506
` Image paste Y start coordinate 1
A_SETTING(1,1,1,4,167) = 429
` Image paste X start coordinate 2
A_SETTING(1,1,1,4,168) = 528
` Image paste Y start coordinate 2
A_SETTING(1,1,1,4,169) = 429
` Image number association for green plug
A_SETTING(1,1,1,4,171) = 116
` X start coordinate
A_SETTING(1,1,1,4,172) = 707
` Y start coordinate
A_SETTING(1,1,1,4,173) = 429
` X end coordinate
A_SETTING(1,1,1,4,174) = 729
` Y end coordinate
A_SETTING(1,1,1,4,175) = 473
` Image paste X start coordinate 1
A_SETTING(1,1,1,4,176) = 506
` Image paste Y start coordinate 1
A_SETTING(1,1,1,4,177) = 429
` Image paste X start coordinate 2
A_SETTING(1,1,1,4,178) = 528
` Image paste Y start coordinate 2
A_SETTING(1,1,1,4,179) = 429
` Image number association for yellow plug
A_SETTING(1,1,1,4,181) = 117
` X start coordinate
A_SETTING(1,1,1,4,182) = 729
` Y start coordinate
A_SETTING(1,1,1,4,183) = 490
` X end coordinate
A_SETTING(1,1,1,4,184) = 751
` Y end coordinate
A_SETTING(1,1,1,4,185) = 534
` Image paste X start coordinate 1
A_SETTING(1,1,1,4,186) = 506
` Image paste Y start coordinate 1
A_SETTING(1,1,1,4,187) = 429
` Image paste X start coordinate 2
A_SETTING(1,1,1,4,188) = 528
` Image paste Y start coordinate 2
A_SETTING(1,1,1,4,189) = 429
` Image number association for red plug
A_SETTING(1,1,1,4,191) = 118
` X start coordinate
A_SETTING(1,1,1,4,192) = 707
` Y start coordinate
A_SETTING(1,1,1,4,193) = 490
` X end coordinate
A_SETTING(1,1,1,4,194) = 729
` Y end coordinate
A_SETTING(1,1,1,4,195) = 534
` Image paste X start coordinate 1
A_SETTING(1,1,1,4,196) = 506
` Image paste Y start coordinate 1
A_SETTING(1,1,1,4,197) = 429
` Image paste X start coordinate 2
A_SETTING(1,1,1,4,198) = 528
` Image paste Y start coordinate 2
A_SETTING(1,1,1,4,199) = 429
` Image number association for black key
A_SETTING(1,1,1,4,201) = 119
` X start coordinate
A_SETTING(1,1,1,4,202) = 773
` Y start coordinate
A_SETTING(1,1,1,4,203) = 429
` X end coordinate
A_SETTING(1,1,1,4,204) = 795
` Y end coordinate
A_SETTING(1,1,1,4,205) = 473
` Image paste X start coordinate 1
A_SETTING(1,1,1,4,206) = 550
` Image paste Y start coordinate 1
A_SETTING(1,1,1,4,207) = 429
` Image paste X start coordinate 2
A_SETTING(1,1,1,4,208) = 572
` Image paste Y start coordinate 2
A_SETTING(1,1,1,4,209) = 429
` Image number association for green key
A_SETTING(1,1,1,4,211) = 120
` X start coordinate
A_SETTING(1,1,1,4,212) = 751
` Y start coordinate
A_SETTING(1,1,1,4,213) = 429
` X end coordinate
A_SETTING(1,1,1,4,214) = 773
` Y end coordinate
A_SETTING(1,1,1,4,215) = 473
` Image paste X start coordinate 1
A_SETTING(1,1,1,4,216) = 550
` Image paste Y start coordinate 1
A_SETTING(1,1,1,4,217) = 429
` Image paste X start coordinate 2
A_SETTING(1,1,1,4,218) = 572
` Image paste Y start coordinate 2
A_SETTING(1,1,1,4,219) = 429
` Image number association for yellow key
A_SETTING(1,1,1,4,221) = 121
` X start coordinate
A_SETTING(1,1,1,4,222) = 773
` Y start coordinate
A_SETTING(1,1,1,4,223) = 490
` X end coordinate
A_SETTING(1,1,1,4,224) = 795
` Y end coordinate
A_SETTING(1,1,1,4,225) = 534
` Image paste X start coordinate 1
A_SETTING(1,1,1,4,226) = 550
` Image paste Y start coordinate 1
A_SETTING(1,1,1,4,227) = 429
` Image paste X start coordinate 2
A_SETTING(1,1,1,4,228) = 572
` Image paste Y start coordinate 2
A_SETTING(1,1,1,4,229) = 429
` Image number association for red key
A_SETTING(1,1,1,4,231) = 122
` X start coordinate
A_SETTING(1,1,1,4,232) = 751
` Y start coordinate
A_SETTING(1,1,1,4,233) = 490
` X end coordinate
A_SETTING(1,1,1,4,234) = 773
` Y end coordinate
A_SETTING(1,1,1,4,235) = 534
` Image paste X start coordinate 1
A_SETTING(1,1,1,4,236) = 550
` Image paste Y start coordinate 1
A_SETTING(1,1,1,4,237) = 429
` Image paste X start coordinate 2
A_SETTING(1,1,1,4,238) = 572
` Image paste Y start coordinate 2
A_SETTING(1,1,1,4,239) = 429
` ___________________________________
` Working with text files in arrays.
` ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
` (1,1,1,5,#)
` How many lines maximum to read from a file
A_SETTING(1,1,1,5,1) = 99
` How many lines were read from a text file
A_SETTING(1,1,1,5,2) = 0
ENDFUNCTION
Take a look at the interesting media loading functions that can be created when you set all the image location numbers to a setting in the defaults file:
` ._______________________________________________________________________,
` |¤ Cyber Cowboy - Game Of Computers - by: Aaron Mann - www.AaronMann.com|
` `¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯`
FUNCTION F_LOAD_MEDIA(CHOICE)
` Precache. This only loads what I've reserved for the core system.
` ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
IF CHOICE = 1
F_LOAD_ANIM("Grafix\Anims\Cursor.avi",1)
F_LOAD_ANIM("Grafix\Anims\Title.avi",2)
F_LOAD_ANIM("Grafix\Anims\Flash.avi",3)
F_LOAD_ANIM("Grafix\Anims\Line.avi",4)
F_LOAD_IMG("Grafix\Splash-1.bmp",2)
F_LOAD_IMG("Grafix\Title-1.bmp",3)
F_LOAD_SND("Sound\Title-1.wav",1)
F_LOAD_SND("Music\CSO-01.mp3",1000)
` Do something with these, allow custom sounds in skins or something.
F_LOAD_SND("Sound\MH-1.wav",2)
F_LOAD_SND("Sound\MC-1.wav",3)
F_LOAD_SND("Sound\CS-1.wav",4)
ENDIF
` Interface / Skin cache. This loads up the GUI based on user preferences.
` ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
IF CHOICE = 2
` This loads custom cursor or default cursor.
IF A_SETTING_$(1,1,1,4,8) = "yes"
F_LOAD_CURSOR(A_SETTING_$(1,1,1,4,9),A_SETTING(1,1,1,1,7))
ELSE
F_LOAD_CURSOR(A_SETTING_$(1,1,1,1,1),A_SETTING(1,1,1,1,7))
ENDIF
` This loads the interface bitmap and collects the images from it.
F_LOAD_BMP(A_SETTING_$(1,1,1,4,2),1)
IF A_SETTING(1,1,1,3,1) = 1
A_SETTING(1,1,1,3,1) = 0
XY = 12
TOTAL_IMAGES = A_SETTING(1,1,1,4,4) + A_SETTING(1,1,1,4,5) - 1
FOR IM = A_SETTING(1,1,1,4,4) TO TOTAL_IMAGES STEP 1
GET IMAGE IM,A_SETTING(1,1,1,4,XY),A_SETTING(1,1,1,4,XY+1),A_SETTING(1,1,1,4,XY+2),A_SETTING(1,1,1,4,XY+3)
INC XY,10
IF IM = A_SETTING(1,1,1,4,6) THEN GOTO L_BREAK
NEXT IM
L_BREAK:
ENDIF
ENDIF
` Extra Features.
` ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
IF CHOICE = 3
ENDIF
ENDFUNCTION
` Loads media only if file exists. If image # exists it deletes it first.
` ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
FUNCTION F_LOAD_ANIM(FILENAME$,NUMBER)
IF FILE EXIST(FILENAME$) = 1
IF ANIMATION EXIST(NUMBER) = 1 THEN DELETE ANIMATION NUMBER
LOAD ANIMATION FILENAME$,NUMBER
A_SETTING(1,1,1,3,1) = 1
ENDIF
ENDFUNCTION
FUNCTION F_LOAD_IMG(FILENAME$,NUMBER)
IF FILE EXIST(FILENAME$) = 1
IF IMAGE EXIST(NUMBER) = 1 THEN DELETE IMAGE NUMBER
LOAD IMAGE FILENAME$,NUMBER
A_SETTING(1,1,1,3,1) = 1
ENDIF
ENDFUNCTION
FUNCTION F_LOAD_BMP(FILENAME$,NUMBER)
IF FILE EXIST(FILENAME$) = 1
IF BITMAP EXIST(NUMBER) = 1 THEN DELETE BITMAP NUMBER
LOAD BITMAP FILENAME$,NUMBER
A_SETTING(1,1,1,3,1) = 1
ENDIF
ENDFUNCTION
FUNCTION F_LOAD_SND(FILENAME$,NUMBER)
IF FILE EXIST(FILENAME$) = 1
IF SOUND EXIST(NUMBER) = 1 THEN DELETE SOUND NUMBER
LOAD SOUND FILENAME$,NUMBER
A_SETTING(1,1,1,3,1) = 1
ENDIF
ENDFUNCTION
FUNCTION F_LOAD_CURSOR(FILENAME$,NUMBER)
IF FILE EXIST(FILENAME$) = 1
IF IMAGE EXIST(NUMBER) = 1 THEN DELETE IMAGE NUMBER
LOAD IMAGE FILENAME$,NUMBER
A_SETTING(1,1,1,3,1) = 1
ENDIF
ENDFUNCTION
Here's a really easy way to read a file in to an array. This function allows array routing numbers to be passed to it so that multiple files could be stored at the same time and the number can exceed the 32 open files limit in DB classic (1.13)
FUNCTION F_READ_TEXT_FILE(CN,SN,LN,FILENAME$)
IF FILE EXIST(FILENAME$) = 0 THEN EXITFUNCTION
OPEN TO READ 1,FILENAME$
REPEAT
READ STRING 1,A_TEXT$(1,1,CN,SN,LN)
IF LN = A_SETTING(1,1,1,5,1) THEN GOTO BREAK
INC LN,1
UNTIL FILE END(1)
BREAK:
A_TEXT(1,1,CN,SN,1) = LN
CLOSE FILE 1
ENDFUNCTION