ModusCreateOrg / creative-engine

Modus Create's portable Game Engine. Runs on the LDK Game console, desktop macOS and Linux
https://labs.moduscreate.com/creative-engine
MIT License
18 stars 8 forks source link

Update rcomp to support music/sound/instrument files. #17

Closed mschwartz closed 5 years ago

mschwartz commented 5 years ago

Need input from Jay.

mschwartz commented 5 years ago

Right now rcomp supports BITMAP, but the idea is for it to support ALL the binary kinds of resources for games.

Thus, we want to support music files, sound files, instrument files all loaded and packed into the Resources.bin file with #defines generated in Resources.h and appropriate Load*() routines in BResourceManager.

mschwartz commented 5 years ago

@jaygarcia

mschwartz commented 5 years ago
SOUND filename.wav
SONG filename.xm
mschwartz commented 5 years ago

ResourceManager:

LoadSound() LoadSong()

SoundSlot struct SongSlot struct

mschwartz commented 5 years ago
struct SongSlot {
   TInt mResourceID;
   BSong *mSong;
}

class BSong {
   TAny *mData;
   TUint32 mSize;
};

BSong *mySong = resourceManager.GetSong(slot_number);
mschwartz commented 5 years ago

Alternatively, we can just do "RAW" resources.

They have mData and mSize.

A RAW resource can be any "thing" like a text file or a wav, etc.

mschwartz commented 5 years ago
struct RawSlot {
   TInt mResourceID;
   BRaw *mRaw;
}

class BRaw {
   TAny *mData;
   TUint32 mSize;
};

BRaw *mySong = resourceManager.GetRaw(slot_number);
BRaw *mySound = resourceManager.GetRaw(slot_number);
mschwartz commented 5 years ago

Just do RAW