Example #1
0
	void GameLoop::loadSettings()
	{
		// load initial state
		loaders::LoadXML lXML;
		lXML.loadXML(this->m_Settings->getStatesPath());
		this->m_Title = lXML.getTagContent(newString("Title"));
		this->m_ReturnAction = lXML.getTagContent(newString("return_action"));
		this->m_PauseGame = lXML.getTagContent(newString("pause_game"));
		this->m_DefaultState = lXML.getTagContent(newString("default"));
		this->m_CurrentState = this->m_DefaultState;
		loadStates(&lXML);
	}
Example #2
0
//sub_800253A0():          //ldat initB, loads level initial zone
unsigned long initLevel()
{
  //TODO: have nsd struct also record pointer to the loading screen info
  //v0 = *(0x5C538);  //modifies this line
    
  //*(0x61A30) = 0;
  var_61A30 = 0;    
  
  //EID = v0[0];      //this line
  //EID != 0x6396347F
  if (nsd->ldat != EID_NULL)  //and this line
  {
    //processBitList = 0x5FF58;
  
    //gp[0x2E8]  =      0;
    //gp[0x2EC]  =      0;  //*(0x566E8) =      0;
    
    //*(0x6189C) = 0xFFFF;  //(animate display flags to reset with for each frame of intro sequence?)
    //*(0x618B0) = 0xFFFF;  //set global process animate and display flags
    dispAniGlobF = 0xFFFF;
    dispAniGlob  = 0xFFFF;
    
    memset(states, 0, 0x4C0);
    
    //levelID = *(0x5C53C)[4];   //also have NSD record extended info
    unsigned long levelID = nsd->level.LID;
    
    loadStates(levelID);     //and write function for this: set up process bitlist array

    unsigned long initProgress = 0;
    unsigned long zoneEntryAddBit;
    
    /*dont need this right now
    curLevel = *(0x5C52C);
    if (curLevel == 0x11 || curLevel == 0x1E)   //hog wild and whole hog need 2
      zoneEntryAddBit = 2;                       //this is value that increments 
    else                                         //the field[0xA] of the page used when loading the first zone
      zoneEntryAddBit = 1;                       //entry; (perhaps this is for loading more since the zone is travelled faster and therefore more zones need to be loaded per progress)
    */
    
    //we'll set up projection later, this is more gl functions
    //sub_80017790();   //set up projection and screen offset

    /*NO MAIN MENU STUFF YET
    if (curLevel == 0x19 || *(0x618D0) == 0x200 || gp[0x98] == 0)
    {
      //also devise routine in nsd class to 'write' over original header
      //values while still maintaining initial value
      //encodes the string in base 64 format
      *(0x5C53C)[8] = sub_80012660("0b_pz");  
    }*/

    /*NO BONUS/RETURN STUFF YET
    if (gp[0x94] == 1)                  //(return from bonus??)
    {
      *(0x5C53C)[8]   = *(0x57998);    //replace with these zones
      *(0x5C53C)[0xC] = *(0x5799C); 

      gp[0x94] = 0;
     
      s1 = *(0x579A0);
    }*/

    //firstZone = sub_80015118(*(0x5C53C)[8], 0, zoneEntryAddBit);       //T7/ZDAT/GLOBAL/INITIAL ENTITY ENTRY
    
    //*(0x566B0) = 0x6396347F;

    currentZone      = 0;     //level entry?
    currentSection   = 0;     
    currentProgressV = 0;

    //*(0x57968) = 0; //sb
    //*(0x57969) = 0;
    //*(0x5796A) = 0;
    //*(0x5796B) = 0;
    //*(0x57970) = *(0x34520);
 
    //**NO MAIN MENU/DEMO STUFF YET
    //--if coming directly from the main menu? then load demo?
    //if (*(0x618D0) == 0) 
    //  sub_8002EABC(0x566B0);
    
    //firstZoneHeader        = firstZone[0x10];
    //firstSectionIndex      = *(0x5C53C)[0xC];  //NSD file locates index of the first section
    //firstZoneSectionsIndex =    item1[0x204];  //zone indicates in header the index of the start of its section items
    //firstSection = entry[0x10 + ((firstZoneSectionsIndex + firstSectionIndex)*4)];

    //initProgress equivalent to s1
    //updateLevel(firstZone, firstSection, initProgress, false);
    //sub_80015458(0x5C53C + 8, 1, initProgress);
  }
  else
  {
    //*(0x5C53C)[0] = 0;
    nsd->level.magic = 0;
  }

  //**NO SOUND YET EITHER (if these are truly sound routines)**
  //if (*(0x56400) == 0)
  //{
  //  sub_8002EC68(1);
  //  sub_8002EBB4(1);
  //}
  
  //gp[0x98] = 0;  //seems to be main focus of this subsystem
  return GOOL_CODE_SUCCESS;
}