Hiya again, another technical question for you lot over something which has me baffled.
at the start of my application i load all the graphics and sound from .h files, like this:
//Engine Data
#include "gamedata\logo.h" //the logo
#include "plug.h" //splash screen
#include "plug_sfx.h" //splash screen audio
#include "gamedata\collision.h" //collision detection
#include "gamedata\tileset.h" //the tiles
#include "gamedata\charset.h" //the characters
#include "gamedata\menu.h" //game menu
#include "gamedata\cursor.h" //the mouse cursor (hand)
however, im now running into problems where changing the sound effects and and plug data to larger files, means my application 'forgets' all the data which is loaded afterwards..
for instance, i changed the plug_sfx to a larger file - and now everything boots and runs (and the sound plays), but the collision detection doesn't work as the collision.h seems to be returning all zero's instead of the proper values it should of loaded
at first i thought i must just be that i was using up all the ram, but surely it wouldn't even boot if that were the case, i would expect it to freeze or reset on me? so could there be another reason
im pretty new to C coding so it has me baffled, i tried moving the plug_sfx to the bottom of the include list, and indeed everything else loads, but when it goes to play the sound only half of it plays.
bizzare stuff, my whole app is under 8mb so no idea whats causing it
On a side note, is it possible to load the contents of a .h file temporarily into RAM, then play the sound/draw the graphic to a buffer, then 'forget' the .h file so it saves some RAM? or will it always have to load the whole .fxe content onto ram before it executes?
oh well, if all else fails i'll just have to jump two steps ahead and code the SMC file loader and keep the data seperate from the .fxe.
at the start of my application i load all the graphics and sound from .h files, like this:
//Engine Data
#include "gamedata\logo.h" //the logo
#include "plug.h" //splash screen
#include "plug_sfx.h" //splash screen audio
#include "gamedata\collision.h" //collision detection
#include "gamedata\tileset.h" //the tiles
#include "gamedata\charset.h" //the characters
#include "gamedata\menu.h" //game menu
#include "gamedata\cursor.h" //the mouse cursor (hand)
however, im now running into problems where changing the sound effects and and plug data to larger files, means my application 'forgets' all the data which is loaded afterwards..
for instance, i changed the plug_sfx to a larger file - and now everything boots and runs (and the sound plays), but the collision detection doesn't work as the collision.h seems to be returning all zero's instead of the proper values it should of loaded
at first i thought i must just be that i was using up all the ram, but surely it wouldn't even boot if that were the case, i would expect it to freeze or reset on me? so could there be another reason
im pretty new to C coding so it has me baffled, i tried moving the plug_sfx to the bottom of the include list, and indeed everything else loads, but when it goes to play the sound only half of it plays.
bizzare stuff, my whole app is under 8mb so no idea whats causing it
On a side note, is it possible to load the contents of a .h file temporarily into RAM, then play the sound/draw the graphic to a buffer, then 'forget' the .h file so it saves some RAM? or will it always have to load the whole .fxe content onto ram before it executes?
oh well, if all else fails i'll just have to jump two steps ahead and code the SMC file loader and keep the data seperate from the .fxe.