CInventoryRequest::CInventoryRequest( BOOL bNotify)
{
	m_bNotify = bNotify;

	if (!initInventory())
		// Can't get Device hardware and os => stop !
		exit( -1);
}
Exemplo n.º 2
0
void Game::initGUI() {

	auto director = CCDirector::sharedDirector();
	auto visibleSize = director->getVisibleSize();

	initStatusBar(visibleSize);
	initInventory(visibleSize);
	addMenu(visibleSize);
}
Exemplo n.º 3
0
Common::Error Parallaction_br::init() {

	_screenWidth = 640;
	_screenHeight = 400;

	if (getPlatform() == Common::kPlatformPC) {
		if (getFeatures() & GF_DEMO) {
			_disk = new DosDemoDisk_br(this);
		} else {
			_disk = new DosDisk_br(this);
		}
		_disk->setLanguage(2);					// NOTE: language is now hardcoded to English. Original used command-line parameters.
		MidiDriver::DeviceHandle dev = MidiDriver::detectDevice(MDT_MIDI | MDT_ADLIB | MDT_PREFER_GM);
		MidiDriver *driver = MidiDriver::createMidi(dev);
		_soundManI = new DosSoundMan_br(this, driver);
	} else {
		_disk = new AmigaDisk_br(this);
		_disk->setLanguage(2);					// NOTE: language is now hardcoded to English. Original used command-line parameters.
		_soundManI = new AmigaSoundMan_br(this);
	}

	_disk->init();
	_soundMan = new SoundMan(_soundManI);

	initResources();
	initFonts();
	_locationParser = new LocationParser_br(this);
	_locationParser->init();
	_programParser = new ProgramParser_br(this);
	_programParser->init();

	_cmdExec = new CommandExec_br(this);
	_programExec = new ProgramExec_br(this);

	_walker = new PathWalker_BR;

	_part = -1;
	_nextPart = -1;

	_subtitle[0] = 0;
	_subtitle[1] = 0;

	memset(_zoneFlags, 0, sizeof(_zoneFlags));

	_countersNames = 0;

	_saveLoad = new SaveLoad_br(this, _saveFileMan);

	initInventory();
	setupBalloonManager();

	Parallaction::init();

	return Common::kNoError;
}
Exemplo n.º 4
0
/*
*	Fills a player structure with a new name/pass combo
*	Starts skills - initializes spelled skills (makes printing easier)
*	Initializes inventory
*/
void initPlayer(char * name, char * pass, player * hero)
{
	int i;

	for(i = 0; i < 7; i++)
		hero->skills[i] = 0;
	hero->spelledskills[0] = "Gold";
	hero->spelledskills[1] = "HP";
	hero->spelledskills[2] = "Speed";
	hero->spelledskills[3] = "Wisdom";
	hero->spelledskills[4] = "Agility";
	hero->spelledskills[5] = "Strenght";
	hero->spelledskills[6] = "Resistance";
		
	hero->name = name;
	hero->pass = pass;	
	hero->skills[HP] = 50;
	hero->freePoints = 0;

	hero->inventory = initInventory();
	hero->inventory = insertItem(hero->inventory, "Map\0");
}
Exemplo n.º 5
0
Common::Error Parallaction_ns::init() {

	_screenWidth = 320;
	_screenHeight = 200;

	if (getPlatform() == Common::kPlatformPC) {
		_disk = new DosDisk_ns(this);
	} else {
		if (getFeatures() & GF_DEMO) {
			strcpy(_location._name, "fognedemo");
		}
		_disk = new AmigaDisk_ns(this);
	}

	_disk->init();

	if (getPlatform() == Common::kPlatformPC) {
		_soundManI = new DosSoundMan_ns(this);
		_soundManI->setMusicVolume(ConfMan.getInt("music_volume"));
	} else {
		_soundManI = new AmigaSoundMan_ns(this);
	}

	_soundMan = new SoundMan(_soundManI);

	initResources();
	initFonts();
	_locationParser = new LocationParser_ns(this);
	_locationParser->init();
	_programParser = new ProgramParser_ns(this);
	_programParser->init();

	_cmdExec = new CommandExec_ns(this);
	_programExec = new ProgramExec_ns(this);

	_walker = new PathWalker_NS(this);

	_sarcophagusDeltaX = 0;
	_movingSarcophagus = false;
	_freeSarcophagusSlotX = INITIAL_FREE_SARCOPHAGUS_SLOT_X;

	num_foglie = 0;

	_intro = false;
	_inTestResult = false;

	_location._animations.push_front(_char._ani);

	_saveLoad = new SaveLoad_ns(this, _saveFileMan);

	initInventory();
	setupBalloonManager();

	_score = 1;

	_testResultLabels[0] = 0;
	_testResultLabels[1] = 0;

	Parallaction::init();

	return Common::kNoError;
}