feat: TU19 (Dec 2014) Features & Content (#155)

* try to resolve merge conflict

* feat: TU19 (Dec 2014) Features & Content (#32)

* December 2014 files

* Working release build

* Fix compilation issues

* Add sound to Windows64Media

* Add DLC content and force Tutorial DLC

* Revert "Add DLC content and force Tutorial DLC"

This reverts commit 97a4399472.

* Disable broken light packing

* Disable breakpoint during DLC texture map load

Allows DLC loading but the DLC textures are still broken

* Fix post build not working

* ...

* fix vs2022 build

* fix cmake build

---------

Co-authored-by: Loki <lokirautio@gmail.com>
This commit is contained in:
daoge
2026-03-03 03:04:10 +08:00
committed by GitHub
parent 84c31a2331
commit b3feddfef3
2069 changed files with 264842 additions and 139522 deletions

View File

@@ -35,4 +35,43 @@ void ConsoleSoundEngine::SetIsPlayingNetherMusic(bool bVal)
m_bIsPlayingNetherMusic=bVal;
}
void ConsoleSoundEngine::tick()
{
if (scheduledSounds.empty())
{
return;
}
for(AUTO_VAR(it,scheduledSounds.begin()); it != scheduledSounds.end();)
{
SoundEngine::ScheduledSound *next = *it;
next->delay--;
if (next->delay <= 0)
{
play(next->iSound, next->x, next->y, next->z, next->volume, next->pitch);
it =scheduledSounds.erase(it);
delete next;
}
else
{
++it;
}
}
}
void ConsoleSoundEngine::schedule(int iSound, float x, float y, float z, float volume, float pitch, int delayTicks)
{
scheduledSounds.push_back(new SoundEngine::ScheduledSound(iSound, x, y, z, volume, pitch, delayTicks));
}
ConsoleSoundEngine::ScheduledSound::ScheduledSound(int iSound, float x, float y, float z, float volume, float pitch, int delay)
{
this->iSound = iSound;
this->x = x;
this->y = y;
this->z = z;
this->volume = volume;
this->pitch = pitch;
this->delay = delay;
}

View File

@@ -69,6 +69,25 @@ public:
static const WCHAR *wchSoundNames[eSoundType_MAX];
static const WCHAR *wchUISoundNames[eSFX_MAX];
public:
void tick();
void schedule(int iSound, float x, float y, float z, float volume, float pitch, int delayTicks);
private:
class ScheduledSound
{
public:
int iSound;
float x, y, z;
float volume, pitch;
int delay;
public:
ScheduledSound(int iSound, float x, float y, float z, float volume, float pitch, int delay);
};
vector<ScheduledSound *> scheduledSounds;
private:
// platform specific functions

View File

@@ -490,6 +490,12 @@ void SoundEngine::updateMiles()
case eSoundType_MOB_ENDERDRAGON_HIT:
distanceScaler=100.0f;
break;
case eSoundType_FIREWORKS_BLAST:
case eSoundType_FIREWORKS_BLAST_FAR:
case eSoundType_FIREWORKS_LARGE_BLAST:
case eSoundType_FIREWORKS_LARGE_BLAST_FAR:
distanceScaler=100.0f;
break;
case eSoundType_MOB_GHAST_MOAN:
case eSoundType_MOB_GHAST_SCREAM:
case eSoundType_MOB_GHAST_DEATH:
@@ -624,6 +630,7 @@ static S32 running = AIL_ms_count();
void SoundEngine::tick(shared_ptr<Mob> *players, float a)
{
ConsoleSoundEngine::tick();
#ifdef __DISABLE_MILES__
return;
#endif
@@ -1129,6 +1136,11 @@ int SoundEngine::OpenStreamThreadProc( void* lpParameter )
#endif
SoundEngine *soundEngine = (SoundEngine *)lpParameter;
soundEngine->m_hStream = AIL_open_stream(soundEngine->m_hDriver,soundEngine->m_szStreamName,0);
if(soundEngine->m_hStream==0)
{
app.DebugPrintf("SoundEngine::OpenStreamThreadProc - Could not open - %s\n",soundEngine->m_szStreamName);
}
return 0;
}
@@ -1225,7 +1237,11 @@ void SoundEngine::playMusicUpdate()
char szName[255];
wcstombs(szName,wstrSoundName.c_str(),255);
#if defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
string strFile="TPACK:/Data/" + string(szName) + ".binka";
#else
string strFile="TPACK:\\Data\\" + string(szName) + ".binka";
#endif
std::string mountedPath = StorageManager.GetMountedPath(strFile);
strcpy(m_szStreamName,mountedPath.c_str());
#endif

View File

@@ -151,6 +151,78 @@ const WCHAR *ConsoleSoundEngine::wchSoundNames[eSoundType_MAX]=
L"dig.snow", // eSoundType_DIG_SNOW
L"dig.stone", // eSoundType_DIG_STONE
L"dig.wood", // eSoundType_DIG_WOOD
// 1.6.4
L"fireworks.launch", //eSoundType_FIREWORKS_LAUNCH,
L"fireworks.blast", //eSoundType_FIREWORKS_BLAST,
L"fireworks.blast_far", //eSoundType_FIREWORKS_BLAST_FAR,
L"fireworks.large_blast", //eSoundType_FIREWORKS_LARGE_BLAST,
L"fireworks.large_blast_far", //eSoundType_FIREWORKS_LARGE_BLAST_FAR,
L"fireworks.twinkle", //eSoundType_FIREWORKS_TWINKLE,
L"fireworks.twinkle_far", //eSoundType_FIREWORKS_TWINKLE_FAR,
L"mob.bat.idle", //eSoundType_MOB_BAT_IDLE,
L"mob.bat.hurt", //eSoundType_MOB_BAT_HURT,
L"mob.bat.death", //eSoundType_MOB_BAT_DEATH,
L"mob.bat.takeoff", //eSoundType_MOB_BAT_TAKEOFF,
L"mob.wither.spawn", //eSoundType_MOB_WITHER_SPAWN,
L"mob.wither.idle", //eSoundType_MOB_WITHER_IDLE,
L"mob.wither.hurt", //eSoundType_MOB_WITHER_HURT,
L"mob.wither.death", //eSoundType_MOB_WITHER_DEATH,
L"mob.wither.shoot", //eSoundType_MOB_WITHER_SHOOT,
L"mob.cow.step", //eSoundType_MOB_COW_STEP,
L"mob.chicken.step", //eSoundType_MOB_CHICKEN_STEP,
L"mob.pig.step", //eSoundType_MOB_PIG_STEP,
L"mob.enderman.stare", //eSoundType_MOB_ENDERMAN_STARE,
L"mob.enderman.scream", //eSoundType_MOB_ENDERMAN_SCREAM,
L"mob.sheep.shear", //eSoundType_MOB_SHEEP_SHEAR,
L"mob.sheep.step", //eSoundType_MOB_SHEEP_STEP,
L"mob.skeleton.death", //eSoundType_MOB_SKELETON_DEATH,
L"mob.skeleton.step", //eSoundType_MOB_SKELETON_STEP,
L"mob.spider.step", //eSoundType_MOB_SPIDER_STEP,
L"mob.wolf.step", //eSoundType_MOB_WOLF_STEP,
L"mob.zombie.step", //eSoundType_MOB_ZOMBIE_STEP,
L"liquid.swim", //eSoundType_LIQUID_SWIM,
L"mob.horse.land", //eSoundType_MOB_HORSE_LAND,
L"mob.horse.armor", //eSoundType_MOB_HORSE_ARMOR,
L"mob.horse.leather", //eSoundType_MOB_HORSE_LEATHER,
L"mob.horse.zombie.death", //eSoundType_MOB_HORSE_ZOMBIE_DEATH,
L"mob.horse.skeleton.death", //eSoundType_MOB_HORSE_SKELETON_DEATH,
L"mob.horse.donkey.death", //eSoundType_MOB_HORSE_DONKEY_DEATH,
L"mob.horse.death", //eSoundType_MOB_HORSE_DEATH,
L"mob.horse.zombie.hit", //eSoundType_MOB_HORSE_ZOMBIE_HIT,
L"mob.horse.skeleton.hit", //eSoundType_MOB_HORSE_SKELETON_HIT,
L"mob.horse.donkey.hit", //eSoundType_MOB_HORSE_DONKEY_HIT,
L"mob.horse.hit", //eSoundType_MOB_HORSE_HIT,
L"mob.horse.zombie.idle", //eSoundType_MOB_HORSE_ZOMBIE_IDLE,
L"mob.horse.skeleton.idle", //eSoundType_MOB_HORSE_SKELETON_IDLE,
L"mob.horse.donkey.idle", //eSoundType_MOB_HORSE_DONKEY_IDLE,
L"mob.horse.idle", //eSoundType_MOB_HORSE_IDLE,
L"mob.horse.donkey.angry", //eSoundType_MOB_HORSE_DONKEY_ANGRY,
L"mob.horse.angry", //eSoundType_MOB_HORSE_ANGRY,
L"mob.horse.gallop", //eSoundType_MOB_HORSE_GALLOP,
L"mob.horse.breathe", //eSoundType_MOB_HORSE_BREATHE,
L"mob.horse.wood", //eSoundType_MOB_HORSE_WOOD,
L"mob.horse.soft", //eSoundType_MOB_HORSE_SOFT,
L"mob.horse.jump", //eSoundType_MOB_HORSE_JUMP,
L"mob.witch.idle", //eSoundType_MOB_WITCH_IDLE, <--- missing
L"mob.witch.hurt", //eSoundType_MOB_WITCH_HURT, <--- missing
L"mob.witch.death", //eSoundType_MOB_WITCH_DEATH, <--- missing
L"mob.slime.big", //eSoundType_MOB_SLIME_BIG,
L"mob.slime.small", //eSoundType_MOB_SLIME_SMALL,
L"eating", //eSoundType_EATING <--- missing
L"random.levelup", //eSoundType_RANDOM_LEVELUP
// 4J-PB - Some sounds were updated, but we can't do that for the 360 or we have to do a new sound bank
// instead, we'll add the sounds as new ones and change the code to reference them
L"fire.new_ignite",
};