void Frontend_Init() { pFrontendFont = Font_Load("data/fonts/frontend"); Frontend_Mode = FRONTEND_NONE; Frontend_ModeNext = FRONTEND_SELECTCAR;//FRONTEND_NONE; fFade = 1.f; Frontend_UpdateMode = FRONTEND_FADINGOUT; }
void ClientGame::LoadResources() { struct TextureLoad { Texture* texture; const char* fileName; }; TextureLoad load[] = { { &m_agentTexture, "assets/agent.png" }, { &m_agentHackingTexture, "assets/agent_hacking.png" }, { &m_agentIntelTexture, "assets/agent_intel.png" }, { &m_agentStakeoutTexture, "assets/agent_stakeout.png" }, { &m_intelTexture, "assets/intel.png" }, { &m_buildingTowerTexture, "assets/building_tower.png" }, { &m_buildingBankTexture, "assets/building_bank.png" }, { &m_buildingHouseTexture, "assets/building_safehouse.png" }, { &m_buildingRaidedHouseTexture, "assets/raided_safehouse.png" }, { &m_buildingPoliceTexture, "assets/building_police.png" }, { &m_buttonTexture[ButtonId_Infiltrate], "assets/action_infiltrate.png" }, { &m_buttonTexture[ButtonId_Capture], "assets/action_capture.png" }, { &m_buttonTexture[ButtonId_Stakeout], "assets/action_stakeout.png" }, { &m_buttonTexture[ButtonId_Hack], "assets/action_hack.png" }, { &m_buttonTexture[ButtonId_Intel], "assets/action_drop.png" }, { &m_buttonShadowTexture, "assets/button_shadow.png" }, { &m_playerPortraitTexture, "assets/player_portrait.png" }, { &m_playerEliminatedTexture, "assets/player_eliminated.png" }, { &m_playerBankHackedTexture, "assets/player_bank_hacked.png" }, { &m_playerCellHackedTexture, "assets/player_cell_hacked.png" }, { &m_playerPoliceHackedTexture, "assets/player_police_hacked.png" }, { &m_titleBackgroundTexture, "assets/title_background.png" }, { &m_titleTextTexture, "assets/title_text.png" }, { &m_uiTexture, "assets/ui.png" }, }; int numTextures = sizeof(load) / sizeof(TextureLoad); for (int i = 0; i < numTextures; ++i) { Texture_Load(*load[i].texture, load[i].fileName); } Font_Load(m_font, "assets/font.csv"); m_soundAction = BASS_SampleLoad(false, "assets/sound_action.wav", 0, 0, 3, BASS_SAMPLE_OVER_POS); m_soundDeath = BASS_SampleLoad(false, "assets/sound_death.wav", 0, 0, 3, BASS_SAMPLE_OVER_POS); m_soundDrop = BASS_SampleLoad(false, "assets/sound_drop.wav", 0, 0, 3, BASS_SAMPLE_OVER_POS); m_soundHack = BASS_SampleLoad(false, "assets/sound_hack.wav", 0, 0, 3, BASS_SAMPLE_OVER_POS); m_soundPickup = BASS_SampleLoad(false, "assets/sound_pickup.wav", 0, 0, 3, BASS_SAMPLE_OVER_POS); m_soundTrain = BASS_SampleLoad(false, "assets/sound_train.wav", 0, 0, 3, BASS_SAMPLE_OVER_POS); m_notificationLog.LoadResources(); }