(function() {
/*:
* @plugindesc HPDS Assets Manager to change from where images and audio are loaded.
* @author Michael Hernandez @ High Plains Design Studio www.highplainsdesignstudio.com
*
* @param images
* @desc The directory that will hold the images. Can be relative (../assets/). This should contain the trailing "/".
* @default img/
*
* @param audio
* @desc The directory that will hold the audio. Can be relative (../assets/audio/). This should contain the trailing "/".
* @default audio/
*/
HPDS_ImageManager = {};
HPDS_ImageManager.parameters = PluginManager.parameters("HPDS_AssetsManager");
var imagesDir = HPDS_ImageManager.parameters["images"];
var audioDir = HPDS_ImageManager.parameters['audio'];
ImageManager.loadAnimation = function(filename, hue) {
return this.loadBitmap(imagesDir + 'animations/', filename, hue, true);
};
ImageManager.loadBattleback1 = function(filename, hue) {
return this.loadBitmap(imagesDir + 'battlebacks1/', filename, hue, true);
};
ImageManager.loadBattleback2 = function(filename, hue) {
return this.loadBitmap(imagesDir + 'battlebacks2/', filename, hue, true);
};
ImageManager.loadEnemy = function(filename, hue) {
return this.loadBitmap(imagesDir + 'enemies/', filename, hue, true);
};
ImageManager.loadCharacter = function(filename, hue) {
return this.loadBitmap(imagesDir + 'characters/', filename, hue, false);
};
ImageManager.loadFace = function(filename, hue) {
return this.loadBitmap(imagesDir + 'faces/', filename, hue, true);
};
ImageManager.loadParallax = function(filename, hue) {
return this.loadBitmap(imagesDir + 'parallaxes/', filename, hue, true);
};
ImageManager.loadPicture = function(filename, hue) {
return this.loadBitmap(imagesDir + 'pictures/', filename, hue, true);
};
ImageManager.loadSvActor = function(filename, hue) {
return this.loadBitmap(imagesDir + 'sv_actors/', filename, hue, false);
};
ImageManager.loadSvEnemy = function(filename, hue) {
return this.loadBitmap(imagesDir + 'sv_enemies/', filename, hue, true);
};
ImageManager.loadSystem = function(filename, hue) {
return this.loadBitmap(imagesDir + 'system/', filename, hue, false);
};
ImageManager.loadTileset = function(filename, hue) {
return this.loadBitmap(imagesDir + 'tilesets/', filename, hue, false);
};
ImageManager.loadTitle1 = function(filename, hue) {
return this.loadBitmap(imagesDir + 'titles1/', filename, hue, true);
};
ImageManager.loadTitle2 = function(filename, hue) {
return this.loadBitmap(imagesDir + 'titles2/', filename, hue, true);
};
// reserve methods
ImageManager.reserveAnimation = function(filename, hue, reservationId) {
return this.reserveBitmap(imagesDir + 'animations/', filename, hue, true, reservationId);
};
ImageManager.reserveBattleback1 = function(filename, hue, reservationId) {
return this.reserveBitmap(imagesDir + 'battlebacks1/', filename, hue, true, reservationId);
};
ImageManager.reserveBattleback2 = function(filename, hue, reservationId) {
return this.reserveBitmap(imagesDir + 'battlebacks2/', filename, hue, true, reservationId);
};
ImageManager.reserveEnemy = function(filename, hue, reservationId) {
return this.reserveBitmap(imagesDir + 'enemies/', filename, hue, true, reservationId);
};
ImageManager.reserveCharacter = function(filename, hue, reservationId) {
return this.reserveBitmap(imagesDir + 'characters/', filename, hue, false, reservationId);
};
ImageManager.reserveFace = function(filename, hue, reservationId) {
return this.reserveBitmap(imagesDir + 'faces/', filename, hue, true, reservationId);
};
ImageManager.reserveParallax = function(filename, hue, reservationId) {
return this.reserveBitmap(imagesDir + 'parallaxes/', filename, hue, true, reservationId);
};
ImageManager.reservePicture = function(filename, hue, reservationId) {
return this.reserveBitmap(imagesDir + 'pictures/', filename, hue, true, reservationId);
};
ImageManager.reserveSvActor = function(filename, hue, reservationId) {
return this.reserveBitmap(imagesDir + 'sv_actors/', filename, hue, false, reservationId);
};
ImageManager.reserveSvEnemy = function(filename, hue, reservationId) {
return this.reserveBitmap(imagesDir + 'sv_enemies/', filename, hue, true, reservationId);
};
ImageManager.reserveSystem = function(filename, hue, reservationId) {
return this.reserveBitmap(imagesDir + 'system/', filename, hue, false, reservationId || this._systemReservationId);
};
ImageManager.reserveTileset = function(filename, hue, reservationId) {
return this.reserveBitmap(imagesDir + 'tilesets/', filename, hue, false, reservationId);
};
ImageManager.reserveTitle1 = function(filename, hue, reservationId) {
return this.reserveBitmap(imagesDir + 'titles1/', filename, hue, true, reservationId);
};
ImageManager.reserveTitle2 = function(filename, hue, reservationId) {
return this.reserveBitmap(imagesDir + 'titles2/', filename, hue, true, reservationId);
};
// Request methods
ImageManager.requestAnimation = function(filename, hue) {
return this.requestBitmap(imagesDir + 'animations/', filename, hue, true);
};
ImageManager.requestBattleback1 = function(filename, hue) {
return this.requestBitmap(imagesDir + 'battlebacks1/', filename, hue, true);
};
ImageManager.requestBattleback2 = function(filename, hue) {
return this.requestBitmap(imagesDir + 'battlebacks2/', filename, hue, true);
};
ImageManager.requestEnemy = function(filename, hue) {
return this.requestBitmap(imagesDir + 'enemies/', filename, hue, true);
};
ImageManager.requestCharacter = function(filename, hue) {
return this.requestBitmap(imagesDir + 'characters/', filename, hue, false);
};
ImageManager.requestFace = function(filename, hue) {
return this.requestBitmap(imagesDir + 'faces/', filename, hue, true);
};
ImageManager.requestParallax = function(filename, hue) {
return this.requestBitmap(imagesDir + 'parallaxes/', filename, hue, true);
};
ImageManager.requestPicture = function(filename, hue) {
return this.requestBitmap(imagesDir + 'pictures/', filename, hue, true);
};
ImageManager.requestSvActor = function(filename, hue) {
return this.requestBitmap(imagesDir + 'sv_actors/', filename, hue, false);
};
ImageManager.requestSvEnemy = function(filename, hue) {
return this.requestBitmap(imagesDir + 'sv_enemies/', filename, hue, true);
};
ImageManager.requestSystem = function(filename, hue) {
return this.requestBitmap(imagesDir + 'system/', filename, hue, false);
};
ImageManager.requestTileset = function(filename, hue) {
return this.requestBitmap(imagesDir + 'tilesets/', filename, hue, false);
};
ImageManager.requestTitle1 = function(filename, hue) {
return this.requestBitmap(imagesDir + 'titles1/', filename, hue, true);
};
ImageManager.requestTitle2 = function(filename, hue) {
return this.requestBitmap(imagesDir + 'titles2/', filename, hue, true);
};
// The audio portion
AudioManager._path = audioDir;
})();