Author Topic: Load/Remove System  (Read 6827 times)

MrTAToad

  • Guest
Load/Remove System
« on: 2009-Aug-31 »
I've updated my Load/Remove loading system to read files from data statements now, instead of INI files.  Also the code includes routines for setting up graphics screens and defining resolutions for the different platforms.

As it stands, DDGui is also needed (as it uses that for displaying error messages), but that bit can be removed if need be.

I always keep screen resolutions, music volume etc in an INI file, so there is a fair bit of checking for valid screens too.

Code: (glbasic) [Select]
// --------------------------------- //
// Project: All
// Start: Thursday, September 11, 2008
// IDE Version: 5.360

// ------------------------------------------------------------- //
// ---  LOADREMOVEFILES  ---
// ------------------------------------------------------------- //
TYPE tLoadDataList
isBumpMap%
idNumber%
xSize%
ySize%
fontIndex%

channel% // Only used by the sound system
fileName$ // Only used by the music system
ENDTYPE

TYPE tOptionsData
screenWidth%
screenHeight%
halfScreenWidth%
halfScreenHeight%
fullScreen%
mVolume
sVolume
webUpload% // TRUE/1 if we allow uploading of scores to the web
ENDTYPE

TYPE tScreenResolutions
width%
height%
ENDTYPE

GLOBAL spriteAnimLoadData[] AS tLoadDataList
GLOBAL spriteLoadData[] AS tLoadDataList
GLOBAL objectLoadData[] AS tLoadDataList
GLOBAL soundLoadData[] AS tLoadDataList
GLOBAL musicLoadData[] AS tLoadDataList
GLOBAL screenResolutions[] AS tScreenResolutions
GLOBAL fontLoadData[] AS tLoadDataList
GLOBAL ttFontLoadData[] AS tLoadDataList //  May have to be in Main program

GLOBAL NO_DATA$ = "NO_DATA"
GLOBAL SOUND_INVALID% = -1
GLOBAL default_screenWidth% = -1
GLOBAL default_screenHeight% = -1
GLOBAL default_useWindow% = FALSE
GLOBAL allowResChange% = FALSE
GLOBAL default_allowWebUpload% = FALSE
GLOBAL allowProgramUpdate% = FALSE
GLOBAL DEFAULT_FONT$ = "smalfont.png"
GLOBAL TTF_FONTSTEP% = 256

FUNCTION setupDefaultScreenResolution:DEBUG_MODE%,BYREF platform$
LOCAL error$
LOCAL defaultResString$

platform$=PLATFORMINFO$("")
SELECT platform$
CASE "LINUX" // Linux
default_screenWidth%=640
default_screenHeight%=480
allowResChange%=TRUE
default_allowWebUpload%=TRUE
allowProgramUpdate%=FALSE
defaultResString$="640x480,800x600,1024x768,1280x768,1440x900"

CASE "WIN32" // Windows
default_screenWidth%=640
default_screenHeight%=480
allowResChange%=TRUE
default_allowWebUpload%=TRUE
allowProgramUpdate%=TRUE
IF DEBUG_MODE%=TRUE
defaultResString$="480x320,"
ELSE
defaultResString$=""
ENDIF

defaultResString$=defaultResString$+"640x480,800x600,1024x768,1280x768,1440x900"

CASE "MACOSX" // Mac
default_screenWidth%=640
default_screenHeight%=480
allowResChange%=TRUE
default_allowWebUpload%=TRUE
allowProgramUpdate%=FALSE
defaultResString$="640x480,800x600,1024x768,1280x768,1440x900"

CASE "GP2X" // GP2x/WIZ
default_screenWidth%=640
default_screenHeight%=480
allowResChange%=FALSE
default_allowWebUpload%=FALSE
allowProgramUpdate%=FALSE
defaultResString$="320x240"

CASE "WINCE" // Pocket PC
default_screenWidth%=240
default_screenHeight%=320
allowResChange%=FALSE
default_allowWebUpload%=TRUE
allowProgramUpdate%=TRUE
defaultResString$="640x480"

CASE "IPHONE" // iPhone/iPod
default_screenWidth%=320
default_screenHeight%=480
allowResChange%=FALSE
default_allowWebUpload%=TRUE
allowProgramUpdate%=FALSE
defaultResString$="320x480"

DEFAULT
RETURN FALSE
ENDSELECT

IF processListOfScreenResolutions(defaultResString$)=0
RETURN FALSE
ENDIF

IF platform$="IPHONE" OR platform$="GP2X"
VERSION$=VERSION$+" - "
ENDIF
RETURN TRUE
ENDFUNCTION

// Setup the screen before calling this command
FUNCTION loadRemoveFiles$:load%,usingShoeBox%=FALSE
LOCAL errorMessage$

errorMessage$=""
IF load%=TRUE
errorMessage$=doLoadData$(TRUE,usingShoeBox%)
ELSE
SYSTEMPOINTER TRUE
doLoadData$(FALSE)
ENDIF

RETURN errorMessage$
ENDFUNCTION

FUNCTION doLoadData$:doLoad%,usingShoeBox%=FALSE
LOCAL file$
LOCAL loop%,secLoop%
LOCAL errorMessage$
LOCAL bumpText$="B:"
LOCAL animText$="A:"
LOCAL sections$[]; DIM sections$[8]
LOCAL isBumpMap%
LOCAL isAnim%
LOCAL l AS tLoadDataList
LOCAL xPos%
LOCAL barYSize% = 100
LOCAL barYPos%
LOCAL TTF_INDEX% = 0
LOCAL SPRITE_INDEX% = 1
LOCAL SOUNDS_INDEX% = 2
LOCAL MUSIC_INDEX% = 3
LOCAL FONT_INDEX% = 4
LOCAL GRAPHICS3D_INDEX% = 5
LOCAL screenWidth%
LOCAL screenHeight%
LOCAL temp$
LOCAL width%
LOCAL height%
LOCAL path$
LOCAL TTF_SPRITEBASE% = 1000
LOCAL loadingBarX% = 4
LOCAL loadingBarY%
LOCAL loadingBarYSize% = 24
LOCAL loadOkay%

GETSCREENSIZE screenWidth%,screenHeight%
loadingBarY%=(screenHeight%-loadingBarYSize%)/2

errorMessage$=""

sections$[TTF_INDEX%]="TTFONT"
sections$[SPRITE_INDEX%]="SPRITES"
sections$[SOUNDS_INDEX%]="SOUNDS"
sections$[MUSIC_INDEX%]="MUSIC"
sections$[FONT_INDEX%]="FONTS"
sections$[GRAPHICS3D_INDEX%]="3DGRAPHICS"
sections$[6]=""

IF doLoad%=TRUE
barYPos%=(screenHeight%-barYSize%)/2

secLoop%=0
xPos%=0
file$=""
WHILE sections$[secLoop%]<>""
// Now we point at the correct data statements
loop%=0
SELECT sections$[secLoop%]
CASE sections$[TTF_INDEX%]
// TTF Font
RESTORE ttFFontsData

CASE sections$[SPRITE_INDEX%]
// Sprites
RESTORE spritesData

CASE sections$[SOUNDS_INDEX%]
// Sounds
RESTORE soundsData

CASE sections$[MUSIC_INDEX%]
// Music
RESTORE musicData

CASE sections$[FONT_INDEX%]
RESTORE fontData

loop%=1
l.xSize%=0
l.ySize%=0
l.isBumpMap%=FALSE
l.idNumber%=0
DIMPUSH fontLoadData[],l

CASE sections$[GRAPHICS3D_INDEX%]
RESTORE graphics3DData
ENDSELECT

READ file$
DEBUG "Files : "+file$+"\n"
WHILE file$<>NO_DATA$
IF path$<>NO_DATA$
// Replace all occurances of %PATH% with what is held in path$
file$=REPLACE$(file$,"%PATH%",path$)
ENDIF

DRAWRECT loadingBarX%,loadingBarY%,screenWidth%-(loadingBarX%*2),loadingBarYSize%,RGB(255,255,255)
DRAWRECT loadingBarX%+2,loadingBarY%+2,screenWidth%-(loadingBarX%*3),loadingBarYSize%-4,0
box(loadingBarX%+4,loadingBarY%+4,xPos%+loadingBarX%+4,loadingBarY%+(loadingBarYSize%-4),RGB(255,0,0),RGB(0,255,255),RGB(0,255,255),RGB(255,0,0))

isAnim%=FALSE
isBumpMap%=FALSE

IF LEFT$(file$,LEN(bumpText$))=bumpText$
isBumpMap%=TRUE
file$=MID$(file$,LEN(bumpText$),LEN(file$))
ELSE
IF LEFT$(file$,LEN(animText$))=animText$
file$=MID$(file$,LEN(animText$),LEN(file$))
isAnim%=TRUE
temp$=INIGET$(sections$[secLoop%],loop%+"_X")
IF temp$=NO_DATA$
width%=32
ELSE
width%=temp$
ENDIF

temp$=INIGET$(sections$[secLoop%],loop%+"_Y")
IF temp$=NO_DATA$
height%=32
ELSE
height%=temp$
ENDIF
ENDIF
ENDIF

IF usingShoeBox%=FALSE AND DOESFILEEXIST(file$)
loadOkay%=TRUE
ELSE
IF usingShoeBox%=TRUE AND ((sections$[secLoop%]=sections$[0] AND DOESFILEEXIST(file$)) OR (sections$[secLoop%]<>sections$[0]))
loadOkay%=TRUE
ELSE
loadOkay%=FALSE
ENDIF
ENDIF

IF loadOkay%=TRUE
l.xSize%=0
l.ySize%=0
l.isBumpMap%=FALSE
l.idNumber%=loop%
l.channel%=SOUND_INVALID%
l.fileName$=file$

SELECT sections$[secLoop%]
CASE sections$[TTF_INDEX%]
// Moru's TTF system
l.idNumber%=TTF_SPRITEBASE%
l.fontIndex%=AddFont(file$,2,TTF_SPRITEBASE%)
INC TTF_SPRITEBASE%,TTF_FONTSTEP% // We're assuming there are 256 characters in each font file
DIMPUSH ttFontLoadData[],l

CASE sections$[SPRITE_INDEX%]
IF isBumpMap%=TRUE
LOADBUMPTEXTURE file$,loop%
l.isBumpMap%=TRUE
GETSPRITESIZE loop%,l.xSize%,l.ySize%
ELSE
IF isAnim%=TRUE
LOADANIM file$,loop%,width%,height%
l.xSize%=width%
l.ySize%=height%
ELSE
LOADSPRITE file$,loop%
GETSPRITESIZE loop%,l.xSize%,l.ySize%
ENDIF
ENDIF

DIMPUSH spriteLoadData[],l

CASE sections$[SOUNDS_INDEX%]
LOADSOUND file$,loop%,1
DIMPUSH soundLoadData[],l

CASE sections$[MUSIC_INDEX%]
// Because music is played on the fly, we just record the filename
DIMPUSH musicLoadData[],l

CASE sections$[FONT_INDEX%]
LOADFONT file$,loop%
SETFONT loop%
GETFONTSIZE l.xSize%,l.ySize%
DIMPUSH fontLoadData[],l

CASE sections$[GRAPHICS3D_INDEX%]
// 3D objects
X_LOADOBJ file$,loop%
DIMPUSH objectLoadData[],l

DEFAULT
errorMessage$="Unknown section code of : "+sections$[secLoop%]
ENDSELECT

SHOWSCREEN

INC loop%,1
INC xPos%,1
IF xPos%>screenWidth%-(loadingBarX%*2)-4
xPos%=0
ENDIF

READ file$
ELSE
errorMessage$="Can NOT find the file : "+file$
file$=NO_DATA$
ENDIF
WEND

IF errorMessage$<>""
RETURN errorMessage$
ENDIF

INC secLoop%,1
WEND
ELSE
STOPMUSIC
HUSH

FOREACH l IN spriteLoadData[]
IF l.isBumpMap%=TRUE
LOADBUMPTEXTURE "",l.idNumber%
ELSE
LOADSPRITE "",l.idNumber%
ENDIF
NEXT

// Font #0 is not to be removed until the program is about to exit
FOREACH l IN fontLoadData[]
LOADFONT "",l.idNumber%
NEXT

FOREACH l IN soundLoadData[]
LOADSOUND "",l.idNumber%,1
NEXT

DIM musicLoadData[0]

FOREACH l IN objectLoadData[]
X_LOADOBJ "",loop%
NEXT

FOREACH l IN ttFontLoadData[]
FOR secLoop%=0 TO TTF_FONTSTEP%-1
LOADSPRITE "",l.idNumber+secLoop%
NEXT
NEXT

clearLoadData()
ENDIF

RETURN errorMessage$
ENDFUNCTION

FUNCTION clearLoadData:
DIM spriteLoadData[0]
DIM fontLoadData[0]
DIM objectLoadData[0]
DIM soundLoadData[0]
DIM musicLoadData[0]
DIM ttFontLoadData[0]
ENDFUNCTION

FUNCTION setupDisplay%:setupFile$,BYREF screenWidth%,BYREF screenHeight%,BYREF fullScreen%, _
BYREF mVolume,BYREF sVolume,BYREF webUpload%, _
doLoadData%,deskWidth%=-1,deskHeight%=-1,DEBUG_MODE%=TRUE
LOCAL DISPLAY_SECTION$="DISPLAY"
LOCAL DISPLAY_SCREENWIDTH$="SCREENWIDTH"
LOCAL DISPLAY_SCREENHEIGHT$="SCREENHEIGHT"
LOCAL DISPLAY_FULLSCREEN$="SCREENFULLSCREEN"
LOCAL VOLUME_SECTION$="VOLUME"
LOCAL VOLUME_MUSIC$="MUSICVOLUME"
LOCAL VOLUME_SFX$="MUSICSFX"
LOCAL WEB_SECTION$="INTERNET"
LOCAL WEB_UPLOAD$="WEBUPLOAD"

LOCAL width$
LOCAL height$
LOCAL fullScreen$
LOCAL musicVolume$
LOCAL sfxVolume$
LOCAL webUpload$

DEBUG "Do Load Data : "+doLoadData%+"\n"
DEBUG "S:"+screenWidth%+" "+screenHeight%+"\n"
IF default_screenWidth%<0 OR default_screenHeight%<0
RETURN FALSE
ENDIF

INIOPEN setupFile$
IF doLoadData%=TRUE
width$=INIGET$(DISPLAY_SECTION$,DISPLAY_SCREENWIDTH$)
height$=INIGET$(DISPLAY_SECTION$,DISPLAY_SCREENHEIGHT$)
fullScreen$=INIGET$(DISPLAY_SECTION$,DISPLAY_FULLSCREEN$)
musicVolume$=INIGET$(VOLUME_SECTION$,VOLUME_MUSIC$)
sfxVolume$=INIGET$(VOLUME_SECTION$,VOLUME_SFX$)
webUpload$=INIGET$(WEB_SECTION$,WEB_UPLOAD$)

IF width$=NO_DATA$ OR height$=NO_DATA$ OR fullScreen$=NO_DATA$
// setup the default screen width
screenWidth%=default_screenWidth%
screenHeight%=default_screenHeight%
fullScreen%=default_useWindow%
ELSE
screenWidth%=width$
screenHeight%=height$
fullScreen%=fullScreen$
ENDIF

IF musicVolume$=NO_DATA$
mVolume=1.0
ELSE
mVolume=musicVolume$
ENDIF

IF sfxVolume$=NO_DATA$
sVolume=1.0
ELSE
sVolume=sfxVolume$
ENDIF

IF fullScreen%<>TRUE AND fullScreen%<>FALSE THEN fullScreen%=TRUE

IF webUpload$=NO_DATA$
webUpload%=TRUE
ELSE
webUpload%=webUpload$
IF webUpload%<>TRUE AND webUpload%<>FALSE THEN webUpload%=TRUE
ENDIF

IF fullScreen%=TRUE AND DEBUG_MODE%=TRUE
fullScreen%=FALSE
ENDIF

// Now we get the list of availiable screen modes
// If we dont allow screen resolution change, then we just check again the default resolution
IF allowResChange%=TRUE
// Make sure this resolution is present
IF findResolution(screenWidth%,screenHeight%)=FALSE
// Can we use the default resolution ?
IF findResolution(default_screenWidth%,default_screenHeight%)=FALSE
// No
seriousError("Unable to use default screen resolution of "+default_screenWidth%+" x "+default_screenHeight%+".  The program will now exit.")
RETURN FALSE
ENDIF

screenWidth%=default_screenWidth%
screenHeight%=default_screenHeight%
ELSE
ENDIF
ENDIF

// Check to make sure that a window cant be greater than the desktop size
IF deskWidth%>-1 AND deskHeight%>-1
IF screenWidth%>deskWidth% OR screenHeight%>deskHeight%
screenWidth%=deskWidth%
screenHeight%=deskHeight%
ENDIF
ENDIF
ELSE
INIPUT DISPLAY_SECTION$,DISPLAY_SCREENWIDTH$,screenWidth%
INIPUT DISPLAY_SECTION$,DISPLAY_SCREENHEIGHT$,screenHeight%
INIPUT DISPLAY_SECTION$,DISPLAY_FULLSCREEN$,fullScreen%
INIPUT VOLUME_SECTION$,VOLUME_MUSIC$,mVolume
INIPUT VOLUME_SECTION$,VOLUME_SFX$,sVolume
INIPUT WEB_SECTION$,WEB_UPLOAD$,webUpload%
RETURN TRUE
ENDIF

INIOPEN ""
changeScreen(screenWidth%,screenHeight%,fullScreen%,deskWidth,deskHeight%)

IF fullScreen%=TRUE AND ISFULLSCREEN()=FALSE
// Try it without full screen ?
fullScreen%=FALSE

IF screenWidth%>deskWidth% OR screenHeight%>deskHeight%
screenWidth%=deskWidth%
screenHeight%=deskHeight%
ENDIF

changeScreen(screenWidth%,screenHeight%,fullScreen%,deskWidth,deskHeight%)

seriousError("Full Screen resolution is unavailiable.\nReverting to Window mode");
ENDIF

RETURN TRUE
ENDFUNCTION

FUNCTION changeScreen:width%,height%,fullScreen%,deskWidth%,deskHeight%
BLACKSCREEN
LIMITFPS -1
SETTRANSPARENCY RGB(0,0,0)

loadRemoveFiles$(FALSE)

SETSCREEN width%,height%,fullScreen%
LOADFONT DEFAULT_FONT$,0
SETFONT 0
DDgui_UpdateFont(TRUE)

IF fullScreen%=FALSE
//DEBUG "Centre"
CentreWindow(deskWidth%,deskHeight%)
ENDIF

SHOWSCREEN
SYSTEMPOINTER FALSE

SEEDRND GETTIMERALL()
ENDFUNCTION

FUNCTION playSND:soundIndex%,isMusic%,loop%=FALSE
LOCAL channel%
LOCAL volume

IF isMusic%=TRUE
IF options.mVolume>0.0
PLAYMUSIC musicLoadData[soundIndex%].fileName$,loop%
MUSICVOLUME options.mVolume
ENDIF
ELSE
IF (soundLoadData[soundIndex%].channel=SOUND_INVALID%) OR _
(SOUNDPLAYING(soundLoadData[soundIndex%].channel)=FALSE)
soundLoadData[soundIndex%].channel=PLAYSOUND(soundIndex%,0,options.sVolume)
ENDIF
ENDIF
ENDFUNCTION

FUNCTION seriousError:text$
LOCAL width%
LOCAL height%
LOCAL message$ = "messID"
LOCAL button$ = "buttID"

GETSCREENSIZE width%,height%
DEC height,26

DDgui_pushdialog(0,0,width%,height%)
DDgui_set("","TEXT","Kangaroo Bouncing Error")
DDgui_text(message$,text$,width%-12,height%-64)
DDgui_button(button$,"Okay",0,0)
setUpColours()

WHILE TRUE
DDgui_show(FALSE)

SHOWSCREEN

IF DDgui_get(button$,"CLICKED")
RETURN FALSE
ENDIF
WEND
ENDFUNCTION

FUNCTION box:x%,y%,width%,height%,c1%,c2%,c3%,c4%
STARTPOLY 500
POLYVECTOR width%,y%,0,0,c1%
POLYVECTOR x%,y%,0,0,c2%
POLYVECTOR x%,height%,0,0,c3%
POLYVECTOR width%,height%,0,0,c4%
ENDPOLY
ENDFUNCTION

FUNCTION processListOfScreenResolutions:list$
LOCAL sectionList$[]
LOCAL resList$[]
LOCAL loop%
LOCAL screenRes AS tScreenResolutions

DIM sectionList$[0]
DIM screenResolutions[0]

IF SPLITSTR(list$,sectionList$[],",")>0
// Now we split these into resolutions
FOR loop%=0 TO BOUNDS(sectionList$[],0)-1
DIM resList$[0]

IF SPLITSTR(sectionList$[loop%],resList$[],"x")>0
screenRes.width%=INTEGER(resList$[0])
screenRes.height%=INTEGER(resList$[1])

DIMPUSH screenResolutions[],screenRes
ENDIF
NEXT

SORTARRAY screenResolutions[],ADDRESSOF(resSort)
ENDIF

RETURN BOUNDS(screenResolutions[],0)
ENDFUNCTION

FUNCTION resSort:a AS tScreenResolutions,b AS tScreenResolutions
IF b.width<a.width
RETURN 1
ELSE
IF b.width>a.width
RETURN -1
ELSE
IF b.height<a.height
RETURN 1
ELSE
IF b.height>a.height
RETURN -1
ENDIF
ENDIF
ENDIF
ENDIF

RETURN 0
ENDFUNCTION

FUNCTION findResolution:width%,height%
LOCAL s AS tScreenResolutions

FOREACH s IN screenResolutions[]
DEBUG s.width%+" "+width%+" "+s.height%+" "+height%+"\n"
IF s.width%=width% AND s.height%=height%
RETURN TRUE
ENDIF
NEXT

RETURN FALSE
ENDFUNCTION

FUNCTION returnScreenIndex:width%,height%
LOCAL loop%

FOR loop%=0 TO BOUNDS(screenResolutions[],0)-1
IF screenResolutions[loop%].width%=width% AND screenResolutions[loop%].height%=height%
RETURN loop%
ENDIF
NEXT

// RETURN the first index
RETURN 0
ENDFUNCTION
« Last Edit: 2009-Aug-31 by MrTAToad »

Offline Schranz0r

  • Premium User :)
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 5032
  • O Rly?
    • View Profile
Re: Load/Remove System
« Reply #1 on: 2009-Aug-31 »
Nice work!
I <3 DGArray's :D

PC:
AMD Ryzen 7 1700 @3.9GHz, 16GB HyperX Fury 3000MHz Ram, ASUS ROG GTX 1060 STRIX 6GB, Windows 10 Pro 64Bit, MSi Tomahawk B350 Mainboard

MrTAToad

  • Guest
Re: Load/Remove System
« Reply #2 on: 2009-Aug-31 »
Thanks!

Offline kaotiklabs

  • Dr. Type
  • ****
  • Posts: 313
  • Spain is diferent
    • View Profile
Re: Load/Remove System
« Reply #3 on: 2009-Nov-13 »

I was looking for something like this. In order to organize a bit the loading of several media files, and also a loading bar.
MrTAToad, can you explain a bot how to use it or even a small project?
I´m not getting how to use it  :(

Thanks in advance!
Vote Cthulhu! Because the stars are right!!!!
Ia Ia Cthulhu F' tang!

Offline WPShadow

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1667
    • View Profile
    • http://lostrevenant.blogspot.com
Re: Load/Remove System
« Reply #4 on: 2009-Nov-13 »
Some little problems with compiling  :giveup:

Code: (glbasic) [Select]

*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.7.122 SN:7ea99b67 - 3D, NET
"LD_remove.gbas"(206) error : missing DATASTART for label : ttFFontsData

AMD X2 4600, 2 GB Ram, ATI X1950 XTX, XP PRO SP2: GLB Premium 10.beta_dingsi, <(´.´<) Kirby Dance (>`.`)>
http://lostrevenant.blogspot.com
alea iacta est

MrTAToad

  • Guest
Re: Load/Remove System
« Reply #5 on: 2009-Nov-14 »
Thats because you need to supply your down set of DATA statements for loading.

Offline WPShadow

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1667
    • View Profile
    • http://lostrevenant.blogspot.com
Re: Load/Remove System
« Reply #6 on: 2009-Nov-14 »
Ahm...  :whistle:
wpshadow <-->  :help:
AMD X2 4600, 2 GB Ram, ATI X1950 XTX, XP PRO SP2: GLB Premium 10.beta_dingsi, <(´.´<) Kirby Dance (>`.`)>
http://lostrevenant.blogspot.com
alea iacta est

MrTAToad

  • Guest
Re: Load/Remove System
« Reply #7 on: 2009-Nov-14 »
Mind you, it would be worth including the base set of data.  This is how I set it up :

Code: (glbasic) [Select]
STARTDATA ttFFontsData:
DATA "NO_DATA"
ENDDATA

STARTDATA spritesData:
DATA "NO_DATA"
ENDDATA

STARTDATA soundsData:
DATA "NO_DATA"
ENDDATA

STARTDATA musicData:
DATA "NO_DATA"
ENDDATA

STARTDATA fontData:
DATA "NO_DATA"
ENDDATA

STARTDATA graphics3DData:
DATA "NO_DATA"
ENDDATA
« Last Edit: 2009-Nov-14 by MrTAToad »

Offline WPShadow

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1667
    • View Profile
    • http://lostrevenant.blogspot.com
Re: Load/Remove System
« Reply #8 on: 2009-Nov-14 »
oh, easier as I thought...  :P

thx, for your help!!!
AMD X2 4600, 2 GB Ram, ATI X1950 XTX, XP PRO SP2: GLB Premium 10.beta_dingsi, <(´.´<) Kirby Dance (>`.`)>
http://lostrevenant.blogspot.com
alea iacta est

MrTAToad

  • Guest
Re: Load/Remove System
« Reply #9 on: 2010-Apr-03 »
Here is the updated version of my loading system.  It also needs DDgui and the BaseDir files (which is also included).

[attachment deleted by admin]