mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Merge branch '1dot13:master' into Backgrounds
This commit is contained in:
+19
-9
@@ -79,8 +79,6 @@
|
|||||||
class OBJECTTYPE;
|
class OBJECTTYPE;
|
||||||
class SOLDIERTYPE;
|
class SOLDIERTYPE;
|
||||||
|
|
||||||
extern CHAR8 *szMusicList[NUM_MUSIC];
|
|
||||||
|
|
||||||
BOOLEAN gfCorruptMap = FALSE;
|
BOOLEAN gfCorruptMap = FALSE;
|
||||||
BOOLEAN gfCorruptSchedules = FALSE;
|
BOOLEAN gfCorruptSchedules = FALSE;
|
||||||
BOOLEAN gfProfileDataLoaded = FALSE;
|
BOOLEAN gfProfileDataLoaded = FALSE;
|
||||||
@@ -169,6 +167,7 @@ LEVELNODE *gCursorNode = NULL;
|
|||||||
INT32 gsCursorGridNo;
|
INT32 gsCursorGridNo;
|
||||||
|
|
||||||
INT32 giMusicID = 0;
|
INT32 giMusicID = 0;
|
||||||
|
NewMusicList gMusicMode = MUSICLIST_MAIN_MENU;
|
||||||
|
|
||||||
void EraseWorldData( );
|
void EraseWorldData( );
|
||||||
|
|
||||||
@@ -1616,16 +1615,27 @@ void HandleKeyboardShortcuts( )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case F4:
|
case F4:
|
||||||
#ifdef NEWMUSIC
|
MusicPlay(gMusicMode, giMusicID);
|
||||||
MusicPlay( giMusicID, MUSIC_OLD_TYPE, FALSE );
|
ScreenMsg( FONT_YELLOW, MSG_INTERFACE, L"%S", MusicLists[gMusicMode][giMusicID] );
|
||||||
#else
|
|
||||||
MusicPlay( giMusicID );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ScreenMsg( FONT_YELLOW, MSG_DEBUG, L"%S", szMusicList[giMusicID] );
|
// Select next track
|
||||||
giMusicID++;
|
giMusicID++;
|
||||||
if( giMusicID >= NUM_MUSIC )
|
if (giMusicID >= MusicLists[gMusicMode].size())
|
||||||
|
{
|
||||||
giMusicID = 0;
|
giMusicID = 0;
|
||||||
|
for (size_t i = 0; i < MAX_MUSIC; i++)
|
||||||
|
{
|
||||||
|
if (gMusicMode == i)
|
||||||
|
{
|
||||||
|
gMusicMode = static_cast<NewMusicList>(i + 1);
|
||||||
|
if (gMusicMode == MAX_MUSIC)
|
||||||
|
{
|
||||||
|
gMusicMode = MUSICLIST_MAIN_MENU;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case F5:
|
case F5:
|
||||||
|
|||||||
@@ -628,7 +628,14 @@ UINT32 MainGameScreenHandle(void)
|
|||||||
InternalLocateGridNo( gGameUBOptions.LOCATEGRIDNO, TRUE );
|
InternalLocateGridNo( gGameUBOptions.LOCATEGRIDNO, TRUE );
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
if (gfFirstHeliRun)
|
||||||
|
{
|
||||||
InternalLocateGridNo( gGameExternalOptions.iInitialMercArrivalLocation, TRUE );
|
InternalLocateGridNo( gGameExternalOptions.iInitialMercArrivalLocation, TRUE );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
InternalLocateGridNo(gMapInformation.sCenterGridNo, TRUE);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
// Flugente: we might have reloaded the game, so we are currently not dropping mercs out of a helicopter
|
// Flugente: we might have reloaded the game, so we are currently not dropping mercs out of a helicopter
|
||||||
gfIngagedInDrop = FALSE;
|
gfIngagedInDrop = FALSE;
|
||||||
|
|||||||
@@ -570,9 +570,6 @@ static int l_AnimMercPtsrusStrategicInsertionData (lua_State *L);
|
|||||||
|
|
||||||
static int l_SetMusicMode (lua_State *L);
|
static int l_SetMusicMode (lua_State *L);
|
||||||
static int l_MusicPlay (lua_State *L);
|
static int l_MusicPlay (lua_State *L);
|
||||||
#ifdef NEWMUSIC
|
|
||||||
static int l_MusicPlayId (lua_State *L);
|
|
||||||
#endif
|
|
||||||
static int l_MusicSetVolume (lua_State *L);
|
static int l_MusicSetVolume (lua_State *L);
|
||||||
static int l_MusicGetVolume (lua_State *L);
|
static int l_MusicGetVolume (lua_State *L);
|
||||||
#ifdef NEWMUSIC
|
#ifdef NEWMUSIC
|
||||||
@@ -1398,7 +1395,6 @@ void IniFunction(lua_State *L, BOOLEAN bQuests )
|
|||||||
lua_register(L, "SetMusicMode", l_SetMusicMode );
|
lua_register(L, "SetMusicMode", l_SetMusicMode );
|
||||||
lua_register(L, "MusicPlay", l_MusicPlay );
|
lua_register(L, "MusicPlay", l_MusicPlay );
|
||||||
#ifdef NEWMUSIC
|
#ifdef NEWMUSIC
|
||||||
lua_register(L, "MusicIdPlay", l_MusicPlayId );
|
|
||||||
lua_register(L, "AddMusic", l_gAddMusic );
|
lua_register(L, "AddMusic", l_gAddMusic );
|
||||||
|
|
||||||
lua_register(L, "SetMusicID", l_SetMusicID );
|
lua_register(L, "SetMusicID", l_SetMusicID );
|
||||||
@@ -5715,33 +5711,16 @@ static int l_gAddMusic(lua_State *L)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
static int l_MusicPlay (lua_State *L)
|
static int l_MusicPlay (lua_State *L)
|
||||||
{
|
|
||||||
if ( lua_gettop(L) >= 1 )
|
|
||||||
{
|
|
||||||
UINT32 uiNum = lua_tointeger(L,1);
|
|
||||||
#ifdef NEWMUSIC
|
|
||||||
MusicPlay( uiNum, MUSIC_OLD_TYPE, FALSE);
|
|
||||||
#else
|
|
||||||
MusicPlay( uiNum );
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef NEWMUSIC
|
|
||||||
static int l_MusicPlayId (lua_State *L)
|
|
||||||
{
|
{
|
||||||
if ( lua_gettop(L) >= 2 )
|
if ( lua_gettop(L) >= 2 )
|
||||||
{
|
{
|
||||||
UINT32 uiNum = lua_tointeger(L,1);
|
UINT32 musicMode = lua_tointeger(L, 1);
|
||||||
UINT32 uiType = lua_tointeger(L,2);
|
UINT32 song = lua_tointeger(L,2);
|
||||||
|
MusicPlay( static_cast<NewMusicList>(musicMode), song );
|
||||||
if (uiType>=1 || uiType<=5 )
|
|
||||||
MusicPlay( uiNum, uiType, TRUE);
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
static int l_SetMusicMode (lua_State *L)
|
static int l_SetMusicMode (lua_State *L)
|
||||||
{
|
{
|
||||||
if ( lua_gettop(L) >= 1 )
|
if ( lua_gettop(L) >= 1 )
|
||||||
|
|||||||
+11
-16
@@ -3382,27 +3382,22 @@ void UpdateMercInSector( SOLDIERTYPE *pSoldier, INT16 sSectorX, INT16 sSectorY,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case INSERTION_CODE_ARRIVING_GAME:
|
case INSERTION_CODE_ARRIVING_GAME:
|
||||||
// Are we in Omerta!
|
#ifdef JA2UB
|
||||||
if ( sSectorX == gWorldSectorX && gWorldSectorX == 9 && sSectorY == gWorldSectorY && gWorldSectorY == 1 && bSectorZ == gbWorldSectorZ && gbWorldSectorZ == 0 )
|
pSoldier->ubStrategicInsertionCode = INSERTION_CODE_GRIDNO;
|
||||||
|
pSoldier->sInsertionGridNo = gGameUBOptions.LOCATEGRIDNO;
|
||||||
|
#else
|
||||||
|
extern BOOLEAN gfFirstHeliRun;
|
||||||
|
if (gfFirstHeliRun)
|
||||||
{
|
{
|
||||||
// TODO.WANNE: Hardcoded grid number
|
pSoldier->ubStrategicInsertionCode = INSERTION_CODE_GRIDNO;
|
||||||
// Try another location and walk into map
|
pSoldier->sInsertionGridNo = gGameExternalOptions.iInitialMercArrivalLocation;
|
||||||
pSoldier->sInsertionGridNo = 4379;//dnl!!!
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef JA2UB
|
pSoldier->ubStrategicInsertionCode = INSERTION_CODE_CENTER;
|
||||||
//pSoldier->ubStrategicInsertionCode = INSERTION_CODE_NORTH;
|
pSoldier->sInsertionGridNo = gMapInformation.sCenterGridNo;
|
||||||
//pSoldier->sInsertionGridNo = gMapInformation.sNorthGridNo;
|
|
||||||
pSoldier->ubStrategicInsertionCode = INSERTION_CODE_GRIDNO;
|
|
||||||
pSoldier->sInsertionGridNo = gGameUBOptions.LOCATEGRIDNO;
|
|
||||||
#else
|
|
||||||
//pSoldier->ubStrategicInsertionCode = INSERTION_CODE_NORTH;
|
|
||||||
//pSoldier->sInsertionGridNo = gMapInformation.sNorthGridNo;
|
|
||||||
pSoldier->ubStrategicInsertionCode = INSERTION_CODE_GRIDNO;
|
|
||||||
pSoldier->sInsertionGridNo = gGameExternalOptions.iInitialMercArrivalLocation;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case INSERTION_CODE_CHOPPER:
|
case INSERTION_CODE_CHOPPER:
|
||||||
// Try another location and walk into map
|
// Try another location and walk into map
|
||||||
|
|||||||
@@ -2246,29 +2246,45 @@ void ChooseBombsForSoldierCreateStruct( SOLDIERCREATE_STRUCT *pp, INT8 bBombClas
|
|||||||
void ChooseLBEsForSoldierCreateStruct( SOLDIERCREATE_STRUCT *pp, INT8 bLBEClass )
|
void ChooseLBEsForSoldierCreateStruct( SOLDIERCREATE_STRUCT *pp, INT8 bLBEClass )
|
||||||
{
|
{
|
||||||
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"ChooseLBEsForSoldierCreateStruct");
|
DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"ChooseLBEsForSoldierCreateStruct");
|
||||||
//UINT16 i;
|
|
||||||
//INVTYPE *pItem;
|
|
||||||
//UINT16 usRandom;
|
|
||||||
UINT16 usItem = 0;
|
|
||||||
|
|
||||||
// CHRISL: If we're using the old inventory system, just return
|
// CHRISL: If we're using the old inventory system, just return
|
||||||
if((UsingNewInventorySystem() == false))
|
if((UsingNewInventorySystem() == false))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
usItem = PickARandomItem( LBE, pp->ubSoldierClass, bLBEClass, FALSE );
|
UINT16 usItem = PickARandomItem( LBE, pp->ubSoldierClass, bLBEClass, FALSE );
|
||||||
if ( usItem > 0 )
|
if ( usItem > 0 )
|
||||||
{
|
{
|
||||||
CreateItem( usItem, (INT8)(80 + Random( 21 )), &gTempObject );
|
CreateItem( usItem, (INT8)(80 + Random( 21 )), &gTempObject );
|
||||||
gTempObject.fFlags |= OBJECT_UNDROPPABLE;
|
gTempObject.fFlags |= OBJECT_UNDROPPABLE;
|
||||||
// put backpacks into the backpack slot for LOBOT
|
|
||||||
if ((UsingNewInventorySystem()) && (Item[usItem].usItemClass & IC_LBEGEAR) && (LoadBearingEquipment[Item[usItem].ubClassIndex].lbeClass == BACKPACK))
|
auto isLBEgear = Item[usItem].usItemClass & IC_LBEGEAR;
|
||||||
|
if (isLBEgear)
|
||||||
{
|
{
|
||||||
pp->Inv[BPACKPOCKPOS] = gTempObject;
|
// put backpacks into the backpack slot for LOBOT
|
||||||
}
|
auto lbeClass = LoadBearingEquipment[Item[usItem].ubClassIndex].lbeClass;
|
||||||
else
|
if (lbeClass == BACKPACK && !pp->Inv[BPACKPOCKPOS].exists())
|
||||||
{
|
{
|
||||||
PlaceObjectInSoldierCreateStruct( pp, &gTempObject );
|
pp->Inv[BPACKPOCKPOS] = gTempObject;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// same for pistol holster
|
||||||
|
if (lbeClass == THIGH_PACK)
|
||||||
|
{
|
||||||
|
if (!pp->Inv[LTHIGHPOCKPOS].exists())
|
||||||
|
{
|
||||||
|
pp->Inv[LTHIGHPOCKPOS] = gTempObject;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!pp->Inv[RTHIGHPOCKPOS].exists())
|
||||||
|
{
|
||||||
|
pp->Inv[RTHIGHPOCKPOS] = gTempObject;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Couldn't find a specific pocket, just stuff it somewhere
|
||||||
|
PlaceObjectInSoldierCreateStruct( pp, &gTempObject );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+15
-14
@@ -1038,27 +1038,28 @@ UINT8 SpawnAirDropElite( INT32 sGridNo )
|
|||||||
|
|
||||||
// Flugente hack
|
// Flugente hack
|
||||||
pSoldier = TacticalCreateEliteEnemy( );
|
pSoldier = TacticalCreateEliteEnemy( );
|
||||||
|
if ( pSoldier == nullptr)
|
||||||
|
{
|
||||||
|
return NOBODY;
|
||||||
|
}
|
||||||
|
|
||||||
//Add soldier strategic info, so it doesn't break the counters!
|
//Add soldier strategic info, so it doesn't break the counters!
|
||||||
if ( pSoldier )
|
if ( !gbWorldSectorZ )
|
||||||
{
|
{
|
||||||
if ( !gbWorldSectorZ )
|
SECTORINFO *pSector = &SectorInfo[SECTOR( gWorldSectorX, gWorldSectorY )];
|
||||||
|
switch ( pSoldier->ubSoldierClass )
|
||||||
{
|
{
|
||||||
SECTORINFO *pSector = &SectorInfo[SECTOR( gWorldSectorX, gWorldSectorY )];
|
case SOLDIER_CLASS_ADMINISTRATOR: pSector->ubNumAdmins++; pSector->ubAdminsInBattle++; break;
|
||||||
switch ( pSoldier->ubSoldierClass )
|
case SOLDIER_CLASS_ARMY: pSector->ubNumTroops++; pSector->ubTroopsInBattle++; break;
|
||||||
{
|
case SOLDIER_CLASS_ELITE: pSector->ubNumElites++; pSector->ubElitesInBattle++; break;
|
||||||
case SOLDIER_CLASS_ADMINISTRATOR: pSector->ubNumAdmins++; pSector->ubAdminsInBattle++; break;
|
|
||||||
case SOLDIER_CLASS_ARMY: pSector->ubNumTroops++; pSector->ubTroopsInBattle++; break;
|
|
||||||
case SOLDIER_CLASS_ELITE: pSector->ubNumElites++; pSector->ubElitesInBattle++; break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pSoldier->ubStrategicInsertionCode = INSERTION_CODE_CHOPPER;
|
|
||||||
pSoldier->usStrategicInsertionData = sGridNo; // required, otherwise soldiers will spawn in map before jumping out of the heli
|
|
||||||
UpdateMercInSector( pSoldier, gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
|
|
||||||
//AllTeamsLookForAll( NO_INTERRUPTS );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pSoldier->ubStrategicInsertionCode = INSERTION_CODE_CHOPPER;
|
||||||
|
pSoldier->usStrategicInsertionData = sGridNo; // required, otherwise soldiers will spawn in map before jumping out of the heli
|
||||||
|
UpdateMercInSector( pSoldier, gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
|
||||||
|
//AllTeamsLookForAll( NO_INTERRUPTS );
|
||||||
|
|
||||||
return pSoldier->ubID;
|
return pSoldier->ubID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,7 @@
|
|||||||
#include "DynamicDialogue.h"// added by Flugente
|
#include "DynamicDialogue.h"// added by Flugente
|
||||||
#include "Dialogue Control.h" // added by Flugente
|
#include "Dialogue Control.h" // added by Flugente
|
||||||
#include "connect.h"
|
#include "connect.h"
|
||||||
|
#include "Map Information.h"
|
||||||
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
#include "Soldier Control.h"
|
#include "Soldier Control.h"
|
||||||
@@ -534,16 +535,23 @@ void MercArrivesCallback( UINT8 ubSoldierID )
|
|||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
if ( pSoldier->ubStrategicInsertionCode != INSERTION_CODE_CHOPPER && pSoldier->sSectorX == gGameExternalOptions.ubDefaultArrivalSectorX && pSoldier->sSectorY == gGameExternalOptions.ubDefaultArrivalSectorY && gGameUBOptions.InGameHeli == TRUE )
|
if ( pSoldier->ubStrategicInsertionCode != INSERTION_CODE_CHOPPER && pSoldier->sSectorX == gGameExternalOptions.ubDefaultArrivalSectorX && pSoldier->sSectorY == gGameExternalOptions.ubDefaultArrivalSectorY && gGameUBOptions.InGameHeli == TRUE )
|
||||||
#else
|
#else
|
||||||
if ( pSoldier->ubStrategicInsertionCode != INSERTION_CODE_CHOPPER && pSoldier->sSectorX == gGameExternalOptions.ubDefaultArrivalSectorX && pSoldier->sSectorY == gGameExternalOptions.ubDefaultArrivalSectorY )
|
if (pSoldier->ubStrategicInsertionCode != INSERTION_CODE_CHOPPER )
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
gfTacticalDoHeliRun = TRUE;
|
gfTacticalDoHeliRun = TRUE;
|
||||||
SetHelicopterDroppoint(gGameExternalOptions.iInitialMercArrivalLocation);
|
if (gfFirstHeliRun)
|
||||||
|
{
|
||||||
|
SetHelicopterDroppoint(gGameExternalOptions.iInitialMercArrivalLocation);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SetHelicopterDroppoint(gMapInformation.sCenterGridNo);
|
||||||
|
}
|
||||||
|
|
||||||
// OK, If we are in mapscreen, get out...
|
// OK, If we are in mapscreen, get out...
|
||||||
if ( guiCurrentScreen == MAP_SCREEN )
|
if ( guiCurrentScreen == MAP_SCREEN )
|
||||||
{
|
{
|
||||||
// ATE: Make sure the current one is selected!
|
// ATE: Make sure the current one is selected!
|
||||||
ChangeSelectedMapSector( gWorldSectorX, gWorldSectorY, 0 );
|
ChangeSelectedMapSector( gWorldSectorX, gWorldSectorY, 0 );
|
||||||
|
|
||||||
RequestTriggerExitFromMapscreen( MAP_EXIT_TO_TACTICAL );
|
RequestTriggerExitFromMapscreen( MAP_EXIT_TO_TACTICAL );
|
||||||
@@ -554,17 +562,14 @@ void MercArrivesCallback( UINT8 ubSoldierID )
|
|||||||
|
|
||||||
UpdateMercInSector( pSoldier, pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ );
|
UpdateMercInSector( pSoldier, pSoldier->sSectorX, pSoldier->sSectorY, pSoldier->bSectorZ );
|
||||||
}
|
}
|
||||||
|
// Strategic map arrival to a sector that's not loaded
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// OK, otherwise, set them in north area, so once we load again, they are here.
|
|
||||||
#ifdef JA2UB
|
#ifdef JA2UB
|
||||||
//pSoldier->ubStrategicInsertionCode = INSERTION_CODE_NORTH;
|
|
||||||
pSoldier->ubStrategicInsertionCode = INSERTION_CODE_GRIDNO;
|
pSoldier->ubStrategicInsertionCode = INSERTION_CODE_GRIDNO;
|
||||||
pSoldier->usStrategicInsertionData = gGameUBOptions.LOCATEGRIDNO;
|
pSoldier->usStrategicInsertionData = gGameUBOptions.LOCATEGRIDNO;
|
||||||
#else
|
#else
|
||||||
//pSoldier->ubStrategicInsertionCode = INSERTION_CODE_NORTH;
|
pSoldier->ubStrategicInsertionCode = INSERTION_CODE_CENTER;
|
||||||
pSoldier->ubStrategicInsertionCode = INSERTION_CODE_GRIDNO;
|
|
||||||
pSoldier->usStrategicInsertionData = gGameExternalOptions.iInitialMercArrivalLocation;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+11
-17
@@ -217,7 +217,7 @@ void DebugAI( INT8 bMsgType, SOLDIERTYPE *pSoldier, STR szOutput, INT8 bAction )
|
|||||||
CHAR8 msg[1024];
|
CHAR8 msg[1024];
|
||||||
CHAR8 buf[1024];
|
CHAR8 buf[1024];
|
||||||
|
|
||||||
if (!gfLogsEnabled)
|
if (!gfLogsEnabled || pSoldier == nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
memset(buf, 0, 1024 * sizeof(char));
|
memset(buf, 0, 1024 * sizeof(char));
|
||||||
@@ -235,17 +235,14 @@ void DebugAI( INT8 bMsgType, SOLDIERTYPE *pSoldier, STR szOutput, INT8 bAction )
|
|||||||
|
|
||||||
sprintf(msg, "");
|
sprintf(msg, "");
|
||||||
|
|
||||||
if (pSoldier)
|
sprintf(buf, "[%d] (%d)", pSoldier->ubID, pSoldier->sGridNo);
|
||||||
{
|
strcat(msg, buf);
|
||||||
sprintf(buf, "[%d] (%d)", pSoldier->ubID, pSoldier->sGridNo);
|
|
||||||
strcat(msg, buf);
|
|
||||||
|
|
||||||
if (pSoldier->ubProfile != NO_PROFILE)
|
if (pSoldier->ubProfile != NO_PROFILE)
|
||||||
{
|
{
|
||||||
wcstombs(buf, pSoldier->GetName(), 1024 - 1);
|
wcstombs(buf, pSoldier->GetName(), 1024 - 1);
|
||||||
strcat(msg, " ");
|
strcat(msg, " ");
|
||||||
strcat(msg, buf);
|
strcat(msg, buf);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
strcat(msg, " ");
|
strcat(msg, " ");
|
||||||
@@ -266,13 +263,10 @@ void DebugAI( INT8 bMsgType, SOLDIERTYPE *pSoldier, STR szOutput, INT8 bAction )
|
|||||||
strcat(msg, " ");
|
strcat(msg, " ");
|
||||||
strcat(msg, szAction[bAction]);
|
strcat(msg, szAction[bAction]);
|
||||||
|
|
||||||
if (pSoldier)
|
sprintf(buf, " %d", pSoldier->aiData.usActionData);
|
||||||
{
|
strcat(msg, buf);
|
||||||
sprintf(buf, " %d", pSoldier->aiData.usActionData);
|
|
||||||
strcat(msg, buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pSoldier && pSoldier->aiData.bNextAction != AI_ACTION_NONE)
|
if (pSoldier->aiData.bNextAction != AI_ACTION_NONE)
|
||||||
{
|
{
|
||||||
strcat(msg, " ");
|
strcat(msg, " ");
|
||||||
strcat(msg, szAction[pSoldier->aiData.bNextAction]);
|
strcat(msg, szAction[pSoldier->aiData.bNextAction]);
|
||||||
|
|||||||
+167
-398
@@ -8,7 +8,7 @@
|
|||||||
#include "strategicmap.h"
|
#include "strategicmap.h"
|
||||||
|
|
||||||
#include "Overhead Types.h"
|
#include "Overhead Types.h"
|
||||||
//extern int iScreenMode;
|
#include <Game Clock.h>
|
||||||
|
|
||||||
static UINT32 uiMusicHandle = NO_SAMPLE;
|
static UINT32 uiMusicHandle = NO_SAMPLE;
|
||||||
static BOOLEAN fMusicPlaying = FALSE;
|
static BOOLEAN fMusicPlaying = FALSE;
|
||||||
@@ -26,31 +26,36 @@ static UINT8 gubOldMusicMode = 0;
|
|||||||
static INT8 gbVictorySongCount = 0;
|
static INT8 gbVictorySongCount = 0;
|
||||||
static INT8 gbDeathSongCount = 0;
|
static INT8 gbDeathSongCount = 0;
|
||||||
|
|
||||||
#ifdef NEWMUSIC
|
|
||||||
static INT32 bNothingModeSong = NOTHING_A_MUSIC;
|
|
||||||
static INT32 bEnemyModeSong = TENSOR_A_MUSIC;
|
|
||||||
static INT32 bBattleModeSong = BATTLE_A_MUSIC;
|
|
||||||
|
|
||||||
static INT32 NewSoundID = -1;
|
|
||||||
static BOOLEAN SetSoundID = FALSE;
|
|
||||||
|
|
||||||
static INT32 gubOldMusicMode2 = 0;
|
|
||||||
#else
|
|
||||||
static INT8 bNothingModeSong;
|
|
||||||
static INT8 bEnemyModeSong;
|
|
||||||
static INT8 bBattleModeSong;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static BOOLEAN gfUseCreatureMusic = FALSE;
|
static BOOLEAN gfUseCreatureMusic = FALSE;
|
||||||
|
|
||||||
static INT8 gbFadeSpeed = 1;
|
static INT8 gbFadeSpeed = 1;
|
||||||
|
|
||||||
static BOOLEAN gfDontRestartSong = FALSE;
|
static BOOLEAN gfDontRestartSong = FALSE;
|
||||||
// unused
|
|
||||||
//BOOLEAN gfForceMusicToTense = FALSE;
|
|
||||||
|
|
||||||
|
|
||||||
CHAR8 *szMusicList[NUM_MUSIC]=
|
// Original music and their hardcoded paths
|
||||||
|
enum MusicList
|
||||||
|
{
|
||||||
|
MARIMBAD2_MUSIC,
|
||||||
|
MENUMIX_MUSIC,
|
||||||
|
NOTHING_A_MUSIC,
|
||||||
|
NOTHING_B_MUSIC,
|
||||||
|
NOTHING_C_MUSIC,
|
||||||
|
NOTHING_D_MUSIC,
|
||||||
|
TENSOR_A_MUSIC,
|
||||||
|
TENSOR_B_MUSIC,
|
||||||
|
TENSOR_C_MUSIC,
|
||||||
|
TRIUMPH_MUSIC,
|
||||||
|
DEATH_MUSIC,
|
||||||
|
BATTLE_A_MUSIC,
|
||||||
|
BATTLE_B_MUSIC, //same as tensor B
|
||||||
|
CREEPY_MUSIC,
|
||||||
|
CREATURE_BATTLE_MUSIC,
|
||||||
|
MUSIC_DIR,
|
||||||
|
NUM_MUSIC
|
||||||
|
};
|
||||||
|
|
||||||
|
CHAR8* szMusicList[NUM_MUSIC] =
|
||||||
{
|
{
|
||||||
"MUSIC\\marimbad 2",
|
"MUSIC\\marimbad 2",
|
||||||
"MUSIC\\menumix1",
|
"MUSIC\\menumix1",
|
||||||
@@ -64,12 +69,122 @@ CHAR8 *szMusicList[NUM_MUSIC]=
|
|||||||
"MUSIC\\triumph",
|
"MUSIC\\triumph",
|
||||||
"MUSIC\\death",
|
"MUSIC\\death",
|
||||||
"MUSIC\\battle A",
|
"MUSIC\\battle A",
|
||||||
"MUSIC\\tensor B",
|
"MUSIC\\battle B",
|
||||||
"MUSIC\\creepy",
|
"MUSIC\\creepy",
|
||||||
"MUSIC\\creature battle",
|
"MUSIC\\creature battle",
|
||||||
"MUSIC",
|
"MUSIC",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
std::vector<STR> MusicLists[MAX_MUSIC];
|
||||||
|
|
||||||
|
static void AddMusicToList(STR fileName, NewMusicList mode)
|
||||||
|
{
|
||||||
|
UINT8 constexpr buf = 64;
|
||||||
|
CHAR8 musicFile[buf];
|
||||||
|
|
||||||
|
if (SoundFileExists(fileName, musicFile))
|
||||||
|
{
|
||||||
|
STR music = (STR)MemAlloc(buf * sizeof(CHAR8));
|
||||||
|
Assert(music);
|
||||||
|
memset(music, 0, sizeof(CHAR8) * buf);
|
||||||
|
strcpy(music, musicFile);
|
||||||
|
|
||||||
|
MusicLists[mode].push_back(music);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void InitializeMusicLists()
|
||||||
|
{
|
||||||
|
UINT8 constexpr buf = 64;
|
||||||
|
CHAR8 fileName[buf];
|
||||||
|
|
||||||
|
// Special casing original music so they can be easily replaced with new files
|
||||||
|
AddMusicToList(szMusicList[MENUMIX_MUSIC], MUSICLIST_MAIN_MENU);
|
||||||
|
AddMusicToList(szMusicList[MARIMBAD2_MUSIC], MUSICLIST_LAPTOP);
|
||||||
|
|
||||||
|
AddMusicToList(szMusicList[NOTHING_A_MUSIC], MUSICLIST_TACTICAL_NOTHING);
|
||||||
|
AddMusicToList(szMusicList[NOTHING_B_MUSIC], MUSICLIST_TACTICAL_NOTHING);
|
||||||
|
AddMusicToList(szMusicList[NOTHING_C_MUSIC], MUSICLIST_TACTICAL_NOTHING);
|
||||||
|
AddMusicToList(szMusicList[NOTHING_D_MUSIC], MUSICLIST_TACTICAL_NOTHING);
|
||||||
|
|
||||||
|
AddMusicToList(szMusicList[TENSOR_A_MUSIC], MUSICLIST_TACTICAL_ENEMYPRESENT);
|
||||||
|
AddMusicToList(szMusicList[TENSOR_B_MUSIC], MUSICLIST_TACTICAL_ENEMYPRESENT);
|
||||||
|
AddMusicToList(szMusicList[TENSOR_C_MUSIC], MUSICLIST_TACTICAL_ENEMYPRESENT);
|
||||||
|
|
||||||
|
AddMusicToList(szMusicList[BATTLE_A_MUSIC], MUSICLIST_TACTICAL_BATTLE);
|
||||||
|
if (SoundFileExists(szMusicList[BATTLE_B_MUSIC], fileName))
|
||||||
|
{
|
||||||
|
AddMusicToList(szMusicList[BATTLE_B_MUSIC], MUSICLIST_TACTICAL_BATTLE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
AddMusicToList(szMusicList[TENSOR_B_MUSIC], MUSICLIST_TACTICAL_BATTLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
AddMusicToList(szMusicList[TRIUMPH_MUSIC], MUSICLIST_TACTICAL_VICTORY);
|
||||||
|
AddMusicToList(szMusicList[DEATH_MUSIC], MUSICLIST_TACTICAL_DEATH);
|
||||||
|
AddMusicToList(szMusicList[CREEPY_MUSIC], MUSICLIST_TACTICAL_CREEPY);
|
||||||
|
AddMusicToList(szMusicList[CREATURE_BATTLE_MUSIC], MUSICLIST_TACTICAL_CREEPY_BATTLE);
|
||||||
|
|
||||||
|
|
||||||
|
// Read music files into list
|
||||||
|
for (size_t j = MUSICLIST_MAIN_MENU; j < MAX_MUSIC; j++)
|
||||||
|
{
|
||||||
|
STR baseFilename;
|
||||||
|
switch (j)
|
||||||
|
{
|
||||||
|
case MUSICLIST_MAIN_MENU:
|
||||||
|
baseFilename = "MUSIC\\Mainmenu_";
|
||||||
|
break;
|
||||||
|
case MUSICLIST_LAPTOP:
|
||||||
|
baseFilename = "MUSIC\\Laptop_";
|
||||||
|
break;
|
||||||
|
case MUSICLIST_TACTICAL_NOTHING:
|
||||||
|
baseFilename = "MUSIC\\Tactical_";
|
||||||
|
break;
|
||||||
|
case MUSICLIST_TACTICAL_ENEMYPRESENT:
|
||||||
|
baseFilename = "MUSIC\\Enemy_";
|
||||||
|
break;
|
||||||
|
case MUSICLIST_TACTICAL_BATTLE:
|
||||||
|
baseFilename = "MUSIC\\Battle_";
|
||||||
|
break;
|
||||||
|
case MUSICLIST_TACTICAL_ENEMYPRESENT_NIGHT:
|
||||||
|
baseFilename = "MUSIC\\EnemyNight_";
|
||||||
|
break;
|
||||||
|
case MUSICLIST_TACTICAL_BATTLE_NIGHT:
|
||||||
|
baseFilename = "MUSIC\\BattleNight_";
|
||||||
|
break;
|
||||||
|
case MUSICLIST_TACTICAL_VICTORY:
|
||||||
|
baseFilename = "MUSIC\\Victory_";
|
||||||
|
break;
|
||||||
|
case MUSICLIST_TACTICAL_DEATH:
|
||||||
|
baseFilename = "MUSIC\\Death_";
|
||||||
|
break;
|
||||||
|
case MUSICLIST_TACTICAL_CREEPY:
|
||||||
|
baseFilename = "MUSIC\\Creepy_";
|
||||||
|
break;
|
||||||
|
case MUSICLIST_TACTICAL_CREEPY_BATTLE:
|
||||||
|
baseFilename = "MUSIC\\CreepyBattle_";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (size_t i = 0; i < 100; i++)
|
||||||
|
{
|
||||||
|
sprintf(fileName, "%s%02d", baseFilename, i);
|
||||||
|
AddMusicToList(fileName, static_cast<NewMusicList>(j));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static STR PickRandomSongFromList(NewMusicList mode)
|
||||||
|
{
|
||||||
|
return MusicLists[mode][Random(MusicLists[mode].size())];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOLEAN StartMusicBasedOnMode(void);
|
BOOLEAN StartMusicBasedOnMode(void);
|
||||||
void DoneFadeOutDueToEndMusic(void);
|
void DoneFadeOutDueToEndMusic(void);
|
||||||
void MusicStopCallback(void *pData);
|
void MusicStopCallback(void *pData);
|
||||||
@@ -77,37 +192,6 @@ BOOLEAN MusicStop(void);
|
|||||||
BOOLEAN MusicFadeOut(void);
|
BOOLEAN MusicFadeOut(void);
|
||||||
BOOLEAN MusicFadeIn(void);
|
BOOLEAN MusicFadeIn(void);
|
||||||
|
|
||||||
#ifdef NEWMUSIC
|
|
||||||
MUSIC_SOUND_VALUES MusicSoundValues[256];
|
|
||||||
INT32 GlobalSoundID = -1;
|
|
||||||
#endif
|
|
||||||
//extern void HandleEndDemoInCreatureLevel( );
|
|
||||||
|
|
||||||
//BOOLEAN NoEnemiesInSight( )
|
|
||||||
//{
|
|
||||||
// SOLDIERTYPE *pSoldier;
|
|
||||||
// INT32 cnt;
|
|
||||||
//
|
|
||||||
// // Loop through our guys
|
|
||||||
// // End the turn of player charactors
|
|
||||||
// cnt = gTacticalStatus.Team[ gbPlayerNum ].bFirstID;
|
|
||||||
//
|
|
||||||
// // look for all mercs on the same team,
|
|
||||||
// for ( pSoldier = MercPtrs[ cnt ]; cnt <= gTacticalStatus.Team[ gbPlayerNum ].bLastID; cnt++, pSoldier++ )
|
|
||||||
// {
|
|
||||||
// if ( pSoldier->bActive && pSoldier->stats.bLife >= OKLIFE )
|
|
||||||
// {
|
|
||||||
// if ( pSoldier->aiData.bOppCnt != 0 )
|
|
||||||
// {
|
|
||||||
// return( FALSE );
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// return( TRUE );
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//********************************************************************************
|
//********************************************************************************
|
||||||
// MusicPlay
|
// MusicPlay
|
||||||
@@ -117,65 +201,22 @@ INT32 GlobalSoundID = -1;
|
|||||||
// Returns: TRUE if the music was started, FALSE if an error occurred
|
// Returns: TRUE if the music was started, FALSE if an error occurred
|
||||||
//
|
//
|
||||||
//********************************************************************************
|
//********************************************************************************
|
||||||
#ifdef NEWMUSIC
|
static BOOLEAN MusicPlay(STR zFileName)
|
||||||
BOOLEAN MusicPlay(UINT32 uiNum, UINT32 MusicMode, BOOLEAN NewSound )
|
|
||||||
#else
|
|
||||||
BOOLEAN MusicPlay(UINT32 uiNum)
|
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
// WANNE: We want music in windowed mode
|
|
||||||
//if( 1==iScreenMode ) /* on Windowed mode, skip the music? was coded for WINDOWED_MODE that way...*/
|
|
||||||
//return FALSE;
|
|
||||||
|
|
||||||
static CHAR8 zFileName[164];
|
|
||||||
SOUNDPARMS spParms;
|
SOUNDPARMS spParms;
|
||||||
|
|
||||||
if(fMusicPlaying)
|
if (fMusicPlaying)
|
||||||
MusicStop();
|
MusicStop();
|
||||||
|
|
||||||
memset(&spParms, 0xff, sizeof(SOUNDPARMS));
|
memset(&spParms, 0xff, sizeof(SOUNDPARMS));
|
||||||
spParms.uiPriority = PRIORITY_MAX;
|
spParms.uiPriority = PRIORITY_MAX;
|
||||||
spParms.uiVolume = 0;
|
spParms.uiVolume = 0;
|
||||||
spParms.uiLoop = 1; // Lesh: only 1 line added
|
spParms.uiLoop = 1;
|
||||||
|
|
||||||
spParms.EOSCallback = MusicStopCallback;
|
spParms.EOSCallback = MusicStopCallback;
|
||||||
|
|
||||||
//DebugMsg( TOPIC_JA2, DBG_LEVEL_3, "About to call SoundPlayStreamedFile" );
|
|
||||||
|
|
||||||
// Lesh: patch to allow playback ogg files
|
|
||||||
#ifdef NEWMUSIC
|
|
||||||
if ( NewSound == FALSE && MusicMode == MUSIC_OLD_TYPE )
|
|
||||||
{
|
|
||||||
#endif
|
|
||||||
SoundFileExists( szMusicList[uiNum], zFileName );
|
|
||||||
#ifdef NEWMUSIC
|
|
||||||
}
|
|
||||||
else if ( NewSound == TRUE )
|
|
||||||
{
|
|
||||||
CHAR8 modstr[32] = "";
|
|
||||||
CHAR8 modstr2[164] = "";
|
|
||||||
|
|
||||||
switch ( MusicMode )
|
|
||||||
{
|
|
||||||
case MUSIC_TACTICAL_NOTHING: sprintf( modstr, "NOTHING_" ); break;
|
|
||||||
case MUSIC_TACTICAL_ENEMYPRESENT: sprintf( modstr, "TENSOR_" ); break;
|
|
||||||
case MUSIC_TACTICAL_BATTLE: sprintf( modstr, "BATTLE_" ); break;
|
|
||||||
case MUSIC_TACTICAL_VICTORY: sprintf( modstr, "TRIUMPH_" ); break;
|
|
||||||
case MUSIC_TACTICAL_BATTLE_MUSIC: sprintf( modstr, "CREATURE_BATTLE_" ); break;
|
|
||||||
case MUSIC_TACTICAL_CREEPY_MUSIC: sprintf( modstr, "CREEPY_" ); break;
|
|
||||||
default: break;
|
|
||||||
}
|
|
||||||
|
|
||||||
sprintf( modstr2, "%s\\%s%d", szMusicList[15], modstr, uiNum );
|
|
||||||
|
|
||||||
SoundFileExists( modstr2, zFileName );
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
uiMusicHandle = SoundPlayStreamedFile(zFileName, &spParms);
|
uiMusicHandle = SoundPlayStreamedFile(zFileName, &spParms);
|
||||||
|
if (uiMusicHandle != SOUND_ERROR)
|
||||||
if(uiMusicHandle != SOUND_ERROR)
|
|
||||||
{
|
{
|
||||||
//DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "Music PLay %d %d", uiMusicHandle, gubMusicMode ) );
|
|
||||||
|
|
||||||
gfMusicEnded = FALSE;
|
gfMusicEnded = FALSE;
|
||||||
fMusicPlaying = TRUE;
|
fMusicPlaying = TRUE;
|
||||||
@@ -183,10 +224,19 @@ BOOLEAN MusicPlay(UINT32 uiNum)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
//DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "Music PLay %d %d", uiMusicHandle, gubMusicMode ) );
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOLEAN MusicPlay(NewMusicList mode, UINT8 songIndex)
|
||||||
|
{
|
||||||
|
if (mode >= MAX_MUSIC || songIndex >= MusicLists[mode].size())
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
MusicPlay(MusicLists[mode][songIndex]);
|
||||||
|
}
|
||||||
|
|
||||||
//********************************************************************************
|
//********************************************************************************
|
||||||
// MusicSetVolume
|
// MusicSetVolume
|
||||||
//
|
//
|
||||||
@@ -410,78 +460,11 @@ BOOLEAN MusicPoll(BOOLEAN /*fForce*/)
|
|||||||
//DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"MusicPoll done");
|
//DebugMsg (TOPIC_JA2,DBG_LEVEL_3,"MusicPoll done");
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
#ifdef NEWMUSIC
|
|
||||||
static BOOLEAN SetMusicModeID(UINT8 ubMusicMode, INT32 SoundID, BOOLEAN fForce)
|
|
||||||
{
|
|
||||||
static INT8 bPreviousMode = 0;
|
|
||||||
|
|
||||||
static INT32 bPreviousMusic = 0;
|
|
||||||
|
|
||||||
// OK, check if we want to restore
|
|
||||||
if (ubMusicMode == MUSIC_RESTORE)
|
|
||||||
{
|
|
||||||
if (bPreviousMode == MUSIC_TACTICAL_VICTORY || bPreviousMode == MUSIC_TACTICAL_DEATH)
|
|
||||||
{
|
|
||||||
bPreviousMode = MUSIC_TACTICAL_NOTHING;
|
|
||||||
}
|
|
||||||
|
|
||||||
ubMusicMode = bPreviousMode;
|
|
||||||
SoundID = bPreviousMusic;
|
|
||||||
GlobalSoundID = SoundID;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Save previous mode...
|
|
||||||
bPreviousMode = gubOldMusicMode;
|
|
||||||
bPreviousMusic = SoundID;
|
|
||||||
GlobalSoundID = SoundID;
|
|
||||||
}
|
|
||||||
|
|
||||||
// if different, start a new music song
|
|
||||||
//if ( ( fForce || gubOldMusicMode != ubMusicMode ) && SoundID != -1)
|
|
||||||
if ( fForce || SoundID != -1 )
|
|
||||||
{
|
|
||||||
// Set mode....
|
|
||||||
gubMusicMode = ubMusicMode;
|
|
||||||
NewSoundID = SoundID;
|
|
||||||
GlobalSoundID = SoundID;
|
|
||||||
|
|
||||||
//DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "Music New Mode %d %d", uiMusicHandle, gubMusicMode ) );
|
|
||||||
|
|
||||||
gbVictorySongCount = 0;
|
|
||||||
gbDeathSongCount = 0;
|
|
||||||
|
|
||||||
if(uiMusicHandle != NO_SAMPLE)
|
|
||||||
{
|
|
||||||
// Fade out old music
|
|
||||||
MusicFadeOut();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Change music!
|
|
||||||
StartMusicBasedOnMode();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
gubOldMusicMode = gubMusicMode;
|
|
||||||
gubOldMusicMode2 = SoundID;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static BOOLEAN SetMusicMode(UINT8 ubMusicMode, BOOLEAN fForce)
|
static BOOLEAN SetMusicMode(UINT8 ubMusicMode, BOOLEAN fForce)
|
||||||
{
|
{
|
||||||
static INT8 bPreviousMode = 0;
|
static INT8 bPreviousMode = 0;
|
||||||
|
|
||||||
#ifdef NEWMUSIC
|
|
||||||
SetSoundID = FALSE;
|
|
||||||
//GlobalSoundID = -1;
|
|
||||||
|
|
||||||
if ( SetSoundID == FALSE )
|
|
||||||
NewSoundID = -1;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// OK, check if we want to restore
|
// OK, check if we want to restore
|
||||||
if (ubMusicMode == MUSIC_RESTORE)
|
if (ubMusicMode == MUSIC_RESTORE)
|
||||||
{
|
{
|
||||||
@@ -489,24 +472,7 @@ static BOOLEAN SetMusicMode(UINT8 ubMusicMode, BOOLEAN fForce)
|
|||||||
{
|
{
|
||||||
bPreviousMode = MUSIC_TACTICAL_NOTHING;
|
bPreviousMode = MUSIC_TACTICAL_NOTHING;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NEWMUSIC
|
|
||||||
if ( GlobalSoundID == -1 )
|
|
||||||
{
|
|
||||||
SetSoundID = FALSE;
|
|
||||||
GlobalSoundID = -1;
|
|
||||||
NewSoundID = -1;
|
|
||||||
}
|
|
||||||
else if ( GlobalSoundID != -1)
|
|
||||||
{
|
|
||||||
SetSoundID = TRUE;
|
|
||||||
NewSoundID = gubOldMusicMode2;
|
|
||||||
GlobalSoundID = NewSoundID;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
ubMusicMode = bPreviousMode;
|
ubMusicMode = bPreviousMode;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -515,11 +481,7 @@ static BOOLEAN SetMusicMode(UINT8 ubMusicMode, BOOLEAN fForce)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// if different, start a new music song
|
// if different, start a new music song
|
||||||
#ifdef NEWMUSIC
|
|
||||||
if (fForce || gubOldMusicMode != ubMusicMode || GlobalSoundID == -1 || SetSoundID == TRUE )
|
|
||||||
#else
|
|
||||||
if (fForce || gubOldMusicMode != ubMusicMode)
|
if (fForce || gubOldMusicMode != ubMusicMode)
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
// Set mode....
|
// Set mode....
|
||||||
gubMusicMode = ubMusicMode;
|
gubMusicMode = ubMusicMode;
|
||||||
@@ -546,36 +508,19 @@ static BOOLEAN SetMusicMode(UINT8 ubMusicMode, BOOLEAN fForce)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NEWMUSIC
|
|
||||||
static BOOLEAN StartMusicBasedOnMode(void)
|
static BOOLEAN StartMusicBasedOnMode(void)
|
||||||
{
|
{
|
||||||
static BOOLEAN fFirstTime = TRUE;
|
|
||||||
|
|
||||||
|
|
||||||
if (fFirstTime)
|
|
||||||
{
|
|
||||||
fFirstTime = FALSE;
|
|
||||||
|
|
||||||
bNothingModeSong = (INT8) (NOTHING_A_MUSIC + Random(4));
|
|
||||||
bEnemyModeSong = (INT8) (TENSOR_A_MUSIC + Random(3));
|
|
||||||
bBattleModeSong = (INT8) (BATTLE_A_MUSIC + Random(2));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "StartMusicBasedOnMode() %d %d", uiMusicHandle, gubMusicMode ) );
|
|
||||||
|
|
||||||
// Setup a song based on mode we're in!
|
|
||||||
switch(gubMusicMode)
|
switch(gubMusicMode)
|
||||||
{
|
{
|
||||||
case MUSIC_MAIN_MENU:
|
case MUSIC_MAIN_MENU:
|
||||||
// ATE: Don't fade in
|
// ATE: Don't fade in
|
||||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
gbFadeSpeed = (INT8)uiMusicVolume;
|
||||||
MusicPlay(MENUMIX_MUSIC,MUSIC_OLD_TYPE,FALSE);
|
MusicPlay(PickRandomSongFromList(MUSICLIST_MAIN_MENU));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MUSIC_LAPTOP:
|
case MUSIC_LAPTOP:
|
||||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
gbFadeSpeed = (INT8)uiMusicVolume;
|
||||||
MusicPlay(MARIMBAD2_MUSIC,MUSIC_OLD_TYPE,FALSE);
|
MusicPlay(PickRandomSongFromList(MUSICLIST_LAPTOP));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MUSIC_TACTICAL_NOTHING:
|
case MUSIC_TACTICAL_NOTHING:
|
||||||
@@ -583,31 +528,11 @@ static BOOLEAN StartMusicBasedOnMode(void)
|
|||||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
gbFadeSpeed = (INT8)uiMusicVolume;
|
||||||
if(gfUseCreatureMusic)
|
if(gfUseCreatureMusic)
|
||||||
{
|
{
|
||||||
if ( NewSoundID == -1)
|
MusicPlay(PickRandomSongFromList(MUSICLIST_TACTICAL_CREEPY));
|
||||||
{
|
|
||||||
SetSoundID = FALSE;
|
|
||||||
MusicPlay(CREEPY_MUSIC,MUSIC_OLD_TYPE,FALSE);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SetSoundID = TRUE;
|
|
||||||
MusicPlay(NewSoundID,MUSIC_TACTICAL_CREEPY_MUSIC,TRUE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( NewSoundID == -1)
|
MusicPlay(PickRandomSongFromList(MUSICLIST_TACTICAL_NOTHING));
|
||||||
{
|
|
||||||
SetSoundID = FALSE;
|
|
||||||
MusicPlay(bNothingModeSong,MUSIC_OLD_TYPE,FALSE);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SetSoundID = TRUE;
|
|
||||||
MusicPlay(NewSoundID,MUSIC_TACTICAL_NOTHING,TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
bNothingModeSong = (INT8) (NOTHING_A_MUSIC + Random(4));
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -616,30 +541,15 @@ static BOOLEAN StartMusicBasedOnMode(void)
|
|||||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
gbFadeSpeed = (INT8)uiMusicVolume;
|
||||||
if(gfUseCreatureMusic)
|
if(gfUseCreatureMusic)
|
||||||
{
|
{
|
||||||
if ( NewSoundID == -1)
|
MusicPlay(PickRandomSongFromList(MUSICLIST_TACTICAL_CREEPY));
|
||||||
{
|
}
|
||||||
SetSoundID = FALSE;
|
else if (NightTime() && MusicLists[MUSICLIST_TACTICAL_ENEMYPRESENT_NIGHT].size() > 0)
|
||||||
MusicPlay(CREEPY_MUSIC,MUSIC_OLD_TYPE,FALSE);
|
{
|
||||||
|
MusicPlay(PickRandomSongFromList(MUSICLIST_TACTICAL_ENEMYPRESENT_NIGHT));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SetSoundID = TRUE;
|
MusicPlay(PickRandomSongFromList(MUSICLIST_TACTICAL_ENEMYPRESENT));
|
||||||
MusicPlay(NewSoundID,MUSIC_TACTICAL_ENEMYPRESENT,TRUE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( NewSoundID == -1)
|
|
||||||
{
|
|
||||||
SetSoundID = FALSE;
|
|
||||||
MusicPlay(bEnemyModeSong,MUSIC_OLD_TYPE,FALSE);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SetSoundID = TRUE;
|
|
||||||
MusicPlay(NewSoundID,MUSIC_TACTICAL_ENEMYPRESENT,TRUE);
|
|
||||||
}
|
|
||||||
bEnemyModeSong = (INT8) (TENSOR_A_MUSIC + Random(3));
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -648,47 +558,23 @@ static BOOLEAN StartMusicBasedOnMode(void)
|
|||||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
gbFadeSpeed = (INT8)uiMusicVolume;
|
||||||
if(gfUseCreatureMusic)
|
if(gfUseCreatureMusic)
|
||||||
{
|
{
|
||||||
if ( NewSoundID == -1)
|
MusicPlay(PickRandomSongFromList(MUSICLIST_TACTICAL_CREEPY_BATTLE));
|
||||||
{
|
}
|
||||||
SetSoundID = FALSE;
|
else if (NightTime() && MusicLists[MUSICLIST_TACTICAL_BATTLE_NIGHT].size() > 0)
|
||||||
MusicPlay(CREATURE_BATTLE_MUSIC,MUSIC_OLD_TYPE,FALSE);
|
{
|
||||||
}
|
MusicPlay(PickRandomSongFromList(MUSICLIST_TACTICAL_BATTLE_NIGHT));
|
||||||
else
|
|
||||||
{
|
|
||||||
SetSoundID = TRUE;
|
|
||||||
MusicPlay(NewSoundID,MUSIC_TACTICAL_BATTLE_MUSIC,TRUE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( NewSoundID == -1)
|
MusicPlay(PickRandomSongFromList(MUSICLIST_TACTICAL_BATTLE));
|
||||||
{
|
|
||||||
SetSoundID = FALSE;
|
|
||||||
MusicPlay(bBattleModeSong,MUSIC_OLD_TYPE,FALSE);
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
SetSoundID = TRUE;
|
|
||||||
MusicPlay(NewSoundID,MUSIC_TACTICAL_BATTLE,TRUE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
bBattleModeSong = (INT8) (BATTLE_A_MUSIC + Random(2));
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MUSIC_TACTICAL_VICTORY:
|
case MUSIC_TACTICAL_VICTORY:
|
||||||
|
|
||||||
// ATE: Don't fade in EnemyPresent...
|
// ATE: Don't fade in EnemyPresent...
|
||||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
gbFadeSpeed = (INT8)uiMusicVolume;
|
||||||
if ( NewSoundID == -1)
|
MusicPlay(PickRandomSongFromList(MUSICLIST_TACTICAL_VICTORY));
|
||||||
{
|
|
||||||
SetSoundID = FALSE;
|
|
||||||
MusicPlay(TRIUMPH_MUSIC,MUSIC_OLD_TYPE,FALSE);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SetSoundID = TRUE;
|
|
||||||
MusicPlay(NewSoundID,MUSIC_TACTICAL_VICTORY,TRUE);
|
|
||||||
}
|
|
||||||
gbVictorySongCount++;
|
gbVictorySongCount++;
|
||||||
|
|
||||||
if(gfUseCreatureMusic && !gbWorldSectorZ)
|
if(gfUseCreatureMusic && !gbWorldSectorZ)
|
||||||
@@ -702,16 +588,7 @@ static BOOLEAN StartMusicBasedOnMode(void)
|
|||||||
|
|
||||||
// ATE: Don't fade in EnemyPresent...
|
// ATE: Don't fade in EnemyPresent...
|
||||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
gbFadeSpeed = (INT8)uiMusicVolume;
|
||||||
if ( NewSoundID == -1)
|
MusicPlay(PickRandomSongFromList(MUSICLIST_TACTICAL_DEATH));
|
||||||
{
|
|
||||||
SetSoundID = FALSE;
|
|
||||||
MusicPlay(DEATH_MUSIC,MUSIC_OLD_TYPE,FALSE);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SetSoundID = TRUE;
|
|
||||||
MusicPlay(NewSoundID,MUSIC_TACTICAL_DEATH,TRUE);
|
|
||||||
}
|
|
||||||
gbDeathSongCount++;
|
gbDeathSongCount++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -722,121 +599,13 @@ static BOOLEAN StartMusicBasedOnMode(void)
|
|||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
static BOOLEAN StartMusicBasedOnMode(void)
|
|
||||||
{
|
|
||||||
static BOOLEAN fFirstTime = TRUE;
|
|
||||||
|
|
||||||
if (fFirstTime)
|
|
||||||
{
|
|
||||||
fFirstTime = FALSE;
|
|
||||||
|
|
||||||
bNothingModeSong = (INT8) (NOTHING_A_MUSIC + Random(4));
|
|
||||||
bEnemyModeSong = (INT8) (TENSOR_A_MUSIC + Random(3));
|
|
||||||
bBattleModeSong = (INT8) (BATTLE_A_MUSIC + Random(2));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//DebugMsg( TOPIC_JA2, DBG_LEVEL_3, String( "StartMusicBasedOnMode() %d %d", uiMusicHandle, gubMusicMode ) );
|
|
||||||
|
|
||||||
// Setup a song based on mode we're in!
|
|
||||||
switch(gubMusicMode)
|
|
||||||
{
|
|
||||||
case MUSIC_MAIN_MENU:
|
|
||||||
// ATE: Don't fade in
|
|
||||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
|
||||||
MusicPlay(MENUMIX_MUSIC);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MUSIC_LAPTOP:
|
|
||||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
|
||||||
MusicPlay(MARIMBAD2_MUSIC);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MUSIC_TACTICAL_NOTHING:
|
|
||||||
// ATE: Don't fade in
|
|
||||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
|
||||||
if(gfUseCreatureMusic)
|
|
||||||
{
|
|
||||||
MusicPlay(CREEPY_MUSIC);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MusicPlay(bNothingModeSong);
|
|
||||||
bNothingModeSong = (INT8) (NOTHING_A_MUSIC + Random(4));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MUSIC_TACTICAL_ENEMYPRESENT:
|
|
||||||
// ATE: Don't fade in EnemyPresent...
|
|
||||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
|
||||||
if(gfUseCreatureMusic)
|
|
||||||
{
|
|
||||||
MusicPlay(CREEPY_MUSIC);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MusicPlay(bEnemyModeSong);
|
|
||||||
bEnemyModeSong = (INT8) (TENSOR_A_MUSIC + Random(3));
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MUSIC_TACTICAL_BATTLE:
|
|
||||||
// ATE: Don't fade in
|
|
||||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
|
||||||
if(gfUseCreatureMusic)
|
|
||||||
{
|
|
||||||
MusicPlay(CREATURE_BATTLE_MUSIC);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
MusicPlay(bBattleModeSong);
|
|
||||||
}
|
|
||||||
bBattleModeSong = (INT8) (BATTLE_A_MUSIC + Random(2));
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MUSIC_TACTICAL_VICTORY:
|
|
||||||
|
|
||||||
// ATE: Don't fade in EnemyPresent...
|
|
||||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
|
||||||
MusicPlay(TRIUMPH_MUSIC);
|
|
||||||
gbVictorySongCount++;
|
|
||||||
|
|
||||||
if(gfUseCreatureMusic && !gbWorldSectorZ)
|
|
||||||
{
|
|
||||||
//We just killed all the creatures that just attacked the town.
|
|
||||||
gfUseCreatureMusic = FALSE;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MUSIC_TACTICAL_DEATH:
|
|
||||||
|
|
||||||
// ATE: Don't fade in EnemyPresent...
|
|
||||||
gbFadeSpeed = (INT8)uiMusicVolume;
|
|
||||||
MusicPlay(DEATH_MUSIC);
|
|
||||||
gbDeathSongCount++;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
MusicFadeOut();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
BOOLEAN SetMusicMode(UINT8 ubMusicMode)
|
BOOLEAN SetMusicMode(UINT8 ubMusicMode)
|
||||||
{
|
{
|
||||||
return SetMusicMode(ubMusicMode, FALSE);
|
return SetMusicMode(ubMusicMode, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef NEWMUSIC
|
|
||||||
BOOLEAN SetMusicModeID(UINT8 ubMusicMode, INT32 SoundID)
|
|
||||||
{
|
|
||||||
return SetMusicModeID(ubMusicMode, SoundID, FALSE);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static void MusicStopCallback(void *pData)
|
static void MusicStopCallback(void *pData)
|
||||||
{
|
{
|
||||||
|
|||||||
+18
-49
@@ -3,27 +3,6 @@
|
|||||||
|
|
||||||
#include "Overhead Types.h"
|
#include "Overhead Types.h"
|
||||||
|
|
||||||
enum MusicList
|
|
||||||
{
|
|
||||||
MARIMBAD2_MUSIC,
|
|
||||||
MENUMIX_MUSIC,
|
|
||||||
NOTHING_A_MUSIC,
|
|
||||||
NOTHING_B_MUSIC,
|
|
||||||
NOTHING_C_MUSIC,
|
|
||||||
NOTHING_D_MUSIC,
|
|
||||||
TENSOR_A_MUSIC,
|
|
||||||
TENSOR_B_MUSIC,
|
|
||||||
TENSOR_C_MUSIC,
|
|
||||||
TRIUMPH_MUSIC,
|
|
||||||
DEATH_MUSIC,
|
|
||||||
BATTLE_A_MUSIC,
|
|
||||||
BATTLE_B_MUSIC, //same as tensor B
|
|
||||||
CREEPY_MUSIC,
|
|
||||||
CREATURE_BATTLE_MUSIC,
|
|
||||||
MUSIC_DIR,
|
|
||||||
NUM_MUSIC
|
|
||||||
};
|
|
||||||
|
|
||||||
enum MusicMode
|
enum MusicMode
|
||||||
{
|
{
|
||||||
MUSIC_NONE,
|
MUSIC_NONE,
|
||||||
@@ -42,43 +21,33 @@ enum MusicMode
|
|||||||
MUSIC_TACTICAL_CIV_GROUP_BATTLE,
|
MUSIC_TACTICAL_CIV_GROUP_BATTLE,
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef NEWMUSIC
|
enum NewMusicList
|
||||||
typedef struct
|
|
||||||
{
|
{
|
||||||
UINT16 uiIndex;
|
MUSICLIST_MAIN_MENU,
|
||||||
INT32 SoundTacticalVictory[4];
|
MUSICLIST_LAPTOP,
|
||||||
INT32 SoundTacticalBattle[4];
|
MUSICLIST_TACTICAL_NOTHING,
|
||||||
INT32 SoundTacticalNothing[4];
|
MUSICLIST_TACTICAL_ENEMYPRESENT,
|
||||||
INT32 SoundTacticalTensor[4];
|
MUSICLIST_TACTICAL_BATTLE,
|
||||||
INT32 SoundTacticalDeath[4];
|
MUSICLIST_TACTICAL_ENEMYPRESENT_NIGHT,
|
||||||
INT32 SoundTacticalBattleCreature[4];
|
MUSICLIST_TACTICAL_BATTLE_NIGHT,
|
||||||
INT32 SoundTacticalBattleCreepy[4];
|
MUSICLIST_TACTICAL_VICTORY,
|
||||||
INT32 SoundTacticalBattleGroup[NUM_CIV_GROUPS];
|
MUSICLIST_TACTICAL_DEATH,
|
||||||
|
MUSICLIST_TACTICAL_CREEPY,
|
||||||
|
MUSICLIST_TACTICAL_CREEPY_BATTLE,
|
||||||
|
|
||||||
} MUSIC_SOUND_VALUES;
|
MAX_MUSIC,
|
||||||
|
};
|
||||||
|
|
||||||
extern MUSIC_SOUND_VALUES MusicSoundValues[256];
|
extern std::vector<STR> MusicLists[MAX_MUSIC];
|
||||||
extern INT32 GlobalSoundID;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//extern UINT32 uiMusicHandle;
|
void InitializeMusicLists();
|
||||||
//extern BOOLEAN fMusicPlaying;
|
|
||||||
//extern UINT8 gubMusicMode;
|
|
||||||
//extern BOOLEAN gfForceMusicToTense;
|
|
||||||
|
|
||||||
UINT8 GetMusicMode(void);
|
UINT8 GetMusicMode(void);
|
||||||
BOOLEAN SetMusicMode(UINT8 ubMusicMode);
|
BOOLEAN SetMusicMode(UINT8 ubMusicMode);
|
||||||
|
|
||||||
// only for editor (editscreen.cpp)
|
// Used in lua scripting and editscreen.cpp
|
||||||
#ifdef NEWMUSIC
|
BOOLEAN MusicPlay(NewMusicList mode, UINT8 songIndex);
|
||||||
BOOLEAN MusicPlay(UINT32 uiNum, UINT32 MusicMode, BOOLEAN NewSound);
|
|
||||||
#else
|
|
||||||
BOOLEAN MusicPlay(UINT32 uiNum);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef NEWMUSIC
|
|
||||||
BOOLEAN SetMusicModeID(UINT8 ubMusicMode, INT32 SoundID);
|
|
||||||
#endif
|
|
||||||
UINT32 MusicGetVolume(void);
|
UINT32 MusicGetVolume(void);
|
||||||
BOOLEAN MusicSetVolume(UINT32 uiVolume);
|
BOOLEAN MusicSetVolume(UINT32 uiVolume);
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,7 @@
|
|||||||
#ifndef WIN32_LEAN_AND_MEAN
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#endif
|
#endif
|
||||||
|
#include <Music Control.h>
|
||||||
|
|
||||||
|
|
||||||
static void MAGIC(std::string const& aarrrrgggh = "")
|
static void MAGIC(std::string const& aarrrrgggh = "")
|
||||||
@@ -574,6 +575,9 @@ BOOLEAN InitializeStandardGamingPlatform(HINSTANCE hInstance, int sCommandShow)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FastDebugMsg("Initializing Music");
|
||||||
|
InitializeMusicLists();
|
||||||
|
|
||||||
FastDebugMsg("Initializing Game Manager");
|
FastDebugMsg("Initializing Game Manager");
|
||||||
// Initialize the Game
|
// Initialize the Game
|
||||||
if (InitializeGame() == FALSE)
|
if (InitializeGame() == FALSE)
|
||||||
|
|||||||
Reference in New Issue
Block a user