mirror of
https://github.com/Patoke/LCERenewed.git
synced 2026-10-15 17:05:52 +00:00
feat: init
This commit is contained in:
commit
25809b8455
18807 files changed
+3944357
No files matched your search
@@ -0,0 +1,235 @@
|
||||
#include "stdafx.h"
|
||||
#include "AbstractContainerScreen.h"
|
||||
#include "ItemRenderer.h"
|
||||
#include "MultiplayerLocalPlayer.h"
|
||||
#include "Lighting.h"
|
||||
#include "GameMode.h"
|
||||
#include "KeyMapping.h"
|
||||
#include "Options.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.inventory.h"
|
||||
#include "..\Minecraft.World\net.minecraft.locale.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.item.h"
|
||||
|
||||
ItemRenderer *AbstractContainerScreen::itemRenderer = new ItemRenderer();
|
||||
|
||||
AbstractContainerScreen::AbstractContainerScreen(AbstractContainerMenu *menu)
|
||||
{
|
||||
// 4J - added initialisers
|
||||
imageWidth = 176;
|
||||
imageHeight = 166;
|
||||
|
||||
this->menu = menu;
|
||||
}
|
||||
|
||||
void AbstractContainerScreen::init()
|
||||
{
|
||||
Screen::init();
|
||||
minecraft->player->containerMenu = menu;
|
||||
// leftPos = (width - imageWidth) / 2;
|
||||
// topPos = (height - imageHeight) / 2;
|
||||
|
||||
}
|
||||
|
||||
void AbstractContainerScreen::render(int xm, int ym, float a)
|
||||
{
|
||||
// 4J Stu - Not used
|
||||
#if 0
|
||||
renderBackground();
|
||||
int xo = (width - imageWidth) / 2;
|
||||
int yo = (height - imageHeight) / 2;
|
||||
|
||||
renderBg(a);
|
||||
|
||||
glPushMatrix();
|
||||
glRotatef(120, 1, 0, 0);
|
||||
Lighting::turnOn();
|
||||
glPopMatrix();
|
||||
|
||||
glPushMatrix();
|
||||
glTranslatef((float)xo, (float)yo, 0);
|
||||
|
||||
glColor4f(1, 1, 1, 1);
|
||||
glEnable(GL_RESCALE_NORMAL);
|
||||
|
||||
Slot *hoveredSlot = NULL;
|
||||
|
||||
AUTO_VAR(itEnd, menu->slots->end());
|
||||
for (AUTO_VAR(it, menu->slots->begin()); it != itEnd; it++)
|
||||
{
|
||||
Slot *slot = *it; //menu->slots->at(i);
|
||||
|
||||
renderSlot(slot);
|
||||
|
||||
if (isHovering(slot, xm, ym))
|
||||
{
|
||||
hoveredSlot = slot;
|
||||
|
||||
glDisable(GL_LIGHTING);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
|
||||
int x = slot->x;
|
||||
int y = slot->y;
|
||||
fillGradient(x, y, x + 16, y + 16, 0x80ffffff, 0x80ffffff);
|
||||
glEnable(GL_LIGHTING);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
}
|
||||
}
|
||||
|
||||
shared_ptr<Inventory> inventory = minecraft->player->inventory;
|
||||
if (inventory->getCarried() != NULL)
|
||||
{
|
||||
glTranslatef(0, 0, 32);
|
||||
// Slot old = carriedSlot;
|
||||
// carriedSlot = null;
|
||||
itemRenderer->renderGuiItem(font, minecraft->textures, inventory->getCarried(), xm - xo - 8, ym - yo - 8);
|
||||
itemRenderer->renderGuiItemDecorations(font, minecraft->textures, inventory->getCarried(), xm - xo - 8, ym - yo - 8);
|
||||
// carriedSlot = old;
|
||||
}
|
||||
glDisable(GL_RESCALE_NORMAL);
|
||||
Lighting::turnOff();
|
||||
|
||||
glDisable(GL_LIGHTING);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
|
||||
renderLabels();
|
||||
|
||||
if (inventory->getCarried() == NULL && hoveredSlot != NULL && hoveredSlot->hasItem())
|
||||
{
|
||||
|
||||
wstring elementName = trimString(Language::getInstance()->getElementName(hoveredSlot->getItem()->getDescriptionId()));
|
||||
|
||||
if (elementName.length() > 0)
|
||||
{
|
||||
int x = xm - xo + 12;
|
||||
int y = ym - yo - 12;
|
||||
int width = font->width(elementName);
|
||||
fillGradient(x - 3, y - 3, x + width + 3, y + 8 + 3, 0xc0000000, 0xc0000000);
|
||||
|
||||
font->drawShadow(elementName, x, y, 0xffffffff);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
glPopMatrix();
|
||||
|
||||
Screen::render(xm, ym, a);
|
||||
glEnable(GL_LIGHTING);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
#endif
|
||||
}
|
||||
|
||||
void AbstractContainerScreen::renderLabels()
|
||||
{
|
||||
}
|
||||
|
||||
void AbstractContainerScreen::renderSlot(Slot *slot)
|
||||
{
|
||||
// 4J Unused
|
||||
#if 0
|
||||
int x = slot->x;
|
||||
int y = slot->y;
|
||||
shared_ptr<ItemInstance> item = slot->getItem();
|
||||
|
||||
if (item == NULL)
|
||||
{
|
||||
int icon = slot->getNoItemIcon();
|
||||
if (icon >= 0)
|
||||
{
|
||||
glDisable(GL_LIGHTING);
|
||||
minecraft->textures->bind(minecraft->textures->loadTexture(TN_GUI_ITEMS));//L"/gui/items.png"));
|
||||
blit(x, y, icon % 16 * 16, icon / 16 * 16, 16, 16);
|
||||
glEnable(GL_LIGHTING);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
itemRenderer->renderGuiItem(font, minecraft->textures, item, x, y);
|
||||
itemRenderer->renderGuiItemDecorations(font, minecraft->textures, item, x, y);
|
||||
#endif
|
||||
}
|
||||
|
||||
Slot *AbstractContainerScreen::findSlot(int x, int y)
|
||||
{
|
||||
AUTO_VAR(itEnd, menu->slots->end());
|
||||
for (AUTO_VAR(it, menu->slots->begin()); it != itEnd; it++)
|
||||
{
|
||||
Slot *slot = *it; //menu->slots->at(i);
|
||||
if (isHovering(slot, x, y)) return slot;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool AbstractContainerScreen::isHovering(Slot *slot, int xm, int ym)
|
||||
{
|
||||
int xo = (width - imageWidth) / 2;
|
||||
int yo = (height - imageHeight) / 2;
|
||||
xm -= xo;
|
||||
ym -= yo;
|
||||
|
||||
return xm >= slot->x - 1 && xm < slot->x + 16 + 1 && ym >= slot->y - 1 && ym < slot->y + 16 + 1;
|
||||
|
||||
}
|
||||
|
||||
void AbstractContainerScreen::mouseClicked(int x, int y, int buttonNum)
|
||||
{
|
||||
Screen::mouseClicked(x, y, buttonNum);
|
||||
if (buttonNum == 0 || buttonNum == 1)
|
||||
{
|
||||
Slot *slot = findSlot(x, y);
|
||||
|
||||
int xo = (width - imageWidth) / 2;
|
||||
int yo = (height - imageHeight) / 2;
|
||||
bool clickedOutside = (x < xo || y < yo || x >= xo + imageWidth || y >= yo + imageHeight);
|
||||
|
||||
int slotId = -1;
|
||||
if (slot != NULL) slotId = slot->index;
|
||||
|
||||
if (clickedOutside)
|
||||
{
|
||||
slotId = AbstractContainerMenu::CLICKED_OUTSIDE;
|
||||
}
|
||||
|
||||
if (slotId != -1)
|
||||
{
|
||||
bool quickKey = slotId != AbstractContainerMenu::CLICKED_OUTSIDE && (Keyboard::isKeyDown(Keyboard::KEY_LSHIFT) || Keyboard::isKeyDown(Keyboard::KEY_RSHIFT));
|
||||
minecraft->gameMode->handleInventoryMouseClick(menu->containerId, slotId, buttonNum, quickKey, minecraft->player);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void AbstractContainerScreen::mouseReleased(int x, int y, int buttonNum)
|
||||
{
|
||||
if (buttonNum == 0)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
void AbstractContainerScreen::keyPressed(wchar_t eventCharacter, int eventKey)
|
||||
{
|
||||
if (eventKey == Keyboard::KEY_ESCAPE || eventKey == minecraft->options->keyBuild->key)
|
||||
{
|
||||
minecraft->player->closeContainer();
|
||||
}
|
||||
}
|
||||
|
||||
void AbstractContainerScreen::removed()
|
||||
{
|
||||
if (minecraft->player == NULL) return;
|
||||
}
|
||||
|
||||
void AbstractContainerScreen::slotsChanged(shared_ptr<Container> container)
|
||||
{
|
||||
}
|
||||
|
||||
bool AbstractContainerScreen::isPauseScreen()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void AbstractContainerScreen::tick()
|
||||
{
|
||||
Screen::tick();
|
||||
if (!minecraft->player->isAlive() || minecraft->player->removed) minecraft->player->closeContainer();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
#include "Screen.h"
|
||||
class ItemRenderer;
|
||||
class AbstractContainerMenu;
|
||||
class Slot;
|
||||
class Container;
|
||||
|
||||
class AbstractContainerScreen : public Screen
|
||||
{
|
||||
private:
|
||||
static ItemRenderer *itemRenderer;
|
||||
protected:
|
||||
int imageWidth;
|
||||
int imageHeight;
|
||||
//int leftPos, topPos;
|
||||
public:
|
||||
AbstractContainerMenu *menu;
|
||||
|
||||
AbstractContainerScreen(AbstractContainerMenu *menu);
|
||||
virtual void init();
|
||||
virtual void render(int xm, int ym, float a);
|
||||
protected:
|
||||
virtual void renderLabels();
|
||||
virtual void renderBg(float a) = 0;
|
||||
private:
|
||||
virtual void renderSlot(Slot *slot);
|
||||
virtual Slot *findSlot(int x, int y);
|
||||
virtual bool isHovering(Slot *slot, int xm, int ym);
|
||||
protected:
|
||||
virtual void mouseClicked(int x, int y, int buttonNum);
|
||||
virtual void mouseReleased(int x, int y, int buttonNum);
|
||||
virtual void keyPressed(wchar_t eventCharacter, int eventKey);
|
||||
public:
|
||||
virtual void removed();
|
||||
virtual void slotsChanged(shared_ptr<Container> container);
|
||||
virtual bool isPauseScreen();
|
||||
virtual void tick();
|
||||
};
|
||||
@@ -0,0 +1,37 @@
|
||||
#include "stdafx.h"
|
||||
#include "..\Minecraft.World\net.minecraft.core.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.entity.projectile.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.level.tile.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.level.h"
|
||||
#include "AbstractProjectileDispenseBehavior.h"
|
||||
|
||||
shared_ptr<ItemInstance> AbstractProjectileDispenseBehavior::execute(BlockSource *source, shared_ptr<ItemInstance> dispensed)
|
||||
{
|
||||
Level *world = source->getWorld();
|
||||
Position position = DispenserTile::getDispensePosition(source);
|
||||
FacingEnum *facing = DispenserTile::getFacing(source->getData());
|
||||
|
||||
shared_ptr<Projectile> arrow = getProjectile(world, position);
|
||||
arrow->shoot(facing->getStepX(), facing->getStepY() + .1f, facing->getStepZ(), getPower(), getUncertainty());
|
||||
world->addEntity(arrow);
|
||||
|
||||
dispensed->remove(1);
|
||||
|
||||
return dispensed;
|
||||
}
|
||||
|
||||
void AbstractProjectileDispenseBehavior::playSound(BlockSource *source)
|
||||
{
|
||||
source->getWorld()->levelEvent(LevelEvent::SOUND_LAUNCH, source->getBlockX(), source->getBlockY(), source->getBlockZ(), 0);
|
||||
}
|
||||
|
||||
|
||||
float AbstractProjectileDispenseBehavior::getUncertainty()
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
|
||||
float AbstractProjectileDispenseBehavior::getPower()
|
||||
{
|
||||
return 1.1f;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
#include "..\Minecraft.World\DefaultDispenseItemBehavior.h"
|
||||
|
||||
class Projectile;
|
||||
|
||||
class AbstractProjectileDispenseBehavior : public DefaultDispenseItemBehavior
|
||||
{
|
||||
public:
|
||||
shared_ptr<ItemInstance> execute(BlockSource *source, shared_ptr<ItemInstance> dispensed);
|
||||
|
||||
protected:
|
||||
virtual void playSound(BlockSource *source);
|
||||
virtual shared_ptr<Projectile> getProjectile(Level *world, Position *position) = 0;
|
||||
virtual float getUncertainty();
|
||||
virtual float getPower();
|
||||
};
|
||||
@@ -0,0 +1,410 @@
|
||||
#include "stdafx.h"
|
||||
#include "Textures.h"
|
||||
#include "AbstractTexturePack.h"
|
||||
#include "..\Minecraft.World\InputOutputStream.h"
|
||||
#include "..\Minecraft.World\StringHelpers.h"
|
||||
|
||||
AbstractTexturePack::AbstractTexturePack(DWORD id, File *file, const wstring &name, TexturePack *fallback) : id(id), name(name)
|
||||
{
|
||||
// 4J init
|
||||
textureId = -1;
|
||||
m_colourTable = NULL;
|
||||
|
||||
|
||||
this->file = file;
|
||||
this->fallback = fallback;
|
||||
|
||||
m_iconData = NULL;
|
||||
m_iconSize = 0;
|
||||
|
||||
m_comparisonData = NULL;
|
||||
m_comparisonSize = 0;
|
||||
|
||||
// 4J Stu - These calls need to be in the most derived version of the class
|
||||
//loadIcon();
|
||||
//loadDescription();
|
||||
}
|
||||
|
||||
wstring AbstractTexturePack::trim(wstring line)
|
||||
{
|
||||
if (!line.empty() && line.length() > 34)
|
||||
{
|
||||
line = line.substr(0, 34);
|
||||
}
|
||||
return line;
|
||||
}
|
||||
|
||||
void AbstractTexturePack::loadIcon()
|
||||
{
|
||||
#ifdef _XBOX
|
||||
// 4J Stu - Temporary only
|
||||
const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
|
||||
WCHAR szResourceLocator[ LOCATOR_SIZE ];
|
||||
|
||||
const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL);
|
||||
swprintf(szResourceLocator, LOCATOR_SIZE ,L"section://%X,%ls#%ls",c_ModuleHandle,L"media", L"media/Graphics/TexturePackIcon.png");
|
||||
|
||||
UINT size = 0;
|
||||
HRESULT hr = XuiResourceLoadAllNoLoc(szResourceLocator, &m_iconData, &size);
|
||||
m_iconSize = size;
|
||||
#endif
|
||||
}
|
||||
|
||||
void AbstractTexturePack::loadComparison()
|
||||
{
|
||||
#ifdef _XBOX
|
||||
// 4J Stu - Temporary only
|
||||
const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
|
||||
WCHAR szResourceLocator[ LOCATOR_SIZE ];
|
||||
|
||||
const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL);
|
||||
swprintf(szResourceLocator, LOCATOR_SIZE ,L"section://%X,%ls#%ls",c_ModuleHandle,L"media", L"media/Graphics/DefaultPack_Comparison.png");
|
||||
|
||||
UINT size = 0;
|
||||
HRESULT hr = XuiResourceLoadAllNoLoc(szResourceLocator, &m_comparisonData, &size);
|
||||
m_comparisonSize = size;
|
||||
#endif
|
||||
}
|
||||
|
||||
void AbstractTexturePack::loadDescription()
|
||||
{
|
||||
// 4J Unused currently
|
||||
#if 0
|
||||
InputStream *inputStream = NULL;
|
||||
BufferedReader *br = NULL;
|
||||
//try {
|
||||
inputStream = getResourceImplementation(L"/pack.txt");
|
||||
br = new BufferedReader(new InputStreamReader(inputStream));
|
||||
desc1 = trim(br->readLine());
|
||||
desc2 = trim(br->readLine());
|
||||
//} catch (IOException ignored) {
|
||||
//} finally {
|
||||
// TODO [EB]: use IOUtils.closeSilently()
|
||||
// try {
|
||||
if (br != NULL)
|
||||
{
|
||||
br->close();
|
||||
delete br;
|
||||
}
|
||||
if (inputStream != NULL)
|
||||
{
|
||||
inputStream->close();
|
||||
delete inputStream;
|
||||
}
|
||||
// } catch (IOException ignored) {
|
||||
// }
|
||||
//}
|
||||
#endif
|
||||
}
|
||||
|
||||
void AbstractTexturePack::loadName()
|
||||
{
|
||||
}
|
||||
|
||||
InputStream *AbstractTexturePack::getResource(const wstring &name, bool allowFallback) //throws IOException
|
||||
{
|
||||
app.DebugPrintf("texture - %ls\n",name.c_str());
|
||||
InputStream *is = getResourceImplementation(name);
|
||||
if (is == NULL && fallback != NULL && allowFallback)
|
||||
{
|
||||
is = fallback->getResource(name, true);
|
||||
}
|
||||
|
||||
return is;
|
||||
}
|
||||
|
||||
// 4J Currently removed due to override in TexturePack class
|
||||
//InputStream *AbstractTexturePack::getResource(const wstring &name) //throws IOException
|
||||
//{
|
||||
// return getResource(name, true);
|
||||
//}
|
||||
|
||||
void AbstractTexturePack::unload(Textures *textures)
|
||||
{
|
||||
if (iconImage != NULL && textureId != -1)
|
||||
{
|
||||
textures->releaseTexture(textureId);
|
||||
}
|
||||
}
|
||||
|
||||
void AbstractTexturePack::load(Textures *textures)
|
||||
{
|
||||
if (iconImage != NULL)
|
||||
{
|
||||
if (textureId == -1)
|
||||
{
|
||||
textureId = textures->getTexture(iconImage);
|
||||
}
|
||||
glBindTexture(GL_TEXTURE_2D, textureId);
|
||||
textures->clearLastBoundId();
|
||||
}
|
||||
else
|
||||
{
|
||||
// 4J Stu - Don't do this
|
||||
//textures->bindTexture(L"/gui/unknown_pack.png");
|
||||
}
|
||||
}
|
||||
|
||||
bool AbstractTexturePack::hasFile(const wstring &name, bool allowFallback)
|
||||
{
|
||||
bool hasFile = this->hasFile(name);
|
||||
|
||||
return !hasFile && (allowFallback && fallback != NULL) ? fallback->hasFile(name, allowFallback) : hasFile;
|
||||
}
|
||||
|
||||
DWORD AbstractTexturePack::getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
wstring AbstractTexturePack::getName()
|
||||
{
|
||||
return texname;
|
||||
}
|
||||
|
||||
wstring AbstractTexturePack::getWorldName()
|
||||
{
|
||||
return m_wsWorldName;
|
||||
}
|
||||
|
||||
wstring AbstractTexturePack::getDesc1()
|
||||
{
|
||||
return desc1;
|
||||
}
|
||||
|
||||
wstring AbstractTexturePack::getDesc2()
|
||||
{
|
||||
return desc2;
|
||||
}
|
||||
|
||||
wstring AbstractTexturePack::getAnimationString(const wstring &textureName, const wstring &path, bool allowFallback)
|
||||
{
|
||||
return getAnimationString(textureName, path);
|
||||
}
|
||||
|
||||
wstring AbstractTexturePack::getAnimationString(const wstring &textureName, const wstring &path)
|
||||
{
|
||||
wstring animationDefinitionFile = textureName + L".txt";
|
||||
|
||||
bool requiresFallback = !hasFile(L"\\" + textureName + L".png", false);
|
||||
|
||||
wstring result = L"";
|
||||
|
||||
InputStream *fileStream = getResource(L"\\" + path + animationDefinitionFile, requiresFallback);
|
||||
|
||||
if(fileStream)
|
||||
{
|
||||
//Minecraft::getInstance()->getLogger().info("Found animation info for: " + animationDefinitionFile);
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
app.DebugPrintf("Found animation info for: %ls\n", animationDefinitionFile.c_str() );
|
||||
#endif
|
||||
InputStreamReader isr(fileStream);
|
||||
BufferedReader br(&isr);
|
||||
|
||||
|
||||
wstring line = br.readLine();
|
||||
while (!line.empty())
|
||||
{
|
||||
line = trimString(line);
|
||||
if (line.length() > 0)
|
||||
{
|
||||
result.append(L",");
|
||||
result.append(line);
|
||||
}
|
||||
line = br.readLine();
|
||||
}
|
||||
delete fileStream;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
BufferedImage *AbstractTexturePack::getImageResource(const wstring& File, bool filenameHasExtension /*= false*/, bool bTitleUpdateTexture /*=false*/, const wstring &drive /*=L""*/)
|
||||
{
|
||||
const char *pchTexture=wstringtofilename(File);
|
||||
app.DebugPrintf("AbstractTexturePack::getImageResource - %s, drive is %s\n",pchTexture, wstringtofilename(drive));
|
||||
|
||||
return new BufferedImage(TexturePack::getResource(L"/" + File),filenameHasExtension,bTitleUpdateTexture,drive);
|
||||
}
|
||||
|
||||
void AbstractTexturePack::loadDefaultUI()
|
||||
{
|
||||
#ifdef _XBOX
|
||||
// load from the .xzp file
|
||||
const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL);
|
||||
|
||||
// Load new skin
|
||||
const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
|
||||
WCHAR szResourceLocator[ LOCATOR_SIZE ];
|
||||
|
||||
swprintf(szResourceLocator, LOCATOR_SIZE,L"section://%X,%ls#%ls",c_ModuleHandle,L"media", L"media/skin_Minecraft.xur");
|
||||
|
||||
XuiFreeVisuals(L"");
|
||||
app.LoadSkin(szResourceLocator,NULL);//L"TexturePack");
|
||||
//CXuiSceneBase::GetInstance()->SetVisualPrefix(L"TexturePack");
|
||||
CXuiSceneBase::GetInstance()->SkinChanged(CXuiSceneBase::GetInstance()->m_hObj);
|
||||
#else
|
||||
ui.ReloadSkin();
|
||||
#endif
|
||||
}
|
||||
|
||||
void AbstractTexturePack::loadColourTable()
|
||||
{
|
||||
loadDefaultColourTable();
|
||||
loadDefaultHTMLColourTable();
|
||||
}
|
||||
|
||||
void AbstractTexturePack::loadDefaultColourTable()
|
||||
{
|
||||
// Load the file
|
||||
#ifdef __PS3__
|
||||
// need to check if it's a BD build, so pass in the name
|
||||
File coloursFile(AbstractTexturePack::getPath(true,app.GetBootedFromDiscPatch()?"colours.col":NULL).append(L"res/colours.col"));
|
||||
|
||||
#else
|
||||
File coloursFile(AbstractTexturePack::getPath(true).append(L"res/colours.col"));
|
||||
#endif
|
||||
|
||||
|
||||
if(coloursFile.exists())
|
||||
{
|
||||
DWORD dwLength = coloursFile.length();
|
||||
byteArray data(dwLength);
|
||||
|
||||
FileInputStream fis(coloursFile);
|
||||
fis.read(data,0,dwLength);
|
||||
fis.close();
|
||||
if(m_colourTable != NULL) delete m_colourTable;
|
||||
m_colourTable = new ColourTable(data.data, dwLength);
|
||||
|
||||
delete [] data.data;
|
||||
}
|
||||
else
|
||||
{
|
||||
app.DebugPrintf("Failed to load the default colours table\n");
|
||||
app.FatalLoadError();
|
||||
}
|
||||
}
|
||||
|
||||
void AbstractTexturePack::loadDefaultHTMLColourTable()
|
||||
{
|
||||
#ifdef _XBOX
|
||||
// load from the .xzp file
|
||||
const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL);
|
||||
|
||||
const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
|
||||
WCHAR szResourceLocator[ LOCATOR_SIZE ];
|
||||
|
||||
// Try and load the HTMLColours.col based off the common XML first, before the deprecated xuiscene_colourtable
|
||||
wsprintfW(szResourceLocator,L"section://%X,%s#%s",c_ModuleHandle,L"media", L"media/HTMLColours.col");
|
||||
BYTE *data;
|
||||
UINT dataLength;
|
||||
if(XuiResourceLoadAll(szResourceLocator, &data, &dataLength) == S_OK)
|
||||
{
|
||||
m_colourTable->loadColoursFromData(data,dataLength);
|
||||
|
||||
XuiFree(data);
|
||||
}
|
||||
else
|
||||
{
|
||||
wsprintfW(szResourceLocator,L"section://%X,%s#%s",c_ModuleHandle,L"media", L"media/");
|
||||
HXUIOBJ hScene;
|
||||
HRESULT hr = XuiSceneCreate(szResourceLocator,L"xuiscene_colourtable.xur", NULL, &hScene);
|
||||
|
||||
if(HRESULT_SUCCEEDED(hr))
|
||||
{
|
||||
loadHTMLColourTableFromXuiScene(hScene);
|
||||
}
|
||||
}
|
||||
#else
|
||||
if(app.hasArchiveFile(L"HTMLColours.col"))
|
||||
{
|
||||
byteArray textColours = app.getArchiveFile(L"HTMLColours.col");
|
||||
m_colourTable->loadColoursFromData(textColours.data,textColours.length);
|
||||
|
||||
delete [] textColours.data;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef _XBOX
|
||||
void AbstractTexturePack::loadHTMLColourTableFromXuiScene(HXUIOBJ hObj)
|
||||
{
|
||||
HXUIOBJ child;
|
||||
HRESULT hr = XuiElementGetFirstChild(hObj, &child);
|
||||
|
||||
while(HRESULT_SUCCEEDED(hr) && child != NULL)
|
||||
{
|
||||
LPCWSTR childName;
|
||||
XuiElementGetId(child,&childName);
|
||||
m_colourTable->setColour(childName,XuiTextElementGetText(child));
|
||||
|
||||
//eMinecraftTextColours colourIndex = eTextColor_NONE;
|
||||
//for(int i = 0; i < (int)eTextColor_MAX; i++)
|
||||
//{
|
||||
// if(wcscmp(HTMLColourTableElements[i],childName)==0)
|
||||
// {
|
||||
// colourIndex = (eMinecraftTextColours)i;
|
||||
// break;
|
||||
// }
|
||||
//}
|
||||
|
||||
//LPCWSTR stringValue = XuiTextElementGetText(child);
|
||||
|
||||
//m_htmlColourTable[colourIndex] = XuiTextElementGetText(child);
|
||||
|
||||
hr = XuiElementGetNext(child, &child);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void AbstractTexturePack::loadUI()
|
||||
{
|
||||
loadColourTable();
|
||||
|
||||
#ifdef _XBOX
|
||||
CXuiSceneBase::GetInstance()->SkinChanged(CXuiSceneBase::GetInstance()->m_hObj);
|
||||
#endif
|
||||
}
|
||||
|
||||
void AbstractTexturePack::unloadUI()
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
wstring AbstractTexturePack::getXuiRootPath()
|
||||
{
|
||||
const ULONG_PTR c_ModuleHandle = (ULONG_PTR)GetModuleHandle(NULL);
|
||||
|
||||
// Load new skin
|
||||
const DWORD LOCATOR_SIZE = 256; // Use this to allocate space to hold a ResourceLocator string
|
||||
WCHAR szResourceLocator[ LOCATOR_SIZE ];
|
||||
|
||||
swprintf(szResourceLocator, LOCATOR_SIZE,L"section://%X,%ls#%ls",c_ModuleHandle,L"media", L"media/");
|
||||
return szResourceLocator;
|
||||
}
|
||||
|
||||
PBYTE AbstractTexturePack::getPackIcon(DWORD &dwImageBytes)
|
||||
{
|
||||
if(m_iconSize == 0 || m_iconData == NULL) loadIcon();
|
||||
dwImageBytes = m_iconSize;
|
||||
return m_iconData;
|
||||
}
|
||||
|
||||
PBYTE AbstractTexturePack::getPackComparison(DWORD &dwImageBytes)
|
||||
{
|
||||
if(m_comparisonSize == 0 || m_comparisonData == NULL) loadComparison();
|
||||
|
||||
dwImageBytes = m_comparisonSize;
|
||||
return m_comparisonData;
|
||||
}
|
||||
|
||||
unsigned int AbstractTexturePack::getDLCParentPackId()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
unsigned char AbstractTexturePack::getDLCSubPackId()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
#pragma once
|
||||
using namespace std;
|
||||
|
||||
#include "TexturePack.h"
|
||||
|
||||
class BufferedImage;
|
||||
|
||||
class AbstractTexturePack : public TexturePack
|
||||
{
|
||||
private:
|
||||
const DWORD id;
|
||||
const wstring name;
|
||||
|
||||
protected:
|
||||
File *file;
|
||||
wstring texname;
|
||||
wstring m_wsWorldName;
|
||||
|
||||
wstring desc1;
|
||||
wstring desc2;
|
||||
|
||||
PBYTE m_iconData;
|
||||
DWORD m_iconSize;
|
||||
|
||||
PBYTE m_comparisonData;
|
||||
DWORD m_comparisonSize;
|
||||
|
||||
TexturePack *fallback;
|
||||
|
||||
ColourTable *m_colourTable;
|
||||
|
||||
protected:
|
||||
BufferedImage *iconImage;
|
||||
|
||||
private:
|
||||
int textureId;
|
||||
|
||||
protected:
|
||||
AbstractTexturePack(DWORD id, File *file, const wstring &name, TexturePack *fallback);
|
||||
|
||||
private:
|
||||
static wstring trim(wstring line);
|
||||
|
||||
protected:
|
||||
virtual void loadIcon();
|
||||
virtual void loadComparison();
|
||||
virtual void loadDescription();
|
||||
virtual void loadName();
|
||||
|
||||
public:
|
||||
virtual InputStream *getResource(const wstring &name, bool allowFallback); //throws IOException
|
||||
// 4J Removed do to current override in TexturePack class
|
||||
//virtual InputStream *getResource(const wstring &name); //throws IOException
|
||||
virtual DLCPack * getDLCPack() =0;
|
||||
|
||||
|
||||
protected:
|
||||
virtual InputStream *getResourceImplementation(const wstring &name) = 0; // throws IOException;
|
||||
public:
|
||||
virtual void unload(Textures *textures);
|
||||
virtual void load(Textures *textures);
|
||||
virtual bool hasFile(const wstring &name, bool allowFallback);
|
||||
virtual bool hasFile(const wstring &name) = 0;
|
||||
virtual DWORD getId();
|
||||
virtual wstring getName();
|
||||
virtual wstring getDesc1();
|
||||
virtual wstring getDesc2();
|
||||
virtual wstring getWorldName();
|
||||
|
||||
virtual wstring getAnimationString(const wstring &textureName, const wstring &path, bool allowFallback);
|
||||
|
||||
protected:
|
||||
virtual wstring getAnimationString(const wstring &textureName, const wstring &path);
|
||||
void loadDefaultUI();
|
||||
void loadDefaultColourTable();
|
||||
void loadDefaultHTMLColourTable();
|
||||
#ifdef _XBOX
|
||||
void loadHTMLColourTableFromXuiScene(HXUIOBJ hObj);
|
||||
#endif
|
||||
|
||||
public:
|
||||
virtual BufferedImage *getImageResource(const wstring& File, bool filenameHasExtension = false, bool bTitleUpdateTexture=false, const wstring &drive =L"");
|
||||
virtual void loadColourTable();
|
||||
virtual void loadUI();
|
||||
virtual void unloadUI();
|
||||
virtual wstring getXuiRootPath();
|
||||
virtual PBYTE getPackIcon(DWORD &dwImageBytes);
|
||||
virtual PBYTE getPackComparison(DWORD &dwImageBytes);
|
||||
virtual unsigned int getDLCParentPackId();
|
||||
virtual unsigned char getDLCSubPackId();
|
||||
virtual ColourTable *getColourTable() { return m_colourTable; }
|
||||
virtual ArchiveFile *getArchiveFile() { return NULL; }
|
||||
};
|
||||
@@ -0,0 +1,151 @@
|
||||
#include "stdafx.h"
|
||||
#include "AchievementPopup.h"
|
||||
#include "ItemRenderer.h"
|
||||
#include "Font.h"
|
||||
#include "Textures.h"
|
||||
#include "Lighting.h"
|
||||
#include "..\Minecraft.World\System.h"
|
||||
#include "..\Minecraft.World\net.minecraft.locale.h"
|
||||
#include "..\Minecraft.World\net.minecraft.stats.h"
|
||||
#include "..\Minecraft.World\SharedConstants.h"
|
||||
|
||||
AchievementPopup::AchievementPopup(Minecraft *mc)
|
||||
{
|
||||
// 4J - added initialisers
|
||||
width = 0;
|
||||
height = 0;
|
||||
ach = NULL;
|
||||
startTime = 0;
|
||||
isHelper = false;
|
||||
|
||||
this->mc = mc;
|
||||
ir = new ItemRenderer();
|
||||
}
|
||||
|
||||
void AchievementPopup::popup(Achievement *ach)
|
||||
{
|
||||
title = I18n::get(L"achievement.get");
|
||||
desc = ach->name;
|
||||
startTime = System::currentTimeMillis();
|
||||
this->ach = ach;
|
||||
isHelper = false;
|
||||
}
|
||||
|
||||
void AchievementPopup::permanent(Achievement *ach)
|
||||
{
|
||||
title = ach->name;
|
||||
desc = ach->getDescription();
|
||||
|
||||
startTime = System::currentTimeMillis() - 2500;
|
||||
this->ach = ach;
|
||||
isHelper = true;
|
||||
}
|
||||
|
||||
void AchievementPopup::prepareWindow()
|
||||
{
|
||||
glViewport(0, 0, mc->width, mc->height);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
|
||||
this->width = mc->width;
|
||||
this->height = mc->height;
|
||||
|
||||
ScreenSizeCalculator ssc(mc->options, mc->width, mc->height);
|
||||
width = ssc.getWidth();
|
||||
height = ssc.getHeight();
|
||||
|
||||
glClear(GL_DEPTH_BUFFER_BIT);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
glOrtho(0, (float)width, (float)height, 0, 1000, 3000);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
glTranslatef(0, 0, -2000);
|
||||
|
||||
}
|
||||
|
||||
void AchievementPopup::render()
|
||||
{
|
||||
// 4J Unused
|
||||
#if 0
|
||||
if (Minecraft::warezTime > 0)
|
||||
{
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glDepthMask(false);
|
||||
Lighting::turnOff();
|
||||
prepareWindow();
|
||||
|
||||
wstring title = L"Minecraft " + SharedConstants::VERSION_STRING + L" Unlicensed Copy :(";
|
||||
wstring msg1 = L"(Or logged in from another location)";
|
||||
wstring msg2 = L"Purchase at minecraft.net";
|
||||
|
||||
mc->font->drawShadow(title, 2, 2 + 9 * 0, 0xffffff);
|
||||
mc->font->drawShadow(msg1, 2, 2 + 9 * 1, 0xffffff);
|
||||
mc->font->drawShadow(msg2, 2, 2 + 9 * 2, 0xffffff);
|
||||
|
||||
glDepthMask(true);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
}
|
||||
if (ach == NULL || startTime == 0) return;
|
||||
|
||||
double time = (System::currentTimeMillis() - startTime) / 3000.0;
|
||||
if (isHelper)
|
||||
{
|
||||
}
|
||||
else if (!isHelper && (time < 0 || time > 1))
|
||||
{
|
||||
startTime = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
prepareWindow();
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glDepthMask(false);
|
||||
|
||||
double yo = time * 2;
|
||||
if (yo > 1) yo = 2 - yo;
|
||||
yo = yo * 4;
|
||||
yo = 1 - yo;
|
||||
if (yo < 0) yo = 0;
|
||||
yo = yo * yo;
|
||||
yo = yo * yo;
|
||||
|
||||
int xx = width - 160;
|
||||
int yy = 0 - (int) (yo * 36);
|
||||
int tex = mc->textures->loadTexture(L"/achievement/bg.png");
|
||||
glColor4f(1, 1, 1, 1);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
glBindTexture(GL_TEXTURE_2D, tex);
|
||||
glDisable(GL_LIGHTING);
|
||||
|
||||
blit(xx, yy, 96, 202, 160, 32);
|
||||
|
||||
if (isHelper)
|
||||
{
|
||||
mc->font->drawWordWrap(desc, xx + 30, yy + 7, 120, 0xffffffff);
|
||||
}
|
||||
else
|
||||
{
|
||||
mc->font->draw(title, xx + 30, yy + 7, 0xffffff00);
|
||||
mc->font->draw(desc, xx + 30, yy + 18, 0xffffffff);
|
||||
}
|
||||
|
||||
glPushMatrix();
|
||||
glRotatef(180, 1, 0, 0);
|
||||
Lighting::turnOn();
|
||||
glPopMatrix();
|
||||
glDisable(GL_LIGHTING);
|
||||
glEnable(GL_RESCALE_NORMAL);
|
||||
glEnable(GL_COLOR_MATERIAL);
|
||||
|
||||
glEnable(GL_LIGHTING);
|
||||
ir->renderGuiItem(mc->font, mc->textures, ach->icon, xx + 8, yy + 8);
|
||||
glDisable(GL_LIGHTING);
|
||||
|
||||
glDepthMask(true);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
#endif
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
#include "GuiComponent.h"
|
||||
class Achievement;
|
||||
class ItemRenderer;
|
||||
using namespace std;
|
||||
|
||||
class AchievementPopup : public GuiComponent
|
||||
{
|
||||
private:
|
||||
Minecraft *mc;
|
||||
int width, height;
|
||||
|
||||
wstring title;
|
||||
wstring desc;
|
||||
Achievement *ach;
|
||||
__int64 startTime;
|
||||
ItemRenderer *ir;
|
||||
bool isHelper;
|
||||
|
||||
public:
|
||||
AchievementPopup(Minecraft *mc);
|
||||
void popup(Achievement *ach);
|
||||
void permanent(Achievement *ach);
|
||||
private:
|
||||
void prepareWindow();
|
||||
public:
|
||||
void render();
|
||||
};
|
||||
@@ -0,0 +1,426 @@
|
||||
#include "stdafx.h"
|
||||
#include "AchievementScreen.h"
|
||||
#include "SmallButton.h"
|
||||
#include "Options.h"
|
||||
#include "KeyMapping.h"
|
||||
#include "Font.h"
|
||||
#include "Lighting.h"
|
||||
#include "Textures.h"
|
||||
#include "StatsCounter.h"
|
||||
#include "ItemRenderer.h"
|
||||
#include "..\Minecraft.World\System.h"
|
||||
#include "..\Minecraft.World\net.minecraft.locale.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.level.tile.h"
|
||||
#include "..\Minecraft.World\JavaMath.h"
|
||||
|
||||
|
||||
|
||||
AchievementScreen::AchievementScreen(StatsCounter *statsCounter)
|
||||
{
|
||||
// 4J - added initialisers
|
||||
imageWidth = 256;
|
||||
imageHeight = 202;
|
||||
xLastScroll = 0;
|
||||
yLastScroll = 0;
|
||||
scrolling = 0;
|
||||
|
||||
// 4J - TODO - investigate - these were static final ints before, but based on members of Achievements which
|
||||
// aren't final Or actually initialised
|
||||
xMin = Achievements::xMin * ACHIEVEMENT_COORD_SCALE - BIGMAP_WIDTH / 2;
|
||||
yMin = Achievements::yMin * ACHIEVEMENT_COORD_SCALE - BIGMAP_WIDTH / 2;
|
||||
xMax = Achievements::xMax * ACHIEVEMENT_COORD_SCALE - BIGMAP_HEIGHT / 2;
|
||||
yMax = Achievements::yMax * ACHIEVEMENT_COORD_SCALE - BIGMAP_HEIGHT / 2;
|
||||
|
||||
this->statsCounter = statsCounter;
|
||||
int wBigMap = 141;
|
||||
int hBigMap = 141;
|
||||
|
||||
xScrollO = xScrollP = xScrollTarget = Achievements::openInventory->x * ACHIEVEMENT_COORD_SCALE - wBigMap / 2 - 12;
|
||||
yScrollO = yScrollP = yScrollTarget = Achievements::openInventory->y * ACHIEVEMENT_COORD_SCALE - hBigMap / 2;
|
||||
|
||||
}
|
||||
|
||||
void AchievementScreen::init()
|
||||
{
|
||||
buttons.clear();
|
||||
// buttons.add(new SmallButton(0, width / 2 - 80 - 24, height / 2 + 74, 110, 20, I18n.get("gui.achievements")));
|
||||
buttons.push_back(new SmallButton(1, width / 2 + 24, height / 2 + 74, 80, 20, I18n::get(L"gui.done")));
|
||||
|
||||
}
|
||||
|
||||
void AchievementScreen::buttonClicked(Button *button)
|
||||
{
|
||||
if (button->id == 1)
|
||||
{
|
||||
minecraft->setScreen(NULL);
|
||||
// minecraft->grabMouse(); // 4J removed
|
||||
}
|
||||
Screen::buttonClicked(button);
|
||||
}
|
||||
|
||||
void AchievementScreen::keyPressed(char eventCharacter, int eventKey)
|
||||
{
|
||||
if (eventKey == minecraft->options->keyBuild->key)
|
||||
{
|
||||
minecraft->setScreen(NULL);
|
||||
// minecraft->grabMouse(); // 4J removed
|
||||
}
|
||||
else
|
||||
{
|
||||
Screen::keyPressed(eventCharacter, eventKey);
|
||||
}
|
||||
}
|
||||
|
||||
void AchievementScreen::render(int mouseX, int mouseY, float a)
|
||||
{
|
||||
if (Mouse::isButtonDown(0))
|
||||
{
|
||||
int xo = (width - imageWidth) / 2;
|
||||
int yo = (height - imageHeight) / 2;
|
||||
|
||||
int xBigMap = xo + 8;
|
||||
int yBigMap = yo + 17;
|
||||
|
||||
if (scrolling == 0 || scrolling == 1)
|
||||
{
|
||||
if (mouseX >= xBigMap && mouseX < xBigMap + BIGMAP_WIDTH && mouseY >= yBigMap && mouseY < yBigMap + BIGMAP_HEIGHT)
|
||||
{
|
||||
if (scrolling == 0)
|
||||
{
|
||||
scrolling = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
xScrollP -= mouseX - xLastScroll;
|
||||
yScrollP -= mouseY - yLastScroll;
|
||||
xScrollTarget = xScrollO = xScrollP;
|
||||
yScrollTarget = yScrollO = yScrollP;
|
||||
}
|
||||
xLastScroll = mouseX;
|
||||
yLastScroll = mouseY;
|
||||
}
|
||||
}
|
||||
|
||||
if (xScrollTarget < xMin) xScrollTarget = xMin;
|
||||
if (yScrollTarget < yMin) yScrollTarget = yMin;
|
||||
if (xScrollTarget >= xMax) xScrollTarget = xMax - 1;
|
||||
if (yScrollTarget >= yMax) yScrollTarget = yMax - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
scrolling = 0;
|
||||
}
|
||||
|
||||
renderBackground();
|
||||
|
||||
renderBg(mouseX, mouseY, a);
|
||||
|
||||
glDisable(GL_LIGHTING);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
|
||||
renderLabels();
|
||||
|
||||
glEnable(GL_LIGHTING);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
|
||||
}
|
||||
|
||||
void AchievementScreen::tick()
|
||||
{
|
||||
xScrollO = xScrollP;
|
||||
yScrollO = yScrollP;
|
||||
|
||||
double xd = (xScrollTarget - xScrollP);
|
||||
double yd = (yScrollTarget - yScrollP);
|
||||
if (xd * xd + yd * yd < 4)
|
||||
{
|
||||
xScrollP += xd;
|
||||
yScrollP += yd;
|
||||
}
|
||||
else
|
||||
{
|
||||
xScrollP += xd * 0.85;
|
||||
yScrollP += yd * 0.85;
|
||||
}
|
||||
}
|
||||
|
||||
void AchievementScreen::renderLabels()
|
||||
{
|
||||
int xo = (width - imageWidth) / 2;
|
||||
int yo = (height - imageHeight) / 2;
|
||||
font->draw(L"Achievements", xo + 15, yo + 5, 0x404040);
|
||||
|
||||
// font.draw(xScrollP + ", " + yScrollP, xo + 5, yo + 5 + BIGMAP_HEIGHT + 18, 0x404040);
|
||||
// font.drawWordWrap("Ride a pig off a cliff.", xo + 5, yo + 5 + BIGMAP_HEIGHT + 16, BIGMAP_WIDTH, 0x404040);
|
||||
|
||||
}
|
||||
|
||||
void AchievementScreen::renderBg(int xm, int ym, float a)
|
||||
{
|
||||
// 4J Unused
|
||||
#if 0
|
||||
int xScroll = Mth::floor(xScrollO + (xScrollP - xScrollO) * a);
|
||||
int yScroll = Mth::floor(yScrollO + (yScrollP - yScrollO) * a);
|
||||
|
||||
if (xScroll < xMin) xScroll = xMin;
|
||||
if (yScroll < yMin) yScroll = yMin;
|
||||
if (xScroll >= xMax) xScroll = xMax - 1;
|
||||
if (yScroll >= yMax) yScroll = yMax - 1;
|
||||
|
||||
|
||||
int terrainTex = minecraft->textures->loadTexture(L"/terrain.png");
|
||||
int tex = minecraft->textures->loadTexture(L"/achievement/bg.png");
|
||||
|
||||
int xo = (width - imageWidth) / 2;
|
||||
int yo = (height - imageHeight) / 2;
|
||||
|
||||
int xBigMap = xo + BIGMAP_X;
|
||||
int yBigMap = yo + BIGMAP_Y;
|
||||
|
||||
blitOffset = 0;
|
||||
// glDisable(GL_DEPTH_TEST);
|
||||
glDepthFunc(GL_GEQUAL);
|
||||
glPushMatrix();
|
||||
glTranslatef(0, 0, -200);
|
||||
|
||||
{
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
glDisable(GL_LIGHTING);
|
||||
glEnable(GL_RESCALE_NORMAL);
|
||||
glEnable(GL_COLOR_MATERIAL);
|
||||
|
||||
minecraft->textures->bind(terrainTex);
|
||||
|
||||
int leftTile = (xScroll + EDGE_VALUE_X) >> 4;
|
||||
int topTile = (yScroll + EDGE_VALUE_Y) >> 4;
|
||||
int xMod = (xScroll + EDGE_VALUE_X) % 16;
|
||||
int yMod = (yScroll + EDGE_VALUE_Y) % 16;
|
||||
|
||||
const int rockLevel = (Achievements::ACHIEVEMENT_HEIGHT_POSITION * 4) / 10;
|
||||
const int coalLevel = (Achievements::ACHIEVEMENT_HEIGHT_POSITION * 7) / 10;
|
||||
const int ironLevel = (Achievements::ACHIEVEMENT_HEIGHT_POSITION * 9) / 10;
|
||||
const int diamondLevel = (Achievements::ACHIEVEMENT_HEIGHT_POSITION * 19) / 10;
|
||||
const int bedrockLevel = (Achievements::ACHIEVEMENT_HEIGHT_POSITION * 31) / 10;
|
||||
|
||||
Random *random = new Random();
|
||||
|
||||
for (int tileY = 0; (tileY * 16) - yMod < BIGMAP_HEIGHT; tileY++)
|
||||
{
|
||||
|
||||
float amount = .6f - (float) (topTile + tileY) / (float) (Achievements::ACHIEVEMENT_HEIGHT_POSITION * 2 + 1) * .3f;
|
||||
glColor4f(amount, amount, amount, 1);
|
||||
|
||||
for (int tileX = 0; (tileX * 16) - xMod < BIGMAP_WIDTH; tileX++)
|
||||
{
|
||||
|
||||
random->setSeed(1234 + leftTile + tileX);
|
||||
random->nextInt();
|
||||
int heightValue = random->nextInt(1 + topTile + tileY) + (topTile + tileY) / 2;
|
||||
int tileType = Tile::sand->tex;
|
||||
|
||||
if (heightValue > bedrockLevel || (topTile + tileY) == MAX_BG_TILE_Y)
|
||||
{
|
||||
tileType = Tile::unbreakable->tex;
|
||||
}
|
||||
else if (heightValue == diamondLevel)
|
||||
{
|
||||
if (random->nextInt(2) == 0)
|
||||
{
|
||||
tileType = Tile::diamondOre->tex;
|
||||
}
|
||||
else
|
||||
{
|
||||
tileType = Tile::redStoneOre->tex;
|
||||
}
|
||||
}
|
||||
else if (heightValue == ironLevel)
|
||||
{
|
||||
tileType = Tile::ironOre->tex;
|
||||
}
|
||||
else if (heightValue == coalLevel)
|
||||
{
|
||||
tileType = Tile::coalOre->tex;
|
||||
}
|
||||
else if (heightValue > rockLevel)
|
||||
{
|
||||
tileType = Tile::rock->tex;
|
||||
}
|
||||
else if (heightValue > 0)
|
||||
{
|
||||
tileType = Tile::dirt->tex;
|
||||
}
|
||||
|
||||
this->blit(xBigMap + tileX * 16 - xMod, yBigMap + tileY * 16 - yMod, (tileType % 16) << 4, (tileType >> 4) << 4, 16, 16);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
|
||||
|
||||
glDepthFunc(GL_LEQUAL);
|
||||
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
|
||||
AUTO_VAR(itEnd, Achievements::achievements->end());
|
||||
for (AUTO_VAR(it, Achievements::achievements->begin()); it != itEnd; it++)
|
||||
{
|
||||
Achievement *ach = *it; //Achievements::achievements->at(i);
|
||||
if (ach->requires == NULL) continue;
|
||||
|
||||
int x1 = ach->x * ACHIEVEMENT_COORD_SCALE - (int) xScroll + 11 + xBigMap;
|
||||
int y1 = ach->y * ACHIEVEMENT_COORD_SCALE - (int) yScroll + 11 + yBigMap;
|
||||
|
||||
int x2 = ach->requires->x * ACHIEVEMENT_COORD_SCALE - (int) xScroll + 11 + xBigMap;
|
||||
int y2 = ach->requires->y * ACHIEVEMENT_COORD_SCALE - (int) yScroll + 11 + yBigMap;
|
||||
|
||||
int color = 0;
|
||||
|
||||
bool taken = statsCounter->hasTaken(ach);
|
||||
bool canTake = statsCounter->canTake(ach);
|
||||
|
||||
int alph = (int) (sin(System::currentTimeMillis() % 600 / 600.0 * PI * 2) > 0.6 ? 255 : 130);
|
||||
if (taken) color = 0xff707070;
|
||||
else if (canTake) color = 0x00ff00 + (alph << 24);
|
||||
else color = 0xff000000;
|
||||
|
||||
hLine(x1, x2, y1, color);
|
||||
vLine(x2, y1, y2, color);
|
||||
}
|
||||
|
||||
Achievement *hoveredAchievement = NULL;
|
||||
ItemRenderer *ir = new ItemRenderer();
|
||||
|
||||
glPushMatrix();
|
||||
glRotatef(180, 1, 0, 0);
|
||||
Lighting::turnOn();
|
||||
glPopMatrix();
|
||||
glDisable(GL_LIGHTING);
|
||||
glEnable(GL_RESCALE_NORMAL);
|
||||
glEnable(GL_COLOR_MATERIAL);
|
||||
|
||||
itEnd = Achievements::achievements->end();
|
||||
for (AUTO_VAR(it, Achievements::achievements->begin()); it != itEnd; it++)
|
||||
{
|
||||
Achievement *ach = *it; //Achievements::achievements->at(i);
|
||||
|
||||
int x = ach->x * ACHIEVEMENT_COORD_SCALE - (int) xScroll;
|
||||
int y = ach->y * ACHIEVEMENT_COORD_SCALE - (int) yScroll;
|
||||
|
||||
if (x >= -24 && y >= -24 && x <= BIGMAP_WIDTH && y <= BIGMAP_HEIGHT)
|
||||
{
|
||||
|
||||
if (statsCounter->hasTaken(ach))
|
||||
{
|
||||
float br = 1.0f;
|
||||
glColor4f(br, br, br, 1);
|
||||
}
|
||||
else if (statsCounter->canTake(ach))
|
||||
{
|
||||
float br = (sin(System::currentTimeMillis() % 600 / 600.0 * PI * 2) < 0.6 ? 0.6f : 0.8f);
|
||||
glColor4f(br, br, br, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
float br = 0.3f;
|
||||
glColor4f(br, br, br, 1);
|
||||
}
|
||||
|
||||
minecraft->textures->bind(tex);
|
||||
int xx = xBigMap + x;
|
||||
int yy = yBigMap + y;
|
||||
if (ach->isGolden())
|
||||
{
|
||||
this->blit(xx - 2, yy - 2, 26, 202, 26, 26);
|
||||
}
|
||||
else
|
||||
{
|
||||
this->blit(xx - 2, yy - 2, 0, 202, 26, 26);
|
||||
}
|
||||
|
||||
if (!statsCounter->canTake(ach))
|
||||
{
|
||||
float br = 0.1f;
|
||||
glColor4f(br, br, br, 1);
|
||||
ir->setColor = false;
|
||||
}
|
||||
glEnable(GL_LIGHTING);
|
||||
glEnable(GL_CULL_FACE);
|
||||
ir->renderGuiItem(minecraft->font, minecraft->textures, ach->icon, xx + 3, yy + 3);
|
||||
glDisable(GL_LIGHTING);
|
||||
if (!statsCounter->canTake(ach))
|
||||
{
|
||||
ir->setColor = true;
|
||||
}
|
||||
glColor4f(1, 1, 1, 1);
|
||||
|
||||
|
||||
if (xm >= xBigMap && ym >= yBigMap && xm < xBigMap + BIGMAP_WIDTH && ym < yBigMap + BIGMAP_HEIGHT && xm >= xx && xm <= xx + 22 && ym >= yy && ym <= yy + 22) {
|
||||
hoveredAchievement = ach;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glEnable(GL_BLEND);
|
||||
glColor4f(1, 1, 1, 1);
|
||||
minecraft->textures->bind(tex);
|
||||
blit(xo, yo, 0, 0, imageWidth, imageHeight);
|
||||
|
||||
|
||||
glPopMatrix();
|
||||
|
||||
blitOffset = 0;
|
||||
glDepthFunc(GL_LEQUAL);
|
||||
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
Screen::render(xm, ym, a);
|
||||
|
||||
if (hoveredAchievement != NULL)
|
||||
{
|
||||
Achievement *ach = hoveredAchievement;
|
||||
wstring name = ach->name;
|
||||
wstring descr = ach->getDescription();
|
||||
|
||||
int x = xm + 12;
|
||||
int y = ym - 4;
|
||||
|
||||
if (statsCounter->canTake(ach))
|
||||
{
|
||||
int width = Math::_max(font->width(name), 120);
|
||||
int height = font->wordWrapHeight(descr, width);
|
||||
if (statsCounter->hasTaken(ach))
|
||||
{
|
||||
height += 12;
|
||||
}
|
||||
fillGradient(x - 3, y - 3, x + width + 3, y + height + 3 + 12, 0xc0000000, 0xc0000000);
|
||||
|
||||
font->drawWordWrap(descr, x, y + 12, width, 0xffa0a0a0);
|
||||
if (statsCounter->hasTaken(ach))
|
||||
{
|
||||
font->drawShadow(I18n::get(L"achievement.taken"), x, y + height + 4, 0xff9090ff);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int width = Math::_max(font->width(name), 120);
|
||||
wstring msg = I18n::get(L"achievement.requires", ach->requires->name);
|
||||
int height = font->wordWrapHeight(msg, width);
|
||||
fillGradient(x - 3, y - 3, x + width + 3, y + height + 12 + 3, 0xc0000000, 0xc0000000);
|
||||
font->drawWordWrap(msg, x, y + 12, width, 0xff705050);
|
||||
}
|
||||
font->drawShadow(name, x, y, statsCounter->canTake(ach) ? ach->isGolden() ? 0xffffff80 : 0xffffffff : ach->isGolden() ? 0xff808040 : 0xff808080);
|
||||
|
||||
|
||||
}
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glEnable(GL_LIGHTING);
|
||||
Lighting::turnOff();
|
||||
#endif
|
||||
}
|
||||
|
||||
bool AchievementScreen::isPauseScreen()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
#pragma once
|
||||
#include "Screen.h"
|
||||
#include "..\Minecraft.World\net.minecraft.stats.h"
|
||||
class StatsCounter;
|
||||
|
||||
class AchievementScreen : public Screen
|
||||
{
|
||||
private:
|
||||
static const int BIGMAP_X = 16;
|
||||
static const int BIGMAP_Y = 17;
|
||||
static const int BIGMAP_WIDTH = 224;
|
||||
static const int BIGMAP_HEIGHT = 155;
|
||||
|
||||
// number of pixels per achievement
|
||||
static const int ACHIEVEMENT_COORD_SCALE = 24;
|
||||
static const int EDGE_VALUE_X = Achievements::ACHIEVEMENT_WIDTH_POSITION * ACHIEVEMENT_COORD_SCALE;
|
||||
static const int EDGE_VALUE_Y = Achievements::ACHIEVEMENT_HEIGHT_POSITION * ACHIEVEMENT_COORD_SCALE;
|
||||
|
||||
int xMin;
|
||||
int yMin;
|
||||
int xMax;
|
||||
int yMax;
|
||||
|
||||
static const int MAX_BG_TILE_Y = (EDGE_VALUE_Y * 2 - 1) / 16;
|
||||
|
||||
protected:
|
||||
int imageWidth;
|
||||
int imageHeight;
|
||||
int xLastScroll;
|
||||
int yLastScroll;
|
||||
|
||||
protected:
|
||||
double xScrollO, yScrollO;
|
||||
double xScrollP, yScrollP;
|
||||
double xScrollTarget, yScrollTarget;
|
||||
|
||||
private:
|
||||
int scrolling;
|
||||
StatsCounter *statsCounter;
|
||||
|
||||
public:
|
||||
using Screen::keyPressed;
|
||||
|
||||
AchievementScreen(StatsCounter *statsCounter);
|
||||
virtual void init();
|
||||
protected:
|
||||
virtual void buttonClicked(Button *button);
|
||||
virtual void keyPressed(char eventCharacter, int eventKey);
|
||||
public:
|
||||
virtual void render(int mouseX, int mouseY, float a);
|
||||
virtual void tick();
|
||||
protected:
|
||||
virtual void renderLabels();
|
||||
virtual void renderBg(int xm, int ym, float a);
|
||||
public:
|
||||
virtual bool isPauseScreen();
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
#include "stdafx.h"
|
||||
#include "AllowAllCuller.h"
|
||||
|
||||
bool AllowAllCuller::isVisible(AABB *bb)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AllowAllCuller::cubeInFrustum(double x0, double y0, double z0, double x1, double y1, double z1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AllowAllCuller::cubeFullyInFrustum(double x0, double y0, double z0, double x1, double y1, double z1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void AllowAllCuller::prepare(double xOff, double yOff, double zOff)
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
#include "Culler.h"
|
||||
|
||||
class AllowAllCuller
|
||||
{
|
||||
public:
|
||||
virtual bool isVisible(AABB *bb);
|
||||
virtual bool cubeInFrustum(double x0, double y0, double z0, double x1, double y1, double z1);
|
||||
virtual bool cubeFullyInFrustum(double x0, double y0, double z0, double x1, double y1, double z1);
|
||||
virtual void prepare(double xOff, double yOff, double zOff);
|
||||
};
|
||||
@@ -0,0 +1,215 @@
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "..\Minecraft.World\StringHelpers.h"
|
||||
#include "..\Minecraft.World\compression.h"
|
||||
|
||||
#include "ArchiveFile.h"
|
||||
|
||||
void ArchiveFile::_readHeader(DataInputStream *dis)
|
||||
{
|
||||
int numberOfFiles = dis->readInt();
|
||||
|
||||
for (int i = 0; i < numberOfFiles; i++)
|
||||
{
|
||||
MetaData *meta = new MetaData();
|
||||
meta->filename = dis->readUTF();
|
||||
meta->ptr = dis->readInt();
|
||||
meta->filesize = dis->readInt();
|
||||
|
||||
// Filenames preceeded by an asterisk have been compressed.
|
||||
if (meta->filename[0] == '*')
|
||||
{
|
||||
meta->filename = meta->filename.substr(1);
|
||||
meta->isCompressed = true;
|
||||
}
|
||||
else meta->isCompressed = false;
|
||||
|
||||
m_index.insert( pair<wstring,PMetaData>(meta->filename,meta) );
|
||||
}
|
||||
}
|
||||
|
||||
ArchiveFile::ArchiveFile(File file)
|
||||
{
|
||||
m_cachedData = NULL;
|
||||
m_sourcefile = file;
|
||||
app.DebugPrintf("Loading archive file...\n");
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
char buf[256];
|
||||
wcstombs(buf, file.getPath().c_str(), 256);
|
||||
app.DebugPrintf("archive file - %s\n",buf);
|
||||
#endif
|
||||
|
||||
if(!file.exists())
|
||||
{
|
||||
app.DebugPrintf("Failed to load archive file!\n");//,file.getPath());
|
||||
app.FatalLoadError();
|
||||
}
|
||||
|
||||
FileInputStream fis(file);
|
||||
|
||||
#if defined _XBOX_ONE || defined __ORBIS__ || defined _WINDOWS64
|
||||
byteArray readArray(file.length());
|
||||
fis.read(readArray,0,file.length());
|
||||
|
||||
ByteArrayInputStream bais(readArray);
|
||||
DataInputStream dis(&bais);
|
||||
|
||||
m_cachedData = readArray.data;
|
||||
#else
|
||||
DataInputStream dis(&fis);
|
||||
#endif
|
||||
|
||||
_readHeader(&dis);
|
||||
|
||||
dis.close();
|
||||
fis.close();
|
||||
#if defined _XBOX_ONE || defined __ORBIS__ || defined _WINDOWS64
|
||||
bais.reset();
|
||||
#endif
|
||||
app.DebugPrintf("Finished loading archive file\n");
|
||||
}
|
||||
|
||||
ArchiveFile::~ArchiveFile()
|
||||
{
|
||||
delete m_cachedData;
|
||||
}
|
||||
|
||||
vector<wstring> *ArchiveFile::getFileList()
|
||||
{
|
||||
vector<wstring> *out = new vector<wstring>();
|
||||
|
||||
for ( AUTO_VAR(it, m_index.begin());
|
||||
it != m_index.end();
|
||||
it++ )
|
||||
|
||||
out->push_back( it->first );
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
bool ArchiveFile::hasFile(const wstring &filename)
|
||||
{
|
||||
return m_index.find(filename) != m_index.end();
|
||||
}
|
||||
|
||||
int ArchiveFile::getFileSize(const wstring &filename)
|
||||
{
|
||||
return hasFile(filename) ? m_index.at(filename)->filesize : -1;
|
||||
}
|
||||
|
||||
byteArray ArchiveFile::getFile(const wstring &filename)
|
||||
{
|
||||
byteArray out;
|
||||
AUTO_VAR(it,m_index.find(filename));
|
||||
|
||||
if(it == m_index.end())
|
||||
{
|
||||
app.DebugPrintf("Couldn't find file in archive\n");
|
||||
app.DebugPrintf("Failed to find file '%ls' in archive\n", filename.c_str());
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
__debugbreak();
|
||||
#endif
|
||||
app.FatalLoadError();
|
||||
}
|
||||
else
|
||||
{
|
||||
PMetaData data = it->second;
|
||||
|
||||
#if defined _XBOX_ONE || defined __ORBIS__ || defined _WINDOWS64
|
||||
out = byteArray(data->filesize );
|
||||
|
||||
memcpy( out.data, m_cachedData + data->ptr, data->filesize );
|
||||
#else
|
||||
|
||||
#ifdef _UNICODE
|
||||
HANDLE hfile = CreateFile( m_sourcefile.getPath().c_str(),
|
||||
GENERIC_READ,
|
||||
0,
|
||||
NULL,
|
||||
OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_NORMAL,
|
||||
NULL
|
||||
);
|
||||
#else
|
||||
app.DebugPrintf("Createfile archive\n");
|
||||
HANDLE hfile = CreateFile( wstringtofilename(m_sourcefile.getPath()),
|
||||
GENERIC_READ,
|
||||
0,
|
||||
NULL,
|
||||
OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_NORMAL,
|
||||
NULL
|
||||
);
|
||||
#endif
|
||||
|
||||
if (hfile != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
app.DebugPrintf("hfile ok\n");
|
||||
DWORD ok = SetFilePointer( hfile,
|
||||
data->ptr,
|
||||
NULL,
|
||||
FILE_BEGIN
|
||||
);
|
||||
|
||||
if (ok != INVALID_SET_FILE_POINTER)
|
||||
{
|
||||
PBYTE pbData = new BYTE[ data->filesize ];
|
||||
|
||||
DWORD bytesRead = -1;
|
||||
BOOL bSuccess = ReadFile( hfile,
|
||||
(LPVOID) pbData,
|
||||
data->filesize,
|
||||
&bytesRead,
|
||||
NULL
|
||||
);
|
||||
|
||||
if(bSuccess==FALSE)
|
||||
{
|
||||
app.FatalLoadError();
|
||||
}
|
||||
assert(bytesRead == data->filesize);
|
||||
out = byteArray(pbData, data->filesize);
|
||||
}
|
||||
else
|
||||
{
|
||||
app.FatalLoadError();
|
||||
}
|
||||
|
||||
CloseHandle(hfile);
|
||||
}
|
||||
else
|
||||
{
|
||||
app.DebugPrintf("bad hfile\n");
|
||||
app.FatalLoadError();
|
||||
}
|
||||
#endif
|
||||
|
||||
// Compressed filenames are preceeded with an asterisk.
|
||||
if ( data->isCompressed && out.data != NULL )
|
||||
{
|
||||
/* 4J-JEV:
|
||||
* If a compressed file is accessed before compression object is
|
||||
* initialized it will crash here (Compression::getCompression).
|
||||
*/
|
||||
///4 279 553 556
|
||||
|
||||
ByteArrayInputStream bais(out);
|
||||
DataInputStream dis(&bais);
|
||||
unsigned int decompressedSize = dis.readInt();
|
||||
dis.close();
|
||||
|
||||
PBYTE uncompressedBuffer = new BYTE[decompressedSize];
|
||||
Compression::getCompression()->Decompress(uncompressedBuffer, &decompressedSize, out.data+4, out.length-4);
|
||||
|
||||
delete [] out.data;
|
||||
|
||||
out.data = uncompressedBuffer;
|
||||
out.length = decompressedSize;
|
||||
}
|
||||
|
||||
assert(out.data != NULL); // THERE IS NO FILE WITH THIS NAME!
|
||||
|
||||
}
|
||||
|
||||
return out;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "..\Minecraft.World\File.h"
|
||||
#include "..\Minecraft.World\ArrayWithLength.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
class ArchiveFile
|
||||
{
|
||||
protected:
|
||||
File m_sourcefile;
|
||||
BYTE *m_cachedData;
|
||||
|
||||
typedef struct _MetaData
|
||||
{
|
||||
wstring filename;
|
||||
int ptr;
|
||||
int filesize;
|
||||
bool isCompressed;
|
||||
|
||||
} MetaData, *PMetaData;
|
||||
|
||||
unordered_map<wstring, PMetaData> m_index;
|
||||
|
||||
public:
|
||||
void _readHeader(DataInputStream *dis);
|
||||
|
||||
ArchiveFile(File file);
|
||||
~ArchiveFile();
|
||||
|
||||
vector<wstring> *getFileList();
|
||||
bool hasFile(const wstring &filename);
|
||||
int getFileSize(const wstring &filename);
|
||||
byteArray getFile(const wstring &filename);
|
||||
};
|
||||
@@ -0,0 +1,93 @@
|
||||
#include "stdafx.h"
|
||||
#include "ArrowRenderer.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.entity.projectile.h"
|
||||
#include "..\Minecraft.World\Mth.h"
|
||||
|
||||
ResourceLocation ArrowRenderer::ARROW_LOCATION = ResourceLocation(TN_ITEM_ARROWS);
|
||||
|
||||
void ArrowRenderer::render(shared_ptr<Entity> _arrow, double x, double y, double z, float rot, float a)
|
||||
{
|
||||
// 4J - original version used generics and thus had an input parameter of type Arrow rather than shared_ptr<Entity> we have here -
|
||||
// do some casting around instead
|
||||
shared_ptr<Arrow> arrow = dynamic_pointer_cast<Arrow>(_arrow);
|
||||
bindTexture(_arrow); // 4J - was L"/item/arrows.png"
|
||||
|
||||
glPushMatrix();
|
||||
|
||||
float yRot = arrow->yRot;
|
||||
float xRot = arrow->xRot;
|
||||
float yRotO = arrow->yRotO;
|
||||
float xRotO = arrow->xRotO;
|
||||
if( ( yRot - yRotO ) > 180.0f ) yRot -= 360.0f;
|
||||
else if( ( yRot - yRotO ) < -180.0f ) yRot += 360.0f;
|
||||
if( ( xRot - xRotO ) > 180.0f ) xRot -= 360.0f;
|
||||
else if( ( xRot - xRotO ) < -180.0f ) xRot += 360.0f;
|
||||
|
||||
glTranslatef((float)x, (float)y, (float)z);
|
||||
glRotatef(yRotO + (yRot - yRotO) * a - 90, 0, 1, 0);
|
||||
glRotatef(xRotO + (xRot - xRotO) * a, 0, 0, 1);
|
||||
|
||||
Tesselator *t = Tesselator::getInstance();
|
||||
int type = 0;
|
||||
|
||||
float u0 = 0 / 32.0f;
|
||||
float u1 = 16 / 32.0f;
|
||||
float v0 = (0 + type * 10) / 32.0f;
|
||||
float v1 = (5 + type * 10) / 32.0f;
|
||||
|
||||
float u02 = 0 / 32.0f;
|
||||
float u12 = 5 / 32.0f;
|
||||
float v02 = (5 + type * 10) / 32.0f;
|
||||
float v12 = (10 + type * 10) / 32.0f;
|
||||
float ss = 0.9f / 16.0f;
|
||||
glEnable(GL_RESCALE_NORMAL);
|
||||
float shake = arrow->shakeTime-a;
|
||||
if (shake>0)
|
||||
{
|
||||
float pow = -Mth::sin(shake*3)*shake;
|
||||
glRotatef(pow, 0, 0, 1);
|
||||
}
|
||||
glRotatef(45, 1, 0, 0);
|
||||
glScalef(ss, ss, ss);
|
||||
|
||||
glTranslatef(-4, 0, 0);
|
||||
|
||||
// glNormal3f(ss, 0, 0); // 4J - changed to use tesselator
|
||||
t->begin();
|
||||
t->normal(1,0,0);
|
||||
t->vertexUV((float)(-7), (float)( -2), (float)( -2), (float)( u02), (float)( v02));
|
||||
t->vertexUV((float)(-7), (float)( -2), (float)( +2), (float)( u12), (float)( v02));
|
||||
t->vertexUV((float)(-7), (float)( +2), (float)( +2), (float)( u12), (float)( v12));
|
||||
t->vertexUV((float)(-7), (float)( +2), (float)( -2), (float)( u02), (float)( v12));
|
||||
t->end();
|
||||
|
||||
// glNormal3f(-ss, 0, 0); // 4J - changed to use tesselator
|
||||
t->begin();
|
||||
t->normal(-1,0,0);
|
||||
t->vertexUV((float)(-7), (float)( +2), (float)( -2), (float)( u02), (float)( v02));
|
||||
t->vertexUV((float)(-7), (float)( +2), (float)( +2), (float)( u12), (float)( v02));
|
||||
t->vertexUV((float)(-7), (float)( -2), (float)( +2), (float)( u12), (float)( v12));
|
||||
t->vertexUV((float)(-7), (float)( -2), (float)( -2), (float)( u02), (float)( v12));
|
||||
t->end();
|
||||
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
|
||||
glRotatef(90, 1, 0, 0);
|
||||
// glNormal3f(0, 0, ss); // 4J - changed to use tesselator
|
||||
t->begin();
|
||||
t->normal(0,0,1);
|
||||
t->vertexUV((float)(-8), (float)( -2), (float)( 0), (float)( u0), (float)( v0));
|
||||
t->vertexUV((float)(+8), (float)( -2), (float)( 0), (float)( u1), (float)( v0));
|
||||
t->vertexUV((float)(+8), (float)( +2), (float)( 0), (float)( u1), (float)( v1));
|
||||
t->vertexUV((float)(-8), (float)( +2), (float)( 0), (float)( u0), (float)( v1));
|
||||
t->end();
|
||||
}
|
||||
glDisable(GL_RESCALE_NORMAL);
|
||||
glPopMatrix();
|
||||
}
|
||||
|
||||
ResourceLocation *ArrowRenderer::getTextureLocation(shared_ptr<Entity> mob)
|
||||
{
|
||||
return &ARROW_LOCATION;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
#include "EntityRenderer.h"
|
||||
|
||||
class ArrowRenderer : public EntityRenderer
|
||||
{
|
||||
private:
|
||||
static ResourceLocation ARROW_LOCATION;
|
||||
|
||||
public:
|
||||
virtual void render(shared_ptr<Entity> _arrow, double x, double y, double z, float rot, float a);
|
||||
virtual ResourceLocation *getTextureLocation(shared_ptr<Entity> mob);
|
||||
};
|
||||
@@ -0,0 +1,107 @@
|
||||
#include "stdafx.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.entity.ambient.h"
|
||||
#include "BatModel.h"
|
||||
#include "ModelPart.h"
|
||||
|
||||
BatModel::BatModel() : Model()
|
||||
{
|
||||
texWidth = 64;
|
||||
texHeight = 64;
|
||||
|
||||
head = new ModelPart(this, 0, 0);
|
||||
head->addBox(-3, -3, -3, 6, 6, 6);
|
||||
|
||||
ModelPart *rightEar = new ModelPart(this, 24, 0);
|
||||
rightEar->addBox(-4, -6, -2, 3, 4, 1);
|
||||
head->addChild(rightEar);
|
||||
ModelPart *leftEar = new ModelPart(this, 24, 0);
|
||||
leftEar->bMirror = true;
|
||||
leftEar->addBox(1, -6, -2, 3, 4, 1);
|
||||
head->addChild(leftEar);
|
||||
|
||||
body = new ModelPart(this, 0, 16);
|
||||
body->addBox(-3, 4, -3, 6, 12, 6);
|
||||
body->texOffs(0, 34)->addBox(-5, 16, 0, 10, 6, 1);
|
||||
|
||||
rightWing = new ModelPart(this, 42, 0);
|
||||
rightWing->addBox(-12, 1, 1.5f, 10, 16, 1);
|
||||
rightWingTip = new ModelPart(this, 24, 16);
|
||||
rightWingTip->setPos(-12, 1, 1.5f);
|
||||
rightWingTip->addBox(-8, 1, 0, 8, 12, 1);
|
||||
|
||||
leftWing = new ModelPart(this, 42, 0);
|
||||
leftWing->bMirror = true;
|
||||
leftWing->addBox(2, 1, 1.5f, 10, 16, 1);
|
||||
leftWingTip = new ModelPart(this, 24, 16);
|
||||
leftWingTip->bMirror = true;
|
||||
leftWingTip->setPos(12, 1, 1.5f);
|
||||
leftWingTip->addBox(0, 1, 0, 8, 12, 1);
|
||||
|
||||
body->addChild(rightWing);
|
||||
body->addChild(leftWing);
|
||||
rightWing->addChild(rightWingTip);
|
||||
leftWing->addChild(leftWingTip);
|
||||
|
||||
// 4J added - compile now to avoid random performance hit first time cubes are rendered
|
||||
// 4J Stu - Not just performance, but alpha+depth tests don't work right unless we compile here
|
||||
head->compile(1.0f/16.0f);
|
||||
body->compile(1.0f/16.0f);
|
||||
rightWing->compile(1.0f/16.0f);
|
||||
leftWing->compile(1.0f/16.0f);
|
||||
rightWingTip->compile(1.0f/16.0f);
|
||||
leftWingTip->compile(1.0f/16.0f);
|
||||
rightEar->compile(1.0f/16.0f);
|
||||
leftEar->compile(1.0f/16.0f);
|
||||
}
|
||||
|
||||
int BatModel::modelVersion()
|
||||
{
|
||||
return 36;
|
||||
}
|
||||
|
||||
void BatModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled)
|
||||
{
|
||||
shared_ptr<Bat> bat = dynamic_pointer_cast<Bat>(entity);
|
||||
if (bat->isResting())
|
||||
{
|
||||
float rad = 180 / PI;
|
||||
head->xRot = xRot / rad;
|
||||
head->yRot = PI - yRot / rad;
|
||||
head->zRot = PI;
|
||||
|
||||
head->setPos(0, -2, 0);
|
||||
rightWing->setPos(-3, 0, 3);
|
||||
leftWing->setPos(3, 0, 3);
|
||||
|
||||
body->xRot = PI;
|
||||
|
||||
rightWing->xRot = -PI * .05f;
|
||||
rightWing->yRot = -PI * .40f;
|
||||
rightWingTip->yRot = -PI * .55f;
|
||||
leftWing->xRot = rightWing->xRot;
|
||||
leftWing->yRot = -rightWing->yRot;
|
||||
leftWingTip->yRot = -rightWingTip->yRot;
|
||||
}
|
||||
else
|
||||
{
|
||||
float rad = 180 / PI;
|
||||
head->xRot = xRot / rad;
|
||||
head->yRot = yRot / rad;
|
||||
head->zRot = 0;
|
||||
|
||||
head->setPos(0, 0, 0);
|
||||
rightWing->setPos(0, 0, 0);
|
||||
leftWing->setPos(0, 0, 0);
|
||||
|
||||
body->xRot = PI * .25f + cos(bob * .1f) * .15f;
|
||||
body->yRot = 0;
|
||||
|
||||
rightWing->yRot = cos(bob * 1.3f) * PI * .25f;
|
||||
leftWing->yRot = -rightWing->yRot;
|
||||
rightWingTip->yRot = rightWing->yRot * .5f;
|
||||
leftWingTip->yRot = -rightWing->yRot * .5f;
|
||||
}
|
||||
|
||||
head->render(scale, usecompiled);
|
||||
body->render(scale, usecompiled);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
#include "Model.h"
|
||||
|
||||
class BatModel : public Model
|
||||
{
|
||||
private:
|
||||
ModelPart *head;
|
||||
ModelPart *body;
|
||||
ModelPart *rightWing;
|
||||
ModelPart *leftWing;
|
||||
ModelPart *rightWingTip;
|
||||
ModelPart *leftWingTip;
|
||||
|
||||
public:
|
||||
BatModel();
|
||||
|
||||
int modelVersion();
|
||||
|
||||
virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled);
|
||||
};
|
||||
@@ -0,0 +1,50 @@
|
||||
#include "stdafx.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.entity.ambient.h"
|
||||
#include "BatRenderer.h"
|
||||
#include "BatModel.h"
|
||||
|
||||
ResourceLocation BatRenderer::BAT_LOCATION = ResourceLocation(TN_MOB_BAT);
|
||||
|
||||
BatRenderer::BatRenderer() : MobRenderer(new BatModel(), 0.25f)
|
||||
{
|
||||
modelVersion = ((BatModel *)model)->modelVersion();
|
||||
}
|
||||
|
||||
void BatRenderer::render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a)
|
||||
{
|
||||
int modelVersion = (dynamic_cast<BatModel*>(model))->modelVersion();
|
||||
if (modelVersion != this->modelVersion) {
|
||||
this->modelVersion = modelVersion;
|
||||
model = new BatModel();
|
||||
}
|
||||
MobRenderer::render(_mob, x, y, z, rot, a);
|
||||
}
|
||||
|
||||
ResourceLocation *BatRenderer::getTextureLocation(shared_ptr<Entity> mob)
|
||||
{
|
||||
return &BAT_LOCATION;
|
||||
}
|
||||
|
||||
void BatRenderer::scale(shared_ptr<LivingEntity> mob, float a)
|
||||
{
|
||||
glScalef(.35f, .35f, .35f);
|
||||
}
|
||||
|
||||
void BatRenderer::setupPosition(shared_ptr<LivingEntity> mob, double x, double y, double z)
|
||||
{
|
||||
MobRenderer::setupPosition(mob, x, y, z);
|
||||
}
|
||||
|
||||
void BatRenderer::setupRotations(shared_ptr<LivingEntity> _mob, float bob, float bodyRot, float a)
|
||||
{
|
||||
shared_ptr<Bat> mob = dynamic_pointer_cast<Bat>(_mob);
|
||||
if (!mob->isResting())
|
||||
{
|
||||
glTranslatef(0, cos(bob * .3f) * .1f, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
glTranslatef(0, -.1f, 0);
|
||||
}
|
||||
MobRenderer::setupRotations(mob, bob, bodyRot, a);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
#include "MobRenderer.h"
|
||||
|
||||
class BatModel;
|
||||
|
||||
class BatRenderer : public MobRenderer
|
||||
{
|
||||
static ResourceLocation BAT_LOCATION;
|
||||
int modelVersion;
|
||||
|
||||
public:
|
||||
BatRenderer();
|
||||
virtual void render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a);
|
||||
|
||||
protected:
|
||||
virtual ResourceLocation *getTextureLocation(shared_ptr<Entity> mob);
|
||||
virtual void scale(shared_ptr<LivingEntity> mob, float a);
|
||||
virtual void setupPosition(shared_ptr<LivingEntity> mob, double x, double y, double z);
|
||||
virtual void setupRotations(shared_ptr<LivingEntity> mob, float bob, float bodyRot, float a);
|
||||
};
|
||||
@@ -0,0 +1,138 @@
|
||||
#include "stdafx.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.level.tile.entity.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.level.h"
|
||||
#include "BeaconRenderer.h"
|
||||
#include "Tesselator.h"
|
||||
|
||||
ResourceLocation BeaconRenderer::BEAM_LOCATION = ResourceLocation(TN_MISC_BEACON_BEAM);
|
||||
|
||||
void BeaconRenderer::render(shared_ptr<TileEntity> _beacon, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled)
|
||||
{
|
||||
shared_ptr<BeaconTileEntity> beacon = dynamic_pointer_cast<BeaconTileEntity>(_beacon);
|
||||
|
||||
float scale = beacon->getAndUpdateClientSideScale();
|
||||
|
||||
if (scale > 0)
|
||||
{
|
||||
Tesselator *t = Tesselator::getInstance();
|
||||
|
||||
bindTexture(&BEAM_LOCATION);
|
||||
|
||||
// TODO: 4J: Put this back in
|
||||
//assert(0);
|
||||
//glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
|
||||
//glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
|
||||
|
||||
glDisable(GL_LIGHTING);
|
||||
glDisable(GL_CULL_FACE);
|
||||
glDisable(GL_BLEND);
|
||||
glDepthMask(true);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
|
||||
|
||||
float tt = beacon->getLevel()->getGameTime() + a;
|
||||
float texVOff = -tt * .20f - floor(-tt * .10f);
|
||||
|
||||
{
|
||||
int r = 1;
|
||||
|
||||
double rot = tt * .025 * (1 - (r & 1) * 2.5);
|
||||
|
||||
t->begin();
|
||||
t->color(255, 255, 255, 32);
|
||||
|
||||
double rr1 = r * 0.2;
|
||||
|
||||
double wnx = .5 + cos(rot + PI * .75) * rr1;
|
||||
double wnz = .5 + sin(rot + PI * .75) * rr1;
|
||||
double enx = .5 + cos(rot + PI * .25) * rr1;
|
||||
double enz = .5 + sin(rot + PI * .25) * rr1;
|
||||
|
||||
double wsx = .5 + cos(rot + PI * 1.25) * rr1;
|
||||
double wsz = .5 + sin(rot + PI * 1.25) * rr1;
|
||||
double esx = .5 + cos(rot + PI * 1.75) * rr1;
|
||||
double esz = .5 + sin(rot + PI * 1.75) * rr1;
|
||||
|
||||
double top = 256 * scale;
|
||||
|
||||
double uu1 = 0;
|
||||
double uu2 = 1;
|
||||
double vv2 = -1 + texVOff;
|
||||
double vv1 = 256 * scale * (.5 / rr1) + vv2;
|
||||
|
||||
t->vertexUV(x + wnx, y + top, z + wnz, uu2, vv1);
|
||||
t->vertexUV(x + wnx, y, z + wnz, uu2, vv2);
|
||||
t->vertexUV(x + enx, y, z + enz, uu1, vv2);
|
||||
t->vertexUV(x + enx, y + top, z + enz, uu1, vv1);
|
||||
|
||||
t->vertexUV(x + esx, y + top, z + esz, uu2, vv1);
|
||||
t->vertexUV(x + esx, y, z + esz, uu2, vv2);
|
||||
t->vertexUV(x + wsx, y, z + wsz, uu1, vv2);
|
||||
t->vertexUV(x + wsx, y + top, z + wsz, uu1, vv1);
|
||||
|
||||
t->vertexUV(x + enx, y + top, z + enz, uu2, vv1);
|
||||
t->vertexUV(x + enx, y, z + enz, uu2, vv2);
|
||||
t->vertexUV(x + esx, y, z + esz, uu1, vv2);
|
||||
t->vertexUV(x + esx, y + top, z + esz, uu1, vv1);
|
||||
|
||||
t->vertexUV(x + wsx, y + top, z + wsz, uu2, vv1);
|
||||
t->vertexUV(x + wsx, y, z + wsz, uu2, vv2);
|
||||
t->vertexUV(x + wnx, y, z + wnz, uu1, vv2);
|
||||
t->vertexUV(x + wnx, y + top, z + wnz, uu1, vv1);
|
||||
|
||||
t->end();
|
||||
}
|
||||
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glDepthMask(false);
|
||||
|
||||
{
|
||||
t->begin();
|
||||
t->color(255, 255, 255, 32);
|
||||
|
||||
double wnx = .2;
|
||||
double wnz = .2;
|
||||
double enx = .8;
|
||||
double enz = .2;
|
||||
|
||||
double wsx = .2;
|
||||
double wsz = .8;
|
||||
double esx = .8;
|
||||
double esz = .8;
|
||||
|
||||
double top = 256 * scale;
|
||||
|
||||
double uu1 = 0;
|
||||
double uu2 = 1;
|
||||
double vv2 = -1 + texVOff;
|
||||
double vv1 = 256 * scale + vv2;
|
||||
|
||||
t->vertexUV(x + wnx, y + top, z + wnz, uu2, vv1);
|
||||
t->vertexUV(x + wnx, y, z + wnz, uu2, vv2);
|
||||
t->vertexUV(x + enx, y, z + enz, uu1, vv2);
|
||||
t->vertexUV(x + enx, y + top, z + enz, uu1, vv1);
|
||||
|
||||
t->vertexUV(x + esx, y + top, z + esz, uu2, vv1);
|
||||
t->vertexUV(x + esx, y, z + esz, uu2, vv2);
|
||||
t->vertexUV(x + wsx, y, z + wsz, uu1, vv2);
|
||||
t->vertexUV(x + wsx, y + top, z + wsz, uu1, vv1);
|
||||
|
||||
t->vertexUV(x + enx, y + top, z + enz, uu2, vv1);
|
||||
t->vertexUV(x + enx, y, z + enz, uu2, vv2);
|
||||
t->vertexUV(x + esx, y, z + esz, uu1, vv2);
|
||||
t->vertexUV(x + esx, y + top, z + esz, uu1, vv1);
|
||||
|
||||
t->vertexUV(x + wsx, y + top, z + wsz, uu2, vv1);
|
||||
t->vertexUV(x + wsx, y, z + wsz, uu2, vv2);
|
||||
t->vertexUV(x + wnx, y, z + wnz, uu1, vv2);
|
||||
t->vertexUV(x + wnx, y + top, z + wnz, uu1, vv1);
|
||||
|
||||
t->end();
|
||||
}
|
||||
|
||||
glEnable(GL_LIGHTING);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
|
||||
glDepthMask(true);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
#pragma once
|
||||
#include "TileEntityRenderer.h"
|
||||
|
||||
class BeaconTileEntity;
|
||||
|
||||
class BeaconRenderer : public TileEntityRenderer
|
||||
{
|
||||
private:
|
||||
static ResourceLocation BEAM_LOCATION;
|
||||
|
||||
public:
|
||||
virtual void render(shared_ptr<TileEntity> _beacon, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled);
|
||||
};
|
||||
@@ -0,0 +1,75 @@
|
||||
#include "stdafx.h"
|
||||
#include "..\Minecraft.World\Mth.h"
|
||||
#include "BlazeModel.h"
|
||||
#include "ModelPart.h"
|
||||
|
||||
BlazeModel::BlazeModel() : Model()
|
||||
{
|
||||
upperBodyParts = ModelPartArray(12);
|
||||
|
||||
for (unsigned int i = 0; i < upperBodyParts.length; i++)
|
||||
{
|
||||
upperBodyParts[i] = new ModelPart(this, 0, 16);
|
||||
upperBodyParts[i]->addBox(0, 0, 0, 2, 8, 2);
|
||||
}
|
||||
|
||||
head = new ModelPart(this, 0, 0);
|
||||
head->addBox(-4, -4, -4, 8, 8, 8);
|
||||
|
||||
// 4J added - compile now to avoid random performance hit first time cubes are rendered
|
||||
// 4J Stu - Not just performance, but alpha+depth tests don't work right unless we compile here
|
||||
for (unsigned int i = 0; i < upperBodyParts.length; i++)
|
||||
{
|
||||
upperBodyParts[i]->compile(1.0f/16.0f);
|
||||
}
|
||||
head->compile(1.0f/16.0f);
|
||||
}
|
||||
|
||||
int BlazeModel::modelVersion()
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
void BlazeModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled)
|
||||
{
|
||||
setupAnim(time, r, bob, yRot, xRot, scale, entity);
|
||||
|
||||
head->render(scale, usecompiled);
|
||||
for (unsigned int i = 0; i < upperBodyParts.length; i++)
|
||||
{
|
||||
upperBodyParts[i]->render(scale, usecompiled);
|
||||
}
|
||||
}
|
||||
|
||||
void BlazeModel::setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, shared_ptr<Entity> entity, unsigned int uiBitmaskOverrideAnim)
|
||||
{
|
||||
float angle = bob * PI * -.1f;
|
||||
for (int i = 0; i < 4; i++)
|
||||
{
|
||||
upperBodyParts[i]->y = -2 + Mth::cos((i * 2 + bob) * .25f);
|
||||
upperBodyParts[i]->x = Mth::cos(angle) * 9.0f;
|
||||
upperBodyParts[i]->z = Mth::sin(angle) * 9.0f;
|
||||
angle += PI * 0.5f;
|
||||
}
|
||||
angle = .25f * PI + bob * PI * .03f;
|
||||
for (int i = 4; i < 8; i++)
|
||||
{
|
||||
upperBodyParts[i]->y = 2 + Mth::cos((i * 2 + bob) * .25f);
|
||||
upperBodyParts[i]->x = Mth::cos(angle) * 7.0f;
|
||||
upperBodyParts[i]->z = Mth::sin(angle) * 7.0f;
|
||||
angle += PI * 0.5f;
|
||||
}
|
||||
|
||||
angle = .15f * PI + bob * PI * -.05f;
|
||||
for (int i = 8; i < 12; i++)
|
||||
{
|
||||
upperBodyParts[i]->y = 11 + Mth::cos((i * 1.5f + bob) * .5f);
|
||||
upperBodyParts[i]->x = Mth::cos(angle) * 5.0f;
|
||||
upperBodyParts[i]->z = Mth::sin(angle) * 5.0f;
|
||||
angle += PI * 0.5f;
|
||||
}
|
||||
|
||||
head->yRot = yRot / (float) (180 / PI);
|
||||
head->xRot = xRot / (float) (180 / PI);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
#include "Model.h"
|
||||
|
||||
class BlazeModel : public Model
|
||||
{
|
||||
|
||||
private:
|
||||
ModelPartArray upperBodyParts;
|
||||
ModelPart *head;
|
||||
|
||||
public:
|
||||
BlazeModel();
|
||||
int modelVersion();
|
||||
virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled);
|
||||
virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, shared_ptr<Entity> entity, unsigned int uiBitmaskOverrideAnim = 0);
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
#include "stdafx.h"
|
||||
#include "BlazeModel.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.entity.monster.h"
|
||||
#include "BlazeRenderer.h"
|
||||
|
||||
ResourceLocation BlazeRenderer::BLAZE_LOCATION = ResourceLocation(TN_MOB_BLAZE);
|
||||
|
||||
BlazeRenderer::BlazeRenderer() : MobRenderer(new BlazeModel(), 0.5f)
|
||||
{
|
||||
modelVersion = ((BlazeModel *) model)->modelVersion();
|
||||
}
|
||||
|
||||
void BlazeRenderer::render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a)
|
||||
{
|
||||
// 4J - original version used generics and thus had an input parameter of type Blaze rather than shared_ptr<Entity> we have here -
|
||||
// do some casting around instead
|
||||
shared_ptr<Blaze> mob = dynamic_pointer_cast<Blaze>(_mob);
|
||||
|
||||
int modelVersion = ((BlazeModel *) model)->modelVersion();
|
||||
if (modelVersion != this->modelVersion)
|
||||
{
|
||||
this->modelVersion = modelVersion;
|
||||
model = new BlazeModel();
|
||||
}
|
||||
MobRenderer::render(mob, x, y, z, rot, a);
|
||||
}
|
||||
|
||||
ResourceLocation *BlazeRenderer::getTextureLocation(shared_ptr<Entity> mob)
|
||||
{
|
||||
return &BLAZE_LOCATION;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
#include "MobRenderer.h"
|
||||
|
||||
class BlazeRenderer : public MobRenderer
|
||||
{
|
||||
private:
|
||||
static ResourceLocation BLAZE_LOCATION;
|
||||
int modelVersion;
|
||||
|
||||
public:
|
||||
BlazeRenderer();
|
||||
|
||||
virtual void render(shared_ptr<Entity> mob, double x, double y, double z, float rot, float a);
|
||||
virtual ResourceLocation *getTextureLocation(shared_ptr<Entity> mob);
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
#include "stdafx.h"
|
||||
#include "BoatModel.h"
|
||||
|
||||
BoatModel::BoatModel() : Model()
|
||||
{
|
||||
cubes[0] = new ModelPart(this, 0, 8);
|
||||
cubes[1] = new ModelPart(this, 0, 0);
|
||||
cubes[2] = new ModelPart(this, 0, 0);
|
||||
cubes[3] = new ModelPart(this, 0, 0);
|
||||
cubes[4] = new ModelPart(this, 0, 0);
|
||||
|
||||
int w = 24;
|
||||
int d = 6;
|
||||
int h = 20;
|
||||
int yOff = 4;
|
||||
|
||||
cubes[0]->addBox((float)(-w / 2), (float)(-h / 2 + 2), -3, w, h - 4, 4, 0);
|
||||
cubes[0]->setPos(0, (float)(0 + yOff), 0);
|
||||
|
||||
cubes[1]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0);
|
||||
cubes[1]->setPos((float)(-w / 2 + 1), (float)(0 + yOff), 0);
|
||||
|
||||
cubes[2]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0);
|
||||
cubes[2]->setPos((float)(+w / 2 - 1), (float)(0 + yOff), 0);
|
||||
|
||||
cubes[3]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0);
|
||||
cubes[3]->setPos(0, (float)(0 + yOff), (float)(-h / 2 + 1));
|
||||
|
||||
cubes[4]->addBox((float)(-w / 2 + 2), (float)(-d - 1), -1, w - 4, d, 2, 0);
|
||||
cubes[4]->setPos(0, (float)(0 + yOff), (float)(+h / 2 - 1));
|
||||
|
||||
cubes[0]->xRot = PI / 2;
|
||||
cubes[1]->yRot = PI / 2 * 3;
|
||||
cubes[2]->yRot = PI / 2 * 1;
|
||||
cubes[3]->yRot = PI / 2 * 2;
|
||||
|
||||
// 4J added - compile now to avoid random performance hit first time cubes are rendered
|
||||
cubes[0]->compile(1.0f/16.0f);
|
||||
cubes[1]->compile(1.0f/16.0f);
|
||||
cubes[2]->compile(1.0f/16.0f);
|
||||
cubes[3]->compile(1.0f/16.0f);
|
||||
cubes[4]->compile(1.0f/16.0f);
|
||||
}
|
||||
|
||||
void BoatModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled)
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
cubes[i]->render(scale, usecompiled);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
#include "Model.h"
|
||||
#include "ModelPart.h"
|
||||
|
||||
class BoatModel : public Model
|
||||
{
|
||||
public:
|
||||
ModelPart *cubes[5];
|
||||
BoatModel();
|
||||
virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled);
|
||||
};
|
||||
@@ -0,0 +1,47 @@
|
||||
#include "stdafx.h"
|
||||
#include "BoatRenderer.h"
|
||||
#include "BoatModel.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.entity.item.h"
|
||||
#include "..\Minecraft.World\Mth.h"
|
||||
|
||||
ResourceLocation BoatRenderer::BOAT_LOCATION = ResourceLocation(TN_ITEM_BOAT);
|
||||
|
||||
BoatRenderer::BoatRenderer() : EntityRenderer()
|
||||
{
|
||||
this->shadowRadius = 0.5f;
|
||||
model = new BoatModel();
|
||||
}
|
||||
|
||||
void BoatRenderer::render(shared_ptr<Entity> _boat, double x, double y, double z, float rot, float a)
|
||||
{
|
||||
// 4J - original version used generics and thus had an input parameter of type Boat rather than shared_ptr<Entity> we have here -
|
||||
// do some casting around instead
|
||||
shared_ptr<Boat> boat = dynamic_pointer_cast<Boat>(_boat);
|
||||
|
||||
glPushMatrix();
|
||||
|
||||
glTranslatef((float) x, (float) y, (float) z);
|
||||
|
||||
glRotatef(180-rot, 0, 1, 0);
|
||||
float hurt = boat->getHurtTime() - a;
|
||||
float dmg = boat->getDamage() - a;
|
||||
if (dmg<0) dmg = 0;
|
||||
if (hurt>0)
|
||||
{
|
||||
glRotatef(Mth::sin(hurt)*hurt*dmg/10*boat->getHurtDir(), 1, 0, 0);
|
||||
}
|
||||
|
||||
float ss = 12/16.0f;
|
||||
glScalef(ss, ss, ss);
|
||||
glScalef(1/ss, 1/ss, 1/ss);
|
||||
|
||||
bindTexture(boat);
|
||||
glScalef(-1, -1, 1);
|
||||
model->render(boat, 0, 0, -0.1f, 0, 0, 1 / 16.0f, true);
|
||||
glPopMatrix();
|
||||
}
|
||||
|
||||
ResourceLocation *BoatRenderer::getTextureLocation(shared_ptr<Entity> mob)
|
||||
{
|
||||
return &BOAT_LOCATION;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
#include "EntityRenderer.h"
|
||||
|
||||
class BoatRenderer : public EntityRenderer
|
||||
{
|
||||
private:
|
||||
static ResourceLocation BOAT_LOCATION;
|
||||
|
||||
protected:
|
||||
Model *model;
|
||||
public:
|
||||
BoatRenderer();
|
||||
|
||||
virtual void render(shared_ptr<Entity> boat, double x, double y, double z, float rot, float a);
|
||||
virtual ResourceLocation *getTextureLocation(shared_ptr<Entity> mob);
|
||||
};
|
||||
@@ -0,0 +1,68 @@
|
||||
#include "stdafx.h"
|
||||
#include "..\Minecraft.World\Mth.h"
|
||||
#include "BookModel.h"
|
||||
#include "ModelPart.h"
|
||||
|
||||
BookModel::BookModel()
|
||||
{
|
||||
leftLid = (new ModelPart(this))->texOffs(0, 0)->addBox(-6, -5, 0, 6, 10, 0);
|
||||
rightLid = (new ModelPart(this))->texOffs(16, 0)->addBox(0, -5, 0, 6, 10, 0);
|
||||
|
||||
seam = (new ModelPart(this))->texOffs(12, 0)->addBox(-1, -5, 0, 2, 10, 0);
|
||||
|
||||
// 4J - added faceMasks here to remove sides of these page boxes which end up being nearly coplanar to the cover of the book and flickering when rendering at a distance
|
||||
leftPages = (new ModelPart(this))->texOffs(0, 10)->addBoxWithMask(0, -4, -1 + 0.01f, 5, 8, 1, 47); // 4J - faceMask is binary 101111
|
||||
rightPages = (new ModelPart(this))->texOffs(12, 10)->addBoxWithMask(0, -4, -0.01f, 5, 8, 1, 31); // 4J - faceMask is binary 011111
|
||||
|
||||
flipPage1 = (new ModelPart(this))->texOffs(24, 10)->addBox(0, -4, 0, 5, 8, 0);
|
||||
flipPage2 = (new ModelPart(this))->texOffs(24, 10)->addBox(0, -4, 0, 5, 8, 0);
|
||||
|
||||
leftLid->setPos(0, 0, -1);
|
||||
rightLid->setPos(0, 0, 1);
|
||||
|
||||
seam->yRot = PI / 2;
|
||||
|
||||
// 4J added - compile now to avoid random performance hit first time cubes are rendered
|
||||
leftLid->compile(1.0f/16.0f);
|
||||
rightLid->compile(1.0f/16.0f);
|
||||
seam->compile(1.0f/16.0f);
|
||||
leftPages->compile(1.0f/16.0f);
|
||||
rightPages->compile(1.0f/16.0f);
|
||||
flipPage1->compile(1.0f/16.0f);
|
||||
flipPage2->compile(1.0f/16.0f);
|
||||
|
||||
}
|
||||
|
||||
void BookModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled)
|
||||
{
|
||||
setupAnim(time, r, bob, yRot, xRot, scale, entity);
|
||||
|
||||
leftLid->render(scale,usecompiled);
|
||||
rightLid->render(scale,usecompiled);
|
||||
seam->render(scale,usecompiled);
|
||||
|
||||
leftPages->render(scale,usecompiled);
|
||||
rightPages->render(scale,usecompiled);
|
||||
|
||||
flipPage1->render(scale,usecompiled);
|
||||
flipPage2->render(scale,usecompiled);
|
||||
}
|
||||
|
||||
void BookModel::setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, shared_ptr<Entity> entity, unsigned int uiBitmaskOverrideAnim)
|
||||
{
|
||||
float openness = (Mth::sin(time * 0.02f) * 0.10f + 1.25f) * yRot;
|
||||
|
||||
leftLid->yRot = PI + openness;
|
||||
rightLid->yRot = -openness;
|
||||
leftPages->yRot = +openness;
|
||||
rightPages->yRot = -openness;
|
||||
|
||||
flipPage1->yRot = +openness - openness * 2 * r;
|
||||
flipPage2->yRot = +openness - openness * 2 * bob;
|
||||
|
||||
leftPages->x = Mth::sin(openness);
|
||||
rightPages->x = Mth::sin(openness);
|
||||
flipPage1->x = Mth::sin(openness);
|
||||
flipPage2->x = Mth::sin(openness);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
|
||||
#pragma once
|
||||
#include "Model.h"
|
||||
|
||||
class BookModel : public Model
|
||||
{
|
||||
public:
|
||||
ModelPart *leftLid, *rightLid;
|
||||
ModelPart *leftPages, *rightPages;
|
||||
ModelPart *flipPage1, *flipPage2;
|
||||
ModelPart *seam;
|
||||
|
||||
BookModel();
|
||||
virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled);
|
||||
virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, shared_ptr<Entity> entity, unsigned int uiBitmaskOverrideAnim = 0);
|
||||
};
|
||||
@@ -0,0 +1,16 @@
|
||||
#include "stdafx.h"
|
||||
#include "BossMobGuiInfo.h"
|
||||
#include "../Minecraft.World/BossMob.h"
|
||||
|
||||
float BossMobGuiInfo::healthProgress = 0.0f;
|
||||
int BossMobGuiInfo::displayTicks = 0;
|
||||
wstring BossMobGuiInfo::name = L"";
|
||||
bool BossMobGuiInfo::darkenWorld = false;
|
||||
|
||||
void BossMobGuiInfo::setBossHealth(shared_ptr<BossMob> boss, bool darkenWorld)
|
||||
{
|
||||
healthProgress = (float) boss->getHealth() / (float) boss->getMaxHealth();
|
||||
displayTicks = SharedConstants::TICKS_PER_SECOND * 5;
|
||||
name = boss->getAName();
|
||||
BossMobGuiInfo::darkenWorld = darkenWorld;
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
class BossMob;
|
||||
|
||||
class BossMobGuiInfo
|
||||
{
|
||||
public:
|
||||
static float healthProgress;
|
||||
static int displayTicks;
|
||||
static wstring name;
|
||||
static bool darkenWorld;
|
||||
|
||||
static void setBossHealth(shared_ptr<BossMob> boss, bool darkenWorld);
|
||||
};
|
||||
@@ -0,0 +1,64 @@
|
||||
#include "stdafx.h"
|
||||
#include "BreakingItemParticle.h"
|
||||
#include "Tesselator.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.level.tile.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.item.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.h"
|
||||
|
||||
void BreakingItemParticle::_init(Item *item, Textures *textures, int data)
|
||||
{
|
||||
this->setTex(textures, item->getIcon(data));
|
||||
rCol = gCol = bCol = 1.0f;
|
||||
gravity = Tile::snow->gravity;
|
||||
size /= 2;
|
||||
}
|
||||
|
||||
BreakingItemParticle::BreakingItemParticle(Level *level, double x, double y, double z, Item *item, Textures *textures, int data) : Particle(level, x, y, z, 0, 0, 0)
|
||||
{
|
||||
_init(item, textures, data);
|
||||
}
|
||||
|
||||
BreakingItemParticle::BreakingItemParticle(Level *level, double x, double y, double z, double xa, double ya, double za, Item *item, Textures *textures, int data) : Particle(level, x, y, z, 0, 0, 0)
|
||||
{
|
||||
_init(item, textures, data);
|
||||
xd *= 0.1f;
|
||||
yd *= 0.1f;
|
||||
zd *= 0.1f;
|
||||
xd += xa;
|
||||
yd += ya;
|
||||
zd += za;
|
||||
}
|
||||
|
||||
int BreakingItemParticle::getParticleTexture()
|
||||
{
|
||||
return ParticleEngine::ITEM_TEXTURE;
|
||||
}
|
||||
|
||||
void BreakingItemParticle::render(Tesselator *t, float a, float xa, float ya, float za, float xa2, float za2)
|
||||
{
|
||||
float u0 = (texX + uo / 4.0f) / 16.0f;
|
||||
float u1 = u0 + 0.999f / 16.0f / 4;
|
||||
float v0 = (texY + vo / 4.0f) / 16.0f;
|
||||
float v1 = v0 + 0.999f / 16.0f / 4;
|
||||
float r = 0.1f * size;
|
||||
|
||||
if (tex != NULL)
|
||||
{
|
||||
u0 = tex->getU((uo / 4.0f) * SharedConstants::WORLD_RESOLUTION);
|
||||
u1 = tex->getU(((uo + 1) / 4.0f) * SharedConstants::WORLD_RESOLUTION);
|
||||
v0 = tex->getV((vo / 4.0f) * SharedConstants::WORLD_RESOLUTION);
|
||||
v1 = tex->getV(((vo + 1) / 4.0f) * SharedConstants::WORLD_RESOLUTION);
|
||||
}
|
||||
|
||||
float x = (float) (xo + (this->x - xo) * a - xOff);
|
||||
float y = (float) (yo + (this->y - yo) * a - yOff);
|
||||
float z = (float) (zo + (this->z - zo) * a - zOff);
|
||||
float br = SharedConstants::TEXTURE_LIGHTING ? 1 : getBrightness(a); // 4J - change brought forward from 1.8.2
|
||||
t->color(br * rCol, br * gCol, br * bCol);
|
||||
|
||||
t->vertexUV((float)(x - xa * r - xa2 * r), (float)( y - ya * r), (float)( z - za * r - za2 * r), (float)( u0), (float)( v1));
|
||||
t->vertexUV((float)(x - xa * r + xa2 * r), (float)( y + ya * r), (float)( z - za * r + za2 * r), (float)( u0), (float)( v0));
|
||||
t->vertexUV((float)(x + xa * r + xa2 * r), (float)( y + ya * r), (float)( z + za * r + za2 * r), (float)( u1), (float)( v0));
|
||||
t->vertexUV((float)(x + xa * r - xa2 * r), (float)( y - ya * r), (float)( z + za * r - za2 * r), (float)( u1), (float)( v1));
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#pragma once
|
||||
#include "Particle.h"
|
||||
|
||||
class BreakingItemParticle : public Particle
|
||||
{
|
||||
// virtual eINSTANCEOF GetType(); // 4J-IB/JEV TODO needs implementation
|
||||
|
||||
public:
|
||||
virtual eINSTANCEOF GetType() { return eType_BREAKINGITEMPARTICLE; }
|
||||
void _init(Item *item, Textures *textures, int data);
|
||||
BreakingItemParticle(Level *level, double x, double y, double z, Item *item, Textures *textures, int data = 0);
|
||||
BreakingItemParticle(Level *level, double x, double y, double z, double xa, double ya, double za, Item *item, Textures *textures, int data = 0);
|
||||
virtual int getParticleTexture();
|
||||
virtual void render(Tesselator *t, float a, float xa, float ya, float za, float xa2, float za2);
|
||||
};
|
||||
@@ -0,0 +1,41 @@
|
||||
#include "stdafx.h"
|
||||
#include "BubbleParticle.h"
|
||||
#include "..\Minecraft.World\Random.h"
|
||||
#include "..\Minecraft.World\Mth.h"
|
||||
#include "..\Minecraft.World\JavaMath.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.level.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.level.material.h"
|
||||
|
||||
BubbleParticle::BubbleParticle(Level *level, double x, double y, double z, double xa, double ya, double za) : Particle(level, x, y, z, xa, ya, za)
|
||||
{
|
||||
rCol = 1.0f;
|
||||
gCol = 1.0f;
|
||||
bCol = 1.0f;
|
||||
setMiscTex(32);
|
||||
this->setSize(0.02f, 0.02f);
|
||||
|
||||
size = size*(random->nextFloat()*0.6f+0.2f);
|
||||
|
||||
xd = xa*0.2f+(float)(Math::random()*2-1)*0.02f;
|
||||
yd = ya*0.2f+(float)(Math::random()*2-1)*0.02f;
|
||||
zd = za*0.2f+(float)(Math::random()*2-1)*0.02f;
|
||||
|
||||
lifetime = (int) (8 / (Math::random() * 0.8 + 0.2));
|
||||
}
|
||||
|
||||
void BubbleParticle::tick()
|
||||
{
|
||||
xo = x;
|
||||
yo = y;
|
||||
zo = z;
|
||||
|
||||
yd += 0.002;
|
||||
move(xd, yd, zd);
|
||||
xd *= 0.85f;
|
||||
yd *= 0.85f;
|
||||
zd *= 0.85f;
|
||||
|
||||
if (level->getMaterial(Mth::floor(x), Mth::floor(y), Mth::floor(z)) != Material::water) remove();
|
||||
|
||||
if (lifetime-- <= 0) remove();
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
#include "Particle.h"
|
||||
|
||||
class BubbleParticle : public Particle
|
||||
{
|
||||
public:
|
||||
virtual eINSTANCEOF GetType() { return eType_BUBBLEPARTICLE; }
|
||||
BubbleParticle(Level *level, double x, double y, double z, double xa, double ya, double za);
|
||||
virtual void tick();
|
||||
};
|
||||
@@ -0,0 +1,522 @@
|
||||
#include "stdafx.h"
|
||||
#include "..\Minecraft.World\StringHelpers.h"
|
||||
#include "Textures.h"
|
||||
#include "..\Minecraft.World\ArrayWithLength.h"
|
||||
#include "BufferedImage.h"
|
||||
|
||||
#ifdef _XBOX
|
||||
typedef struct
|
||||
{
|
||||
unsigned int filesz;
|
||||
unsigned short creator1;
|
||||
unsigned short creator2;
|
||||
unsigned int bmp_offset;
|
||||
unsigned int header_sz;
|
||||
unsigned int width;
|
||||
unsigned int height;
|
||||
unsigned short nplanes;
|
||||
unsigned short bitspp;
|
||||
unsigned int compress_type;
|
||||
unsigned int bmp_bytesz;
|
||||
int hres;
|
||||
int vres;
|
||||
unsigned int ncolors;
|
||||
unsigned int nimpcolors;
|
||||
} BITMAPINFOHEADER;
|
||||
#endif
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
static void NormalizePathSlashes(string& value)
|
||||
{
|
||||
for(size_t i = 0; i < value.size(); ++i)
|
||||
{
|
||||
if(value[i] == '\\')
|
||||
{
|
||||
value[i] = '/';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static bool FileExistsA(const string& path)
|
||||
{
|
||||
return GetFileAttributesA(path.c_str()) != INVALID_FILE_ATTRIBUTES;
|
||||
}
|
||||
|
||||
static void AddUniqueTexturePath(vector<string>& output, const string& path)
|
||||
{
|
||||
if(path.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
for(size_t i = 0; i < output.size(); ++i)
|
||||
{
|
||||
if(output[i] == path)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
output.push_back(path);
|
||||
}
|
||||
|
||||
static void AddSourceTextureCandidates(vector<string>& output, const string& path)
|
||||
{
|
||||
AddUniqueTexturePath(output, "sources/textures/" + path);
|
||||
AddUniqueTexturePath(output, "../sources/textures/" + path);
|
||||
AddUniqueTexturePath(output, "../../sources/textures/" + path);
|
||||
AddUniqueTexturePath(output, "../../../sources/textures/" + path);
|
||||
}
|
||||
|
||||
static bool ResolveWindows64TexturePath(const wstring& inputPath, wstring& resolvedPath)
|
||||
{
|
||||
string originalPath;
|
||||
originalPath.reserve(inputPath.size());
|
||||
for(size_t i = 0; i < inputPath.size(); ++i)
|
||||
{
|
||||
originalPath.push_back((char)inputPath[i]);
|
||||
}
|
||||
NormalizePathSlashes(originalPath);
|
||||
if(originalPath.empty())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if(FileExistsA(originalPath))
|
||||
{
|
||||
resolvedPath = convStringToWstring(originalPath);
|
||||
return true;
|
||||
}
|
||||
|
||||
string relativePath = originalPath;
|
||||
while(!relativePath.empty() && (relativePath[0] == '/' || relativePath[0] == '\\'))
|
||||
{
|
||||
relativePath.erase(relativePath.begin());
|
||||
}
|
||||
if(relativePath.empty())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
vector<string> candidates;
|
||||
AddSourceTextureCandidates(candidates, relativePath);
|
||||
|
||||
char cwd[MAX_PATH];
|
||||
cwd[0] = 0;
|
||||
if(GetCurrentDirectoryA(sizeof(cwd), cwd) > 0)
|
||||
{
|
||||
string cwdPath = cwd;
|
||||
NormalizePathSlashes(cwdPath);
|
||||
if(!cwdPath.empty() && cwdPath[cwdPath.size() - 1] != '/')
|
||||
{
|
||||
cwdPath += "/";
|
||||
}
|
||||
AddSourceTextureCandidates(candidates, cwdPath + relativePath);
|
||||
}
|
||||
|
||||
char modulePath[MAX_PATH];
|
||||
modulePath[0] = 0;
|
||||
if(GetModuleFileNameA(NULL, modulePath, sizeof(modulePath)) > 0)
|
||||
{
|
||||
string moduleDir = modulePath;
|
||||
NormalizePathSlashes(moduleDir);
|
||||
size_t slashPos = moduleDir.find_last_of('/');
|
||||
if(slashPos != string::npos)
|
||||
{
|
||||
moduleDir = moduleDir.substr(0, slashPos + 1);
|
||||
AddSourceTextureCandidates(candidates, moduleDir + relativePath);
|
||||
}
|
||||
}
|
||||
|
||||
for(size_t i = 0; i < candidates.size(); ++i)
|
||||
{
|
||||
if(FileExistsA(candidates[i]))
|
||||
{
|
||||
resolvedPath = convStringToWstring(candidates[i]);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
BufferedImage::BufferedImage(int width,int height,int type)
|
||||
{
|
||||
data[0] = new int[width*height];
|
||||
|
||||
for( int i = 1 ; i < 10; i++ )
|
||||
{
|
||||
data[i] = NULL;
|
||||
}
|
||||
this->width = width;
|
||||
this->height = height;
|
||||
}
|
||||
|
||||
void BufferedImage::ByteFlip4(unsigned int &data)
|
||||
{
|
||||
data = ( data >> 24 ) |
|
||||
( ( data >> 8 ) & 0x0000ff00 ) |
|
||||
( ( data << 8 ) & 0x00ff0000 ) |
|
||||
( data << 24 );
|
||||
}
|
||||
// Loads a bitmap into a buffered image - only currently supports the 2 types of 32-bit image that we've made so far
|
||||
// and determines which of these is which by the compression method. Compression method 3 is a 32-bit image with only
|
||||
// 24-bits used (ie no alpha channel) whereas method 0 is a full 32-bit image with a valid alpha channel.
|
||||
BufferedImage::BufferedImage(const wstring& File, bool filenameHasExtension /*=false*/, bool bTitleUpdateTexture /*=false*/, const wstring &drive /*=L""*/)
|
||||
{
|
||||
HRESULT hr;
|
||||
wstring wDrive;
|
||||
wstring filePath;
|
||||
filePath = File;
|
||||
|
||||
wDrive = drive;
|
||||
if(wDrive.empty())
|
||||
{
|
||||
#ifdef _XBOX
|
||||
if(bTitleUpdateTexture)
|
||||
{
|
||||
// Make the content package point to to the UPDATE: drive is needed
|
||||
#ifdef _TU_BUILD
|
||||
wDrive=L"UPDATE:\\";
|
||||
#else
|
||||
|
||||
wDrive=L"GAME:\\res\\TitleUpdate\\";
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
wDrive=L"GAME:\\";
|
||||
}
|
||||
#else
|
||||
|
||||
#ifdef __PS3__
|
||||
|
||||
char *pchUsrDir;
|
||||
if(app.GetBootedFromDiscPatch())
|
||||
{
|
||||
const char *pchTextureName=wstringtofilename(File);
|
||||
pchUsrDir = app.GetBDUsrDirPath(pchTextureName);
|
||||
}
|
||||
else
|
||||
{
|
||||
pchUsrDir=getUsrDirPath();
|
||||
}
|
||||
|
||||
wstring wstr (pchUsrDir, pchUsrDir+strlen(pchUsrDir));
|
||||
|
||||
if(bTitleUpdateTexture)
|
||||
{
|
||||
// Make the content package point to to the UPDATE: drive is needed
|
||||
wDrive= wstr + L"\\Common\\res\\TitleUpdate\\";
|
||||
}
|
||||
else
|
||||
{
|
||||
wDrive= wstr + L"/Common/";
|
||||
}
|
||||
#elif __PSVITA__
|
||||
|
||||
/*char *pchUsrDir=getUsrDirPath();
|
||||
|
||||
wstring wstr (pchUsrDir, pchUsrDir+strlen(pchUsrDir));
|
||||
|
||||
if(bTitleUpdateTexture)
|
||||
{
|
||||
// Make the content package point to to the UPDATE: drive is needed
|
||||
wDrive= wstr + L"\\Common\\res\\TitleUpdate\\";
|
||||
}
|
||||
else
|
||||
{
|
||||
wDrive= wstr + L"/Common/";
|
||||
}*/
|
||||
|
||||
if(bTitleUpdateTexture)
|
||||
{
|
||||
// Make the content package point to to the UPDATE: drive is needed
|
||||
wDrive= L"Common\\res\\TitleUpdate\\";
|
||||
}
|
||||
else
|
||||
{
|
||||
wDrive= L"Common/";
|
||||
}
|
||||
#else
|
||||
if(bTitleUpdateTexture)
|
||||
{
|
||||
// Make the content package point to to the UPDATE: drive is needed
|
||||
wDrive= L"Common\\res\\TitleUpdate\\";
|
||||
}
|
||||
else
|
||||
{
|
||||
wDrive= L"Common/";
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
for( int l = 0 ; l < 10; l++ )
|
||||
{
|
||||
data[l] = NULL;
|
||||
}
|
||||
|
||||
for( int l = 0; l < 10; l++ )
|
||||
{
|
||||
wstring name;
|
||||
wstring mipMapPath = L"";
|
||||
if( l != 0 )
|
||||
{
|
||||
mipMapPath = L"MipMapLevel" + _toString<int>(l+1);
|
||||
}
|
||||
if( filenameHasExtension )
|
||||
{
|
||||
name = wDrive + L"res" + filePath.substr(0,filePath.length());
|
||||
}
|
||||
else
|
||||
{
|
||||
name = wDrive + L"res" + filePath.substr(0,filePath.length()-4) + mipMapPath + L".png";
|
||||
}
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
wstring resolvedPath;
|
||||
if(ResolveWindows64TexturePath(name, resolvedPath))
|
||||
{
|
||||
name = resolvedPath;
|
||||
}
|
||||
#endif
|
||||
|
||||
const char *pchTextureName=wstringtofilename(name);
|
||||
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
app.DebugPrintf("\n--- Loading TEXTURE - %s\n\n",pchTextureName);
|
||||
#endif
|
||||
|
||||
D3DXIMAGE_INFO ImageInfo;
|
||||
ZeroMemory(&ImageInfo,sizeof(D3DXIMAGE_INFO));
|
||||
hr=RenderManager.LoadTextureData(pchTextureName,&ImageInfo,&data[l]);
|
||||
|
||||
|
||||
if(hr!=ERROR_SUCCESS)
|
||||
{
|
||||
// 4J - If we haven't loaded the non-mipmap version then exit the game
|
||||
if( l == 0 )
|
||||
{
|
||||
app.FatalLoadError();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if( l == 0 )
|
||||
{
|
||||
width=ImageInfo.Width;
|
||||
height=ImageInfo.Height;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BufferedImage::BufferedImage(DLCPack *dlcPack, const wstring& File, bool filenameHasExtension /*= false*/ )
|
||||
{
|
||||
HRESULT hr;
|
||||
wstring filePath = File;
|
||||
BYTE *pbData = NULL;
|
||||
DWORD dwBytes = 0;
|
||||
|
||||
for( int l = 0 ; l < 10; l++ )
|
||||
{
|
||||
data[l] = NULL;
|
||||
}
|
||||
|
||||
for( int l = 0; l < 10; l++ )
|
||||
{
|
||||
wstring name;
|
||||
wstring mipMapPath = L"";
|
||||
if( l != 0 )
|
||||
{
|
||||
mipMapPath = L"MipMapLevel" + _toString<int>(l+1);
|
||||
}
|
||||
if( filenameHasExtension )
|
||||
{
|
||||
name = L"res" + filePath.substr(0,filePath.length());
|
||||
}
|
||||
else
|
||||
{
|
||||
name = L"res" + filePath.substr(0,filePath.length()-4) + mipMapPath + L".png";
|
||||
}
|
||||
|
||||
if(!dlcPack->doesPackContainFile(DLCManager::e_DLCType_All, name))
|
||||
{
|
||||
// 4J - If we haven't loaded the non-mipmap version then exit the game
|
||||
if( l == 0 )
|
||||
{
|
||||
app.FatalLoadError();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
DLCFile *dlcFile = dlcPack->getFile(DLCManager::e_DLCType_All, name);
|
||||
pbData = dlcFile->getData(dwBytes);
|
||||
if(pbData == NULL || dwBytes == 0)
|
||||
{
|
||||
// 4J - If we haven't loaded the non-mipmap version then exit the game
|
||||
if( l == 0 )
|
||||
{
|
||||
app.FatalLoadError();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
D3DXIMAGE_INFO ImageInfo;
|
||||
ZeroMemory(&ImageInfo,sizeof(D3DXIMAGE_INFO));
|
||||
hr=RenderManager.LoadTextureData(pbData,dwBytes,&ImageInfo,&data[l]);
|
||||
|
||||
|
||||
if(hr!=ERROR_SUCCESS)
|
||||
{
|
||||
// 4J - If we haven't loaded the non-mipmap version then exit the game
|
||||
if( l == 0 )
|
||||
{
|
||||
app.FatalLoadError();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if( l == 0 )
|
||||
{
|
||||
width=ImageInfo.Width;
|
||||
height=ImageInfo.Height;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BufferedImage::BufferedImage(BYTE *pbData, DWORD dwBytes)
|
||||
{
|
||||
int iCurrentByte=0;
|
||||
for( int l = 0 ; l < 10; l++ )
|
||||
{
|
||||
data[l] = NULL;
|
||||
}
|
||||
|
||||
D3DXIMAGE_INFO ImageInfo;
|
||||
ZeroMemory(&ImageInfo,sizeof(D3DXIMAGE_INFO));
|
||||
HRESULT hr=RenderManager.LoadTextureData(pbData,dwBytes,&ImageInfo,&data[0]);
|
||||
|
||||
if(hr==ERROR_SUCCESS)
|
||||
{
|
||||
width=ImageInfo.Width;
|
||||
height=ImageInfo.Height;
|
||||
}
|
||||
else
|
||||
{
|
||||
app.FatalLoadError();
|
||||
}
|
||||
}
|
||||
|
||||
BufferedImage::~BufferedImage()
|
||||
{
|
||||
for(int i = 0; i < 10; i++ )
|
||||
{
|
||||
delete[] data[i];
|
||||
}
|
||||
}
|
||||
|
||||
int BufferedImage::getWidth()
|
||||
{
|
||||
return width;
|
||||
}
|
||||
|
||||
int BufferedImage::getHeight()
|
||||
{
|
||||
return height;
|
||||
}
|
||||
|
||||
void BufferedImage::getRGB(int startX, int startY, int w, int h, intArray out,int offset,int scansize, int level)
|
||||
{
|
||||
int ww = width >> level;
|
||||
for( int y = 0; y < h; y++ )
|
||||
{
|
||||
for( int x = 0; x < w; x++ )
|
||||
{
|
||||
out[ y * scansize + offset + x] = data[level][ startX + x + ww * ( startY + y ) ];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int *BufferedImage::getData()
|
||||
{
|
||||
return data[0];
|
||||
}
|
||||
|
||||
int *BufferedImage::getData(int level)
|
||||
{
|
||||
return data[level];
|
||||
}
|
||||
|
||||
Graphics *BufferedImage::getGraphics()
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//Returns the transparency. Returns either OPAQUE, BITMASK, or TRANSLUCENT.
|
||||
//Specified by:
|
||||
//getTransparency in interface Transparency
|
||||
//Returns:
|
||||
//the transparency of this BufferedImage.
|
||||
int BufferedImage::getTransparency()
|
||||
{
|
||||
// TODO - 4J Implement?
|
||||
return 0;
|
||||
}
|
||||
|
||||
//Returns a subimage defined by a specified rectangular region. The returned BufferedImage shares the same data array as the original image.
|
||||
//Parameters:
|
||||
//x, y - the coordinates of the upper-left corner of the specified rectangular region
|
||||
//w - the width of the specified rectangular region
|
||||
//h - the height of the specified rectangular region
|
||||
//Returns:
|
||||
//a BufferedImage that is the subimage of this BufferedImage.
|
||||
BufferedImage *BufferedImage::getSubimage(int x ,int y, int w, int h)
|
||||
{
|
||||
// TODO - 4J Implement
|
||||
|
||||
BufferedImage *img = new BufferedImage(w,h,0);
|
||||
intArray arrayWrapper(img->data[0], w*h);
|
||||
this->getRGB(x, y, w, h, arrayWrapper,0,w);
|
||||
|
||||
int level = 1;
|
||||
while(getData(level) != NULL)
|
||||
{
|
||||
int ww = w >> level;
|
||||
int hh = h >> level;
|
||||
int xx = x >> level;
|
||||
int yy = y >> level;
|
||||
img->data[level] = new int[ww*hh];
|
||||
intArray arrayWrapper(img->data[level], ww*hh);
|
||||
this->getRGB(xx, yy, ww, hh, arrayWrapper,0,ww,level);
|
||||
|
||||
++level;
|
||||
}
|
||||
|
||||
return img;
|
||||
}
|
||||
|
||||
|
||||
void BufferedImage::preMultiplyAlpha()
|
||||
{
|
||||
int *curData = data[0];
|
||||
|
||||
int cur = 0;
|
||||
int alpha = 0;
|
||||
int r = 0;
|
||||
int g = 0;
|
||||
int b = 0;
|
||||
|
||||
int total = width * height;
|
||||
for(unsigned int i = 0; i < total; ++i)
|
||||
{
|
||||
cur = curData[i];
|
||||
alpha = (cur >> 24) & 0xff;
|
||||
r = ((cur >> 16) & 0xff) * (float)alpha/255;
|
||||
g = ((cur >> 8) & 0xff) * (float)alpha/255;
|
||||
b = (cur & 0xff) * (float)alpha/255;
|
||||
|
||||
curData[i] = (r << 16) | (g << 8) | (b ) | (alpha << 24);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
using namespace std;
|
||||
|
||||
class Graphics;
|
||||
class DLCPack;
|
||||
|
||||
class BufferedImage
|
||||
{
|
||||
private:
|
||||
int *data[10]; // Arrays for mipmaps - NULL if not used
|
||||
int width;
|
||||
int height;
|
||||
void ByteFlip4(unsigned int &data); // 4J added
|
||||
public:
|
||||
static const int TYPE_INT_ARGB = 0;
|
||||
static const int TYPE_INT_RGB = 1;
|
||||
BufferedImage(int width,int height,int type);
|
||||
BufferedImage(const wstring& File, bool filenameHasExtension = false, bool bTitleUpdateTexture=false, const wstring &drive =L""); // 4J added
|
||||
BufferedImage(DLCPack *dlcPack, const wstring& File, bool filenameHasExtension = false ); // 4J Added
|
||||
BufferedImage(BYTE *pbData, DWORD dwBytes); // 4J added
|
||||
~BufferedImage();
|
||||
|
||||
int getWidth();
|
||||
int getHeight();
|
||||
void getRGB(int startX, int startY, int w, int h, intArray out,int offset,int scansize, int level = 0); // 4J Added level param
|
||||
int *getData(); // 4J added
|
||||
int *getData(int level); // 4J added
|
||||
Graphics *getGraphics();
|
||||
int getTransparency();
|
||||
BufferedImage *getSubimage(int x, int y, int w, int h);
|
||||
|
||||
void preMultiplyAlpha();
|
||||
};
|
||||
@@ -0,0 +1,85 @@
|
||||
#include "stdafx.h"
|
||||
#include "Button.h"
|
||||
#include "Textures.h"
|
||||
|
||||
Button::Button(int id, int x, int y, const wstring& msg)
|
||||
{
|
||||
init(id, x, y, 200, 20, msg);
|
||||
}
|
||||
|
||||
Button::Button(int id, int x, int y, int w, int h, const wstring& msg)
|
||||
{
|
||||
init(id, x, y, w, h, msg);
|
||||
}
|
||||
|
||||
// 4J - added
|
||||
void Button::init(int id, int x, int y, int w, int h, const wstring& msg)
|
||||
{
|
||||
active = true;
|
||||
visible = true;
|
||||
|
||||
// this bit of code from original ctor
|
||||
this->id = id;
|
||||
this->x = x;
|
||||
this->y = y;
|
||||
this->w = w;
|
||||
this->h = h;
|
||||
this->msg = msg;
|
||||
}
|
||||
|
||||
int Button::getYImage(bool hovered)
|
||||
{
|
||||
int res = 1;
|
||||
if (!active) res = 0;
|
||||
else if (hovered) res = 2;
|
||||
return res;
|
||||
}
|
||||
|
||||
void Button::render(Minecraft *minecraft, int xm, int ym)
|
||||
{
|
||||
if (!visible) return;
|
||||
|
||||
Font *font = minecraft->font;
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, minecraft->textures->loadTexture(TN_GUI_GUI)); // 4J was L"/gui/gui.png"
|
||||
glColor4f(1, 1, 1, 1);
|
||||
|
||||
|
||||
bool hovered = xm >= x && ym >= y && xm < x + w && ym < y + h;
|
||||
int yImage = getYImage(hovered);
|
||||
|
||||
blit(x, y, 0, 46 + yImage * 20, w / 2, h);
|
||||
blit(x + w / 2, y, 200 - w / 2, 46 + yImage * 20, w / 2, h);
|
||||
|
||||
renderBg(minecraft, xm, ym);
|
||||
|
||||
if (!active)
|
||||
{
|
||||
drawCenteredString(font, msg, x + w / 2, y + (h - 8) / 2, 0xffa0a0a0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (hovered)
|
||||
{
|
||||
drawCenteredString(font, msg, x + w / 2, y + (h - 8) / 2, 0xffffa0);
|
||||
}
|
||||
else
|
||||
{
|
||||
drawCenteredString(font, msg, x + w / 2, y + (h - 8) / 2, 0xe0e0e0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Button::renderBg(Minecraft *minecraft, int xm, int ym)
|
||||
{
|
||||
}
|
||||
|
||||
void Button::released(int mx, int my)
|
||||
{
|
||||
}
|
||||
|
||||
bool Button::clicked(Minecraft *minecraft, int mx, int my)
|
||||
{
|
||||
return active && mx >= x && my >= y && mx < x + w && my < y + h;
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
#include "GuiComponent.h"
|
||||
using namespace std;
|
||||
|
||||
class Button : public GuiComponent
|
||||
{
|
||||
protected:
|
||||
int w;
|
||||
int h;
|
||||
public:
|
||||
int x, y;
|
||||
wstring msg;
|
||||
int id;
|
||||
bool active;
|
||||
bool visible;
|
||||
|
||||
Button(int id, int x, int y, const wstring& msg);
|
||||
Button(int id, int x, int y, int w, int h, const wstring& msg);
|
||||
void init(int id, int x, int y, int w, int h, const wstring& msg); // 4J - added
|
||||
protected:
|
||||
virtual int getYImage(bool hovered);
|
||||
public:
|
||||
virtual void render(Minecraft *minecraft, int xm, int ym);
|
||||
|
||||
protected:
|
||||
virtual void renderBg(Minecraft *minecraft, int xm, int ym);
|
||||
public:
|
||||
virtual void released(int mx, int my);
|
||||
virtual bool clicked(Minecraft *minecraft, int mx, int my);
|
||||
};
|
||||
@@ -0,0 +1,124 @@
|
||||
#include "stdafx.h"
|
||||
#include "Camera.h"
|
||||
#include "MemoryTracker.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.entity.player.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.level.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.level.tile.h"
|
||||
#include "..\Minecraft.World\TilePos.h"
|
||||
|
||||
float Camera::xPlayerOffs = 0.0f;
|
||||
float Camera::yPlayerOffs = 0.0f;
|
||||
float Camera::zPlayerOffs = 0.0f;
|
||||
|
||||
//IntBuffer *Camera::viewport = MemoryTracker::createIntBuffer(16);
|
||||
FloatBuffer *Camera::modelview = MemoryTracker::createFloatBuffer(16);
|
||||
FloatBuffer *Camera::projection = MemoryTracker::createFloatBuffer(16);
|
||||
//FloatBuffer *Camera::position = MemoryTracker::createFloatBuffer(3);
|
||||
|
||||
float Camera::xa = 0.0f;
|
||||
float Camera::ya = 0.0f;
|
||||
float Camera::za = 0.0f;
|
||||
float Camera::xa2 = 0.0f;
|
||||
float Camera::za2 = 0.0f;
|
||||
|
||||
void Camera::prepare(shared_ptr<Player> player, bool mirror)
|
||||
{
|
||||
glGetFloat(GL_MODELVIEW_MATRIX, modelview);
|
||||
glGetFloat(GL_PROJECTION_MATRIX, projection);
|
||||
|
||||
/* Original java code for reference
|
||||
glGetInteger(GL_VIEWPORT, viewport);
|
||||
|
||||
float x = (viewport.get(0) + viewport.get(2)) / 2;
|
||||
float y = (viewport.get(1) + viewport.get(3)) / 2;
|
||||
gluUnProject(x, y, 0, modelview, projection, viewport, position);
|
||||
|
||||
xPlayerOffs = position->get(0);
|
||||
yPlayerOffs = position->get(1);
|
||||
zPlayerOffs = position->get(2);
|
||||
*/
|
||||
|
||||
// Xbox conversion here... note that we don't bother getting the viewport as this is just working out how to get a (0,0,0) point in clip space to pass into the inverted
|
||||
// combined model/view/projection matrix, so we just need to get this matrix and get its translation as an equivalent.
|
||||
XMMATRIX _modelview, _proj, _final, _invert;
|
||||
XMVECTOR _det;
|
||||
XMFLOAT4 trans;
|
||||
|
||||
memcpy( &_modelview, modelview->_getDataPointer(), 64 );
|
||||
memcpy( &_proj, projection->_getDataPointer(), 64 );
|
||||
|
||||
#if ( defined __ORBIS__ ) || ( defined __PSVITA__ )
|
||||
_modelview = transpose(_modelview);
|
||||
_proj = transpose(_proj);
|
||||
_final = _modelview * _proj;
|
||||
_invert = sce::Vectormath::Simd::Aos::inverse(_final);
|
||||
xPlayerOffs = _invert.getElem(0,3) / _invert.getElem(3,3);
|
||||
yPlayerOffs = _invert.getElem(1,3) / _invert.getElem(3,3);
|
||||
zPlayerOffs = _invert.getElem(2,3) / _invert.getElem(3,3);
|
||||
#elif defined __PS3__
|
||||
_modelview = transpose(_modelview);
|
||||
_proj = transpose(_proj);
|
||||
_final = _modelview * _proj;
|
||||
_invert = Vectormath::Aos::inverse(_final);
|
||||
xPlayerOffs = _invert.getElem(0,3) / _invert.getElem(3,3);
|
||||
yPlayerOffs = _invert.getElem(1,3) / _invert.getElem(3,3);
|
||||
zPlayerOffs = _invert.getElem(2,3) / _invert.getElem(3,3);
|
||||
#else
|
||||
_final = XMMatrixMultiply( _modelview, _proj );
|
||||
_det = XMMatrixDeterminant(_final);
|
||||
_invert = XMMatrixInverse(&_det, _final);
|
||||
|
||||
XMStoreFloat4(&trans,_invert.r[3]);
|
||||
|
||||
xPlayerOffs = trans.x / trans.w;
|
||||
yPlayerOffs = trans.y / trans.w;
|
||||
zPlayerOffs = trans.z / trans.w;
|
||||
#endif
|
||||
|
||||
int flipCamera = mirror ? 1 : 0;
|
||||
|
||||
float xRot = player->xRot;
|
||||
float yRot = player->yRot;
|
||||
|
||||
xa = cosf(yRot * PI / 180.0f) * (1 - flipCamera * 2);
|
||||
za = sinf(yRot * PI / 180.0f) * (1 - flipCamera * 2);
|
||||
|
||||
xa2 = -za * sinf(xRot * PI / 180.0f) * (1 - flipCamera * 2);
|
||||
za2 = xa * sinf(xRot * PI / 180.0f) * (1 - flipCamera * 2);
|
||||
ya = cosf(xRot * PI / 180.0f);
|
||||
}
|
||||
|
||||
TilePos *Camera::getCameraTilePos(shared_ptr<LivingEntity> player, double alpha)
|
||||
{
|
||||
return new TilePos(getCameraPos(player, alpha));
|
||||
}
|
||||
|
||||
Vec3 *Camera::getCameraPos(shared_ptr<LivingEntity> player, double alpha)
|
||||
{
|
||||
double xx = player->xo + (player->x - player->xo) * alpha;
|
||||
double yy = player->yo + (player->y - player->yo) * alpha + player->getHeadHeight();
|
||||
double zz = player->zo + (player->z - player->zo) * alpha;
|
||||
|
||||
double xt = xx + Camera::xPlayerOffs * 1;
|
||||
double yt = yy + Camera::yPlayerOffs * 1;
|
||||
double zt = zz + Camera::zPlayerOffs * 1;
|
||||
|
||||
return Vec3::newTemp(xt, yt, zt);
|
||||
}
|
||||
|
||||
int Camera::getBlockAt(Level *level, shared_ptr<LivingEntity> player, float alpha)
|
||||
{
|
||||
Vec3 *p = Camera::getCameraPos(player, alpha);
|
||||
TilePos tp = TilePos(p);
|
||||
int t = level->getTile(tp.x, tp.y, tp.z);
|
||||
if (t != 0 && Tile::tiles[t]->material->isLiquid())
|
||||
{
|
||||
float hh = LiquidTile::getHeight(level->getData(tp.x, tp.y, tp.z)) - 1 / 9.0f;
|
||||
float h = tp.y + 1 - hh;
|
||||
if (p->y >= h)
|
||||
{
|
||||
t = level->getTile(tp.x, tp.y + 1, tp.z);
|
||||
}
|
||||
}
|
||||
return t;
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
#include "..\Minecraft.World\FloatBuffer.h"
|
||||
#include "..\Minecraft.World\IntBuffer.h"
|
||||
|
||||
|
||||
class TilePos;
|
||||
class Vec3;
|
||||
class Player;
|
||||
class Mob;
|
||||
|
||||
class Camera
|
||||
{
|
||||
public:
|
||||
static float xPlayerOffs;
|
||||
static float yPlayerOffs;
|
||||
static float zPlayerOffs;
|
||||
|
||||
private:
|
||||
// static IntBuffer *viewport;
|
||||
static FloatBuffer *modelview;
|
||||
static FloatBuffer *projection;
|
||||
// static FloatBuffer *position;
|
||||
|
||||
public:
|
||||
static float xa, ya, za, xa2, za2;
|
||||
|
||||
static void prepare(shared_ptr<Player> player, bool mirror);
|
||||
|
||||
static TilePos *getCameraTilePos(shared_ptr<LivingEntity> player, double alpha);
|
||||
static Vec3 *getCameraPos(shared_ptr<LivingEntity> player, double alpha);
|
||||
static int getBlockAt(Level *level, shared_ptr<LivingEntity> player, float alpha);
|
||||
};
|
||||
@@ -0,0 +1,20 @@
|
||||
#include "stdafx.h"
|
||||
#include "CaveSpiderRenderer.h"
|
||||
|
||||
ResourceLocation CaveSpiderRenderer::CAVE_SPIDER_LOCATION = ResourceLocation(TN_MOB_CAVE_SPIDER);
|
||||
float CaveSpiderRenderer::s_scale = 0.7f;
|
||||
|
||||
CaveSpiderRenderer::CaveSpiderRenderer() : SpiderRenderer()
|
||||
{
|
||||
shadowRadius *= s_scale;
|
||||
}
|
||||
|
||||
void CaveSpiderRenderer::scale(shared_ptr<LivingEntity> mob, float a)
|
||||
{
|
||||
glScalef(s_scale, s_scale, s_scale);
|
||||
}
|
||||
|
||||
ResourceLocation *CaveSpiderRenderer::getTextureLocation(shared_ptr<Entity> mob)
|
||||
{
|
||||
return &CAVE_SPIDER_LOCATION;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
#include "SpiderRenderer.h"
|
||||
|
||||
class CaveSpider;
|
||||
|
||||
class CaveSpiderRenderer : public SpiderRenderer
|
||||
{
|
||||
private:
|
||||
static ResourceLocation CAVE_SPIDER_LOCATION;
|
||||
static float s_scale;
|
||||
|
||||
public:
|
||||
CaveSpiderRenderer();
|
||||
|
||||
protected:
|
||||
virtual void scale(shared_ptr<LivingEntity> mob, float a);
|
||||
virtual ResourceLocation *getTextureLocation(shared_ptr<Entity> mob);
|
||||
};
|
||||
@@ -0,0 +1,89 @@
|
||||
#include "stdafx.h"
|
||||
#include "ChatScreen.h"
|
||||
#include "MultiplayerLocalPlayer.h"
|
||||
#include "..\Minecraft.World\SharedConstants.h"
|
||||
#include "..\Minecraft.World\StringHelpers.h"
|
||||
|
||||
const wstring ChatScreen::allowedChars = SharedConstants::acceptableLetters;
|
||||
|
||||
ChatScreen::ChatScreen()
|
||||
{
|
||||
frame = 0;
|
||||
}
|
||||
|
||||
void ChatScreen::init()
|
||||
{
|
||||
Keyboard::enableRepeatEvents(true);
|
||||
}
|
||||
|
||||
void ChatScreen::removed()
|
||||
{
|
||||
Keyboard::enableRepeatEvents(false);
|
||||
}
|
||||
|
||||
void ChatScreen::tick()
|
||||
{
|
||||
frame++;
|
||||
}
|
||||
|
||||
void ChatScreen::keyPressed(wchar_t ch, int eventKey)
|
||||
{
|
||||
if (eventKey == Keyboard::KEY_ESCAPE)
|
||||
{
|
||||
minecraft->setScreen(NULL);
|
||||
return;
|
||||
}
|
||||
if (eventKey == Keyboard::KEY_RETURN)
|
||||
{
|
||||
wstring msg = trimString(message);
|
||||
if (msg.length() > 0)
|
||||
{
|
||||
wstring trim = trimString(message);
|
||||
if (!minecraft->handleClientSideCommand(trim))
|
||||
{
|
||||
minecraft->player->chat(trim);
|
||||
}
|
||||
}
|
||||
minecraft->setScreen(NULL);
|
||||
return;
|
||||
}
|
||||
if (eventKey == Keyboard::KEY_BACK && message.length() > 0) message = message.substr(0, message.length() - 1);
|
||||
if (allowedChars.find(ch) >= 0 && message.length() < SharedConstants::maxChatLength)
|
||||
{
|
||||
message += ch;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ChatScreen::render(int xm, int ym, float a)
|
||||
{
|
||||
fill(2, height - 14, width - 2, height - 2, 0x80000000);
|
||||
drawString(font, L"> " + message + (frame / 6 % 2 == 0 ? L"_" : L""), 4, height - 12, 0xe0e0e0);
|
||||
|
||||
Screen::render(xm, ym, a);
|
||||
}
|
||||
|
||||
void ChatScreen::mouseClicked(int x, int y, int buttonNum)
|
||||
{
|
||||
if (buttonNum == 0)
|
||||
{
|
||||
if (minecraft->gui->selectedName != L"") // 4J - was NULL comparison
|
||||
{
|
||||
if (message.length() > 0 && message[message.length()-1]!=L' ')
|
||||
{
|
||||
message += L" ";
|
||||
}
|
||||
message += minecraft->gui->selectedName;
|
||||
unsigned int maxLength = SharedConstants::maxChatLength;
|
||||
if (message.length() > maxLength)
|
||||
{
|
||||
message = message.substr(0, maxLength);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Screen::mouseClicked(x, y, buttonNum);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
#include "Screen.h"
|
||||
using namespace std;
|
||||
|
||||
class ChatScreen : public Screen
|
||||
{
|
||||
protected:
|
||||
wstring message;
|
||||
private:
|
||||
int frame;
|
||||
|
||||
public:
|
||||
ChatScreen(); //4J added
|
||||
virtual void init();
|
||||
virtual void removed();
|
||||
virtual void tick();
|
||||
private:
|
||||
static const wstring allowedChars;
|
||||
protected:
|
||||
void keyPressed(wchar_t ch, int eventKey);
|
||||
public:
|
||||
void render(int xm, int ym, float a);
|
||||
protected:
|
||||
void mouseClicked(int x, int y, int buttonNum);
|
||||
};
|
||||
@@ -0,0 +1,43 @@
|
||||
#include "stdafx.h"
|
||||
#include "ChestModel.h"
|
||||
#include "ModelPart.h"
|
||||
|
||||
ChestModel::ChestModel()
|
||||
{
|
||||
lid = ((new ModelPart(this, 0, 0)))->setTexSize(64, 64);
|
||||
lid->addBox(0.0f, -5.0f, -14.0f, 14, 5, 14, 0.0f);
|
||||
lid->x = 1;
|
||||
lid->y = 7;
|
||||
lid->z = 15;
|
||||
|
||||
lock = ((new ModelPart(this, 0, 0)))->setTexSize(64, 64);
|
||||
lock->addBox(-1.0f, -2.0f, -15.0f, 2, 4, 1, 0.0f);
|
||||
lock->x = 8;
|
||||
lock->y = 7;
|
||||
lock->z = 15;
|
||||
|
||||
bottom = ((new ModelPart(this, 0, 19)))->setTexSize(64, 64);
|
||||
bottom->addBox(0.0f, 0.0f, 0.0f, 14, 10, 14, 0.0f);
|
||||
bottom->x = 1;
|
||||
bottom->y = 6;
|
||||
bottom->z = 1;
|
||||
|
||||
|
||||
// 4J added - compile now to avoid random performance hit first time cubes are rendered
|
||||
lid->compile(1.0f/16.0f);
|
||||
lock->compile(1.0f/16.0f);
|
||||
bottom->compile(1.0f/16.0f);
|
||||
}
|
||||
|
||||
void ChestModel::render(bool usecompiled)
|
||||
{
|
||||
lock->xRot = lid->xRot;
|
||||
|
||||
lock->render(1 / 16.0f, usecompiled);
|
||||
bottom->render(1 / 16.0f, usecompiled);
|
||||
|
||||
// 4J - moved lid to last and added z-bias to avoid glitching caused by z-fighting between the area of overlap between the lid & bottom of the chest
|
||||
glPolygonOffset(-0.3f, -0.3f);
|
||||
lid->render(1 / 16.0f, usecompiled);
|
||||
glPolygonOffset(0.0f, 0.0f);
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include "Model.h"
|
||||
|
||||
class Cube;
|
||||
|
||||
class ChestModel : public Model
|
||||
{
|
||||
public:
|
||||
using Model::render;
|
||||
|
||||
ModelPart *lid;
|
||||
ModelPart *bottom;
|
||||
ModelPart *lock;
|
||||
|
||||
ChestModel();
|
||||
void render(bool usecompiled);
|
||||
};
|
||||
@@ -0,0 +1,146 @@
|
||||
#include "stdafx.h"
|
||||
#include "ChestRenderer.h"
|
||||
#include "ChestModel.h"
|
||||
#include "LargeChestModel.h"
|
||||
#include "ModelPart.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.level.tile.entity.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.level.tile.h"
|
||||
#include "..\Minecraft.World\Calendar.h"
|
||||
|
||||
ResourceLocation ChestRenderer::CHEST_LARGE_TRAP_LOCATION = ResourceLocation(TN_TILE_LARGE_TRAP_CHEST);
|
||||
//ResourceLocation ChestRenderer::CHEST_LARGE_XMAS_LOCATION = ResourceLocation(TN_TILE_LARGE_XMAS_CHEST);
|
||||
ResourceLocation ChestRenderer::CHEST_LARGE_LOCATION = ResourceLocation(TN_TILE_LARGE_CHEST);
|
||||
ResourceLocation ChestRenderer::CHEST_TRAP_LOCATION = ResourceLocation(TN_TILE_TRAP_CHEST);
|
||||
//ResourceLocation ChestRenderer::CHEST_XMAS_LOCATION = ResourceLocation(TN_TILE_XMAS_CHEST);
|
||||
ResourceLocation ChestRenderer::CHEST_LOCATION = ResourceLocation(TN_TILE_CHEST);
|
||||
|
||||
ChestRenderer::ChestRenderer() : TileEntityRenderer()
|
||||
{
|
||||
chestModel = new ChestModel();
|
||||
largeChestModel = new LargeChestModel();
|
||||
|
||||
xmasTextures = false;
|
||||
|
||||
// 4J Stu - Disable this
|
||||
#if 0
|
||||
if (Calendar::GetMonth() + 1 == 12 && Calendar::GetDayOfMonth() >= 24 && Calendar::GetDayOfMonth() <= 26)
|
||||
{
|
||||
xmasTextures = true;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
ChestRenderer::~ChestRenderer()
|
||||
{
|
||||
delete chestModel;
|
||||
delete largeChestModel;
|
||||
}
|
||||
|
||||
void ChestRenderer::render(shared_ptr<TileEntity> _chest, double x, double y, double z, float a, bool setColor, float alpha, bool useCompiled)
|
||||
{
|
||||
// 4J Convert as we aren't using a templated class
|
||||
shared_ptr<ChestTileEntity> chest = dynamic_pointer_cast<ChestTileEntity>(_chest);
|
||||
|
||||
int data;
|
||||
|
||||
if (!chest->hasLevel())
|
||||
{
|
||||
data = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
Tile *tile = chest->getTile();
|
||||
data = chest->getData();
|
||||
|
||||
if (dynamic_cast<ChestTile*>(tile) != NULL && data == 0)
|
||||
{
|
||||
((ChestTile *) tile)->recalcLockDir(chest->getLevel(), chest->x, chest->y, chest->z);
|
||||
data = chest->getData();
|
||||
}
|
||||
|
||||
chest->checkNeighbors();
|
||||
}
|
||||
if (chest->n.lock() != NULL || chest->w.lock() != NULL) return;
|
||||
|
||||
|
||||
ChestModel *model;
|
||||
if (chest->e.lock() != NULL || chest->s.lock() != NULL)
|
||||
{
|
||||
model = largeChestModel;
|
||||
|
||||
if (chest->getType() == ChestTile::TYPE_TRAP)
|
||||
{
|
||||
bindTexture(&CHEST_LARGE_TRAP_LOCATION);
|
||||
}
|
||||
//else if (xmasTextures)
|
||||
//{
|
||||
// bindTexture(&CHEST_LARGE_XMAS_LOCATION);
|
||||
//}
|
||||
else
|
||||
{
|
||||
bindTexture(&CHEST_LARGE_LOCATION);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
model = chestModel;
|
||||
if (chest->getType() == ChestTile::TYPE_TRAP)
|
||||
{
|
||||
bindTexture(&CHEST_TRAP_LOCATION);
|
||||
}
|
||||
//else if (xmasTextures)
|
||||
//{
|
||||
// bindTexture(&CHEST_XMAS_LOCATION);
|
||||
//}
|
||||
else
|
||||
{
|
||||
bindTexture(&CHEST_LOCATION);
|
||||
}
|
||||
}
|
||||
|
||||
glPushMatrix();
|
||||
glEnable(GL_RESCALE_NORMAL);
|
||||
//if( setColor ) glColor4f(1, 1, 1, 1);
|
||||
if( setColor ) glColor4f(1, 1, 1, alpha);
|
||||
glTranslatef((float) x, (float) y + 1, (float) z + 1);
|
||||
glScalef(1, -1, -1);
|
||||
|
||||
glTranslatef(0.5f, 0.5f, 0.5f);
|
||||
int rot = 0;
|
||||
if (data == 2) rot = 180;
|
||||
if (data == 3) rot = 0;
|
||||
if (data == 4) rot = 90;
|
||||
if (data == 5) rot = -90;
|
||||
|
||||
if (data == 2 && chest->e.lock() != NULL)
|
||||
{
|
||||
glTranslatef(1, 0, 0);
|
||||
}
|
||||
if (data == 5 && chest->s.lock() != NULL)
|
||||
{
|
||||
glTranslatef(0, 0, -1);
|
||||
}
|
||||
glRotatef(rot, 0, 1, 0);
|
||||
glTranslatef(-0.5f, -0.5f, -0.5f);
|
||||
|
||||
float open = chest->oOpenness + (chest->openness - chest->oOpenness) * a;
|
||||
if (chest->n.lock() != NULL)
|
||||
{
|
||||
float open2 = chest->n.lock()->oOpenness + (chest->n.lock()->openness - chest->n.lock()->oOpenness) * a;
|
||||
if (open2 > open) open = open2;
|
||||
}
|
||||
if (chest->w.lock() != NULL)
|
||||
{
|
||||
float open2 = chest->w.lock()->oOpenness + (chest->w.lock()->openness - chest->w.lock()->oOpenness) * a;
|
||||
if (open2 > open) open = open2;
|
||||
}
|
||||
|
||||
open = 1 - open;
|
||||
open = 1 - open * open * open;
|
||||
|
||||
model->lid->xRot = -(open * PI / 2);
|
||||
model->render(useCompiled);
|
||||
glDisable(GL_RESCALE_NORMAL);
|
||||
glPopMatrix();
|
||||
if( setColor ) glColor4f(1, 1, 1, 1);
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
#include "TileEntityRenderer.h"
|
||||
|
||||
class ChestModel;
|
||||
|
||||
class ChestRenderer : public TileEntityRenderer
|
||||
{
|
||||
private:
|
||||
static ResourceLocation CHEST_LARGE_TRAP_LOCATION;
|
||||
//static ResourceLocation CHEST_LARGE_XMAS_LOCATION;
|
||||
static ResourceLocation CHEST_LARGE_LOCATION;
|
||||
static ResourceLocation CHEST_TRAP_LOCATION;
|
||||
//static ResourceLocation CHEST_XMAS_LOCATION;
|
||||
static ResourceLocation CHEST_LOCATION;
|
||||
|
||||
ChestModel *chestModel;
|
||||
ChestModel *largeChestModel;
|
||||
boolean xmasTextures;
|
||||
|
||||
public:
|
||||
ChestRenderer();
|
||||
~ChestRenderer();
|
||||
|
||||
void render(shared_ptr<TileEntity> _chest, double x, double y, double z, float a, bool setColor, float alpha=1.0f, bool useCompiled = true); // 4J added setColor param
|
||||
};
|
||||
@@ -0,0 +1,104 @@
|
||||
#include "stdafx.h"
|
||||
#include "..\Minecraft.World\Mth.h"
|
||||
#include "ChickenModel.h"
|
||||
#include "ModelPart.h"
|
||||
|
||||
ChickenModel::ChickenModel() : Model()
|
||||
{
|
||||
int yo = 16;
|
||||
head = new ModelPart(this, 0, 0);
|
||||
head->addBox(-2.0f, -6.0f, -2.0f, 4, 6, 3, 0.0f); // Head
|
||||
head->setPos(0, (float)(-1 + yo), -4);
|
||||
|
||||
beak = new ModelPart(this, 14, 0);
|
||||
beak->addBox(-2.0f, -4.0f, -4.0f, 4, 2, 2, 0.0f); // Beak
|
||||
beak->setPos(0, (float)(-1 + yo), -4);
|
||||
|
||||
redThing = new ModelPart(this, 14, 4);
|
||||
redThing->addBox(-1.0f, -2.0f, -3.0f, 2, 2, 2, 0.0f); // Beak
|
||||
redThing->setPos(0, (float)(-1 + yo), -4);
|
||||
|
||||
body = new ModelPart(this, 0, 9);
|
||||
body->addBox(-3.0f, -4.0f, -3.0f, 6, 8, 6, 0.0f); // Body
|
||||
body->setPos(0, (float)(0 + yo), 0);
|
||||
|
||||
leg0 = new ModelPart(this, 26, 0);
|
||||
leg0->addBox(-1.0f, 0.0f, -3.0f, 3, 5, 3); // Leg0
|
||||
leg0->setPos(-2, (float)(3 + yo), 1);
|
||||
|
||||
leg1 = new ModelPart(this, 26, 0);
|
||||
leg1->addBox(-1.0f, 0.0f, -3.0f, 3, 5, 3); // Leg1
|
||||
leg1->setPos(1, (float)(3 + yo), 1);
|
||||
|
||||
wing0 = new ModelPart(this, 24, 13);
|
||||
wing0->addBox(0.0f, 0.0f, -3.0f, 1, 4, 6); // Wing0
|
||||
wing0->setPos(-4, (float)(-3 + yo), 0);
|
||||
|
||||
wing1 = new ModelPart(this, 24, 13);
|
||||
wing1->addBox(-1.0f, 0.0f, -3.0f, 1, 4, 6); // Wing1
|
||||
wing1->setPos(4, (float)(-3 + yo), 0);
|
||||
|
||||
// 4J added - compile now to avoid random performance hit first time cubes are rendered
|
||||
head->compile(1.0f/16.0f);
|
||||
beak->compile(1.0f/16.0f);
|
||||
redThing->compile(1.0f/16.0f);
|
||||
body->compile(1.0f/16.0f);
|
||||
leg0->compile(1.0f/16.0f);
|
||||
leg1->compile(1.0f/16.0f);
|
||||
wing0->compile(1.0f/16.0f);
|
||||
wing1->compile(1.0f/16.0f);
|
||||
}
|
||||
|
||||
void ChickenModel::render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled)
|
||||
{
|
||||
setupAnim(time, r, bob, yRot, xRot, scale, entity);
|
||||
if (young)
|
||||
{
|
||||
float ss = 2;
|
||||
glPushMatrix();
|
||||
glTranslatef(0, 5 * scale, 2 * scale);
|
||||
head->render(scale,usecompiled);
|
||||
beak->render(scale,usecompiled);
|
||||
redThing->render(scale,usecompiled);
|
||||
glPopMatrix();
|
||||
glPushMatrix();
|
||||
glScalef(1 / ss, 1 / ss, 1 / ss);
|
||||
glTranslatef(0, 24 * scale, 0);
|
||||
body->render(scale,usecompiled);
|
||||
leg0->render(scale,usecompiled);
|
||||
leg1->render(scale,usecompiled);
|
||||
wing0->render(scale,usecompiled);
|
||||
wing1->render(scale,usecompiled);
|
||||
glPopMatrix();
|
||||
}
|
||||
else
|
||||
{
|
||||
head->render(scale,usecompiled);
|
||||
beak->render(scale,usecompiled);
|
||||
redThing->render(scale,usecompiled);
|
||||
body->render(scale,usecompiled);
|
||||
leg0->render(scale,usecompiled);
|
||||
leg1->render(scale,usecompiled);
|
||||
wing0->render(scale,usecompiled);
|
||||
wing1->render(scale,usecompiled);
|
||||
}
|
||||
}
|
||||
|
||||
void ChickenModel::setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, shared_ptr<Entity> entity, unsigned int uiBitmaskOverrideAnim)
|
||||
{
|
||||
head->xRot = xRot / (float) (180 / PI);
|
||||
head->yRot = yRot / (float) (180 / PI);
|
||||
|
||||
beak->xRot = head->xRot;
|
||||
beak->yRot = head->yRot;
|
||||
|
||||
redThing->xRot = head->xRot;
|
||||
redThing->yRot = head->yRot;
|
||||
|
||||
body->xRot = 90 / (float) (180 / PI);
|
||||
|
||||
leg0->xRot = (Mth::cos(time * 0.6662f) * 1.4f) * r;
|
||||
leg1->xRot = ( Mth::cos(time * 0.6662f + PI) * 1.4f) * r;
|
||||
wing0->zRot = bob;
|
||||
wing1->zRot = -bob;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
#include "Model.h"
|
||||
|
||||
class ChickenModel : public Model
|
||||
{
|
||||
public:
|
||||
ModelPart *head, *hair, *body, *leg0, *leg1, *wing0,* wing1, *beak, *redThing;
|
||||
|
||||
ChickenModel();
|
||||
virtual void render(shared_ptr<Entity> entity, float time, float r, float bob, float yRot, float xRot, float scale, bool usecompiled);
|
||||
virtual void setupAnim(float time, float r, float bob, float yRot, float xRot, float scale, shared_ptr<Entity> entity, unsigned int uiBitmaskOverrideAnim = 0);
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
#include "stdafx.h"
|
||||
#include "..\Minecraft.World\Mth.h"
|
||||
#include "ChickenRenderer.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.entity.animal.h"
|
||||
|
||||
ResourceLocation ChickenRenderer::CHICKEN_LOCATION = ResourceLocation(TN_MOB_CHICKEN);
|
||||
|
||||
ChickenRenderer::ChickenRenderer(Model *model, float shadow) : MobRenderer(model,shadow)
|
||||
{
|
||||
}
|
||||
|
||||
void ChickenRenderer::render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a)
|
||||
{
|
||||
MobRenderer::render(_mob, x, y, z, rot, a);
|
||||
}
|
||||
|
||||
float ChickenRenderer::getBob(shared_ptr<LivingEntity> _mob, float a)
|
||||
{
|
||||
// 4J - dynamic cast required because we aren't using templates/generics in our version
|
||||
shared_ptr<Chicken> mob = dynamic_pointer_cast<Chicken>(_mob);
|
||||
|
||||
float flap = mob->oFlap+(mob->flap-mob->oFlap)*a;
|
||||
float flapSpeed = mob->oFlapSpeed+(mob->flapSpeed-mob->oFlapSpeed)*a;
|
||||
|
||||
return (Mth::sin(flap)+1)*flapSpeed;
|
||||
}
|
||||
|
||||
ResourceLocation *ChickenRenderer::getTextureLocation(shared_ptr<Entity> mob)
|
||||
{
|
||||
return &CHICKEN_LOCATION;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#pragma once
|
||||
#include "MobRenderer.h"
|
||||
|
||||
class ChickenRenderer : public MobRenderer
|
||||
{
|
||||
private:
|
||||
static ResourceLocation CHICKEN_LOCATION;
|
||||
|
||||
public:
|
||||
ChickenRenderer(Model *model, float shadow);
|
||||
virtual void render(shared_ptr<Entity> _mob, double x, double y, double z, float rot, float a);
|
||||
virtual ResourceLocation *getTextureLocation(shared_ptr<Entity> mob);
|
||||
|
||||
protected:
|
||||
virtual float getBob(shared_ptr<LivingEntity> _mob, float a);
|
||||
};
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,87 @@
|
||||
#pragma once
|
||||
#include "AllowAllCuller.h"
|
||||
#include "Tesselator.h"
|
||||
#include "..\Minecraft.World\ArrayWithLength.h"
|
||||
#include "LevelRenderer.h"
|
||||
|
||||
class Level;
|
||||
class TileEntity;
|
||||
class Entity;
|
||||
using namespace std;
|
||||
|
||||
class ClipChunk
|
||||
{
|
||||
public:
|
||||
Chunk *chunk;
|
||||
int globalIdx;
|
||||
bool visible;
|
||||
float aabb[6];
|
||||
int xm, ym, zm;
|
||||
};
|
||||
|
||||
class Chunk
|
||||
{
|
||||
private:
|
||||
static const int XZSIZE = LevelRenderer::CHUNK_XZSIZE;
|
||||
static const int SIZE = LevelRenderer::CHUNK_SIZE;
|
||||
|
||||
public:
|
||||
Level *level;
|
||||
static LevelRenderer *levelRenderer;
|
||||
private:
|
||||
#ifndef _LARGE_WORLDS
|
||||
static Tesselator *t;
|
||||
#else
|
||||
static DWORD tlsIdx;
|
||||
public:
|
||||
static void CreateNewThreadStorage();
|
||||
static void ReleaseThreadStorage();
|
||||
static unsigned char *GetTileIdsStorage();
|
||||
#endif
|
||||
|
||||
public:
|
||||
static int updates;
|
||||
|
||||
int x, y, z;
|
||||
int xRender, yRender, zRender;
|
||||
int xRenderOffs, yRenderOffs, zRenderOffs;
|
||||
|
||||
int xm, ym, zm;
|
||||
AABB *bb;
|
||||
ClipChunk *clipChunk;
|
||||
|
||||
int id;
|
||||
//public:
|
||||
// vector<shared_ptr<TileEntity> > renderableTileEntities; // 4J - removed
|
||||
|
||||
private:
|
||||
LevelRenderer::rteMap *globalRenderableTileEntities;
|
||||
CRITICAL_SECTION *globalRenderableTileEntities_cs;
|
||||
bool assigned;
|
||||
public:
|
||||
Chunk(Level *level, LevelRenderer::rteMap &globalRenderableTileEntities, CRITICAL_SECTION &globalRenderableTileEntities_cs, int x, int y, int z, ClipChunk *clipChunk);
|
||||
Chunk();
|
||||
|
||||
void setPos(int x, int y, int z);
|
||||
private:
|
||||
void translateToPos();
|
||||
public:
|
||||
void makeCopyForRebuild(Chunk *source);
|
||||
void rebuild();
|
||||
#ifdef __PS3__
|
||||
void rebuild_SPU();
|
||||
#endif // __PS3__
|
||||
float distanceToSqr(shared_ptr<Entity> player) const;
|
||||
float squishedDistanceToSqr(shared_ptr<Entity> player);
|
||||
void reset();
|
||||
void _delete();
|
||||
|
||||
int getList(int layer);
|
||||
void cull(Culler *culler);
|
||||
void renderBB() ;
|
||||
bool isEmpty();
|
||||
void setDirty();
|
||||
void clearDirty(); // 4J added
|
||||
bool emptyFlagSet(int layer);
|
||||
~Chunk();
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram />
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,166 @@
|
||||
#pragma once
|
||||
#include "..\Minecraft.World\net.minecraft.network.h"
|
||||
class Minecraft;
|
||||
class MultiPlayerLevel;
|
||||
class SavedDataStorage;
|
||||
class Socket;
|
||||
class MultiplayerLocalPlayer;
|
||||
|
||||
class ClientConnection : public PacketListener
|
||||
{
|
||||
private:
|
||||
enum eClientConnectionConnectingState
|
||||
{
|
||||
eCCPreLoginSent = 0,
|
||||
eCCPreLoginReceived,
|
||||
eCCLoginSent,
|
||||
eCCLoginReceived,
|
||||
eCCConnected
|
||||
};
|
||||
|
||||
private:
|
||||
bool done;
|
||||
Connection *connection;
|
||||
public:
|
||||
wstring message;
|
||||
bool createdOk; // 4J added
|
||||
private:
|
||||
Minecraft *minecraft;
|
||||
MultiPlayerLevel *level;
|
||||
bool started;
|
||||
|
||||
// 4J Stu - I don't think we are interested in the PlayerInfo data, so I'm not going to use it at the moment
|
||||
//Map<String, PlayerInfo> playerInfoMap = new HashMap<String, PlayerInfo>();
|
||||
public:
|
||||
//List<PlayerInfo> playerInfos = new ArrayList<PlayerInfo>();
|
||||
|
||||
int maxPlayers;
|
||||
|
||||
public:
|
||||
bool isStarted() { return started; } // 4J Added
|
||||
bool isClosed() { return done; } // 4J Added
|
||||
Socket *getSocket() { return connection->getSocket(); } // 4J Added
|
||||
|
||||
private:
|
||||
DWORD m_userIndex; // 4J Added
|
||||
public:
|
||||
SavedDataStorage *savedDataStorage;
|
||||
ClientConnection(Minecraft *minecraft, const wstring& ip, int port);
|
||||
ClientConnection(Minecraft *minecraft, Socket *socket, int iUserIndex = -1);
|
||||
~ClientConnection();
|
||||
void tick();
|
||||
INetworkPlayer *getNetworkPlayer();
|
||||
virtual void handleLogin(shared_ptr<LoginPacket> packet);
|
||||
virtual void handleAddEntity(shared_ptr<AddEntityPacket> packet);
|
||||
virtual void handleAddExperienceOrb(shared_ptr<AddExperienceOrbPacket> packet);
|
||||
virtual void handleAddGlobalEntity(shared_ptr<AddGlobalEntityPacket> packet);
|
||||
virtual void handleAddPainting(shared_ptr<AddPaintingPacket> packet);
|
||||
virtual void handleSetEntityMotion(shared_ptr<SetEntityMotionPacket> packet);
|
||||
virtual void handleSetEntityData(shared_ptr<SetEntityDataPacket> packet);
|
||||
virtual void handleAddPlayer(shared_ptr<AddPlayerPacket> packet);
|
||||
virtual void handleTeleportEntity(shared_ptr<TeleportEntityPacket> packet);
|
||||
virtual void handleSetCarriedItem(shared_ptr<SetCarriedItemPacket> packet);
|
||||
virtual void handleMoveEntity(shared_ptr<MoveEntityPacket> packet);
|
||||
virtual void handleRotateMob(shared_ptr<RotateHeadPacket> packet);
|
||||
virtual void handleMoveEntitySmall(shared_ptr<MoveEntityPacketSmall> packet);
|
||||
virtual void handleRemoveEntity(shared_ptr<RemoveEntitiesPacket> packet);
|
||||
virtual void handleMovePlayer(shared_ptr<MovePlayerPacket> packet);
|
||||
|
||||
Random *random;
|
||||
|
||||
// 4J Added
|
||||
virtual void handleChunkVisibilityArea(shared_ptr<ChunkVisibilityAreaPacket> packet);
|
||||
|
||||
virtual void handleChunkVisibility(shared_ptr<ChunkVisibilityPacket> packet);
|
||||
virtual void handleChunkTilesUpdate(shared_ptr<ChunkTilesUpdatePacket> packet);
|
||||
virtual void handleBlockRegionUpdate(shared_ptr<BlockRegionUpdatePacket> packet);
|
||||
virtual void handleTileUpdate(shared_ptr<TileUpdatePacket> packet);
|
||||
virtual void handleDisconnect(shared_ptr<DisconnectPacket> packet);
|
||||
virtual void onDisconnect(DisconnectPacket::eDisconnectReason reason, void *reasonObjects);
|
||||
void sendAndDisconnect(shared_ptr<Packet> packet);
|
||||
void send(shared_ptr<Packet> packet);
|
||||
virtual void handleTakeItemEntity(shared_ptr<TakeItemEntityPacket> packet);
|
||||
virtual void handleChat(shared_ptr<ChatPacket> packet);
|
||||
virtual void handleAnimate(shared_ptr<AnimatePacket> packet);
|
||||
virtual void handleEntityActionAtPosition(shared_ptr<EntityActionAtPositionPacket> packet);
|
||||
virtual void handlePreLogin(shared_ptr<PreLoginPacket> packet);
|
||||
void close();
|
||||
virtual void handleAddMob(shared_ptr<AddMobPacket> packet);
|
||||
virtual void handleSetTime(shared_ptr<SetTimePacket> packet);
|
||||
virtual void handleSetSpawn(shared_ptr<SetSpawnPositionPacket> packet);
|
||||
virtual void handleEntityLinkPacket(shared_ptr<SetEntityLinkPacket> packet);
|
||||
virtual void handleEntityEvent(shared_ptr<EntityEventPacket> packet);
|
||||
private:
|
||||
shared_ptr<Entity> getEntity(int entityId);
|
||||
wstring GetDisplayNameByGamertag(wstring gamertag);
|
||||
public:
|
||||
virtual void handleSetHealth(shared_ptr<SetHealthPacket> packet);
|
||||
virtual void handleSetExperience(shared_ptr<SetExperiencePacket> packet);
|
||||
virtual void handleRespawn(shared_ptr<RespawnPacket> packet);
|
||||
virtual void handleExplosion(shared_ptr<ExplodePacket> packet);
|
||||
virtual void handleContainerOpen(shared_ptr<ContainerOpenPacket> packet);
|
||||
virtual void handleContainerSetSlot(shared_ptr<ContainerSetSlotPacket> packet);
|
||||
virtual void handleContainerAck(shared_ptr<ContainerAckPacket> packet);
|
||||
virtual void handleContainerContent(shared_ptr<ContainerSetContentPacket> packet);
|
||||
virtual void handleTileEditorOpen(shared_ptr<TileEditorOpenPacket> packet);
|
||||
virtual void handleSignUpdate(shared_ptr<SignUpdatePacket> packet);
|
||||
virtual void handleTileEntityData(shared_ptr<TileEntityDataPacket> packet);
|
||||
virtual void handleContainerSetData(shared_ptr<ContainerSetDataPacket> packet);
|
||||
virtual void handleSetEquippedItem(shared_ptr<SetEquippedItemPacket> packet);
|
||||
virtual void handleContainerClose(shared_ptr<ContainerClosePacket> packet);
|
||||
virtual void handleTileEvent(shared_ptr<TileEventPacket> packet);
|
||||
virtual void handleTileDestruction(shared_ptr<TileDestructionPacket> packet);
|
||||
virtual bool canHandleAsyncPackets();
|
||||
virtual void handleGameEvent(shared_ptr<GameEventPacket> gameEventPacket);
|
||||
virtual void handleComplexItemData(shared_ptr<ComplexItemDataPacket> packet);
|
||||
virtual void handleLevelEvent(shared_ptr<LevelEventPacket> packet);
|
||||
virtual void handleAwardStat(shared_ptr<AwardStatPacket> packet);
|
||||
virtual void handleUpdateMobEffect(shared_ptr<UpdateMobEffectPacket> packet);
|
||||
virtual void handleRemoveMobEffect(shared_ptr<RemoveMobEffectPacket> packet);
|
||||
virtual bool isServerPacketListener();
|
||||
virtual void handlePlayerInfo(shared_ptr<PlayerInfoPacket> packet);
|
||||
virtual void handleKeepAlive(shared_ptr<KeepAlivePacket> packet);
|
||||
virtual void handlePlayerAbilities(shared_ptr<PlayerAbilitiesPacket> playerAbilitiesPacket);
|
||||
virtual void handleSoundEvent(shared_ptr<LevelSoundPacket> packet);
|
||||
virtual void handleCustomPayload(shared_ptr<CustomPayloadPacket> customPayloadPacket);
|
||||
virtual Connection *getConnection();
|
||||
|
||||
// 4J Added
|
||||
virtual void handleServerSettingsChanged(shared_ptr<ServerSettingsChangedPacket> packet);
|
||||
virtual void handleTexture(shared_ptr<TexturePacket> packet);
|
||||
virtual void handleTextureAndGeometry(shared_ptr<TextureAndGeometryPacket> packet);
|
||||
virtual void handleUpdateProgress(shared_ptr<UpdateProgressPacket> packet);
|
||||
|
||||
// 4J Added
|
||||
static int HostDisconnectReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int ExitGameAndSaveReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
virtual void handleTextureChange(shared_ptr<TextureChangePacket> packet);
|
||||
virtual void handleTextureAndGeometryChange(shared_ptr<TextureAndGeometryChangePacket> packet);
|
||||
virtual void handleUpdateGameRuleProgressPacket(shared_ptr<UpdateGameRuleProgressPacket> packet);
|
||||
virtual void handleXZ(shared_ptr<XZPacket> packet);
|
||||
|
||||
void displayPrivilegeChanges(shared_ptr<MultiplayerLocalPlayer> player, unsigned int oldPrivileges);
|
||||
|
||||
virtual void handleAddObjective(shared_ptr<SetObjectivePacket> packet);
|
||||
virtual void handleSetScore(shared_ptr<SetScorePacket> packet);
|
||||
virtual void handleSetDisplayObjective(shared_ptr<SetDisplayObjectivePacket> packet);
|
||||
virtual void handleSetPlayerTeamPacket(shared_ptr<SetPlayerTeamPacket> packet);
|
||||
virtual void handleParticleEvent(shared_ptr<LevelParticlesPacket> packet);
|
||||
virtual void handleUpdateAttributes(shared_ptr<UpdateAttributesPacket> packet);
|
||||
|
||||
private:
|
||||
// 4J: Entity link packet deferred
|
||||
class DeferredEntityLinkPacket
|
||||
{
|
||||
public:
|
||||
DWORD m_recievedTick;
|
||||
shared_ptr<SetEntityLinkPacket> m_packet;
|
||||
|
||||
DeferredEntityLinkPacket(shared_ptr<SetEntityLinkPacket> packet);
|
||||
};
|
||||
|
||||
vector<DeferredEntityLinkPacket> deferredEntityLinkPackets;
|
||||
static const int MAX_ENTITY_LINK_DEFERRAL_INTERVAL = 1000;
|
||||
|
||||
void checkDeferredEntityLinkPackets(int newEntityId);
|
||||
};
|
||||
@@ -0,0 +1,4 @@
|
||||
#include "stdafx.h"
|
||||
#include "ClientConstants.h"
|
||||
|
||||
const wstring ClientConstants::VERSION_STRING = wstring(L"Minecraft Xbox ") + VER_FILEVERSION_STR_W;//+ SharedConstants::VERSION_STRING;
|
||||
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
using namespace std;
|
||||
|
||||
class ClientConstants
|
||||
{
|
||||
|
||||
// This file holds global constants used by the client.
|
||||
// The file should be replaced at compile-time with the
|
||||
// proper settings for the given compilation. For example,
|
||||
// release builds should replace this file with no-cheat
|
||||
// settings.
|
||||
|
||||
// INTERNAL DEVELOPMENT SETTINGS
|
||||
public:
|
||||
static const wstring VERSION_STRING;
|
||||
|
||||
static const bool DEADMAU5_CAMERA_CHEATS = false;
|
||||
static const bool IS_DEMO_VERSION = false;
|
||||
};
|
||||
@@ -0,0 +1,119 @@
|
||||
#include "stdafx.h"
|
||||
#include "Minecraft.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.level.h"
|
||||
#include "..\Minecraft.World\net.minecraft.world.level.dimension.h"
|
||||
#include "MultiplayerLocalPlayer.h"
|
||||
#include "..\Minecraft.World\JavaMath.h"
|
||||
#include "Texture.h"
|
||||
#include "ClockTexture.h"
|
||||
|
||||
ClockTexture::ClockTexture() : StitchedTexture(L"clock", L"clock")
|
||||
{
|
||||
rot = rota = 0.0;
|
||||
m_dataTexture = NULL;
|
||||
m_iPad = XUSER_INDEX_ANY;
|
||||
}
|
||||
|
||||
ClockTexture::ClockTexture(int iPad, ClockTexture *dataTexture) : StitchedTexture(L"clock", L"clock")
|
||||
{
|
||||
rot = rota = 0.0;
|
||||
m_dataTexture = dataTexture;
|
||||
m_iPad = iPad;
|
||||
}
|
||||
|
||||
void ClockTexture::cycleFrames()
|
||||
{
|
||||
|
||||
Minecraft *mc = Minecraft::GetInstance();
|
||||
|
||||
double rott = 0;
|
||||
if (m_iPad >= 0 && m_iPad < XUSER_MAX_COUNT && mc->level != NULL && mc->localplayers[m_iPad] != NULL)
|
||||
{
|
||||
float time = mc->localplayers[m_iPad]->level->getTimeOfDay(1);
|
||||
rott = time;
|
||||
if (!mc->localplayers[m_iPad]->level->dimension->isNaturalDimension())
|
||||
{
|
||||
rott = Math::random();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// 4J Stu - For the static version, pretend we are already on a frame other than 0
|
||||
frame = 1;
|
||||
}
|
||||
|
||||
double rotd = rott - rot;
|
||||
while (rotd < -.5)
|
||||
rotd += 1.0;
|
||||
while (rotd >= .5)
|
||||
rotd -= 1.0;
|
||||
if (rotd < -1) rotd = -1;
|
||||
if (rotd > 1) rotd = 1;
|
||||
rota += rotd * 0.1;
|
||||
rota *= 0.8;
|
||||
|
||||
rot += rota;
|
||||
|
||||
// 4J Stu - We share data with another texture
|
||||
if(m_dataTexture != NULL)
|
||||
{
|
||||
int newFrame = (int) ((rot + 1.0) * m_dataTexture->frames->size()) % m_dataTexture->frames->size();
|
||||
while (newFrame < 0)
|
||||
{
|
||||
newFrame = (newFrame + m_dataTexture->frames->size()) % m_dataTexture->frames->size();
|
||||
}
|
||||
if (newFrame != frame)
|
||||
{
|
||||
frame = newFrame;
|
||||
m_dataTexture->source->blit(x, y, m_dataTexture->frames->at(this->frame), rotated);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
int newFrame = (int) ((rot + 1.0) * frames->size()) % frames->size();
|
||||
while (newFrame < 0)
|
||||
{
|
||||
newFrame = (newFrame + frames->size()) % frames->size();
|
||||
}
|
||||
if (newFrame != frame)
|
||||
{
|
||||
frame = newFrame;
|
||||
source->blit(x, y, frames->at(this->frame), rotated);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int ClockTexture::getSourceWidth() const
|
||||
{
|
||||
return source->getWidth();
|
||||
}
|
||||
|
||||
int ClockTexture::getSourceHeight() const
|
||||
{
|
||||
return source->getHeight();
|
||||
}
|
||||
|
||||
int ClockTexture::getFrames()
|
||||
{
|
||||
if(m_dataTexture == NULL)
|
||||
{
|
||||
return StitchedTexture::getFrames();
|
||||
}
|
||||
else
|
||||
{
|
||||
return m_dataTexture->getFrames();
|
||||
}
|
||||
}
|
||||
|
||||
void ClockTexture::freeFrameTextures()
|
||||
{
|
||||
if(m_dataTexture == NULL)
|
||||
{
|
||||
StitchedTexture::freeFrameTextures();
|
||||
}
|
||||
}
|
||||
|
||||
bool ClockTexture::hasOwnData()
|
||||
{
|
||||
return m_dataTexture == NULL;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
#include "StitchedTexture.h"
|
||||
|
||||
class ClockTexture : public StitchedTexture
|
||||
{
|
||||
private:
|
||||
double rot, rota;
|
||||
int m_iPad;
|
||||
ClockTexture* m_dataTexture;
|
||||
|
||||
public:
|
||||
ClockTexture();
|
||||
ClockTexture(int iPad, ClockTexture *dataTexture);
|
||||
void cycleFrames();
|
||||
|
||||
virtual int getSourceWidth() const;
|
||||
virtual int getSourceHeight() const;
|
||||
virtual int getFrames();
|
||||
virtual void freeFrameTextures(); // 4J added
|
||||
virtual bool hasOwnData(); // 4J Added
|
||||
};
|
||||
@@ -0,0 +1,156 @@
|
||||
#pragma once
|
||||
|
||||
|
||||
// 4J Stu - For non-splitscreen menus, default to this screen
|
||||
#define DEFAULT_XUI_MENU_USER 0
|
||||
#define MULTITHREAD_ENABLE
|
||||
#define MAX_CAPENAME_SIZE 32
|
||||
#define MAX_BANNERNAME_SIZE 32
|
||||
#define MAX_TMSFILENAME_SIZE 40
|
||||
#define MAX_TYPE_SIZE 32
|
||||
#define MAX_EXTENSION_TYPES 3
|
||||
|
||||
#ifdef __PSVITA__
|
||||
#define MAX_LOCAL_PLAYERS 1
|
||||
#else
|
||||
#define MAX_LOCAL_PLAYERS 4
|
||||
#endif
|
||||
|
||||
// 4J Stu - Required for sentient reporting of whether the volume level has been changed or not
|
||||
#define DEFAULT_VOLUME_LEVEL 100
|
||||
|
||||
#define GAME_HOST_OPTION_BITMASK_DIFFICULTY 0x00000003 // 0 - 3
|
||||
#define GAME_HOST_OPTION_BITMASK_FRIENDSOFFRIENDS 0x00000004
|
||||
#define GAME_HOST_OPTION_BITMASK_GAMERTAGS 0x00000008
|
||||
#define GAME_HOST_OPTION_BITMASK_GAMETYPE 0x00000030
|
||||
#define GAME_HOST_OPTION_BITMASK_LEVELTYPE 0x00000040
|
||||
#define GAME_HOST_OPTION_BITMASK_STRUCTURES 0x00000080
|
||||
#define GAME_HOST_OPTION_BITMASK_BONUSCHEST 0x00000100
|
||||
#define GAME_HOST_OPTION_BITMASK_BEENINCREATIVE 0x00000200
|
||||
#define GAME_HOST_OPTION_BITMASK_PVP 0x00000400
|
||||
#define GAME_HOST_OPTION_BITMASK_TRUSTPLAYERS 0x00000800
|
||||
#define GAME_HOST_OPTION_BITMASK_TNT 0x00001000
|
||||
#define GAME_HOST_OPTION_BITMASK_FIRESPREADS 0x00002000
|
||||
#define GAME_HOST_OPTION_BITMASK_HOSTFLY 0x00004000
|
||||
#define GAME_HOST_OPTION_BITMASK_HOSTHUNGER 0x00008000
|
||||
#define GAME_HOST_OPTION_BITMASK_HOSTINVISIBLE 0x00010000
|
||||
#define GAME_HOST_OPTION_BITMASK_BEDROCKFOG 0x00020000
|
||||
#define GAME_HOST_OPTION_BITMASK_DISABLESAVE 0x00040000
|
||||
#define GAME_HOST_OPTION_BITMASK_NOTOWNER 0x00080000
|
||||
#define GAME_HOST_OPTION_BITMASK_WORLDSIZE 0x00700000 // 3 bits, 5 values (unset(0), classic(1), small(2), medium(3), large(4))
|
||||
#define GAME_HOST_OPTION_BITMASK_MOBGRIEFING 0x00800000
|
||||
#define GAME_HOST_OPTION_BITMASK_KEEPINVENTORY 0x01000000
|
||||
#define GAME_HOST_OPTION_BITMASK_DOMOBSPAWNING 0x02000000
|
||||
#define GAME_HOST_OPTION_BITMASK_DOMOBLOOT 0x04000000
|
||||
#define GAME_HOST_OPTION_BITMASK_DOTILEDROPS 0x08000000
|
||||
#define GAME_HOST_OPTION_BITMASK_NATURALREGEN 0x10000000
|
||||
#define GAME_HOST_OPTION_BITMASK_DODAYLIGHTCYCLE 0x20000000
|
||||
#define GAME_HOST_OPTION_BITMASK_ALL 0xFFFFFFFF
|
||||
|
||||
#define GAME_HOST_OPTION_BITMASK_WORLDSIZE_BITSHIFT 20
|
||||
|
||||
enum EGameHostOptionWorldSize
|
||||
{
|
||||
e_worldSize_Unknown = 0,
|
||||
e_worldSize_Classic,
|
||||
e_worldSize_Small,
|
||||
e_worldSize_Medium,
|
||||
e_worldSize_Large
|
||||
};
|
||||
|
||||
|
||||
#ifdef _XBOX
|
||||
#define PROFILE_VERSION_1 1
|
||||
#define PROFILE_VERSION_2 2
|
||||
#define PROFILE_VERSION_3 3
|
||||
#define PROFILE_VERSION_4 4
|
||||
#define PROFILE_VERSION_5 6
|
||||
#define PROFILE_VERSION_6 7
|
||||
#define PROFILE_VERSION_7 8
|
||||
#endif
|
||||
#define PROFILE_VERSION_8 10
|
||||
#define PROFILE_VERSION_9 11
|
||||
|
||||
#define PROFILE_VERSION_10 12
|
||||
|
||||
// 4J-JEV: New Statistics and Achievements for 'NexGen' platforms.
|
||||
#define PROFILE_VERSION_11 13
|
||||
|
||||
// Java 1.6.4
|
||||
#define PROFILE_VERSION_12 14
|
||||
|
||||
#define PROFILE_VERSION_CURRENT PROFILE_VERSION_12
|
||||
|
||||
#define MAX_FAVORITE_SKINS 10 // these are stored in the profile data so keep it small
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// defines for game settings - uiBitmaskValues
|
||||
|
||||
#define GAMESETTING_CLOUDS 0x00000001
|
||||
#define GAMESETTING_ONLINE 0x00000002
|
||||
#define GAMESETTING_INVITEONLY 0x00000004
|
||||
#define GAMESETTING_FRIENDSOFFRIENDS 0x00000008
|
||||
#define GAMESETTING_DISPLAYUPDATEMSG 0x00000030
|
||||
#define GAMESETTING_BEDROCKFOG 0x00000040
|
||||
#define GAMESETTING_DISPLAYHUD 0x00000080
|
||||
#define GAMESETTING_DISPLAYHAND 0x00000100
|
||||
#define GAMESETTING_CUSTOMSKINANIM 0x00000200
|
||||
#define GAMESETTING_DEATHMESSAGES 0x00000400
|
||||
#define GAMESETTING_UISIZE 0x00001800
|
||||
#define GAMESETTING_UISIZE_SPLITSCREEN 0x00006000
|
||||
#define GAMESETTING_ANIMATEDCHARACTER 0x00008000
|
||||
#define GAMESETTING_PS3EULAREAD 0x00010000
|
||||
#define GAMESETTING_PSVITANETWORKMODEADHOC 0x00020000
|
||||
|
||||
|
||||
// defines for languages
|
||||
|
||||
#define MINECRAFT_LANGUAGE_DEFAULT 0x00
|
||||
#define MINECRAFT_LANGUAGE_ENGLISH 0x01
|
||||
#define MINECRAFT_LANGUAGE_JAPANESE 0x02
|
||||
#define MINECRAFT_LANGUAGE_GERMAN 0x03
|
||||
#define MINECRAFT_LANGUAGE_FRENCH 0x04
|
||||
#define MINECRAFT_LANGUAGE_SPANISH 0x05
|
||||
#define MINECRAFT_LANGUAGE_ITALIAN 0x06
|
||||
#define MINECRAFT_LANGUAGE_KOREAN 0x07
|
||||
#define MINECRAFT_LANGUAGE_TCHINESE 0x08
|
||||
#define MINECRAFT_LANGUAGE_PORTUGUESE 0x09
|
||||
#define MINECRAFT_LANGUAGE_BRAZILIAN 0x0A
|
||||
#define MINECRAFT_LANGUAGE_RUSSIAN 0x0B
|
||||
#define MINECRAFT_LANGUAGE_DUTCH 0x0C
|
||||
#define MINECRAFT_LANGUAGE_FINISH 0x0D
|
||||
#define MINECRAFT_LANGUAGE_SWEDISH 0x0E
|
||||
#define MINECRAFT_LANGUAGE_DANISH 0x0F
|
||||
#define MINECRAFT_LANGUAGE_NORWEGIAN 0x10
|
||||
#define MINECRAFT_LANGUAGE_POLISH 0x11
|
||||
#define MINECRAFT_LANGUAGE_TURKISH 0x12
|
||||
#define MINECRAFT_LANGUAGE_LATINAMERICANSPANISH 0x13
|
||||
#define MINECRAFT_LANGUAGE_GREEK 0x14
|
||||
|
||||
|
||||
/* Match these
|
||||
|
||||
const int XC_LANGUAGE_ENGLISH =1;
|
||||
const int XC_LANGUAGE_JAPANESE =2;
|
||||
const int XC_LANGUAGE_GERMAN =3;
|
||||
const int XC_LANGUAGE_FRENCH =4;
|
||||
const int XC_LANGUAGE_SPANISH =5;
|
||||
const int XC_LANGUAGE_ITALIAN =6;
|
||||
const int XC_LANGUAGE_KOREAN =7;
|
||||
const int XC_LANGUAGE_TCHINESE =8;
|
||||
const int XC_LANGUAGE_PORTUGUESE =9;
|
||||
const int XC_LANGUAGE_BRAZILIAN =10;
|
||||
const int XC_LANGUAGE_RUSSIAN =11;
|
||||
const int XC_LANGUAGE_DUTCH =12;
|
||||
const int XC_LANGUAGE_FINISH =13;
|
||||
const int XC_LANGUAGE_SWEDISH =14;
|
||||
const int XC_LANGUAGE_DANISH =15;
|
||||
const int XC_LANGUAGE_NORWEGIAN =16;
|
||||
const int XC_LANGUAGE_POLISH =17;
|
||||
const int XC_LANGUAGE_TURKISH =18;
|
||||
const int XC_LANGUAGE_LATINAMERICANSPANISH =19;
|
||||
const int XC_LANGUAGE_GREEK =20;
|
||||
*/
|
||||
@@ -0,0 +1,948 @@
|
||||
#pragma once
|
||||
|
||||
enum eFileExtensionType
|
||||
{
|
||||
eFileExtensionType_PNG=0,
|
||||
eFileExtensionType_INF,
|
||||
eFileExtensionType_DAT,
|
||||
};
|
||||
|
||||
enum eTMSFileType
|
||||
{
|
||||
eTMSFileType_MinecraftStore=0,
|
||||
eTMSFileType_TexturePack,
|
||||
eTMSFileType_All
|
||||
};
|
||||
|
||||
enum eTPDFileType
|
||||
{
|
||||
eTPDFileType_Loc=0,
|
||||
eTPDFileType_Icon,
|
||||
// eTPDFileType_Banner,
|
||||
eTPDFileType_Comparison,
|
||||
};
|
||||
|
||||
enum eFont
|
||||
{
|
||||
eFont_European=0,
|
||||
eFont_Korean,
|
||||
eFont_Japanese,
|
||||
eFont_Chinese,
|
||||
eFont_None, // to fallback to nothing
|
||||
};
|
||||
|
||||
enum eXuiAction
|
||||
{
|
||||
eAppAction_Idle=0,
|
||||
eAppAction_SaveGame,
|
||||
eAppAction_SaveGameCapturedThumbnail,
|
||||
eAppAction_ExitWorld,
|
||||
eAppAction_ExitWorldCapturedThumbnail,
|
||||
eAppAction_ExitWorldTrial,
|
||||
//eAppAction_ExitGameFatalLoadError,
|
||||
eAppAction_Respawn,
|
||||
eAppAction_WaitForRespawnComplete,
|
||||
eAppAction_PrimaryPlayerSignedOut,
|
||||
eAppAction_PrimaryPlayerSignedOutReturned,
|
||||
eAppAction_PrimaryPlayerSignedOutReturned_Menus,
|
||||
eAppAction_ExitPlayer, // secondary player
|
||||
eAppAction_ExitPlayerPreLogin,
|
||||
eAppAction_TrialOver,
|
||||
eAppAction_ExitTrial,
|
||||
eAppAction_WaitForDimensionChangeComplete,
|
||||
eAppAction_SocialPost,
|
||||
eAppAction_SocialPostScreenshot,
|
||||
eAppAction_EthernetDisconnected,
|
||||
eAppAction_EthernetDisconnectedReturned,
|
||||
eAppAction_EthernetDisconnectedReturned_Menus,
|
||||
eAppAction_ExitAndJoinFromInvite,
|
||||
eAppAction_DashboardTrialJoinFromInvite,
|
||||
eAppAction_ExitAndJoinFromInviteConfirmed,
|
||||
eAppAction_JoinFromInvite,
|
||||
eAppAction_ChangeSessionType,
|
||||
eAppAction_SetDefaultOptions,
|
||||
eAppAction_LocalPlayerJoined,
|
||||
eAppAction_RemoteServerSave,
|
||||
eAppAction_WaitRemoteServerSaveComplete,
|
||||
eAppAction_FailedToJoinNoPrivileges,
|
||||
eAppAction_AutosaveSaveGame,
|
||||
eAppAction_AutosaveSaveGameCapturedThumbnail,
|
||||
eAppAction_ProfileReadError,
|
||||
eAppAction_DisplayLavaMessage,
|
||||
eAppAction_BanLevel,
|
||||
eAppAction_LevelInBanLevelList,
|
||||
|
||||
eAppAction_ReloadTexturePack,
|
||||
eAppAction_ReloadFont,
|
||||
eAppAction_TexturePackRequired, // when the user has joined from invite, but doesn't have the texture pack
|
||||
|
||||
#ifdef __ORBIS__
|
||||
eAppAction_OptionsSaveNoSpace,
|
||||
#endif
|
||||
eAppAction_DebugText,
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
enum eTMSAction
|
||||
{
|
||||
eTMSAction_Idle=0,
|
||||
eTMSAction_TMS_RetrieveFiles_Complete,
|
||||
eTMSAction_TMSPP_RetrieveFiles_CreateLoad_SignInReturned,
|
||||
eTMSAction_TMSPP_RetrieveFiles_RunPlayGame,
|
||||
eTMSAction_TMSPP_RetrieveFiles_HelpAndOptions,
|
||||
eTMSAction_TMSPP_RetrieveFiles_DLCMain,
|
||||
eTMSAction_TMSPP_GlobalFileList,
|
||||
eTMSAction_TMSPP_GlobalFileList_Waiting,
|
||||
// eTMSAction_TMSPP_ConfigFile,
|
||||
// eTMSAction_TMSPP_ConfigFile_Waiting,
|
||||
eTMSAction_TMSPP_UserFileList,
|
||||
eTMSAction_TMSPP_UserFileList_Waiting,
|
||||
eTMSAction_TMSPP_XUIDSFile,
|
||||
eTMSAction_TMSPP_XUIDSFile_Waiting,
|
||||
eTMSAction_TMSPP_DLCFile,
|
||||
eTMSAction_TMSPP_DLCFile_Waiting,
|
||||
eTMSAction_TMSPP_BannedListFile,
|
||||
eTMSAction_TMSPP_BannedListFile_Waiting,
|
||||
eTMSAction_TMSPP_RetrieveFiles_Complete,
|
||||
eTMSAction_TMSPP_DLCFileOnly,
|
||||
eTMSAction_TMSPP_RetrieveUserFilelist_DLCFileOnly,
|
||||
};
|
||||
|
||||
// The server runs on its own thread, so we need to call its actions there rather than where all other Xui actions are performed
|
||||
// In general these are debugging options
|
||||
enum eXuiServerAction
|
||||
{
|
||||
eXuiServerAction_Idle=0,
|
||||
eXuiServerAction_DropItem, // Debug
|
||||
eXuiServerAction_SaveGame,
|
||||
eXuiServerAction_AutoSaveGame,
|
||||
eXuiServerAction_SpawnMob, // Debug
|
||||
eXuiServerAction_PauseServer,
|
||||
eXuiServerAction_ToggleRain, // Debug
|
||||
eXuiServerAction_ToggleThunder, // Debug
|
||||
eXuiServerAction_ServerSettingChanged_Gamertags,
|
||||
eXuiServerAction_ServerSettingChanged_Difficulty,
|
||||
eXuiServerAction_ExportSchematic, //Debug
|
||||
eXuiServerAction_ServerSettingChanged_BedrockFog,
|
||||
eXuiServerAction_SetCameraLocation, //Debug
|
||||
};
|
||||
|
||||
enum eGameSetting
|
||||
{
|
||||
eGameSetting_MusicVolume=0,
|
||||
eGameSetting_SoundFXVolume,
|
||||
eGameSetting_Gamma,
|
||||
eGameSetting_Difficulty,
|
||||
eGameSetting_Sensitivity_InGame,
|
||||
eGameSetting_Sensitivity_InMenu,
|
||||
eGameSetting_ViewBob,
|
||||
eGameSetting_ControlScheme,
|
||||
eGameSetting_ControlInvertLook,
|
||||
eGameSetting_ControlSouthPaw,
|
||||
eGameSetting_SplitScreenVertical,
|
||||
eGameSetting_GamertagsVisible,
|
||||
// Interim TU 1.6.6
|
||||
eGameSetting_Autosave,
|
||||
eGameSetting_DisplaySplitscreenGamertags,
|
||||
eGameSetting_Hints,
|
||||
eGameSetting_InterfaceOpacity,
|
||||
eGameSetting_Tooltips,
|
||||
// TU5
|
||||
eGameSetting_Clouds,
|
||||
eGameSetting_Online,
|
||||
eGameSetting_InviteOnly,
|
||||
eGameSetting_FriendsOfFriends,
|
||||
eGameSetting_DisplayUpdateMessage,
|
||||
|
||||
// TU6
|
||||
eGameSetting_BedrockFog,
|
||||
eGameSetting_DisplayHUD,
|
||||
eGameSetting_DisplayHand,
|
||||
|
||||
// TU7
|
||||
eGameSetting_CustomSkinAnim,
|
||||
|
||||
// TU9
|
||||
eGameSetting_DeathMessages,
|
||||
eGameSetting_UISize,
|
||||
eGameSetting_UISizeSplitscreen,
|
||||
eGameSetting_AnimatedCharacter,
|
||||
|
||||
// PS3
|
||||
eGameSetting_PS3_EULA_Read,
|
||||
|
||||
// PSVita
|
||||
eGameSetting_PSVita_NetworkModeAdhoc,
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
enum eGameMode
|
||||
{
|
||||
eMode_Singleplayer,
|
||||
eMode_Multiplayer
|
||||
};
|
||||
|
||||
|
||||
enum eMinecraftColour
|
||||
{
|
||||
eMinecraftColour_NOT_SET,
|
||||
|
||||
eMinecraftColour_Foliage_Evergreen,
|
||||
eMinecraftColour_Foliage_Birch,
|
||||
eMinecraftColour_Foliage_Default,
|
||||
eMinecraftColour_Foliage_Common,
|
||||
eMinecraftColour_Foliage_Ocean,
|
||||
eMinecraftColour_Foliage_Plains,
|
||||
eMinecraftColour_Foliage_Desert,
|
||||
eMinecraftColour_Foliage_ExtremeHills,
|
||||
eMinecraftColour_Foliage_Forest,
|
||||
eMinecraftColour_Foliage_Taiga,
|
||||
eMinecraftColour_Foliage_Swampland,
|
||||
eMinecraftColour_Foliage_River,
|
||||
eMinecraftColour_Foliage_Hell,
|
||||
eMinecraftColour_Foliage_Sky,
|
||||
eMinecraftColour_Foliage_FrozenOcean,
|
||||
eMinecraftColour_Foliage_FrozenRiver,
|
||||
eMinecraftColour_Foliage_IcePlains,
|
||||
eMinecraftColour_Foliage_IceMountains,
|
||||
eMinecraftColour_Foliage_MushroomIsland,
|
||||
eMinecraftColour_Foliage_MushroomIslandShore,
|
||||
eMinecraftColour_Foliage_Beach,
|
||||
eMinecraftColour_Foliage_DesertHills,
|
||||
eMinecraftColour_Foliage_ForestHills,
|
||||
eMinecraftColour_Foliage_TaigaHills,
|
||||
eMinecraftColour_Foliage_ExtremeHillsEdge,
|
||||
eMinecraftColour_Foliage_Jungle,
|
||||
eMinecraftColour_Foliage_JungleHills,
|
||||
|
||||
eMinecraftColour_Grass_Common,
|
||||
eMinecraftColour_Grass_Ocean,
|
||||
eMinecraftColour_Grass_Plains,
|
||||
eMinecraftColour_Grass_Desert,
|
||||
eMinecraftColour_Grass_ExtremeHills,
|
||||
eMinecraftColour_Grass_Forest,
|
||||
eMinecraftColour_Grass_Taiga,
|
||||
eMinecraftColour_Grass_Swampland,
|
||||
eMinecraftColour_Grass_River,
|
||||
eMinecraftColour_Grass_Hell,
|
||||
eMinecraftColour_Grass_Sky,
|
||||
eMinecraftColour_Grass_FrozenOcean,
|
||||
eMinecraftColour_Grass_FrozenRiver,
|
||||
eMinecraftColour_Grass_IcePlains,
|
||||
eMinecraftColour_Grass_IceMountains,
|
||||
eMinecraftColour_Grass_MushroomIsland,
|
||||
eMinecraftColour_Grass_MushroomIslandShore,
|
||||
eMinecraftColour_Grass_Beach,
|
||||
eMinecraftColour_Grass_DesertHills,
|
||||
eMinecraftColour_Grass_ForestHills,
|
||||
eMinecraftColour_Grass_TaigaHills,
|
||||
eMinecraftColour_Grass_ExtremeHillsEdge,
|
||||
eMinecraftColour_Grass_Jungle,
|
||||
eMinecraftColour_Grass_JungleHills,
|
||||
|
||||
eMinecraftColour_Water_Ocean,
|
||||
eMinecraftColour_Water_Plains,
|
||||
eMinecraftColour_Water_Desert,
|
||||
eMinecraftColour_Water_ExtremeHills,
|
||||
eMinecraftColour_Water_Forest,
|
||||
eMinecraftColour_Water_Taiga,
|
||||
eMinecraftColour_Water_Swampland,
|
||||
eMinecraftColour_Water_River,
|
||||
eMinecraftColour_Water_Hell,
|
||||
eMinecraftColour_Water_Sky,
|
||||
eMinecraftColour_Water_FrozenOcean,
|
||||
eMinecraftColour_Water_FrozenRiver,
|
||||
eMinecraftColour_Water_IcePlains,
|
||||
eMinecraftColour_Water_IceMountains,
|
||||
eMinecraftColour_Water_MushroomIsland,
|
||||
eMinecraftColour_Water_MushroomIslandShore,
|
||||
eMinecraftColour_Water_Beach,
|
||||
eMinecraftColour_Water_DesertHills,
|
||||
eMinecraftColour_Water_ForestHills,
|
||||
eMinecraftColour_Water_TaigaHills,
|
||||
eMinecraftColour_Water_ExtremeHillsEdge,
|
||||
eMinecraftColour_Water_Jungle,
|
||||
eMinecraftColour_Water_JungleHills,
|
||||
|
||||
eMinecraftColour_Sky_Ocean,
|
||||
eMinecraftColour_Sky_Plains,
|
||||
eMinecraftColour_Sky_Desert,
|
||||
eMinecraftColour_Sky_ExtremeHills,
|
||||
eMinecraftColour_Sky_Forest,
|
||||
eMinecraftColour_Sky_Taiga,
|
||||
eMinecraftColour_Sky_Swampland,
|
||||
eMinecraftColour_Sky_River,
|
||||
eMinecraftColour_Sky_Hell,
|
||||
eMinecraftColour_Sky_Sky,
|
||||
eMinecraftColour_Sky_FrozenOcean,
|
||||
eMinecraftColour_Sky_FrozenRiver,
|
||||
eMinecraftColour_Sky_IcePlains,
|
||||
eMinecraftColour_Sky_IceMountains,
|
||||
eMinecraftColour_Sky_MushroomIsland,
|
||||
eMinecraftColour_Sky_MushroomIslandShore,
|
||||
eMinecraftColour_Sky_Beach,
|
||||
eMinecraftColour_Sky_DesertHills,
|
||||
eMinecraftColour_Sky_ForestHills,
|
||||
eMinecraftColour_Sky_TaigaHills,
|
||||
eMinecraftColour_Sky_ExtremeHillsEdge,
|
||||
eMinecraftColour_Sky_Jungle,
|
||||
eMinecraftColour_Sky_JungleHills,
|
||||
|
||||
eMinecraftColour_Tile_RedstoneDust,
|
||||
eMinecraftColour_Tile_RedstoneDustUnlit,
|
||||
eMinecraftColour_Tile_RedstoneDustLitMin,
|
||||
eMinecraftColour_Tile_RedstoneDustLitMax,
|
||||
eMinecraftColour_Tile_StemMin,
|
||||
eMinecraftColour_Tile_StemMax,
|
||||
eMinecraftColour_Tile_WaterLily,
|
||||
|
||||
eMinecraftColour_Sky_Dawn_Dark,
|
||||
eMinecraftColour_Sky_Dawn_Bright,
|
||||
|
||||
eMinecraftColour_Material_None,
|
||||
eMinecraftColour_Material_Grass,
|
||||
eMinecraftColour_Material_Sand,
|
||||
eMinecraftColour_Material_Cloth,
|
||||
eMinecraftColour_Material_Fire,
|
||||
eMinecraftColour_Material_Ice,
|
||||
eMinecraftColour_Material_Metal,
|
||||
eMinecraftColour_Material_Plant,
|
||||
eMinecraftColour_Material_Snow,
|
||||
eMinecraftColour_Material_Clay,
|
||||
eMinecraftColour_Material_Dirt,
|
||||
eMinecraftColour_Material_Stone,
|
||||
eMinecraftColour_Material_Water,
|
||||
eMinecraftColour_Material_Wood,
|
||||
eMinecraftColour_Material_Emerald,
|
||||
|
||||
eMinecraftColour_Particle_Note_00,
|
||||
eMinecraftColour_Particle_Note_01,
|
||||
eMinecraftColour_Particle_Note_02,
|
||||
eMinecraftColour_Particle_Note_03,
|
||||
eMinecraftColour_Particle_Note_04,
|
||||
eMinecraftColour_Particle_Note_05,
|
||||
eMinecraftColour_Particle_Note_06,
|
||||
eMinecraftColour_Particle_Note_07,
|
||||
eMinecraftColour_Particle_Note_08,
|
||||
eMinecraftColour_Particle_Note_09,
|
||||
eMinecraftColour_Particle_Note_10,
|
||||
eMinecraftColour_Particle_Note_11,
|
||||
eMinecraftColour_Particle_Note_12,
|
||||
eMinecraftColour_Particle_Note_13,
|
||||
eMinecraftColour_Particle_Note_14,
|
||||
eMinecraftColour_Particle_Note_15,
|
||||
eMinecraftColour_Particle_Note_16,
|
||||
eMinecraftColour_Particle_Note_17,
|
||||
eMinecraftColour_Particle_Note_18,
|
||||
eMinecraftColour_Particle_Note_19,
|
||||
eMinecraftColour_Particle_Note_20,
|
||||
eMinecraftColour_Particle_Note_21,
|
||||
eMinecraftColour_Particle_Note_22,
|
||||
eMinecraftColour_Particle_Note_23,
|
||||
eMinecraftColour_Particle_Note_24,
|
||||
|
||||
eMinecraftColour_Particle_NetherPortal,
|
||||
eMinecraftColour_Particle_EnderPortal,
|
||||
eMinecraftColour_Particle_Smoke,
|
||||
eMinecraftColour_Particle_Ender,
|
||||
eMinecraftColour_Particle_Explode,
|
||||
eMinecraftColour_Particle_HugeExplosion,
|
||||
eMinecraftColour_Particle_DripWater,
|
||||
eMinecraftColour_Particle_DripLavaStart,
|
||||
eMinecraftColour_Particle_DripLavaEnd,
|
||||
eMinecraftColour_Particle_EnchantmentTable,
|
||||
eMinecraftColour_Particle_DragonBreathMin,
|
||||
eMinecraftColour_Particle_DragonBreathMax,
|
||||
eMinecraftColour_Particle_Suspend,
|
||||
eMinecraftColour_Particle_CritStart,
|
||||
eMinecraftColour_Particle_CritEnd,
|
||||
|
||||
eMinecraftColour_Effect_MovementSpeed,
|
||||
eMinecraftColour_Effect_MovementSlowDown,
|
||||
eMinecraftColour_Effect_DigSpeed,
|
||||
eMinecraftColour_Effect_DigSlowdown,
|
||||
eMinecraftColour_Effect_DamageBoost,
|
||||
eMinecraftColour_Effect_Heal,
|
||||
eMinecraftColour_Effect_Harm,
|
||||
eMinecraftColour_Effect_Jump,
|
||||
eMinecraftColour_Effect_Confusion,
|
||||
eMinecraftColour_Effect_Regeneration,
|
||||
eMinecraftColour_Effect_DamageResistance,
|
||||
eMinecraftColour_Effect_FireResistance,
|
||||
eMinecraftColour_Effect_WaterBreathing,
|
||||
eMinecraftColour_Effect_Invisiblity,
|
||||
eMinecraftColour_Effect_Blindness,
|
||||
eMinecraftColour_Effect_NightVision,
|
||||
eMinecraftColour_Effect_Hunger,
|
||||
eMinecraftColour_Effect_Weakness,
|
||||
eMinecraftColour_Effect_Poison,
|
||||
eMinecraftColour_Effect_Wither,
|
||||
eMinecraftColour_Effect_HealthBoost,
|
||||
eMinecraftColour_Effect_Absoprtion,
|
||||
eMinecraftColour_Effect_Saturation,
|
||||
|
||||
eMinecraftColour_Potion_BaseColour,
|
||||
|
||||
eMinecraftColour_Mob_Creeper_Colour1,
|
||||
eMinecraftColour_Mob_Creeper_Colour2,
|
||||
eMinecraftColour_Mob_Skeleton_Colour1,
|
||||
eMinecraftColour_Mob_Skeleton_Colour2,
|
||||
eMinecraftColour_Mob_Spider_Colour1,
|
||||
eMinecraftColour_Mob_Spider_Colour2,
|
||||
eMinecraftColour_Mob_Zombie_Colour1,
|
||||
eMinecraftColour_Mob_Zombie_Colour2,
|
||||
eMinecraftColour_Mob_Slime_Colour1,
|
||||
eMinecraftColour_Mob_Slime_Colour2,
|
||||
eMinecraftColour_Mob_Ghast_Colour1,
|
||||
eMinecraftColour_Mob_Ghast_Colour2,
|
||||
eMinecraftColour_Mob_PigZombie_Colour1,
|
||||
eMinecraftColour_Mob_PigZombie_Colour2,
|
||||
eMinecraftColour_Mob_Enderman_Colour1,
|
||||
eMinecraftColour_Mob_Enderman_Colour2,
|
||||
eMinecraftColour_Mob_CaveSpider_Colour1,
|
||||
eMinecraftColour_Mob_CaveSpider_Colour2,
|
||||
eMinecraftColour_Mob_Silverfish_Colour1,
|
||||
eMinecraftColour_Mob_Silverfish_Colour2,
|
||||
eMinecraftColour_Mob_Blaze_Colour1,
|
||||
eMinecraftColour_Mob_Blaze_Colour2,
|
||||
eMinecraftColour_Mob_LavaSlime_Colour1,
|
||||
eMinecraftColour_Mob_LavaSlime_Colour2,
|
||||
eMinecraftColour_Mob_Pig_Colour1,
|
||||
eMinecraftColour_Mob_Pig_Colour2,
|
||||
eMinecraftColour_Mob_Sheep_Colour1,
|
||||
eMinecraftColour_Mob_Sheep_Colour2,
|
||||
eMinecraftColour_Mob_Cow_Colour1,
|
||||
eMinecraftColour_Mob_Cow_Colour2,
|
||||
eMinecraftColour_Mob_Chicken_Colour1,
|
||||
eMinecraftColour_Mob_Chicken_Colour2,
|
||||
eMinecraftColour_Mob_Squid_Colour1,
|
||||
eMinecraftColour_Mob_Squid_Colour2,
|
||||
eMinecraftColour_Mob_Wolf_Colour1,
|
||||
eMinecraftColour_Mob_Wolf_Colour2,
|
||||
eMinecraftColour_Mob_MushroomCow_Colour1,
|
||||
eMinecraftColour_Mob_MushroomCow_Colour2,
|
||||
eMinecraftColour_Mob_Ocelot_Colour1,
|
||||
eMinecraftColour_Mob_Ocelot_Colour2,
|
||||
eMinecraftColour_Mob_Villager_Colour1,
|
||||
eMinecraftColour_Mob_Villager_Colour2,
|
||||
eMinecraftColour_Mob_Bat_Colour1,
|
||||
eMinecraftColour_Mob_Bat_Colour2,
|
||||
eMinecraftColour_Mob_Witch_Colour1,
|
||||
eMinecraftColour_Mob_Witch_Colour2,
|
||||
eMinecraftColour_Mob_Horse_Colour1,
|
||||
eMinecraftColour_Mob_Horse_Colour2,
|
||||
|
||||
eMinecraftColour_Armour_Default_Leather_Colour,
|
||||
|
||||
eMinecraftColour_Under_Water_Clear_Colour,
|
||||
eMinecraftColour_Under_Lava_Clear_Colour,
|
||||
eMinecraftColour_In_Cloud_Base_Colour,
|
||||
|
||||
eMinecraftColour_Under_Water_Fog_Colour,
|
||||
eMinecraftColour_Under_Lava_Fog_Colour,
|
||||
eMinecraftColour_In_Cloud_Fog_Colour,
|
||||
|
||||
eMinecraftColour_Default_Fog_Colour,
|
||||
eMinecraftColour_Nether_Fog_Colour,
|
||||
eMinecraftColour_End_Fog_Colour,
|
||||
|
||||
eMinecraftColour_Sign_Text,
|
||||
eMinecraftColour_Map_Text,
|
||||
|
||||
eMinecraftColour_Leash_Light_Colour,
|
||||
eMinecraftColour_Leash_Dark_Colour,
|
||||
|
||||
eMinecraftColour_Fire_Overlay,
|
||||
|
||||
eHTMLColor_0,
|
||||
eHTMLColor_1,
|
||||
eHTMLColor_2,
|
||||
eHTMLColor_3,
|
||||
eHTMLColor_4,
|
||||
eHTMLColor_5,
|
||||
eHTMLColor_6,
|
||||
eHTMLColor_7,
|
||||
eHTMLColor_8,
|
||||
eHTMLColor_9,
|
||||
eHTMLColor_a,
|
||||
eHTMLColor_b,
|
||||
eHTMLColor_c,
|
||||
eHTMLColor_d,
|
||||
eHTMLColor_e,
|
||||
eHTMLColor_f,
|
||||
eHTMLColor_0_dark,
|
||||
eHTMLColor_1_dark,
|
||||
eHTMLColor_2_dark,
|
||||
eHTMLColor_3_dark,
|
||||
eHTMLColor_4_dark,
|
||||
eHTMLColor_5_dark,
|
||||
eHTMLColor_6_dark,
|
||||
eHTMLColor_7_dark,
|
||||
eHTMLColor_8_dark,
|
||||
eHTMLColor_9_dark,
|
||||
eHTMLColor_a_dark,
|
||||
eHTMLColor_b_dark,
|
||||
eHTMLColor_c_dark,
|
||||
eHTMLColor_d_dark,
|
||||
eHTMLColor_e_dark,
|
||||
eHTMLColor_f_dark,
|
||||
eHTMLColor_T1,
|
||||
eHTMLColor_T2,
|
||||
eHTMLColor_T3,
|
||||
eHTMLColor_Black,
|
||||
eHTMLColor_White,
|
||||
|
||||
eTextColor_Enchant,
|
||||
eTextColor_EnchantFocus,
|
||||
eTextColor_EnchantDisabled,
|
||||
eTextColor_RenamedItemTitle,
|
||||
|
||||
//eHTMLColor_0 = 0x000000, //r:0 , g: 0, b: 0, i: 0
|
||||
//eHTMLColor_1 = 0x0000aa, //r:0 , g: 0, b: aa, i: 1 // blue, quite dark
|
||||
//eHTMLColor_2 = 0x109e10, // Changed by request of Dave //0x00aa00, //r:0 , g: aa, b: 0, i: 2 // green
|
||||
//eHTMLColor_3 = 0x109e9e, // Changed by request of Dave //0x00aaaa, //r:0 , g: aa, b: aa, i: 3 // cyan
|
||||
//eHTMLColor_4 = 0xaa0000, //r:aa , g: 0, b: 0, i: 4 // red
|
||||
//eHTMLColor_5 = 0xaa00aa, //r:aa , g: 0, b: aa, i: 5 // purple
|
||||
//eHTMLColor_6 = 0xffaa00, //r:ff , g: aa, b: 0, i: 6 // orange
|
||||
//eHTMLColor_7 = 0xaaaaaa, //r:aa , g: aa, b: aa, i: 7 // light gray
|
||||
//eHTMLColor_8 = 0x555555, //r:55 , g: 55, b: 55, i: 8 // gray
|
||||
//eHTMLColor_9 = 0x5555ff, //r:55 , g: 55, b: ff, i: 9 // blue
|
||||
//eHTMLColor_a = 0x55ff55, //r:55 , g: ff, b: 55, i: a // green
|
||||
//eHTMLColor_b = 0x55ffff, //r:55 , g: ff, b: ff, i: b // cyan
|
||||
//eHTMLColor_c = 0xff5555, //r:ff , g: 55, b: 55, i: c // red pink
|
||||
//eHTMLColor_d = 0xff55ff, //r:ff , g: 55, b: ff, i: d // bright pink
|
||||
//eHTMLColor_e = 0xffff55, //r:ff , g: ff, b: 55, i: e // yellow
|
||||
//eHTMLColor_f = 0xffffff, //r:ff , g: ff, b: ff, i: f
|
||||
//eHTMLColor_0_dark = 0x000000, //r:0 , g: 0, b: 0, i: 10
|
||||
//eHTMLColor_1_dark = 0x00002a, //r:0 , g: 0, b: 2a, i: 11
|
||||
//eHTMLColor_2_dark = 0x002a00, //r:0 , g: 2a, b: 0, i: 12
|
||||
//eHTMLColor_3_dark = 0x002a2a, //r:0 , g: 2a, b: 2a, i: 13
|
||||
//eHTMLColor_4_dark = 0x2a0000, //r:2a , g: 0, b: 0, i: 14
|
||||
//eHTMLColor_5_dark = 0x2a002a, //r:2a , g: 0, b: 2a, i: 15
|
||||
//eHTMLColor_6_dark = 0x2a2a00, //r:2a , g: 2a, b: 0, i: 16
|
||||
//eHTMLColor_7_dark = 0x2a2a2a, //r:2a , g: 2a, b: 2a, i: 17 // dark gray
|
||||
//eHTMLColor_8_dark = 0x151515, //r:15 , g: 15, b: 15, i: 18
|
||||
//eHTMLColor_9_dark = 0x15153f, //r:15 , g: 15, b: 3f, i: 19
|
||||
//eHTMLColor_a_dark = 0x153f15, //r:15 , g: 3f, b: 15, i: 1a
|
||||
//eHTMLColor_b_dark = 0x153f3f, //r:15 , g: 3f, b: 3f, i: 1b
|
||||
//eHTMLColor_c_dark = 0x3f1515, //r:3f , g: 15, b: 15, i: 1c // brown
|
||||
//eHTMLColor_d_dark = 0x3f153f, //r:3f , g: 15, b: 3f, i: 1d
|
||||
//eHTMLColor_e_dark = 0x3f3f15, //r:3f , g: 3f, b: 15, i: 1e
|
||||
//eHTMLColor_f_dark = 0x3f3f3f, //r:3f , g: 3f, b: 3f, i: 1f
|
||||
|
||||
eMinecraftColour_COUNT,
|
||||
};
|
||||
|
||||
enum eDLCContentType
|
||||
{
|
||||
e_DLC_SkinPack=0,
|
||||
e_DLC_TexturePacks,
|
||||
e_DLC_MashupPacks,
|
||||
e_DLC_Themes,
|
||||
e_DLC_AvatarItems,
|
||||
e_DLC_Gamerpics,
|
||||
e_DLC_MAX_MinecraftStore,
|
||||
e_DLC_TexturePackData, // for the icon, banner and text
|
||||
e_DLC_MAX,
|
||||
e_DLC_NotDefined,
|
||||
};
|
||||
|
||||
enum eDLCMarketplaceType
|
||||
{
|
||||
e_Marketplace_Content=0, // skins, texture packs and mashup packs
|
||||
e_Marketplace_Themes,
|
||||
e_Marketplace_AvatarItems,
|
||||
e_Marketplace_Gamerpics,
|
||||
e_Marketplace_MAX,
|
||||
e_Marketplace_NotDefined,
|
||||
};
|
||||
|
||||
enum eDLCContentState
|
||||
{
|
||||
e_DLC_ContentState_Idle = 0,
|
||||
e_DLC_ContentState_Retrieving,
|
||||
e_DLC_ContentState_Retrieved
|
||||
};
|
||||
|
||||
enum eTMSContentState
|
||||
{
|
||||
e_TMS_ContentState_Idle = 0,
|
||||
e_TMS_ContentState_Queued,
|
||||
e_TMS_ContentState_Retrieving,
|
||||
e_TMS_ContentState_Retrieved
|
||||
};
|
||||
|
||||
enum eXUID
|
||||
{
|
||||
eXUID_Undefined=0,
|
||||
eXUID_NoName, // name not needed
|
||||
eXUID_Notch,
|
||||
eXUID_Carl,
|
||||
eXUID_Daniel,
|
||||
eXUID_Deadmau5,
|
||||
eXUID_DannyBStyle,
|
||||
eXUID_JulianClark,
|
||||
eXUID_Millionth,
|
||||
eXUID_4JPaddy,
|
||||
eXUID_4JStuart,
|
||||
eXUID_4JDavid,
|
||||
eXUID_4JRichard,
|
||||
eXUID_4JSteven,
|
||||
};
|
||||
|
||||
|
||||
enum _eTerrainFeatureType
|
||||
{
|
||||
eTerrainFeature_None=0,
|
||||
eTerrainFeature_Stronghold,
|
||||
eTerrainFeature_Mineshaft,
|
||||
eTerrainFeature_Village,
|
||||
eTerrainFeature_Ravine,
|
||||
eTerrainFeature_NetherFortress,
|
||||
eTerrainFeature_StrongholdEndPortal,
|
||||
eTerrainFeature_Count
|
||||
};
|
||||
|
||||
// 4J Stu - Whend adding new options you should consider whether having them on should disable achievements, and if so add them to the CanRecordStatsAndAchievements function
|
||||
// 4J Stu - These options are now saved in save data, so new options can ONLY be added to the end
|
||||
enum eGameHostOption
|
||||
{
|
||||
eGameHostOption_Difficulty=0,
|
||||
eGameHostOption_OnlineGame, // Unused
|
||||
eGameHostOption_InviteOnly, // Unused
|
||||
eGameHostOption_FriendsOfFriends,
|
||||
eGameHostOption_Gamertags,
|
||||
eGameHostOption_Tutorial, // special case
|
||||
eGameHostOption_GameType,
|
||||
eGameHostOption_LevelType, // flat or default
|
||||
eGameHostOption_Structures,
|
||||
eGameHostOption_BonusChest,
|
||||
eGameHostOption_HasBeenInCreative,
|
||||
eGameHostOption_PvP,
|
||||
eGameHostOption_TrustPlayers,
|
||||
eGameHostOption_TNT,
|
||||
eGameHostOption_FireSpreads,
|
||||
eGameHostOption_CheatsEnabled, // special case
|
||||
eGameHostOption_HostCanFly,
|
||||
eGameHostOption_HostCanChangeHunger,
|
||||
eGameHostOption_HostCanBeInvisible,
|
||||
eGameHostOption_BedrockFog,
|
||||
eGameHostOption_NoHUD,
|
||||
eGameHostOption_WorldSize,
|
||||
eGameHostOption_All,
|
||||
|
||||
eGameHostOption_DisableSaving,
|
||||
eGameHostOption_WasntSaveOwner, // Added for PS3 save transfer, so we can add a nice message in the future instead of the creative mode one
|
||||
|
||||
eGameHostOption_MobGriefing,
|
||||
eGameHostOption_KeepInventory,
|
||||
eGameHostOption_DoMobSpawning,
|
||||
eGameHostOption_DoMobLoot,
|
||||
eGameHostOption_DoTileDrops,
|
||||
eGameHostOption_NaturalRegeneration,
|
||||
eGameHostOption_DoDaylightCycle,
|
||||
};
|
||||
|
||||
// 4J-PB - If any new DLC items are added to the TMSFiles, this array needs updated
|
||||
#ifdef _XBOX
|
||||
enum _TMSFILES
|
||||
{
|
||||
TMS_SP1=0,
|
||||
TMS_SP2,
|
||||
TMS_SP3,
|
||||
TMS_SP4,
|
||||
TMS_SP5,
|
||||
TMS_SP6,
|
||||
TMS_SPF,
|
||||
TMS_SPB,
|
||||
TMS_SPC,
|
||||
TMS_SPZ,
|
||||
TMS_SPM,
|
||||
TMS_SPI,
|
||||
TMS_SPG,
|
||||
TMS_SPD1,
|
||||
TMS_SPSW1,
|
||||
|
||||
TMS_THST,
|
||||
TMS_THIR,
|
||||
TMS_THGO,
|
||||
TMS_THDI,
|
||||
TMS_THAW,
|
||||
|
||||
TMS_GPAN,
|
||||
TMS_GPCO,
|
||||
TMS_GPEN,
|
||||
TMS_GPFO,
|
||||
TMS_GPTO,
|
||||
TMS_GPBA,
|
||||
TMS_GPFA,
|
||||
TMS_GPME,
|
||||
TMS_GPMF,
|
||||
TMS_GPMM,
|
||||
TMS_GPSE,
|
||||
TMS_GPOr,
|
||||
TMS_GPMi,
|
||||
TMS_GPMB,
|
||||
TMS_GPBr,
|
||||
TMS_GPM1,
|
||||
TMS_GPM2,
|
||||
TMS_GPM3,
|
||||
|
||||
TMS_AH_0001,
|
||||
TMS_AH_0002,
|
||||
TMS_AH_0003,
|
||||
TMS_AH_0004,
|
||||
TMS_AH_0005,
|
||||
TMS_AH_0006,
|
||||
TMS_AH_0007,
|
||||
TMS_AH_0008,
|
||||
TMS_AH_0009,
|
||||
TMS_AH_0010,
|
||||
TMS_AH_0011,
|
||||
TMS_AH_0012,
|
||||
TMS_AH_0013,
|
||||
|
||||
TMS_AT_0001,
|
||||
TMS_AT_0002,
|
||||
TMS_AT_0003,
|
||||
TMS_AT_0004,
|
||||
TMS_AT_0005,
|
||||
TMS_AT_0006,
|
||||
TMS_AT_0007,
|
||||
TMS_AT_0008,
|
||||
TMS_AT_0009,
|
||||
TMS_AT_0010,
|
||||
TMS_AT_0011,
|
||||
TMS_AT_0012,
|
||||
TMS_AT_0013,
|
||||
TMS_AT_0014,
|
||||
TMS_AT_0015,
|
||||
TMS_AT_0016,
|
||||
TMS_AT_0017,
|
||||
TMS_AT_0018,
|
||||
TMS_AT_0019,
|
||||
TMS_AT_0020,
|
||||
TMS_AT_0021,
|
||||
TMS_AT_0022,
|
||||
TMS_AT_0023,
|
||||
TMS_AT_0024,
|
||||
TMS_AT_0025,
|
||||
TMS_AT_0026,
|
||||
|
||||
TMS_AP_0001,
|
||||
TMS_AP_0002,
|
||||
TMS_AP_0003,
|
||||
TMS_AP_0004,
|
||||
TMS_AP_0005,
|
||||
TMS_AP_0006,
|
||||
TMS_AP_0007,
|
||||
TMS_AP_0009,
|
||||
TMS_AP_0010,
|
||||
TMS_AP_0011,
|
||||
TMS_AP_0012,
|
||||
TMS_AP_0013,
|
||||
TMS_AP_0014,
|
||||
TMS_AP_0015,
|
||||
TMS_AP_0016,
|
||||
TMS_AP_0017,
|
||||
TMS_AP_0018,
|
||||
|
||||
TMS_AP_0019,
|
||||
TMS_AP_0020,
|
||||
TMS_AP_0021,
|
||||
TMS_AP_0022,
|
||||
TMS_AP_0023,
|
||||
TMS_AP_0024,
|
||||
TMS_AP_0025,
|
||||
TMS_AP_0026,
|
||||
TMS_AP_0027,
|
||||
TMS_AP_0028,
|
||||
TMS_AP_0029,
|
||||
TMS_AP_0030,
|
||||
TMS_AP_0031,
|
||||
TMS_AP_0032,
|
||||
TMS_AP_0033,
|
||||
|
||||
TMS_AA_0001,
|
||||
|
||||
TMS_MPMA,
|
||||
TMS_MPMA_DAT,
|
||||
TMS_MPSR,
|
||||
TMS_MPSR_DAT,
|
||||
TMS_MPHA,
|
||||
TMS_MPHA_DAT,
|
||||
TMS_MPFE,
|
||||
TMS_MPFE_DAT,
|
||||
|
||||
TMS_TP01,
|
||||
TMS_TP01_DAT,
|
||||
TMS_TP02,
|
||||
TMS_TP02_DAT,
|
||||
TMS_TP04,
|
||||
TMS_TP04_DAT,
|
||||
TMS_TP05,
|
||||
TMS_TP05_DAT,
|
||||
TMS_TP06,
|
||||
TMS_TP06_DAT,
|
||||
TMS_TP07,
|
||||
TMS_TP07_DAT,
|
||||
TMS_TP08,
|
||||
TMS_TP08_DAT,
|
||||
|
||||
TMS_COUNT
|
||||
};
|
||||
#endif
|
||||
|
||||
enum EHTMLFontSize
|
||||
{
|
||||
eHTMLSize_Normal,
|
||||
eHTMLSize_Splitscreen,
|
||||
eHTMLSize_Tutorial,
|
||||
eHTMLSize_EndPoem,
|
||||
|
||||
eHTMLSize_COUNT,
|
||||
};
|
||||
|
||||
enum EControllerActions
|
||||
{
|
||||
ACTION_MENU_A,
|
||||
ACTION_MENU_B,
|
||||
ACTION_MENU_X,
|
||||
ACTION_MENU_Y,
|
||||
ACTION_MENU_UP,
|
||||
ACTION_MENU_DOWN,
|
||||
ACTION_MENU_RIGHT,
|
||||
ACTION_MENU_LEFT,
|
||||
ACTION_MENU_PAGEUP,
|
||||
ACTION_MENU_PAGEDOWN,
|
||||
ACTION_MENU_RIGHT_SCROLL,
|
||||
ACTION_MENU_LEFT_SCROLL,
|
||||
ACTION_MENU_STICK_PRESS,
|
||||
ACTION_MENU_OTHER_STICK_PRESS,
|
||||
ACTION_MENU_OTHER_STICK_UP,
|
||||
ACTION_MENU_OTHER_STICK_DOWN,
|
||||
ACTION_MENU_OTHER_STICK_LEFT,
|
||||
ACTION_MENU_OTHER_STICK_RIGHT,
|
||||
ACTION_MENU_PAUSEMENU,
|
||||
|
||||
#ifdef _DURANGO
|
||||
ACTION_MENU_GTC_PAUSE,
|
||||
ACTION_MENU_GTC_RESUME,
|
||||
#endif
|
||||
|
||||
#ifdef __ORBIS__
|
||||
ACTION_MENU_TOUCHPAD_PRESS,
|
||||
#endif
|
||||
|
||||
ACTION_MENU_OK,
|
||||
ACTION_MENU_CANCEL,
|
||||
ACTION_MAX_MENU = ACTION_MENU_CANCEL,
|
||||
|
||||
MINECRAFT_ACTION_JUMP,
|
||||
MINECRAFT_ACTION_FORWARD,
|
||||
MINECRAFT_ACTION_BACKWARD,
|
||||
MINECRAFT_ACTION_LEFT,
|
||||
MINECRAFT_ACTION_RIGHT,
|
||||
MINECRAFT_ACTION_LOOK_LEFT,
|
||||
MINECRAFT_ACTION_LOOK_RIGHT,
|
||||
MINECRAFT_ACTION_LOOK_UP,
|
||||
MINECRAFT_ACTION_LOOK_DOWN,
|
||||
MINECRAFT_ACTION_USE,
|
||||
MINECRAFT_ACTION_ACTION,
|
||||
MINECRAFT_ACTION_LEFT_SCROLL,
|
||||
MINECRAFT_ACTION_RIGHT_SCROLL,
|
||||
MINECRAFT_ACTION_INVENTORY,
|
||||
MINECRAFT_ACTION_PAUSEMENU,
|
||||
MINECRAFT_ACTION_DROP,
|
||||
MINECRAFT_ACTION_SNEAK_TOGGLE,
|
||||
MINECRAFT_ACTION_CRAFTING,
|
||||
MINECRAFT_ACTION_RENDER_THIRD_PERSON,
|
||||
MINECRAFT_ACTION_GAME_INFO,
|
||||
MINECRAFT_ACTION_DPAD_LEFT,
|
||||
MINECRAFT_ACTION_DPAD_RIGHT,
|
||||
MINECRAFT_ACTION_DPAD_UP,
|
||||
MINECRAFT_ACTION_DPAD_DOWN,
|
||||
|
||||
MINECRAFT_ACTION_MAX,
|
||||
|
||||
// These 4 aren't mapped to the input manager directly but are created from the dpad controls if required in Minecraft::run_middle
|
||||
// Don't use them with the input manager directly, just through LocalPlayer::ullButtonsPressed
|
||||
MINECRAFT_ACTION_SPAWN_CREEPER,
|
||||
MINECRAFT_ACTION_CHANGE_SKIN,
|
||||
MINECRAFT_ACTION_FLY_TOGGLE,
|
||||
MINECRAFT_ACTION_RENDER_DEBUG
|
||||
};
|
||||
|
||||
enum eMCLang
|
||||
{
|
||||
eMCLang_null=0,
|
||||
eMCLang_enUS,
|
||||
eMCLang_enGB,
|
||||
eMCLang_enIE,
|
||||
eMCLang_enAU,
|
||||
eMCLang_enNZ,
|
||||
eMCLang_enCA,
|
||||
eMCLang_jaJP,
|
||||
eMCLang_deDE,
|
||||
eMCLang_deAT,
|
||||
eMCLang_frFR,
|
||||
eMCLang_frCA,
|
||||
eMCLang_esES,
|
||||
eMCLang_esMX,
|
||||
eMCLang_itIT,
|
||||
eMCLang_koKR,
|
||||
eMCLang_ptPT,
|
||||
eMCLang_ptBR,
|
||||
eMCLang_ruRU,
|
||||
eMCLang_nlNL,
|
||||
eMCLang_fiFI,
|
||||
eMCLang_svSV,
|
||||
eMCLang_daDA,
|
||||
eMCLang_noNO,
|
||||
eMCLang_plPL,
|
||||
eMCLang_trTR,
|
||||
eMCLang_elEL,
|
||||
eMCLang_csCS,
|
||||
eMCLang_zhCHT,
|
||||
eMCLang_laLAS,
|
||||
|
||||
eMCLang_zhSG,
|
||||
eMCLang_zhCN,
|
||||
eMCLang_zhHK,
|
||||
eMCLang_zhTW,
|
||||
eMCLang_nlBE,
|
||||
eMCLang_daDK,
|
||||
eMCLang_frBE,
|
||||
eMCLang_frCH,
|
||||
eMCLang_deCH,
|
||||
eMCLang_nbNO,
|
||||
eMCLang_enGR,
|
||||
eMCLang_enHK,
|
||||
eMCLang_enSA,
|
||||
eMCLang_enHU,
|
||||
eMCLang_enIN,
|
||||
eMCLang_enIL,
|
||||
eMCLang_enSG,
|
||||
eMCLang_enSK,
|
||||
eMCLang_enZA,
|
||||
eMCLang_enCZ,
|
||||
eMCLang_enAE,
|
||||
eMCLang_esAR,
|
||||
eMCLang_esCL,
|
||||
eMCLang_esCO,
|
||||
eMCLang_esUS,
|
||||
eMCLang_svSE,
|
||||
|
||||
eMCLang_csCZ,
|
||||
eMCLang_elGR,
|
||||
eMCLang_nnNO,
|
||||
eMCLang_skSK,
|
||||
|
||||
eMCLang_hans,
|
||||
eMCLang_hant,
|
||||
};
|
||||
@@ -0,0 +1,231 @@
|
||||
#pragma once
|
||||
|
||||
typedef struct
|
||||
{
|
||||
wchar_t *wchFilename;
|
||||
eFileExtensionType eEXT;
|
||||
eTMSFileType eTMSType;
|
||||
PBYTE pbData;
|
||||
UINT uiSize;
|
||||
int iConfig; // used for texture pack data files
|
||||
}
|
||||
TMS_FILE;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
PBYTE pbData;
|
||||
DWORD dwBytes;
|
||||
BYTE ucRefCount;
|
||||
}
|
||||
MEMDATA,*PMEMDATA;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
DWORD dwNotification;
|
||||
UINT uiParam;
|
||||
}
|
||||
NOTIFICATION,*PNOTIFICATION;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool bSettingsChanged;
|
||||
unsigned char ucMusicVolume;
|
||||
unsigned char ucSoundFXVolume;
|
||||
unsigned char ucSensitivity;
|
||||
unsigned char ucGamma;
|
||||
unsigned char ucPad01; // 1 byte of padding inserted here
|
||||
unsigned short usBitmaskValues; // bit 0,1 - difficulty
|
||||
// bit 2 - view bob
|
||||
// bit 3 - player visible in a map
|
||||
// bit 4,5 - control scheme
|
||||
// bit 6 - invert look
|
||||
// bit 7 - southpaw
|
||||
// bit 8 - splitscreen vertical
|
||||
|
||||
// 4J-PB - Adding new values for interim TU for 1.6.6
|
||||
// bit 9 - Display gamertags in splitscreen
|
||||
// bit 10 - Disable/Enable hints
|
||||
// bit 11,12,13,14 - Autosave frequency - 0 = Off, 8 = (8*15 minutes) = 2 hours
|
||||
// bit 15 Tooltips
|
||||
|
||||
// debug values
|
||||
unsigned int uiDebugBitmask;
|
||||
|
||||
// block off space to use for whatever we want (e.g bitflags for storing things the player has done in the game, so we can flag the first time they do things, such as sleep)
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
unsigned char ucTutorialCompletion[TUTORIAL_PROFILE_STORAGE_BYTES];
|
||||
// adding new flags for interim TU to 1.6.6
|
||||
|
||||
// A value that encodes the skin that the player has set as their default
|
||||
DWORD dwSelectedSkin;
|
||||
|
||||
// In-Menu sensitivity
|
||||
unsigned char ucMenuSensitivity;
|
||||
unsigned char ucInterfaceOpacity;
|
||||
unsigned char ucPad02;//2 bytes of padding added here
|
||||
unsigned char usPad03;
|
||||
|
||||
// Adding another bitmask flag for more settings for 1.8.2
|
||||
unsigned int uiBitmaskValues; // 0x00000001 - eGameSetting_Clouds - on
|
||||
// 0x00000002 - eGameSetting_GameSetting_Online - on
|
||||
// 0x00000004 - eGameSetting_GameSetting_Invite - off
|
||||
// 0x00000008 - eGameSetting_GameSetting_FriendsOfFriends - on
|
||||
// 0x00000010 - eGameSetting_PSVita_NetworkModeAdhoc - on
|
||||
|
||||
// TU 5
|
||||
// 0x00000030 - eGameSetting_DisplayUpdateMessage - 3 - counts down to zero
|
||||
// TU 6
|
||||
// 0x00000040 - eGameSetting_BedrockFog - off
|
||||
// 0x00000080 - eGameSetting_DisplayHUD - on
|
||||
// 0x00000100 - eGameSetting_DisplayHand - on
|
||||
// TU 7
|
||||
// 0x00000200 - eGameSetting_CustomSkinAnim - on
|
||||
|
||||
// TU9 // 0x00000400 - eGameSetting_DeathMessages - on
|
||||
|
||||
// Adding another bitmask to store "special" completion tasks for the tutorial
|
||||
unsigned int uiSpecialTutorialBitmask;
|
||||
|
||||
// A value that encodes the cape that the player has set
|
||||
DWORD dwSelectedCape;
|
||||
|
||||
unsigned int uiFavoriteSkinA[MAX_FAVORITE_SKINS];
|
||||
unsigned char ucCurrentFavoriteSkinPos;
|
||||
|
||||
// TU13
|
||||
unsigned int uiMashUpPackWorldsDisplay; // bitmask to enable/disable the display of the individual mash-up pack worlds
|
||||
|
||||
// PS3 1.05 - Adding Greek, so need a language
|
||||
unsigned char ucLanguage;
|
||||
|
||||
// 29/Oct/2014 - Language selector.
|
||||
unsigned char ucLocale;
|
||||
|
||||
// 4J Stu - See comment for GAME_SETTINGS_PROFILE_DATA_BYTES below
|
||||
// was 192
|
||||
//unsigned char ucUnused[192-TUTORIAL_PROFILE_STORAGE_BYTES-sizeof(DWORD)-sizeof(char)-sizeof(char)-sizeof(char)-sizeof(char)-sizeof(LONG)-sizeof(LONG)-sizeof(DWORD)];
|
||||
// 4J-PB - don't need to define the padded space, the union with ucReservedSpace will make the sizeof GAME_SETTINGS correct
|
||||
};
|
||||
|
||||
unsigned char ucReservedSpace[192];
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
GAME_SETTINGS;
|
||||
|
||||
#ifdef _XBOX_ONE
|
||||
typedef struct
|
||||
{
|
||||
WCHAR wchPlayerUID[64];
|
||||
char pszLevelName[14];
|
||||
}
|
||||
BANNEDLISTDATA,*PBANNEDLISTDATA;
|
||||
#else
|
||||
typedef struct
|
||||
{
|
||||
PlayerUID xuid;
|
||||
char pszLevelName[14];
|
||||
}
|
||||
BANNEDLISTDATA,*PBANNEDLISTDATA;
|
||||
#endif
|
||||
|
||||
typedef std::vector <PBANNEDLISTDATA> VBANNEDLIST;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int iPad;
|
||||
eXuiAction action;
|
||||
}
|
||||
XuiActionParam;
|
||||
|
||||
// tips
|
||||
typedef struct
|
||||
{
|
||||
int iSortValue;
|
||||
UINT uiStringID;
|
||||
}
|
||||
TIPSTRUCT;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
eXUID eXuid;
|
||||
WCHAR wchCape[MAX_CAPENAME_SIZE];
|
||||
WCHAR wchSkin[MAX_CAPENAME_SIZE];
|
||||
}
|
||||
MOJANG_DATA;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
eDLCContentType eDLCType;
|
||||
#if defined( __PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
|
||||
char chImageURL[256];//SCE_NP_COMMERCE2_URL_LEN
|
||||
#else
|
||||
|
||||
#ifdef _XBOX_ONE
|
||||
|
||||
wstring wsProductId;
|
||||
wstring wsDisplayName;
|
||||
|
||||
// add a store for the local DLC image
|
||||
PBYTE pbImageData;
|
||||
DWORD dwImageBytes;
|
||||
#else
|
||||
ULONGLONG ullOfferID_Full;
|
||||
ULONGLONG ullOfferID_Trial;
|
||||
#endif
|
||||
WCHAR wchBanner[MAX_BANNERNAME_SIZE];
|
||||
WCHAR wchDataFile[MAX_BANNERNAME_SIZE];
|
||||
int iGender;
|
||||
#endif
|
||||
int iConfig;
|
||||
unsigned int uiSortIndex;
|
||||
}
|
||||
DLC_INFO;
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int x,z;
|
||||
_eTerrainFeatureType eTerrainFeature;
|
||||
}
|
||||
FEATURE_DATA;
|
||||
|
||||
// banned list
|
||||
typedef struct
|
||||
{
|
||||
BYTE *pBannedList;
|
||||
DWORD dwBytes;
|
||||
}
|
||||
BANNEDLIST;
|
||||
|
||||
typedef struct _DLCRequest
|
||||
{
|
||||
DWORD dwType;
|
||||
eDLCContentState eState;
|
||||
}
|
||||
DLCRequest;
|
||||
|
||||
typedef struct _TMSPPRequest
|
||||
{
|
||||
eTMSContentState eState;
|
||||
eDLCContentType eType;
|
||||
C4JStorage::eGlobalStorage eStorageFacility;
|
||||
C4JStorage::eTMS_FILETYPEVAL eFileTypeVal;
|
||||
//char szFilename[MAX_TMSFILENAME_SIZE];
|
||||
#ifdef _XBOX_ONE
|
||||
int( *CallbackFunc)(LPVOID,int,int,LPVOID, WCHAR *);
|
||||
#else
|
||||
int( *CallbackFunc)(LPVOID,int,int,C4JStorage::PTMSPP_FILEDATA, LPCSTR szFilename);
|
||||
#endif
|
||||
WCHAR wchFilename[MAX_TMSFILENAME_SIZE];
|
||||
|
||||
LPVOID lpCallbackParam;
|
||||
}
|
||||
TMSPPRequest;
|
||||
|
||||
typedef pair<EUIScene, HXUIOBJ> SceneStackPair;
|
||||
@@ -0,0 +1,77 @@
|
||||
#include "stdafx.h"
|
||||
#include "Consoles_SoundEngine.h"
|
||||
|
||||
|
||||
bool ConsoleSoundEngine::GetIsPlayingStreamingCDMusic()
|
||||
{
|
||||
return m_bIsPlayingStreamingCDMusic;
|
||||
}
|
||||
bool ConsoleSoundEngine::GetIsPlayingStreamingGameMusic()
|
||||
{
|
||||
return m_bIsPlayingStreamingGameMusic;
|
||||
}
|
||||
void ConsoleSoundEngine::SetIsPlayingStreamingCDMusic(bool bVal)
|
||||
{
|
||||
m_bIsPlayingStreamingCDMusic=bVal;
|
||||
}
|
||||
void ConsoleSoundEngine::SetIsPlayingStreamingGameMusic(bool bVal)
|
||||
{
|
||||
m_bIsPlayingStreamingGameMusic=bVal;
|
||||
}
|
||||
bool ConsoleSoundEngine::GetIsPlayingEndMusic()
|
||||
{
|
||||
return m_bIsPlayingEndMusic;
|
||||
}
|
||||
bool ConsoleSoundEngine::GetIsPlayingNetherMusic()
|
||||
{
|
||||
return m_bIsPlayingNetherMusic;
|
||||
}
|
||||
void ConsoleSoundEngine::SetIsPlayingEndMusic(bool bVal)
|
||||
{
|
||||
m_bIsPlayingEndMusic=bVal;
|
||||
}
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,98 @@
|
||||
#pragma once
|
||||
|
||||
#include "..\..\..\Minecraft.World\SoundTypes.h"
|
||||
|
||||
#ifdef _XBOX
|
||||
|
||||
#elif defined (__PS3__)
|
||||
#undef __in
|
||||
#undef __out
|
||||
#include "..\..\PS3\Miles\include\mss.h"
|
||||
#elif defined (__PSVITA__)
|
||||
#include "..\..\PSVITA\Miles\include\mss.h"
|
||||
#elif defined _DURANGO
|
||||
// 4J Stu - Temp define to get Miles to link, can likely be removed when we get a new version of Miles
|
||||
#define _SEKRIT
|
||||
#include "..\..\Durango\Miles\include\mss.h"
|
||||
#elif defined __ORBIS__
|
||||
// 4J Stu - Temp define to get Miles to link, can likely be removed when we get a new version of Miles
|
||||
#define _SEKRIT2
|
||||
#include "..\..\Orbis\Miles\include\mss.h"
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float x,y,z;
|
||||
}
|
||||
AUDIO_VECTOR;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool bValid;
|
||||
AUDIO_VECTOR vPosition;
|
||||
AUDIO_VECTOR vOrientFront;
|
||||
}
|
||||
AUDIO_LISTENER;
|
||||
|
||||
class Options;
|
||||
|
||||
class ConsoleSoundEngine
|
||||
{
|
||||
public:
|
||||
|
||||
ConsoleSoundEngine() : m_bIsPlayingStreamingCDMusic(false),m_bIsPlayingStreamingGameMusic(false), m_bIsPlayingEndMusic(false),m_bIsPlayingNetherMusic(false){};
|
||||
virtual void tick(shared_ptr<Mob> *players, float a) =0;
|
||||
virtual void destroy()=0;
|
||||
virtual void play(int iSound, float x, float y, float z, float volume, float pitch) =0;
|
||||
virtual void playStreaming(const wstring& name, float x, float y , float z, float volume, float pitch, bool bMusicDelay=true) =0;
|
||||
virtual void playUI(int iSound, float volume, float pitch) =0;
|
||||
virtual void updateMusicVolume(float fVal) =0;
|
||||
virtual void updateSystemMusicPlaying(bool isPlaying) = 0;
|
||||
virtual void updateSoundEffectVolume(float fVal) =0;
|
||||
virtual void init(Options *) =0 ;
|
||||
virtual void add(const wstring& name, File *file) =0;
|
||||
virtual void addMusic(const wstring& name, File *file) =0;
|
||||
virtual void addStreaming(const wstring& name, File *file) =0;
|
||||
virtual char *ConvertSoundPathToName(const wstring& name, bool bConvertSpaces) =0;
|
||||
virtual void playMusicTick() =0;
|
||||
|
||||
virtual bool GetIsPlayingStreamingCDMusic() ;
|
||||
virtual bool GetIsPlayingStreamingGameMusic() ;
|
||||
virtual void SetIsPlayingStreamingCDMusic(bool bVal) ;
|
||||
virtual void SetIsPlayingStreamingGameMusic(bool bVal) ;
|
||||
virtual bool GetIsPlayingEndMusic() ;
|
||||
virtual bool GetIsPlayingNetherMusic() ;
|
||||
virtual void SetIsPlayingEndMusic(bool bVal) ;
|
||||
virtual void SetIsPlayingNetherMusic(bool bVal) ;
|
||||
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
|
||||
|
||||
virtual int initAudioHardware(int iMinSpeakers)=0;
|
||||
|
||||
bool m_bIsPlayingStreamingCDMusic;
|
||||
bool m_bIsPlayingStreamingGameMusic;
|
||||
bool m_bIsPlayingEndMusic;
|
||||
bool m_bIsPlayingNetherMusic;
|
||||
};
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,174 @@
|
||||
#pragma once
|
||||
class Mob;
|
||||
class Options;
|
||||
using namespace std;
|
||||
#include "..\..\Minecraft.World\SoundTypes.h"
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
typedef void *HMSOUNDBANK;
|
||||
typedef void *HDIGDRIVER;
|
||||
typedef void *HSTREAM;
|
||||
#endif
|
||||
|
||||
enum eMUSICFILES
|
||||
{
|
||||
eStream_Overworld_Calm1 = 0,
|
||||
eStream_Overworld_Calm2,
|
||||
eStream_Overworld_Calm3,
|
||||
eStream_Overworld_hal1,
|
||||
eStream_Overworld_hal2,
|
||||
eStream_Overworld_hal3,
|
||||
eStream_Overworld_hal4,
|
||||
eStream_Overworld_nuance1,
|
||||
eStream_Overworld_nuance2,
|
||||
#ifndef _XBOX
|
||||
// Add the new music tracks
|
||||
eStream_Overworld_Creative1,
|
||||
eStream_Overworld_Creative2,
|
||||
eStream_Overworld_Creative3,
|
||||
eStream_Overworld_Creative4,
|
||||
eStream_Overworld_Creative5,
|
||||
eStream_Overworld_Creative6,
|
||||
eStream_Overworld_Menu1,
|
||||
eStream_Overworld_Menu2,
|
||||
eStream_Overworld_Menu3,
|
||||
eStream_Overworld_Menu4,
|
||||
#endif
|
||||
eStream_Overworld_piano1,
|
||||
eStream_Overworld_piano2,
|
||||
eStream_Overworld_piano3, // <-- make piano3 the last overworld one
|
||||
// Nether
|
||||
eStream_Nether1,
|
||||
eStream_Nether2,
|
||||
eStream_Nether3,
|
||||
eStream_Nether4,
|
||||
// The End
|
||||
eStream_end_dragon,
|
||||
eStream_end_end,
|
||||
eStream_CD_1,
|
||||
eStream_CD_2,
|
||||
eStream_CD_3,
|
||||
eStream_CD_4,
|
||||
eStream_CD_5,
|
||||
eStream_CD_6,
|
||||
eStream_CD_7,
|
||||
eStream_CD_8,
|
||||
eStream_CD_9,
|
||||
eStream_CD_10,
|
||||
eStream_CD_11,
|
||||
eStream_CD_12,
|
||||
eStream_Max,
|
||||
};
|
||||
|
||||
enum eMUSICTYPE
|
||||
{
|
||||
eMusicType_None,
|
||||
eMusicType_Game,
|
||||
eMusicType_CD,
|
||||
};
|
||||
|
||||
|
||||
enum MUSIC_STREAMSTATE
|
||||
{
|
||||
eMusicStreamState_Idle=0,
|
||||
eMusicStreamState_Stop,
|
||||
eMusicStreamState_Stopping,
|
||||
eMusicStreamState_Opening,
|
||||
eMusicStreamState_OpeningCancel,
|
||||
eMusicStreamState_Play,
|
||||
eMusicStreamState_Playing,
|
||||
eMusicStreamState_Completed
|
||||
};
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float x,y,z,volume,pitch;
|
||||
int iSound;
|
||||
bool bIs3D;
|
||||
bool bUseSoundsPitchVal;
|
||||
#ifdef _DEBUG
|
||||
char chName[64];
|
||||
#endif
|
||||
}
|
||||
AUDIO_INFO;
|
||||
|
||||
class SoundEngine : public ConsoleSoundEngine
|
||||
{
|
||||
static const int MAX_SAME_SOUNDS_PLAYING = 8; // 4J added
|
||||
public:
|
||||
SoundEngine();
|
||||
virtual void destroy();
|
||||
#ifdef _DEBUG
|
||||
void GetSoundName(char *szSoundName,int iSound);
|
||||
#endif
|
||||
virtual void play(int iSound, float x, float y, float z, float volume, float pitch);
|
||||
virtual void playStreaming(const wstring& name, float x, float y , float z, float volume, float pitch, bool bMusicDelay=true);
|
||||
virtual void playUI(int iSound, float volume, float pitch);
|
||||
virtual void playMusicTick();
|
||||
virtual void updateMusicVolume(float fVal);
|
||||
virtual void updateSystemMusicPlaying(bool isPlaying);
|
||||
virtual void updateSoundEffectVolume(float fVal);
|
||||
virtual void init(Options *);
|
||||
virtual void tick(shared_ptr<Mob> *players, float a); // 4J - updated to take array of local players rather than single one
|
||||
virtual void add(const wstring& name, File *file);
|
||||
virtual void addMusic(const wstring& name, File *file);
|
||||
virtual void addStreaming(const wstring& name, File *file);
|
||||
virtual char *ConvertSoundPathToName(const wstring& name, bool bConvertSpaces=false);
|
||||
bool isStreamingWavebankReady(); // 4J Added
|
||||
int getMusicID(int iDomain);
|
||||
int getMusicID(const wstring& name);
|
||||
void SetStreamingSounds(int iOverworldMin, int iOverWorldMax, int iNetherMin, int iNetherMax, int iEndMin, int iEndMax, int iCD1);
|
||||
void updateMiles(); // AP added so Vita can update all the Miles functions during the mixer callback
|
||||
void playMusicUpdate();
|
||||
|
||||
private:
|
||||
float getMasterMusicVolume();
|
||||
// platform specific functions
|
||||
#ifdef __PS3__
|
||||
int initAudioHardware(int iMinSpeakers);
|
||||
#else
|
||||
int initAudioHardware(int iMinSpeakers) { return iMinSpeakers;}
|
||||
#endif
|
||||
|
||||
int GetRandomishTrack(int iStart,int iEnd);
|
||||
|
||||
HMSOUNDBANK m_hBank;
|
||||
HDIGDRIVER m_hDriver;
|
||||
HSTREAM m_hStream;
|
||||
|
||||
static char m_szSoundPath[];
|
||||
static char m_szMusicPath[];
|
||||
static char m_szRedistName[];
|
||||
static char *m_szStreamFileA[eStream_Max];
|
||||
|
||||
AUDIO_LISTENER m_ListenerA[MAX_LOCAL_PLAYERS];
|
||||
int m_validListenerCount;
|
||||
|
||||
|
||||
Random *random;
|
||||
int m_musicID;
|
||||
int m_iMusicDelay;
|
||||
int m_StreamState;
|
||||
int m_MusicType;
|
||||
AUDIO_INFO m_StreamingAudioInfo;
|
||||
wstring m_CDMusic;
|
||||
BOOL m_bSystemMusicPlaying;
|
||||
float m_MasterMusicVolume;
|
||||
float m_MasterEffectsVolume;
|
||||
|
||||
C4JThread *m_openStreamThread;
|
||||
static int OpenStreamThreadProc( void* lpParameter );
|
||||
char m_szStreamName[255];
|
||||
int CurrentSoundsPlaying[eSoundType_MAX+eSFX_MAX];
|
||||
|
||||
// streaming music files - will be different for mash-up packs
|
||||
int m_iStream_Overworld_Min,m_iStream_Overworld_Max;
|
||||
int m_iStream_Nether_Min,m_iStream_Nether_Max;
|
||||
int m_iStream_End_Min,m_iStream_End_Max;
|
||||
int m_iStream_CD_1;
|
||||
bool *m_bHeardTrackA;
|
||||
|
||||
#ifdef __ORBIS__
|
||||
int32_t m_hBGMAudio;
|
||||
#endif
|
||||
};
|
||||
@@ -0,0 +1,237 @@
|
||||
#include "stdafx.h"
|
||||
|
||||
#include "Consoles_SoundEngine.h"
|
||||
|
||||
|
||||
|
||||
const WCHAR *ConsoleSoundEngine::wchSoundNames[eSoundType_MAX]=
|
||||
{
|
||||
L"mob.chicken", // eSoundType_MOB_CHICKEN_AMBIENT
|
||||
L"mob.chickenhurt", // eSoundType_MOB_CHICKEN_HURT
|
||||
L"mob.chickenplop", // eSoundType_MOB_CHICKENPLOP
|
||||
L"mob.cow", // eSoundType_MOB_COW_AMBIENT
|
||||
L"mob.cowhurt", // eSoundType_MOB_COW_HURT
|
||||
L"mob.pig", // eSoundType_MOB_PIG_AMBIENT
|
||||
L"mob.pigdeath", // eSoundType_MOB_PIG_DEATH
|
||||
L"mob.sheep", // eSoundType_MOB_SHEEP_AMBIENT
|
||||
L"mob.wolf.growl", // eSoundType_MOB_WOLF_GROWL
|
||||
L"mob.wolf.whine", // eSoundType_MOB_WOLF_WHINE
|
||||
L"mob.wolf.panting", // eSoundType_MOB_WOLF_PANTING
|
||||
L"mob.wolf.bark", // eSoundType_MOB_WOLF_BARK
|
||||
L"mob.wolf.hurt", // eSoundType_MOB_WOLF_HURT
|
||||
L"mob.wolf.death", // eSoundType_MOB_WOLF_DEATH
|
||||
L"mob.wolf.shake", // eSoundType_MOB_WOLF_SHAKE
|
||||
L"mob.blaze.breathe", // eSoundType_MOB_BLAZE_BREATHE
|
||||
L"mob.blaze.hit", // eSoundType_MOB_BLAZE_HURT
|
||||
L"mob.blaze.death", // eSoundType_MOB_BLAZE_DEATH
|
||||
L"mob.ghast.moan", // eSoundType_MOB_GHAST_MOAN
|
||||
L"mob.ghast.scream", // eSoundType_MOB_GHAST_SCREAM
|
||||
L"mob.ghast.death", // eSoundType_MOB_GHAST_DEATH
|
||||
L"mob.ghast.fireball", // eSoundType_MOB_GHAST_FIREBALL
|
||||
L"mob.ghast.charge", // eSoundType_MOB_GHAST_CHARGE
|
||||
L"mob.endermen.idle", // eSoundType_MOB_ENDERMEN_IDLE
|
||||
L"mob.endermen.hit", // eSoundType_MOB_ENDERMEN_HIT
|
||||
L"mob.endermen.death", // eSoundType_MOB_ENDERMEN_DEATH
|
||||
L"mob.endermen.portal", // eSoundType_MOB_ENDERMEN_PORTAL
|
||||
L"mob.zombiepig.zpig", // eSoundType_MOB_ZOMBIEPIG_AMBIENT
|
||||
L"mob.zombiepig.zpighurt", // eSoundType_MOB_ZOMBIEPIG_HURT
|
||||
L"mob.zombiepig.zpigdeath", // eSoundType_MOB_ZOMBIEPIG_DEATH
|
||||
L"mob.zombiepig.zpigangry", // eSoundType_MOB_ZOMBIEPIG_ZPIGANGRY
|
||||
L"mob.silverfish.say", // eSoundType_MOB_SILVERFISH_AMBIENT,
|
||||
L"mob.silverfish.hit", // eSoundType_MOB_SILVERFISH_HURT
|
||||
L"mob.silverfish.kill", // eSoundType_MOB_SILVERFISH_DEATH,
|
||||
L"mob.silverfish.step", // eSoundType_MOB_SILVERFISH_STEP,
|
||||
L"mob.skeleton", // eSoundType_MOB_SKELETON_AMBIENT,
|
||||
L"mob.skeletonhurt", // eSoundType_MOB_SKELETON_HURT,
|
||||
L"mob.spider", // eSoundType_MOB_SPIDER_AMBIENT,
|
||||
L"mob.spiderdeath", // eSoundType_MOB_SPIDER_DEATH,
|
||||
L"mob.slime", // eSoundType_MOB_SLIME,
|
||||
L"mob.slimeattack", // eSoundType_MOB_SLIME_ATTACK,
|
||||
L"mob.creeper", // eSoundType_MOB_CREEPER_HURT,
|
||||
L"mob.creeperdeath", // eSoundType_MOB_CREEPER_DEATH,
|
||||
L"mob.zombie", // eSoundType_MOB_ZOMBIE_AMBIENT,
|
||||
L"mob.zombiehurt", // eSoundType_MOB_ZOMBIE_HURT,
|
||||
L"mob.zombiedeath", // eSoundType_MOB_ZOMBIE_DEATH,
|
||||
L"mob.zombie.wood", // eSoundType_MOB_ZOMBIE_WOOD,
|
||||
L"mob.zombie.woodbreak", // eSoundType_MOB_ZOMBIE_WOOD_BREAK,
|
||||
L"mob.zombie.metal", // eSoundType_MOB_ZOMBIE_METAL,
|
||||
L"mob.magmacube.big", // eSoundType_MOB_MAGMACUBE_BIG,
|
||||
L"mob.magmacube.small", // eSoundType_MOB_MAGMACUBE_SMALL,
|
||||
L"mob.cat.purr", // eSoundType_MOB_CAT_PURR
|
||||
L"mob.cat.purreow", // eSoundType_MOB_CAT_PURREOW
|
||||
L"mob.cat.meow", // eSoundType_MOB_CAT_MEOW
|
||||
// 4J-PB - correct the name of the event for hitting ocelots
|
||||
L"mob.cat.hit", // eSoundType_MOB_CAT_HITT
|
||||
// L"mob.irongolem.throw", // eSoundType_MOB_IRONGOLEM_THROW
|
||||
// L"mob.irongolem.hit", // eSoundType_MOB_IRONGOLEM_HIT
|
||||
// L"mob.irongolem.death", // eSoundType_MOB_IRONGOLEM_DEATH
|
||||
// L"mob.irongolem.walk", // eSoundType_MOB_IRONGOLEM_WALK
|
||||
L"random.bow", // eSoundType_RANDOM_BOW,
|
||||
L"random.bowhit", // eSoundType_RANDOM_BOW_HIT,
|
||||
L"random.explode", // eSoundType_RANDOM_EXPLODE,
|
||||
L"random.fizz", // eSoundType_RANDOM_FIZZ,
|
||||
L"random.pop", // eSoundType_RANDOM_POP,
|
||||
L"random.fuse", // eSoundType_RANDOM_FUSE,
|
||||
L"random.drink", // eSoundType_RANDOM_DRINK,
|
||||
L"random.eat", // eSoundType_RANDOM_EAT,
|
||||
L"random.burp", // eSoundType_RANDOM_BURP,
|
||||
L"random.splash", // eSoundType_RANDOM_SPLASH,
|
||||
L"random.click", // eSoundType_RANDOM_CLICK,
|
||||
L"random.glass", // eSoundType_RANDOM_GLASS,
|
||||
L"random.orb", // eSoundType_RANDOM_ORB,
|
||||
L"random.break", // eSoundType_RANDOM_BREAK,
|
||||
L"random.chestopen", // eSoundType_RANDOM_CHEST_OPEN,
|
||||
L"random.chestclosed", // eSoundType_RANDOM_CHEST_CLOSE,
|
||||
L"random.door_open", // eSoundType_RANDOM_DOOR_OPEN,
|
||||
L"random.door_close", // eSoundType_RANDOM_DOOR_CLOSE,
|
||||
L"ambient.weather.rain", // eSoundType_AMBIENT_WEATHER_RAIN,
|
||||
L"ambient.weather.thunder", // eSoundType_AMBIENT_WEATHER_THUNDER,
|
||||
L"ambient.cave.cave", // eSoundType_CAVE_CAVE, DON'T USE FOR XBOX 360!!!
|
||||
#ifdef _XBOX
|
||||
L"ambient.cave.cave2", // eSoundType_CAVE_CAVE2 - removed the two sounds that were at 192k in the first ambient cave event
|
||||
#endif
|
||||
L"portal.portal", // eSoundType_PORTAL_PORTAL,
|
||||
// 4J-PB - added a couple that were still using wstring
|
||||
L"portal.trigger", // eSoundType_PORTAL_TRIGGER
|
||||
L"portal.travel", // eSoundType_PORTAL_TRAVEL
|
||||
|
||||
L"fire.ignite", // eSoundType_FIRE_IGNITE,
|
||||
L"fire.fire", // eSoundType_FIRE_FIRE,
|
||||
L"damage.hurtflesh", // eSoundType_DAMAGE_HURT,
|
||||
L"damage.fallsmall", // eSoundType_DAMAGE_FALL_SMALL,
|
||||
L"damage.fallbig", // eSoundType_DAMAGE_FALL_BIG,
|
||||
L"note.harp", // eSoundType_NOTE_HARP,
|
||||
L"note.bd", // eSoundType_NOTE_BD,
|
||||
L"note.snare", // eSoundType_NOTE_SNARE,
|
||||
L"note.hat", // eSoundType_NOTE_HAT,
|
||||
L"note.bassattack", // eSoundType_NOTE_BASSATTACK,
|
||||
L"tile.piston.in", // eSoundType_TILE_PISTON_IN,
|
||||
L"tile.piston.out", // eSoundType_TILE_PISTON_OUT,
|
||||
L"liquid.water", // eSoundType_LIQUID_WATER,
|
||||
L"liquid.lavapop", // eSoundType_LIQUID_LAVA_POP,
|
||||
L"liquid.lava", // eSoundType_LIQUID_LAVA,
|
||||
L"step.stone", // eSoundType_STEP_STONE,
|
||||
L"step.wood", // eSoundType_STEP_WOOD,
|
||||
L"step.gravel", // eSoundType_STEP_GRAVEL,
|
||||
L"step.grass", // eSoundType_STEP_GRASS,
|
||||
L"step.metal", // eSoundType_STEP_METAL,
|
||||
L"step.cloth", // eSoundType_STEP_CLOTH,
|
||||
L"step.sand", // eSoundType_STEP_SAND,
|
||||
|
||||
// below this are the additional sounds from the second soundbank
|
||||
L"mob.enderdragon.end", // eSoundType_MOB_ENDERDRAGON_END
|
||||
L"mob.enderdragon.growl", // eSoundType_MOB_ENDERDRAGON_GROWL
|
||||
L"mob.enderdragon.hit", // eSoundType_MOB_ENDERDRAGON_HIT
|
||||
L"mob.enderdragon.wings", // eSoundType_MOB_ENDERDRAGON_MOVE
|
||||
L"mob.irongolem.throw", // eSoundType_MOB_IRONGOLEM_THROW
|
||||
L"mob.irongolem.hit", // eSoundType_MOB_IRONGOLEM_HIT
|
||||
L"mob.irongolem.death", // eSoundType_MOB_IRONGOLEM_DEATH
|
||||
L"mob.irongolem.walk", // eSoundType_MOB_IRONGOLEM_WALK
|
||||
|
||||
// TU14
|
||||
L"damage.thorns", // eSoundType_DAMAGE_THORNS
|
||||
L"random.anvil_break", // eSoundType_RANDOM_ANVIL_BREAK
|
||||
L"random.anvil_land", // eSoundType_RANDOM_ANVIL_LAND
|
||||
L"random.anvil_use", // eSoundType_RANDOM_ANVIL_USE
|
||||
L"mob.villager.haggle", // eSoundType_MOB_VILLAGER_HAGGLE
|
||||
L"mob.villager.idle", // eSoundType_MOB_VILLAGER_IDLE
|
||||
L"mob.villager.hit", // eSoundType_MOB_VILLAGER_HIT
|
||||
L"mob.villager.death", // eSoundType_MOB_VILLAGER_DEATH
|
||||
L"mob.villager.yes", // eSoundType_MOB_VILLAGER_YES
|
||||
L"mob.villager.no", // eSoundType_MOB_VILLAGER_NO
|
||||
L"mob.zombie.infect", // eSoundType_MOB_ZOMBIE_INFECT
|
||||
L"mob.zombie.unfect", // eSoundType_MOB_ZOMBIE_UNFECT
|
||||
L"mob.zombie.remedy", // eSoundType_MOB_ZOMBIE_REMEDY
|
||||
L"step.snow", // eSoundType_STEP_SNOW
|
||||
L"step.ladder", // eSoundType_STEP_LADDER
|
||||
L"dig.cloth", // eSoundType_DIG_CLOTH
|
||||
L"dig.grass", // eSoundType_DIG_GRASS
|
||||
L"dig.gravel", // eSoundType_DIG_GRAVEL
|
||||
L"dig.sand", // eSoundType_DIG_SAND
|
||||
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",
|
||||
};
|
||||
|
||||
|
||||
const WCHAR *ConsoleSoundEngine::wchUISoundNames[eSFX_MAX]=
|
||||
{
|
||||
L"back",
|
||||
L"craft",
|
||||
L"craftfail",
|
||||
L"focus",
|
||||
L"press",
|
||||
L"scroll",
|
||||
};
|
||||
Binary file not shown.
@@ -0,0 +1,802 @@
|
||||
/* This is free and unencumbered software released into the public domain.
|
||||
*
|
||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
* distribute this software, either in source code form or as a compiled
|
||||
* binary, for any purpose, commercial or non-commercial, and by any
|
||||
* means.
|
||||
*
|
||||
* In jurisdictions that recognize copyright laws, the author or authors
|
||||
* of this software dedicate any and all copyright interest in the
|
||||
* software to the public domain. We make this dedication for the benefit
|
||||
* of the public at large and to the detriment of our heirs and
|
||||
* successors. We intend this dedication to be an overt act of
|
||||
* relinquishment in perpetuity of all present and future rights to this
|
||||
* software under copyright law.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* For more information, please refer to <http://unlicense.org/>
|
||||
*/
|
||||
|
||||
/* This file is auto-generated! Please do not edit it manually.
|
||||
* Instead, modify the API in al.xml and regenerate using genheaders.py.
|
||||
*
|
||||
* Last regenerated: 2025-10-13 19:40:01.687690+00:00
|
||||
*/
|
||||
|
||||
#ifndef AL_AL_H
|
||||
#define AL_AL_H
|
||||
|
||||
/* NOLINTBEGIN */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
#ifdef _MSVC_LANG
|
||||
#define AL_CPLUSPLUS _MSVC_LANG
|
||||
#else
|
||||
#define AL_CPLUSPLUS __cplusplus
|
||||
#endif
|
||||
|
||||
#ifndef AL_DISABLE_NOEXCEPT
|
||||
#if AL_CPLUSPLUS >= 201103L
|
||||
#define AL_API_NOEXCEPT noexcept
|
||||
#else
|
||||
#define AL_API_NOEXCEPT
|
||||
#endif
|
||||
#if AL_CPLUSPLUS >= 201703L
|
||||
#define AL_API_NOEXCEPT17 noexcept
|
||||
#else
|
||||
#define AL_API_NOEXCEPT17
|
||||
#endif
|
||||
|
||||
#else /* AL_DISABLE_NOEXCEPT */
|
||||
|
||||
#define AL_API_NOEXCEPT
|
||||
#define AL_API_NOEXCEPT17
|
||||
#endif
|
||||
|
||||
#undef AL_CPLUSPLUS
|
||||
|
||||
#else /* __cplusplus */
|
||||
|
||||
#define AL_API_NOEXCEPT
|
||||
#define AL_API_NOEXCEPT17
|
||||
#endif
|
||||
|
||||
#ifndef AL_API
|
||||
#if defined(AL_LIBTYPE_STATIC)
|
||||
#define AL_API
|
||||
#elif defined(_WIN32)
|
||||
#define AL_API __declspec(dllimport)
|
||||
#else
|
||||
#define AL_API extern
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define AL_APIENTRY __cdecl
|
||||
#else
|
||||
#define AL_APIENTRY
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef AL_VERSION_1_0
|
||||
#define AL_VERSION_1_0 1
|
||||
/** 8-bit boolean */
|
||||
typedef char ALboolean;
|
||||
|
||||
/** character */
|
||||
typedef char ALchar;
|
||||
|
||||
/** signed 8-bit integer */
|
||||
typedef signed char ALbyte;
|
||||
|
||||
/** unsigned 8-bit integer */
|
||||
typedef unsigned char ALubyte;
|
||||
|
||||
/** signed 16-bit integer */
|
||||
typedef short ALshort;
|
||||
|
||||
/** unsigned 16-bit integer */
|
||||
typedef unsigned short ALushort;
|
||||
|
||||
/** signed 32-bit integer */
|
||||
typedef int ALint;
|
||||
|
||||
/** unsigned 32-bit integer */
|
||||
typedef unsigned int ALuint;
|
||||
|
||||
/** non-negative 32-bit integer size */
|
||||
typedef int ALsizei;
|
||||
|
||||
/** 32-bit enumeration value */
|
||||
typedef int ALenum;
|
||||
|
||||
/** 32-bit IEEE-754 floating-point */
|
||||
typedef float ALfloat;
|
||||
|
||||
/** 64-bit IEEE-754 floating-point */
|
||||
typedef double ALdouble;
|
||||
|
||||
/** void type (opaque pointers only) */
|
||||
typedef void ALvoid;
|
||||
|
||||
/** No distance model or no buffer */
|
||||
#define AL_NONE 0
|
||||
|
||||
/** Boolean False. */
|
||||
#define AL_FALSE 0
|
||||
|
||||
/** Boolean True. */
|
||||
#define AL_TRUE 1
|
||||
|
||||
/**
|
||||
* Relative source.
|
||||
* Type: ALboolean
|
||||
* Range: [AL_FALSE, AL_TRUE]
|
||||
* Default: AL_FALSE
|
||||
*
|
||||
* Specifies if the source uses relative coordinates.
|
||||
*/
|
||||
#define AL_SOURCE_RELATIVE 0x202
|
||||
|
||||
/**
|
||||
* Inner cone angle, in degrees.
|
||||
* Type: ALint, ALfloat
|
||||
* Range: [0 - 360]
|
||||
* Default: 360
|
||||
*
|
||||
* The angle covered by the inner cone, the area within which the source will
|
||||
* not be attenuated by direction.
|
||||
*/
|
||||
#define AL_CONE_INNER_ANGLE 0x1001
|
||||
|
||||
/**
|
||||
* Outer cone angle, in degrees.
|
||||
* Type: ALint, ALfloat
|
||||
* Range: [0 - 360]
|
||||
* Default: 360
|
||||
*
|
||||
* The angle covered by the outer cone, the area outside of which the source
|
||||
* will be fully attenuated by direction.
|
||||
*/
|
||||
#define AL_CONE_OUTER_ANGLE 0x1002
|
||||
|
||||
/**
|
||||
* Source pitch.
|
||||
* Type: ALfloat
|
||||
* Range: [0.5 - 2.0]
|
||||
* Default: 1.0
|
||||
*
|
||||
* A multiplier for the sample rate of the source's buffer.
|
||||
*/
|
||||
#define AL_PITCH 0x1003
|
||||
|
||||
/**
|
||||
* Source or listener position.
|
||||
* Type: ALfloat[3], ALint[3]
|
||||
* Default: {0, 0, 0}
|
||||
*
|
||||
* The source or listener location in three dimensional space.
|
||||
*
|
||||
* OpenAL uses a right handed coordinate system, like OpenGL, where with a
|
||||
* default view, X points right (thumb), Y points up (index finger), and Z
|
||||
* points towards the viewer/camera (middle finger).
|
||||
*
|
||||
* To change from or to a left handed coordinate system, negate the Z
|
||||
* component.
|
||||
*/
|
||||
#define AL_POSITION 0x1004
|
||||
|
||||
/**
|
||||
* Source direction.
|
||||
* Type: ALfloat[3], ALint[3]
|
||||
* Default: {0, 0, 0}
|
||||
*
|
||||
* Specifies the current direction in local space. A zero-length vector
|
||||
* specifies an omni-directional source (cone is ignored).
|
||||
*
|
||||
* To change from or to a left handed coordinate system, negate the Z
|
||||
* component.
|
||||
*/
|
||||
#define AL_DIRECTION 0x1005
|
||||
|
||||
/**
|
||||
* Source or listener velocity.
|
||||
* Type: ALfloat[3], ALint[3]
|
||||
* Default: {0, 0, 0}
|
||||
*
|
||||
* Specifies the current velocity, relative to the position.
|
||||
*
|
||||
* To change from or to a left handed coordinate system, negate the Z
|
||||
* component.
|
||||
*/
|
||||
#define AL_VELOCITY 0x1006
|
||||
|
||||
/**
|
||||
* Source looping.
|
||||
* Type: ALboolean
|
||||
* Range: [AL_FALSE, AL_TRUE]
|
||||
* Default: AL_FALSE
|
||||
*
|
||||
* Specifies whether source playback loops.
|
||||
*/
|
||||
#define AL_LOOPING 0x1007
|
||||
|
||||
/**
|
||||
* Source buffer.
|
||||
* Type: ALuint
|
||||
* Range: any valid Buffer ID
|
||||
* Default: AL_NONE
|
||||
*
|
||||
* Specifies the buffer to provide sound samples for a source.
|
||||
*/
|
||||
#define AL_BUFFER 0x1009
|
||||
|
||||
/**
|
||||
* Source or listener gain.
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - ]
|
||||
*
|
||||
* For sources, an initial linear gain value (before attenuation is applied).
|
||||
* For the listener, an output linear gain adjustment.
|
||||
*
|
||||
* A value of 1.0 means unattenuated. Each division by 2 equals an attenuation
|
||||
* of about -6dB. Each multiplication by 2 equals an amplification of about
|
||||
* +6dB.
|
||||
*/
|
||||
#define AL_GAIN 0x100A
|
||||
|
||||
/**
|
||||
* Minimum source gain.
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - 1.0]
|
||||
*
|
||||
* The minimum gain allowed for a source, after distance and cone attenuation
|
||||
* are applied (if applicable).
|
||||
*/
|
||||
#define AL_MIN_GAIN 0x100D
|
||||
|
||||
/**
|
||||
* Maximum source gain.
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - 1.0]
|
||||
*
|
||||
* The maximum gain allowed for a source, after distance and cone attenuation
|
||||
* are applied (if applicable).
|
||||
*/
|
||||
#define AL_MAX_GAIN 0x100E
|
||||
|
||||
/**
|
||||
* Listener orientation.
|
||||
* Type: ALfloat[6]
|
||||
* Default: {0.0, 0.0, -1.0, 0.0, 1.0, 0.0}
|
||||
*
|
||||
* Effectively two three dimensional vectors. The first vector is the front (or
|
||||
* "at") and the second is the top (or "up"). Both vectors are relative to the
|
||||
* listener position.
|
||||
*
|
||||
* To change from or to a left handed coordinate system, negate the Z
|
||||
* component of both vectors.
|
||||
*/
|
||||
#define AL_ORIENTATION 0x100F
|
||||
|
||||
/**
|
||||
* Source state (query only).
|
||||
* Type: ALenum
|
||||
* Range: [AL_INITIAL, AL_PLAYING, AL_PAUSED, AL_STOPPED]
|
||||
*/
|
||||
#define AL_SOURCE_STATE 0x1010
|
||||
|
||||
/* Source state values. */
|
||||
#define AL_INITIAL 0x1011
|
||||
#define AL_PLAYING 0x1012
|
||||
#define AL_PAUSED 0x1013
|
||||
#define AL_STOPPED 0x1014
|
||||
|
||||
/**
|
||||
* Source Buffer Queue size (query only).
|
||||
* Type: ALint
|
||||
*
|
||||
* The number of buffers queued using alSourceQueueBuffers, minus the buffers
|
||||
* removed with alSourceUnqueueBuffers.
|
||||
*/
|
||||
#define AL_BUFFERS_QUEUED 0x1015
|
||||
|
||||
/**
|
||||
* Source Buffer Queue processed count (query only).
|
||||
* Type: ALint
|
||||
*
|
||||
* The number of queued buffers that have been fully processed, and can be
|
||||
* removed with alSourceUnqueueBuffers.
|
||||
*
|
||||
* Looping sources will never fully process buffers because they will be set to
|
||||
* play again for when the source loops.
|
||||
*/
|
||||
#define AL_BUFFERS_PROCESSED 0x1016
|
||||
|
||||
/**
|
||||
* Source reference distance.
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - ]
|
||||
* Default: 1.0
|
||||
*
|
||||
* The distance in units that no distance attenuation occurs.
|
||||
*
|
||||
* At 0.0, no distance attenuation occurs with non-linear attenuation models.
|
||||
*/
|
||||
#define AL_REFERENCE_DISTANCE 0x1020
|
||||
|
||||
/**
|
||||
* Source rolloff factor.
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - ]
|
||||
* Default: 1.0
|
||||
*
|
||||
* Multiplier to exaggerate or diminish distance attenuation.
|
||||
*
|
||||
* At 0.0, no distance attenuation ever occurs.
|
||||
*/
|
||||
#define AL_ROLLOFF_FACTOR 0x1021
|
||||
|
||||
/**
|
||||
* Outer cone gain.
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - 1.0]
|
||||
* Default: 0.0
|
||||
*
|
||||
* The gain attenuation applied when the listener is outside of the source's
|
||||
* outer cone angle.
|
||||
*/
|
||||
#define AL_CONE_OUTER_GAIN 0x1022
|
||||
|
||||
/**
|
||||
* Source maximum distance.
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - ]
|
||||
* Default: FLT_MAX
|
||||
*
|
||||
* The distance above which the source is not attenuated any further with a
|
||||
* clamped distance model, or where attenuation reaches 0.0 gain for linear
|
||||
* distance models with a default rolloff factor.
|
||||
*/
|
||||
#define AL_MAX_DISTANCE 0x1023
|
||||
|
||||
/** Unsigned 8-bit mono buffer format. */
|
||||
#define AL_FORMAT_MONO8 0x1100
|
||||
|
||||
/** Signed 16-bit mono buffer format. */
|
||||
#define AL_FORMAT_MONO16 0x1101
|
||||
|
||||
/** Unsigned 8-bit stereo buffer format. */
|
||||
#define AL_FORMAT_STEREO8 0x1102
|
||||
|
||||
/** Signed 16-bit stereo buffer format. */
|
||||
#define AL_FORMAT_STEREO16 0x1103
|
||||
|
||||
/**
|
||||
* Buffer frequency/sample rate (query only).
|
||||
* Type: ALint
|
||||
*/
|
||||
#define AL_FREQUENCY 0x2001
|
||||
|
||||
/**
|
||||
* Buffer data size in bytes (query only).
|
||||
* Type: ALint
|
||||
*/
|
||||
#define AL_SIZE 0x2004
|
||||
|
||||
/* Buffer state. Not for public use. */
|
||||
#define AL_UNUSED 0x2010
|
||||
#define AL_PENDING 0x2011
|
||||
#define AL_PROCESSED 0x2012
|
||||
|
||||
/** No error. */
|
||||
#define AL_NO_ERROR 0
|
||||
|
||||
/** Invalid name (ID) passed to an AL call. */
|
||||
#define AL_INVALID_NAME 0xA001
|
||||
|
||||
/** Invalid enumeration passed to AL call. */
|
||||
#define AL_INVALID_ENUM 0xA002
|
||||
|
||||
/** Invalid value passed to AL call. */
|
||||
#define AL_INVALID_VALUE 0xA003
|
||||
|
||||
/** Illegal AL call. */
|
||||
#define AL_INVALID_OPERATION 0xA004
|
||||
|
||||
/** Not enough memory to execute the AL call. */
|
||||
#define AL_OUT_OF_MEMORY 0xA005
|
||||
|
||||
/** Context string: Vendor name. */
|
||||
#define AL_VENDOR 0xB001
|
||||
|
||||
/** Context string: Version. */
|
||||
#define AL_VERSION 0xB002
|
||||
|
||||
/** Context string: Renderer name. */
|
||||
#define AL_RENDERER 0xB003
|
||||
|
||||
/** Context string: Space-separated extension list. */
|
||||
#define AL_EXTENSIONS 0xB004
|
||||
|
||||
/**
|
||||
* Doppler scale.
|
||||
* Type: ALfloat
|
||||
* Range: [0.0 - ]
|
||||
* Default: 1.0
|
||||
*
|
||||
* Scale for source and listener velocities.
|
||||
*/
|
||||
#define AL_DOPPLER_FACTOR 0xC000
|
||||
|
||||
/**
|
||||
* Doppler velocity (deprecated).
|
||||
* Type: ALfloat
|
||||
*
|
||||
* A multiplier applied to the Speed of Sound.
|
||||
*/
|
||||
#define AL_DOPPLER_VELOCITY 0xC001
|
||||
|
||||
/**
|
||||
* Distance attenuation model.
|
||||
* Type: ALenum
|
||||
* Range: [AL_NONE, AL_INVERSE_DISTANCE, AL_INVERSE_DISTANCE_CLAMPED,
|
||||
* AL_LINEAR_DISTANCE, AL_LINEAR_DISTANCE_CLAMPED,
|
||||
* AL_EXPONENT_DISTANCE, AL_EXPONENT_DISTANCE_CLAMPED]
|
||||
* Default: AL_INVERSE_DISTANCE_CLAMPED
|
||||
*
|
||||
* The model by which sources attenuate with distance.
|
||||
*
|
||||
* None - No distance attenuation.
|
||||
* Inverse - Doubling the distance halves the source gain.
|
||||
* Linear - Linear gain scaling between the reference and max distances.
|
||||
* Exponent - Exponential gain dropoff.
|
||||
*
|
||||
* Clamped variations work like the non-clamped counterparts, except the
|
||||
* distance calculated is clamped between the reference and max distances.
|
||||
*/
|
||||
#define AL_DISTANCE_MODEL 0xD000
|
||||
|
||||
/* Deprecated macros. */
|
||||
#define OPENAL
|
||||
#define ALAPI AL_API
|
||||
#define ALAPIENTRY AL_APIENTRY
|
||||
#define AL_INVALID -1
|
||||
#define AL_ILLEGAL_ENUM AL_INVALID_ENUM
|
||||
#define AL_ILLEGAL_COMMAND AL_INVALID_OPERATION
|
||||
|
||||
/* Distance model values. */
|
||||
#define AL_INVERSE_DISTANCE 0xD001
|
||||
#define AL_INVERSE_DISTANCE_CLAMPED 0xD002
|
||||
|
||||
#ifndef AL_NO_PROTOTYPES
|
||||
/* Renderer State management. */
|
||||
AL_API void AL_APIENTRY alEnable(ALenum capability) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alDisable(ALenum capability) AL_API_NOEXCEPT;
|
||||
AL_API ALboolean AL_APIENTRY alIsEnabled(ALenum capability) AL_API_NOEXCEPT;
|
||||
|
||||
/* Context state setting. */
|
||||
AL_API void AL_APIENTRY alDopplerFactor(ALfloat value) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alDopplerVelocity(ALfloat value) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alDistanceModel(ALenum distanceModel) AL_API_NOEXCEPT;
|
||||
|
||||
/* Context state retrieval. */
|
||||
AL_API const ALchar* AL_APIENTRY alGetString(ALenum param) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetBooleanv(ALenum param, ALboolean *values) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetIntegerv(ALenum param, ALint *values) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetFloatv(ALenum param, ALfloat *values) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetDoublev(ALenum param, ALdouble *values) AL_API_NOEXCEPT;
|
||||
AL_API ALboolean AL_APIENTRY alGetBoolean(ALenum param) AL_API_NOEXCEPT;
|
||||
AL_API ALint AL_APIENTRY alGetInteger(ALenum param) AL_API_NOEXCEPT;
|
||||
AL_API ALfloat AL_APIENTRY alGetFloat(ALenum param) AL_API_NOEXCEPT;
|
||||
AL_API ALdouble AL_APIENTRY alGetDouble(ALenum param) AL_API_NOEXCEPT;
|
||||
|
||||
/**
|
||||
* Obtain the first error generated in the AL context since the last call to
|
||||
* this function.
|
||||
*/
|
||||
AL_API ALenum AL_APIENTRY alGetError(void) AL_API_NOEXCEPT;
|
||||
|
||||
/** Query for the presence of an extension on the AL context. */
|
||||
AL_API ALboolean AL_APIENTRY alIsExtensionPresent(const ALchar *extname) AL_API_NOEXCEPT;
|
||||
|
||||
/**
|
||||
* Retrieve the address of a function. The returned function may be context-
|
||||
* specific.
|
||||
*/
|
||||
AL_API void* AL_APIENTRY alGetProcAddress(const ALchar *fname) AL_API_NOEXCEPT;
|
||||
|
||||
/** Retrieve the value of an enum. The returned value may be context-specific. */
|
||||
AL_API ALenum AL_APIENTRY alGetEnumValue(const ALchar *ename) AL_API_NOEXCEPT;
|
||||
|
||||
/* Set listener parameters. */
|
||||
AL_API void AL_APIENTRY alListenerf(ALenum param, ALfloat value) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alListener3f(ALenum param, ALfloat value1, ALfloat value2, ALfloat value3) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alListenerfv(ALenum param, const ALfloat *values) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alListeneri(ALenum param, ALint value) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alListener3i(ALenum param, ALint value1, ALint value2, ALint value3) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alListeneriv(ALenum param, const ALint *values) AL_API_NOEXCEPT;
|
||||
|
||||
/* Get listener parameters. */
|
||||
AL_API void AL_APIENTRY alGetListenerf(ALenum param, ALfloat *value) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetListener3f(ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetListenerfv(ALenum param, ALfloat *values) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetListeneri(ALenum param, ALint *value) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetListener3i(ALenum param, ALint *value1, ALint *value2, ALint *value3) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetListeneriv(ALenum param, ALint *values) AL_API_NOEXCEPT;
|
||||
|
||||
/** Create source objects. */
|
||||
AL_API void AL_APIENTRY alGenSources(ALsizei n, ALuint *sources) AL_API_NOEXCEPT;
|
||||
|
||||
/** Delete source objects. */
|
||||
AL_API void AL_APIENTRY alDeleteSources(ALsizei n, const ALuint *sources) AL_API_NOEXCEPT;
|
||||
|
||||
/** Verify an ID is for a valid source. */
|
||||
AL_API ALboolean AL_APIENTRY alIsSource(ALuint source) AL_API_NOEXCEPT;
|
||||
|
||||
/* Set source parameters. */
|
||||
AL_API void AL_APIENTRY alSourcef(ALuint source, ALenum param, ALfloat value) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alSource3f(ALuint source, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alSourcefv(ALuint source, ALenum param, const ALfloat *values) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alSourcei(ALuint source, ALenum param, ALint value) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alSource3i(ALuint source, ALenum param, ALint value1, ALint value2, ALint value3) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alSourceiv(ALuint source, ALenum param, const ALint *values) AL_API_NOEXCEPT;
|
||||
|
||||
/* Get source parameters. */
|
||||
AL_API void AL_APIENTRY alGetSourcef(ALuint source, ALenum param, ALfloat *value) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetSource3f(ALuint source, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetSourcefv(ALuint source, ALenum param, ALfloat *values) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetSourcei(ALuint source, ALenum param, ALint *value) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetSource3i(ALuint source, ALenum param, ALint *value1, ALint *value2, ALint *value3) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetSourceiv(ALuint source, ALenum param, ALint *values) AL_API_NOEXCEPT;
|
||||
|
||||
/** Play, restart, or resume a source, setting its state to AL_PLAYING. */
|
||||
AL_API void AL_APIENTRY alSourcePlay(ALuint source) AL_API_NOEXCEPT;
|
||||
|
||||
/** Stop a source, setting its state to AL_STOPPED if playing or paused. */
|
||||
AL_API void AL_APIENTRY alSourceStop(ALuint source) AL_API_NOEXCEPT;
|
||||
|
||||
/** Rewind a source, setting its state to AL_INITIAL. */
|
||||
AL_API void AL_APIENTRY alSourceRewind(ALuint source) AL_API_NOEXCEPT;
|
||||
|
||||
/** Pause a source, setting its state to AL_PAUSED if playing. */
|
||||
AL_API void AL_APIENTRY alSourcePause(ALuint source) AL_API_NOEXCEPT;
|
||||
|
||||
/** Play, restart, or resume a list of sources atomically. */
|
||||
AL_API void AL_APIENTRY alSourcePlayv(ALsizei n, const ALuint *sources) AL_API_NOEXCEPT;
|
||||
|
||||
/** Stop a list of sources atomically. */
|
||||
AL_API void AL_APIENTRY alSourceStopv(ALsizei n, const ALuint *sources) AL_API_NOEXCEPT;
|
||||
|
||||
/** Rewind a list of sources atomically. */
|
||||
AL_API void AL_APIENTRY alSourceRewindv(ALsizei n, const ALuint *sources) AL_API_NOEXCEPT;
|
||||
|
||||
/** Pause a list of sources atomically. */
|
||||
AL_API void AL_APIENTRY alSourcePausev(ALsizei n, const ALuint *sources) AL_API_NOEXCEPT;
|
||||
|
||||
/** Queue buffers onto a source */
|
||||
AL_API void AL_APIENTRY alSourceQueueBuffers(ALuint source, ALsizei nb, const ALuint *buffers) AL_API_NOEXCEPT;
|
||||
|
||||
/** Unqueue processed buffers from a source */
|
||||
AL_API void AL_APIENTRY alSourceUnqueueBuffers(ALuint source, ALsizei nb, ALuint *buffers) AL_API_NOEXCEPT;
|
||||
|
||||
/** Create buffer objects */
|
||||
AL_API void AL_APIENTRY alGenBuffers(ALsizei n, ALuint *buffers) AL_API_NOEXCEPT;
|
||||
|
||||
/** Delete buffer objects */
|
||||
AL_API void AL_APIENTRY alDeleteBuffers(ALsizei n, const ALuint *buffers) AL_API_NOEXCEPT;
|
||||
|
||||
/** Verify an ID is a valid buffer (including the NULL buffer) */
|
||||
AL_API ALboolean AL_APIENTRY alIsBuffer(ALuint buffer) AL_API_NOEXCEPT;
|
||||
|
||||
/**
|
||||
* Copies data into the buffer, interpreting it using the specified format and
|
||||
* samplerate.
|
||||
*/
|
||||
AL_API void AL_APIENTRY alBufferData(ALuint buffer, ALenum format, const ALvoid *data, ALsizei size, ALsizei samplerate) AL_API_NOEXCEPT;
|
||||
|
||||
/* Set buffer parameters. */
|
||||
AL_API void AL_APIENTRY alBufferf(ALuint buffer, ALenum param, ALfloat value) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alBuffer3f(ALuint buffer, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alBufferfv(ALuint buffer, ALenum param, const ALfloat *values) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alBufferi(ALuint buffer, ALenum param, ALint value) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alBuffer3i(ALuint buffer, ALenum param, ALint value1, ALint value2, ALint value3) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alBufferiv(ALuint buffer, ALenum param, const ALint *values) AL_API_NOEXCEPT;
|
||||
|
||||
/* Get buffer parameters. */
|
||||
AL_API void AL_APIENTRY alGetBufferf(ALuint buffer, ALenum param, ALfloat *value) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetBuffer3f(ALuint buffer, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetBufferfv(ALuint buffer, ALenum param, ALfloat *values) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetBufferi(ALuint buffer, ALenum param, ALint *value) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetBuffer3i(ALuint buffer, ALenum param, ALint *value1, ALint *value2, ALint *value3) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetBufferiv(ALuint buffer, ALenum param, ALint *values) AL_API_NOEXCEPT;
|
||||
#endif /* AL_NO_PROTOTYPES */
|
||||
|
||||
/* Pointer-to-function types, useful for storing dynamically loaded AL entry
|
||||
* points.
|
||||
*/
|
||||
typedef void (AL_APIENTRY *LPALENABLE)(ALenum capability) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALDISABLE)(ALenum capability) AL_API_NOEXCEPT17;
|
||||
typedef ALboolean (AL_APIENTRY *LPALISENABLED)(ALenum capability) AL_API_NOEXCEPT17;
|
||||
|
||||
typedef void (AL_APIENTRY *LPALDOPPLERFACTOR)(ALfloat value) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALDOPPLERVELOCITY)(ALfloat value) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALDISTANCEMODEL)(ALenum distanceModel) AL_API_NOEXCEPT17;
|
||||
|
||||
typedef const ALchar* (AL_APIENTRY *LPALGETSTRING)(ALenum param) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETBOOLEANV)(ALenum param, ALboolean *values) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETINTEGERV)(ALenum param, ALint *values) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETFLOATV)(ALenum param, ALfloat *values) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETDOUBLEV)(ALenum param, ALdouble *values) AL_API_NOEXCEPT17;
|
||||
typedef ALboolean (AL_APIENTRY *LPALGETBOOLEAN)(ALenum param) AL_API_NOEXCEPT17;
|
||||
typedef ALint (AL_APIENTRY *LPALGETINTEGER)(ALenum param) AL_API_NOEXCEPT17;
|
||||
typedef ALfloat (AL_APIENTRY *LPALGETFLOAT)(ALenum param) AL_API_NOEXCEPT17;
|
||||
typedef ALdouble (AL_APIENTRY *LPALGETDOUBLE)(ALenum param) AL_API_NOEXCEPT17;
|
||||
|
||||
typedef ALenum (AL_APIENTRY *LPALGETERROR)(void) AL_API_NOEXCEPT17;
|
||||
typedef ALboolean (AL_APIENTRY *LPALISEXTENSIONPRESENT)(const ALchar *extname) AL_API_NOEXCEPT17;
|
||||
typedef void* (AL_APIENTRY *LPALGETPROCADDRESS)(const ALchar *fname) AL_API_NOEXCEPT17;
|
||||
typedef ALenum (AL_APIENTRY *LPALGETENUMVALUE)(const ALchar *ename) AL_API_NOEXCEPT17;
|
||||
|
||||
typedef void (AL_APIENTRY *LPALLISTENERF)(ALenum param, ALfloat value) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALLISTENER3F)(ALenum param, ALfloat value1, ALfloat value2, ALfloat value3) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALLISTENERFV)(ALenum param, const ALfloat *values) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALLISTENERI)(ALenum param, ALint value) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALLISTENER3I)(ALenum param, ALint value1, ALint value2, ALint value3) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALLISTENERIV)(ALenum param, const ALint *values) AL_API_NOEXCEPT17;
|
||||
|
||||
typedef void (AL_APIENTRY *LPALGETLISTENERF)(ALenum param, ALfloat *value) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETLISTENER3F)(ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETLISTENERFV)(ALenum param, ALfloat *values) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETLISTENERI)(ALenum param, ALint *value) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETLISTENER3I)(ALenum param, ALint *value1, ALint *value2, ALint *value3) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETLISTENERIV)(ALenum param, ALint *values) AL_API_NOEXCEPT17;
|
||||
|
||||
typedef void (AL_APIENTRY *LPALGENSOURCES)(ALsizei n, ALuint *sources) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALDELETESOURCES)(ALsizei n, const ALuint *sources) AL_API_NOEXCEPT17;
|
||||
typedef ALboolean (AL_APIENTRY *LPALISSOURCE)(ALuint source) AL_API_NOEXCEPT17;
|
||||
|
||||
typedef void (AL_APIENTRY *LPALSOURCEF)(ALuint source, ALenum param, ALfloat value) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALSOURCE3F)(ALuint source, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALSOURCEFV)(ALuint source, ALenum param, const ALfloat *values) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALSOURCEI)(ALuint source, ALenum param, ALint value) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALSOURCE3I)(ALuint source, ALenum param, ALint value1, ALint value2, ALint value3) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALSOURCEIV)(ALuint source, ALenum param, const ALint *values) AL_API_NOEXCEPT17;
|
||||
|
||||
typedef void (AL_APIENTRY *LPALGETSOURCEF)(ALuint source, ALenum param, ALfloat *value) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETSOURCE3F)(ALuint source, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETSOURCEFV)(ALuint source, ALenum param, ALfloat *values) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETSOURCEI)(ALuint source, ALenum param, ALint *value) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETSOURCE3I)(ALuint source, ALenum param, ALint *value1, ALint *value2, ALint *value3) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETSOURCEIV)(ALuint source, ALenum param, ALint *values) AL_API_NOEXCEPT17;
|
||||
|
||||
typedef void (AL_APIENTRY *LPALSOURCEPLAY)(ALuint source) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALSOURCESTOP)(ALuint source) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALSOURCEREWIND)(ALuint source) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALSOURCEPAUSE)(ALuint source) AL_API_NOEXCEPT17;
|
||||
|
||||
typedef void (AL_APIENTRY *LPALSOURCEPLAYV)(ALsizei n, const ALuint *sources) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALSOURCESTOPV)(ALsizei n, const ALuint *sources) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALSOURCEREWINDV)(ALsizei n, const ALuint *sources) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALSOURCEPAUSEV)(ALsizei n, const ALuint *sources) AL_API_NOEXCEPT17;
|
||||
|
||||
typedef void (AL_APIENTRY *LPALSOURCEQUEUEBUFFERS)(ALuint source, ALsizei nb, const ALuint *buffers) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALSOURCEUNQUEUEBUFFERS)(ALuint source, ALsizei nb, ALuint *buffers) AL_API_NOEXCEPT17;
|
||||
|
||||
typedef void (AL_APIENTRY *LPALGENBUFFERS)(ALsizei n, ALuint *buffers) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALDELETEBUFFERS)(ALsizei n, const ALuint *buffers) AL_API_NOEXCEPT17;
|
||||
typedef ALboolean (AL_APIENTRY *LPALISBUFFER)(ALuint buffer) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALBUFFERDATA)(ALuint buffer, ALenum format, const ALvoid *data, ALsizei size, ALsizei samplerate) AL_API_NOEXCEPT17;
|
||||
|
||||
typedef void (AL_APIENTRY *LPALBUFFERF)(ALuint buffer, ALenum param, ALfloat value) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALBUFFER3F)(ALuint buffer, ALenum param, ALfloat value1, ALfloat value2, ALfloat value3) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALBUFFERFV)(ALuint buffer, ALenum param, const ALfloat *values) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALBUFFERI)(ALuint buffer, ALenum param, ALint value) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALBUFFER3I)(ALuint buffer, ALenum param, ALint value1, ALint value2, ALint value3) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALBUFFERIV)(ALuint buffer, ALenum param, const ALint *values) AL_API_NOEXCEPT17;
|
||||
|
||||
typedef void (AL_APIENTRY *LPALGETBUFFERF)(ALuint buffer, ALenum param, ALfloat *value) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETBUFFER3F)(ALuint buffer, ALenum param, ALfloat *value1, ALfloat *value2, ALfloat *value3) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETBUFFERFV)(ALuint buffer, ALenum param, ALfloat *values) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETBUFFERI)(ALuint buffer, ALenum param, ALint *value) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETBUFFER3I)(ALuint buffer, ALenum param, ALint *value1, ALint *value2, ALint *value3) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETBUFFERIV)(ALuint buffer, ALenum param, ALint *values) AL_API_NOEXCEPT17;
|
||||
#endif
|
||||
|
||||
#ifndef AL_VERSION_1_1
|
||||
#define AL_VERSION_1_1 1
|
||||
/**
|
||||
* Source buffer offset, in seconds.
|
||||
* Type: ALfloat, ALint
|
||||
* Range: [0 - ]
|
||||
*/
|
||||
#define AL_SEC_OFFSET 0x1024
|
||||
|
||||
/**
|
||||
* Source buffer offset, in sample frames.
|
||||
* Type: ALint
|
||||
* Range: [0 - ]
|
||||
*/
|
||||
#define AL_SAMPLE_OFFSET 0x1025
|
||||
|
||||
/**
|
||||
* Source buffer offset, in bytes.
|
||||
* Type: ALint
|
||||
* Range: [0 - ]
|
||||
*/
|
||||
#define AL_BYTE_OFFSET 0x1026
|
||||
|
||||
/**
|
||||
* Source type (query only).
|
||||
* Type: ALenum
|
||||
* Range: [AL_STATIC, AL_STREAMING, AL_UNDETERMINED]
|
||||
*
|
||||
* A Source is Static if a Buffer has been attached using AL_BUFFER.
|
||||
*
|
||||
* A Source is Streaming if one or more Buffers have been attached using
|
||||
* alSourceQueueBuffers.
|
||||
*
|
||||
* A Source is Undetermined when it has the NULL buffer attached using
|
||||
* AL_BUFFER.
|
||||
*/
|
||||
#define AL_SOURCE_TYPE 0x1027
|
||||
|
||||
/* Source type values. */
|
||||
#define AL_STATIC 0x1028
|
||||
#define AL_STREAMING 0x1029
|
||||
#define AL_UNDETERMINED 0x1030
|
||||
|
||||
/**
|
||||
* Buffer bits per sample (query only).
|
||||
* Type: ALint
|
||||
*/
|
||||
#define AL_BITS 0x2002
|
||||
|
||||
/**
|
||||
* Buffer channel count (query only).
|
||||
* Type: ALint
|
||||
*/
|
||||
#define AL_CHANNELS 0x2003
|
||||
|
||||
/**
|
||||
* Speed of Sound, in units per second.
|
||||
* Type: ALfloat
|
||||
* Range: [0.0001 - ]
|
||||
* Default: 343.3
|
||||
*
|
||||
* The speed at which sound waves are assumed to travel, when calculating the
|
||||
* doppler effect from source and listener velocities.
|
||||
*/
|
||||
#define AL_SPEED_OF_SOUND 0xC003
|
||||
|
||||
#define AL_LINEAR_DISTANCE 0xD003
|
||||
#define AL_LINEAR_DISTANCE_CLAMPED 0xD004
|
||||
|
||||
#define AL_EXPONENT_DISTANCE 0xD005
|
||||
#define AL_EXPONENT_DISTANCE_CLAMPED 0xD006
|
||||
#ifndef AL_NO_PROTOTYPES
|
||||
AL_API void AL_APIENTRY alSpeedOfSound(ALfloat value) AL_API_NOEXCEPT;
|
||||
|
||||
#endif /* AL_NO_PROTOTYPES */
|
||||
|
||||
/* Pointer-to-function types, useful for storing dynamically loaded AL entry
|
||||
* points.
|
||||
*/
|
||||
typedef void (AL_APIENTRY *LPALSPEEDOFSOUND)(ALfloat value) AL_API_NOEXCEPT17;
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
/* NOLINTEND */
|
||||
|
||||
#endif /* AL_AL_H */
|
||||
@@ -0,0 +1,369 @@
|
||||
/* This is free and unencumbered software released into the public domain.
|
||||
*
|
||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
* distribute this software, either in source code form or as a compiled
|
||||
* binary, for any purpose, commercial or non-commercial, and by any
|
||||
* means.
|
||||
*
|
||||
* In jurisdictions that recognize copyright laws, the author or authors
|
||||
* of this software dedicate any and all copyright interest in the
|
||||
* software to the public domain. We make this dedication for the benefit
|
||||
* of the public at large and to the detriment of our heirs and
|
||||
* successors. We intend this dedication to be an overt act of
|
||||
* relinquishment in perpetuity of all present and future rights to this
|
||||
* software under copyright law.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* For more information, please refer to <http://unlicense.org/>
|
||||
*/
|
||||
|
||||
/* This file is auto-generated! Please do not edit it manually.
|
||||
* Instead, modify the API in al.xml and regenerate using genheaders.py.
|
||||
*
|
||||
* Last regenerated: 2025-10-13 19:40:01.687690+00:00
|
||||
*/
|
||||
|
||||
#ifndef AL_ALC_H
|
||||
#define AL_ALC_H
|
||||
|
||||
/* NOLINTBEGIN */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
#ifdef _MSVC_LANG
|
||||
#define ALC_CPLUSPLUS _MSVC_LANG
|
||||
#else
|
||||
#define ALC_CPLUSPLUS __cplusplus
|
||||
#endif
|
||||
|
||||
#ifndef AL_DISABLE_NOEXCEPT
|
||||
#if ALC_CPLUSPLUS >= 201103L
|
||||
#define ALC_API_NOEXCEPT noexcept
|
||||
#else
|
||||
#define ALC_API_NOEXCEPT
|
||||
#endif
|
||||
#if ALC_CPLUSPLUS >= 201703L
|
||||
#define ALC_API_NOEXCEPT17 noexcept
|
||||
#else
|
||||
#define ALC_API_NOEXCEPT17
|
||||
#endif
|
||||
|
||||
#else /* AL_DISABLE_NOEXCEPT */
|
||||
|
||||
#define ALC_API_NOEXCEPT
|
||||
#define ALC_API_NOEXCEPT17
|
||||
#endif
|
||||
|
||||
#undef ALC_CPLUSPLUS
|
||||
|
||||
#else /* __cplusplus */
|
||||
|
||||
#define ALC_API_NOEXCEPT
|
||||
#define ALC_API_NOEXCEPT17
|
||||
#endif
|
||||
|
||||
#ifndef ALC_API
|
||||
#if defined(AL_LIBTYPE_STATIC)
|
||||
#define ALC_API
|
||||
#elif defined(_WIN32)
|
||||
#define ALC_API __declspec(dllimport)
|
||||
#else
|
||||
#define ALC_API extern
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#define ALC_APIENTRY __cdecl
|
||||
#else
|
||||
#define ALC_APIENTRY
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef ALC_VERSION_1_0
|
||||
#define ALC_VERSION_1_0 1
|
||||
/* Deprecated macros. */
|
||||
#define ALCAPI ALC_API
|
||||
#define ALCAPIENTRY ALC_APIENTRY
|
||||
/** Deprecated enum. */
|
||||
#define ALC_INVALID 0
|
||||
|
||||
/** Supported ALC version? */
|
||||
#define ALC_VERSION_0_1 1
|
||||
|
||||
/** Opaque device handle */
|
||||
typedef struct ALCdevice ALCdevice;
|
||||
|
||||
/** Opaque context handle */
|
||||
typedef struct ALCcontext ALCcontext;
|
||||
|
||||
/** 8-bit boolean */
|
||||
typedef char ALCboolean;
|
||||
|
||||
/** character */
|
||||
typedef char ALCchar;
|
||||
|
||||
/** signed 8-bit integer */
|
||||
typedef signed char ALCbyte;
|
||||
|
||||
/** unsigned 8-bit integer */
|
||||
typedef unsigned char ALCubyte;
|
||||
|
||||
/** signed 16-bit integer */
|
||||
typedef short ALCshort;
|
||||
|
||||
/** unsigned 16-bit integer */
|
||||
typedef unsigned short ALCushort;
|
||||
|
||||
/** signed 32-bit integer */
|
||||
typedef int ALCint;
|
||||
|
||||
/** unsigned 32-bit integer */
|
||||
typedef unsigned int ALCuint;
|
||||
|
||||
/** non-negative 32-bit integer size */
|
||||
typedef int ALCsizei;
|
||||
|
||||
/** 32-bit enumeration value */
|
||||
typedef int ALCenum;
|
||||
|
||||
/** 32-bit IEEE-754 floating-point */
|
||||
typedef float ALCfloat;
|
||||
|
||||
/** 64-bit IEEE-754 floating-point */
|
||||
typedef double ALCdouble;
|
||||
|
||||
/** void type (for opaque pointers only) */
|
||||
typedef void ALCvoid;
|
||||
|
||||
/** Boolean False. */
|
||||
#define ALC_FALSE 0
|
||||
|
||||
/** Boolean True. */
|
||||
#define ALC_TRUE 1
|
||||
|
||||
/** Context attribute: <int> Hz. */
|
||||
#define ALC_FREQUENCY 0x1007
|
||||
|
||||
/** Context attribute: <int> Hz. */
|
||||
#define ALC_REFRESH 0x1008
|
||||
|
||||
/** Context attribute: AL_TRUE or AL_FALSE synchronous context? */
|
||||
#define ALC_SYNC 0x1009
|
||||
|
||||
/** No error. */
|
||||
#define ALC_NO_ERROR 0
|
||||
|
||||
/** Invalid device handle. */
|
||||
#define ALC_INVALID_DEVICE 0xA001
|
||||
|
||||
/** Invalid context handle. */
|
||||
#define ALC_INVALID_CONTEXT 0xA002
|
||||
|
||||
/** Invalid enumeration passed to an ALC call. */
|
||||
#define ALC_INVALID_ENUM 0xA003
|
||||
|
||||
/** Invalid value passed to an ALC call. */
|
||||
#define ALC_INVALID_VALUE 0xA004
|
||||
|
||||
/** Out of memory. */
|
||||
#define ALC_OUT_OF_MEMORY 0xA005
|
||||
|
||||
/** Runtime ALC major version. */
|
||||
#define ALC_MAJOR_VERSION 0x1000
|
||||
|
||||
/** Runtime ALC minor version. */
|
||||
#define ALC_MINOR_VERSION 0x1001
|
||||
|
||||
/** Context attribute list size. */
|
||||
#define ALC_ATTRIBUTES_SIZE 0x1002
|
||||
|
||||
/** Context attribute list properties. */
|
||||
#define ALC_ALL_ATTRIBUTES 0x1003
|
||||
|
||||
/** String for the default device specifier. */
|
||||
#define ALC_DEFAULT_DEVICE_SPECIFIER 0x1004
|
||||
|
||||
/**
|
||||
* Device specifier string.
|
||||
*
|
||||
* If device handle is NULL, it is instead a null-character separated list of
|
||||
* strings of known device specifiers (list ends with an empty string).
|
||||
*/
|
||||
#define ALC_DEVICE_SPECIFIER 0x1005
|
||||
|
||||
/** String for space-separated list of ALC extensions. */
|
||||
#define ALC_EXTENSIONS 0x1006
|
||||
|
||||
#ifndef ALC_NO_PROTOTYPES
|
||||
/* Context management. */
|
||||
/** Create and attach a context to the given device. */
|
||||
ALC_API ALCcontext* ALC_APIENTRY alcCreateContext(ALCdevice *device, const ALCint *attrlist) ALC_API_NOEXCEPT;
|
||||
|
||||
/**
|
||||
* Makes the given context the active process-wide context. Passing NULL clears
|
||||
* the active context.
|
||||
*/
|
||||
ALC_API ALCboolean ALC_APIENTRY alcMakeContextCurrent(ALCcontext *context) ALC_API_NOEXCEPT;
|
||||
|
||||
/** Resumes processing updates for the given context. */
|
||||
ALC_API void ALC_APIENTRY alcProcessContext(ALCcontext *context) ALC_API_NOEXCEPT;
|
||||
|
||||
/** Suspends updates for the given context. */
|
||||
ALC_API void ALC_APIENTRY alcSuspendContext(ALCcontext *context) ALC_API_NOEXCEPT;
|
||||
|
||||
/** Remove a context from its device and destroys it. */
|
||||
ALC_API void ALC_APIENTRY alcDestroyContext(ALCcontext *context) ALC_API_NOEXCEPT;
|
||||
|
||||
/** Returns the currently active context. */
|
||||
ALC_API ALCcontext* ALC_APIENTRY alcGetCurrentContext(void) ALC_API_NOEXCEPT;
|
||||
|
||||
/** Returns the device that a particular context is attached to. */
|
||||
ALC_API ALCdevice* ALC_APIENTRY alcGetContextsDevice(ALCcontext *context) ALC_API_NOEXCEPT;
|
||||
|
||||
/* Device management. */
|
||||
/** Opens the named playback device. */
|
||||
ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *devicename) ALC_API_NOEXCEPT;
|
||||
|
||||
/** Closes the given playback device. */
|
||||
ALC_API ALCboolean ALC_APIENTRY alcCloseDevice(ALCdevice *device) ALC_API_NOEXCEPT;
|
||||
|
||||
/* Error support. */
|
||||
/** Obtain the most recent Device error. */
|
||||
ALC_API ALCenum ALC_APIENTRY alcGetError(ALCdevice *device) ALC_API_NOEXCEPT;
|
||||
|
||||
/* Extension support. */
|
||||
/**
|
||||
* Query for the presence of an extension on the device. Pass a NULL device to
|
||||
* query a device-inspecific extension.
|
||||
*/
|
||||
ALC_API ALCboolean ALC_APIENTRY alcIsExtensionPresent(ALCdevice *device, const ALCchar *extname) ALC_API_NOEXCEPT;
|
||||
|
||||
/**
|
||||
* Retrieve the address of a function. Given a non-NULL device, the returned
|
||||
* function may be device-specific.
|
||||
*/
|
||||
ALC_API ALCvoid* ALC_APIENTRY alcGetProcAddress(ALCdevice *device, const ALCchar *funcname) ALC_API_NOEXCEPT;
|
||||
|
||||
/**
|
||||
* Retrieve the value of an enum. Given a non-NULL device, the returned value
|
||||
* may be device-specific.
|
||||
*/
|
||||
ALC_API ALCenum ALC_APIENTRY alcGetEnumValue(ALCdevice *device, const ALCchar *enumname) ALC_API_NOEXCEPT;
|
||||
|
||||
/* Query functions. */
|
||||
/** Returns information about the device, and error strings. */
|
||||
ALC_API const ALCchar* ALC_APIENTRY alcGetString(ALCdevice *device, ALCenum param) ALC_API_NOEXCEPT;
|
||||
|
||||
/** Returns information about the device and the version of OpenAL. */
|
||||
ALC_API void ALC_APIENTRY alcGetIntegerv(ALCdevice *device, ALCenum param, ALCsizei size, ALCint *values) ALC_API_NOEXCEPT;
|
||||
|
||||
#endif /* ALC_NO_PROTOTYPES */
|
||||
|
||||
/* Pointer-to-function types, useful for storing dynamically loaded ALC entry
|
||||
* points.
|
||||
*/
|
||||
typedef ALCcontext* (ALC_APIENTRY *LPALCCREATECONTEXT)(ALCdevice *device, const ALCint *attrlist) ALC_API_NOEXCEPT17;
|
||||
typedef ALCboolean (ALC_APIENTRY *LPALCMAKECONTEXTCURRENT)(ALCcontext *context) ALC_API_NOEXCEPT17;
|
||||
typedef void (ALC_APIENTRY *LPALCPROCESSCONTEXT)(ALCcontext *context) ALC_API_NOEXCEPT17;
|
||||
typedef void (ALC_APIENTRY *LPALCSUSPENDCONTEXT)(ALCcontext *context) ALC_API_NOEXCEPT17;
|
||||
typedef void (ALC_APIENTRY *LPALCDESTROYCONTEXT)(ALCcontext *context) ALC_API_NOEXCEPT17;
|
||||
typedef ALCcontext* (ALC_APIENTRY *LPALCGETCURRENTCONTEXT)(void) ALC_API_NOEXCEPT17;
|
||||
typedef ALCdevice* (ALC_APIENTRY *LPALCGETCONTEXTSDEVICE)(ALCcontext *context) ALC_API_NOEXCEPT17;
|
||||
|
||||
typedef ALCdevice* (ALC_APIENTRY *LPALCOPENDEVICE)(const ALCchar *devicename) ALC_API_NOEXCEPT17;
|
||||
typedef ALCboolean (ALC_APIENTRY *LPALCCLOSEDEVICE)(ALCdevice *device) ALC_API_NOEXCEPT17;
|
||||
|
||||
typedef ALCenum (ALC_APIENTRY *LPALCGETERROR)(ALCdevice *device) ALC_API_NOEXCEPT17;
|
||||
|
||||
typedef ALCboolean (ALC_APIENTRY *LPALCISEXTENSIONPRESENT)(ALCdevice *device, const ALCchar *extname) ALC_API_NOEXCEPT17;
|
||||
typedef ALCvoid* (ALC_APIENTRY *LPALCGETPROCADDRESS)(ALCdevice *device, const ALCchar *funcname) ALC_API_NOEXCEPT17;
|
||||
typedef ALCenum (ALC_APIENTRY *LPALCGETENUMVALUE)(ALCdevice *device, const ALCchar *enumname) ALC_API_NOEXCEPT17;
|
||||
|
||||
typedef const ALCchar* (ALC_APIENTRY *LPALCGETSTRING)(ALCdevice *device, ALCenum param) ALC_API_NOEXCEPT17;
|
||||
typedef void (ALC_APIENTRY *LPALCGETINTEGERV)(ALCdevice *device, ALCenum param, ALCsizei size, ALCint *values) ALC_API_NOEXCEPT17;
|
||||
#endif
|
||||
|
||||
#ifndef ALC_VERSION_1_1
|
||||
#define ALC_VERSION_1_1 1
|
||||
/** Context attribute: <int> requested Mono (3D) Sources. */
|
||||
#define ALC_MONO_SOURCES 0x1010
|
||||
|
||||
/** Context attribute: <int> requested Stereo Sources. */
|
||||
#define ALC_STEREO_SOURCES 0x1011
|
||||
|
||||
/** Capture extension */
|
||||
#define ALC_EXT_CAPTURE 1
|
||||
|
||||
/**
|
||||
* Capture specifier string.
|
||||
*
|
||||
* If device handle is NULL, it is instead a null-character separated list of
|
||||
* strings of known device specifiers (list ends with an empty string).
|
||||
*/
|
||||
#define ALC_CAPTURE_DEVICE_SPECIFIER 0x310
|
||||
|
||||
/** String for the default capture device specifier. */
|
||||
#define ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER 0x311
|
||||
|
||||
/** Number of sample frames available for capture. */
|
||||
#define ALC_CAPTURE_SAMPLES 0x312
|
||||
|
||||
/** Enumerate All extension */
|
||||
#define ALC_ENUMERATE_ALL_EXT 1
|
||||
|
||||
/** String for the default extended device specifier. */
|
||||
#define ALC_DEFAULT_ALL_DEVICES_SPECIFIER 0x1012
|
||||
|
||||
/**
|
||||
* Device's extended specifier string.
|
||||
*
|
||||
* If device handle is NULL, it is instead a null-character separated list of
|
||||
* strings of known extended device specifiers (list ends with an empty string).
|
||||
*/
|
||||
#define ALC_ALL_DEVICES_SPECIFIER 0x1013
|
||||
|
||||
#ifndef ALC_NO_PROTOTYPES
|
||||
/**
|
||||
* Opens the named capture device with the given frequency, format, and buffer
|
||||
* size.
|
||||
*/
|
||||
ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize) ALC_API_NOEXCEPT;
|
||||
|
||||
/** Closes the given capture device. */
|
||||
ALC_API ALCboolean ALC_APIENTRY alcCaptureCloseDevice(ALCdevice *device) ALC_API_NOEXCEPT;
|
||||
|
||||
/** Starts capturing samples into the device buffer. */
|
||||
ALC_API void ALC_APIENTRY alcCaptureStart(ALCdevice *device) ALC_API_NOEXCEPT;
|
||||
|
||||
/** Stops capturing samples. Samples in the device buffer remain available. */
|
||||
ALC_API void ALC_APIENTRY alcCaptureStop(ALCdevice *device) ALC_API_NOEXCEPT;
|
||||
|
||||
/** Reads samples from the device buffer. */
|
||||
ALC_API void ALC_APIENTRY alcCaptureSamples(ALCdevice *device, ALCvoid *buffer, ALCsizei samples) ALC_API_NOEXCEPT;
|
||||
|
||||
#endif /* ALC_NO_PROTOTYPES */
|
||||
|
||||
/* Pointer-to-function types, useful for storing dynamically loaded ALC entry
|
||||
* points.
|
||||
*/
|
||||
typedef ALCdevice* (ALC_APIENTRY *LPALCCAPTUREOPENDEVICE)(const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize) ALC_API_NOEXCEPT17;
|
||||
typedef ALCboolean (ALC_APIENTRY *LPALCCAPTURECLOSEDEVICE)(ALCdevice *device) ALC_API_NOEXCEPT17;
|
||||
typedef void (ALC_APIENTRY *LPALCCAPTURESTART)(ALCdevice *device) ALC_API_NOEXCEPT17;
|
||||
typedef void (ALC_APIENTRY *LPALCCAPTURESTOP)(ALCdevice *device) ALC_API_NOEXCEPT17;
|
||||
typedef void (ALC_APIENTRY *LPALCCAPTURESAMPLES)(ALCdevice *device, ALCvoid *buffer, ALCsizei samples) ALC_API_NOEXCEPT17;
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
/* NOLINTEND */
|
||||
|
||||
#endif /* AL_ALC_H */
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,3 @@
|
||||
/* The tokens that would be defined here are already defined in efx.h. This
|
||||
* empty file is here to provide compatibility with Windows-based projects
|
||||
* that would include it. */
|
||||
@@ -0,0 +1,404 @@
|
||||
/* Reverb presets for EFX */
|
||||
|
||||
#ifndef EFX_PRESETS_H
|
||||
#define EFX_PRESETS_H
|
||||
/* NOLINTBEGIN */
|
||||
|
||||
#ifndef EFXEAXREVERBPROPERTIES_DEFINED
|
||||
#define EFXEAXREVERBPROPERTIES_DEFINED
|
||||
typedef struct {
|
||||
float flDensity;
|
||||
float flDiffusion;
|
||||
float flGain;
|
||||
float flGainHF;
|
||||
float flGainLF;
|
||||
float flDecayTime;
|
||||
float flDecayHFRatio;
|
||||
float flDecayLFRatio;
|
||||
float flReflectionsGain;
|
||||
float flReflectionsDelay;
|
||||
float flReflectionsPan[3];
|
||||
float flLateReverbGain;
|
||||
float flLateReverbDelay;
|
||||
float flLateReverbPan[3];
|
||||
float flEchoTime;
|
||||
float flEchoDepth;
|
||||
float flModulationTime;
|
||||
float flModulationDepth;
|
||||
float flAirAbsorptionGainHF;
|
||||
float flHFReference;
|
||||
float flLFReference;
|
||||
float flRoomRolloffFactor;
|
||||
int iDecayHFLimit;
|
||||
} EFXEAXREVERBPROPERTIES, *LPEFXEAXREVERBPROPERTIES;
|
||||
#endif
|
||||
|
||||
/* Default Presets */
|
||||
|
||||
#define EFX_REVERB_PRESET_GENERIC \
|
||||
{ 1.0000f, 1.0000f, 0.3162f, 0.8913f, 1.0000f, 1.4900f, 0.8300f, 1.0000f, 0.0500f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_PADDEDCELL \
|
||||
{ 0.1715f, 1.0000f, 0.3162f, 0.0010f, 1.0000f, 0.1700f, 0.1000f, 1.0000f, 0.2500f, 0.0010f, { 0.0000f, 0.0000f, 0.0000f }, 1.2691f, 0.0020f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_ROOM \
|
||||
{ 0.4287f, 1.0000f, 0.3162f, 0.5929f, 1.0000f, 0.4000f, 0.8300f, 1.0000f, 0.1503f, 0.0020f, { 0.0000f, 0.0000f, 0.0000f }, 1.0629f, 0.0030f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_BATHROOM \
|
||||
{ 0.1715f, 1.0000f, 0.3162f, 0.2512f, 1.0000f, 1.4900f, 0.5400f, 1.0000f, 0.6531f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 3.2734f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_LIVINGROOM \
|
||||
{ 0.9766f, 1.0000f, 0.3162f, 0.0010f, 1.0000f, 0.5000f, 0.1000f, 1.0000f, 0.2051f, 0.0030f, { 0.0000f, 0.0000f, 0.0000f }, 0.2805f, 0.0040f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_STONEROOM \
|
||||
{ 1.0000f, 1.0000f, 0.3162f, 0.7079f, 1.0000f, 2.3100f, 0.6400f, 1.0000f, 0.4411f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.1003f, 0.0170f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_AUDITORIUM \
|
||||
{ 1.0000f, 1.0000f, 0.3162f, 0.5781f, 1.0000f, 4.3200f, 0.5900f, 1.0000f, 0.4032f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.7170f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_CONCERTHALL \
|
||||
{ 1.0000f, 1.0000f, 0.3162f, 0.5623f, 1.0000f, 3.9200f, 0.7000f, 1.0000f, 0.2427f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.9977f, 0.0290f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_CAVE \
|
||||
{ 1.0000f, 1.0000f, 0.3162f, 1.0000f, 1.0000f, 2.9100f, 1.3000f, 1.0000f, 0.5000f, 0.0150f, { 0.0000f, 0.0000f, 0.0000f }, 0.7063f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||
|
||||
#define EFX_REVERB_PRESET_ARENA \
|
||||
{ 1.0000f, 1.0000f, 0.3162f, 0.4477f, 1.0000f, 7.2400f, 0.3300f, 1.0000f, 0.2612f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.0186f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_HANGAR \
|
||||
{ 1.0000f, 1.0000f, 0.3162f, 0.3162f, 1.0000f, 10.0500f, 0.2300f, 1.0000f, 0.5000f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.2560f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_CARPETEDHALLWAY \
|
||||
{ 0.4287f, 1.0000f, 0.3162f, 0.0100f, 1.0000f, 0.3000f, 0.1000f, 1.0000f, 0.1215f, 0.0020f, { 0.0000f, 0.0000f, 0.0000f }, 0.1531f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_HALLWAY \
|
||||
{ 0.3645f, 1.0000f, 0.3162f, 0.7079f, 1.0000f, 1.4900f, 0.5900f, 1.0000f, 0.2458f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.6615f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_STONECORRIDOR \
|
||||
{ 1.0000f, 1.0000f, 0.3162f, 0.7612f, 1.0000f, 2.7000f, 0.7900f, 1.0000f, 0.2472f, 0.0130f, { 0.0000f, 0.0000f, 0.0000f }, 1.5758f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_ALLEY \
|
||||
{ 1.0000f, 0.3000f, 0.3162f, 0.7328f, 1.0000f, 1.4900f, 0.8600f, 1.0000f, 0.2500f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 0.9954f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.1250f, 0.9500f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_FOREST \
|
||||
{ 1.0000f, 0.3000f, 0.3162f, 0.0224f, 1.0000f, 1.4900f, 0.5400f, 1.0000f, 0.0525f, 0.1620f, { 0.0000f, 0.0000f, 0.0000f }, 0.7682f, 0.0880f, { 0.0000f, 0.0000f, 0.0000f }, 0.1250f, 1.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_CITY \
|
||||
{ 1.0000f, 0.5000f, 0.3162f, 0.3981f, 1.0000f, 1.4900f, 0.6700f, 1.0000f, 0.0730f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 0.1427f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_MOUNTAINS \
|
||||
{ 1.0000f, 0.2700f, 0.3162f, 0.0562f, 1.0000f, 1.4900f, 0.2100f, 1.0000f, 0.0407f, 0.3000f, { 0.0000f, 0.0000f, 0.0000f }, 0.1919f, 0.1000f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||
|
||||
#define EFX_REVERB_PRESET_QUARRY \
|
||||
{ 1.0000f, 1.0000f, 0.3162f, 0.3162f, 1.0000f, 1.4900f, 0.8300f, 1.0000f, 0.0000f, 0.0610f, { 0.0000f, 0.0000f, 0.0000f }, 1.7783f, 0.0250f, { 0.0000f, 0.0000f, 0.0000f }, 0.1250f, 0.7000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_PLAIN \
|
||||
{ 1.0000f, 0.2100f, 0.3162f, 0.1000f, 1.0000f, 1.4900f, 0.5000f, 1.0000f, 0.0585f, 0.1790f, { 0.0000f, 0.0000f, 0.0000f }, 0.1089f, 0.1000f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_PARKINGLOT \
|
||||
{ 1.0000f, 1.0000f, 0.3162f, 1.0000f, 1.0000f, 1.6500f, 1.5000f, 1.0000f, 0.2082f, 0.0080f, { 0.0000f, 0.0000f, 0.0000f }, 0.2652f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||
|
||||
#define EFX_REVERB_PRESET_SEWERPIPE \
|
||||
{ 0.3071f, 0.8000f, 0.3162f, 0.3162f, 1.0000f, 2.8100f, 0.1400f, 1.0000f, 1.6387f, 0.0140f, { 0.0000f, 0.0000f, 0.0000f }, 3.2471f, 0.0210f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_UNDERWATER \
|
||||
{ 0.3645f, 1.0000f, 0.3162f, 0.0100f, 1.0000f, 1.4900f, 0.1000f, 1.0000f, 0.5963f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 7.0795f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 1.1800f, 0.3480f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_DRUGGED \
|
||||
{ 0.4287f, 0.5000f, 0.3162f, 1.0000f, 1.0000f, 8.3900f, 1.3900f, 1.0000f, 0.8760f, 0.0020f, { 0.0000f, 0.0000f, 0.0000f }, 3.1081f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 1.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||
|
||||
#define EFX_REVERB_PRESET_DIZZY \
|
||||
{ 0.3645f, 0.6000f, 0.3162f, 0.6310f, 1.0000f, 17.2300f, 0.5600f, 1.0000f, 0.1392f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.4937f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.8100f, 0.3100f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||
|
||||
#define EFX_REVERB_PRESET_PSYCHOTIC \
|
||||
{ 0.0625f, 0.5000f, 0.3162f, 0.8404f, 1.0000f, 7.5600f, 0.9100f, 1.0000f, 0.4864f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 2.4378f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 4.0000f, 1.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||
|
||||
/* Castle Presets */
|
||||
|
||||
#define EFX_REVERB_PRESET_CASTLE_SMALLROOM \
|
||||
{ 1.0000f, 0.8900f, 0.3162f, 0.3981f, 0.1000f, 1.2200f, 0.8300f, 0.3100f, 0.8913f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 1.9953f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.1380f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_CASTLE_SHORTPASSAGE \
|
||||
{ 1.0000f, 0.8900f, 0.3162f, 0.3162f, 0.1000f, 2.3200f, 0.8300f, 0.3100f, 0.8913f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0230f, { 0.0000f, 0.0000f, 0.0000f }, 0.1380f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_CASTLE_MEDIUMROOM \
|
||||
{ 1.0000f, 0.9300f, 0.3162f, 0.2818f, 0.1000f, 2.0400f, 0.8300f, 0.4600f, 0.6310f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 1.5849f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.1550f, 0.0300f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_CASTLE_LARGEROOM \
|
||||
{ 1.0000f, 0.8200f, 0.3162f, 0.2818f, 0.1259f, 2.5300f, 0.8300f, 0.5000f, 0.4467f, 0.0340f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0160f, { 0.0000f, 0.0000f, 0.0000f }, 0.1850f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_CASTLE_LONGPASSAGE \
|
||||
{ 1.0000f, 0.8900f, 0.3162f, 0.3981f, 0.1000f, 3.4200f, 0.8300f, 0.3100f, 0.8913f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0230f, { 0.0000f, 0.0000f, 0.0000f }, 0.1380f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_CASTLE_HALL \
|
||||
{ 1.0000f, 0.8100f, 0.3162f, 0.2818f, 0.1778f, 3.1400f, 0.7900f, 0.6200f, 0.1778f, 0.0560f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0240f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_CASTLE_CUPBOARD \
|
||||
{ 1.0000f, 0.8900f, 0.3162f, 0.2818f, 0.1000f, 0.6700f, 0.8700f, 0.3100f, 1.4125f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 3.5481f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 0.1380f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_CASTLE_COURTYARD \
|
||||
{ 1.0000f, 0.4200f, 0.3162f, 0.4467f, 0.1995f, 2.1300f, 0.6100f, 0.2300f, 0.2239f, 0.1600f, { 0.0000f, 0.0000f, 0.0000f }, 0.7079f, 0.0360f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.3700f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||
|
||||
#define EFX_REVERB_PRESET_CASTLE_ALCOVE \
|
||||
{ 1.0000f, 0.8900f, 0.3162f, 0.5012f, 0.1000f, 1.6400f, 0.8700f, 0.3100f, 1.0000f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0340f, { 0.0000f, 0.0000f, 0.0000f }, 0.1380f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 5168.6001f, 139.5000f, 0.0000f, 0x1 }
|
||||
|
||||
/* Factory Presets */
|
||||
|
||||
#define EFX_REVERB_PRESET_FACTORY_SMALLROOM \
|
||||
{ 0.3645f, 0.8200f, 0.3162f, 0.7943f, 0.5012f, 1.7200f, 0.6500f, 1.3100f, 0.7079f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.7783f, 0.0240f, { 0.0000f, 0.0000f, 0.0000f }, 0.1190f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_FACTORY_SHORTPASSAGE \
|
||||
{ 0.3645f, 0.6400f, 0.2512f, 0.7943f, 0.5012f, 2.5300f, 0.6500f, 1.3100f, 1.0000f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0380f, { 0.0000f, 0.0000f, 0.0000f }, 0.1350f, 0.2300f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_FACTORY_MEDIUMROOM \
|
||||
{ 0.4287f, 0.8200f, 0.2512f, 0.7943f, 0.5012f, 2.7600f, 0.6500f, 1.3100f, 0.2818f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0230f, { 0.0000f, 0.0000f, 0.0000f }, 0.1740f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_FACTORY_LARGEROOM \
|
||||
{ 0.4287f, 0.7500f, 0.2512f, 0.7079f, 0.6310f, 4.2400f, 0.5100f, 1.3100f, 0.1778f, 0.0390f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0230f, { 0.0000f, 0.0000f, 0.0000f }, 0.2310f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_FACTORY_LONGPASSAGE \
|
||||
{ 0.3645f, 0.6400f, 0.2512f, 0.7943f, 0.5012f, 4.0600f, 0.6500f, 1.3100f, 1.0000f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0370f, { 0.0000f, 0.0000f, 0.0000f }, 0.1350f, 0.2300f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_FACTORY_HALL \
|
||||
{ 0.4287f, 0.7500f, 0.3162f, 0.7079f, 0.6310f, 7.4300f, 0.5100f, 1.3100f, 0.0631f, 0.0730f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0270f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_FACTORY_CUPBOARD \
|
||||
{ 0.3071f, 0.6300f, 0.2512f, 0.7943f, 0.5012f, 0.4900f, 0.6500f, 1.3100f, 1.2589f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.9953f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 0.1070f, 0.0700f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_FACTORY_COURTYARD \
|
||||
{ 0.3071f, 0.5700f, 0.3162f, 0.3162f, 0.6310f, 2.3200f, 0.2900f, 0.5600f, 0.2239f, 0.1400f, { 0.0000f, 0.0000f, 0.0000f }, 0.3981f, 0.0390f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2900f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_FACTORY_ALCOVE \
|
||||
{ 0.3645f, 0.5900f, 0.2512f, 0.7943f, 0.5012f, 3.1400f, 0.6500f, 1.3100f, 1.4125f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.0000f, 0.0380f, { 0.0000f, 0.0000f, 0.0000f }, 0.1140f, 0.1000f, 0.2500f, 0.0000f, 0.9943f, 3762.6001f, 362.5000f, 0.0000f, 0x1 }
|
||||
|
||||
/* Ice Palace Presets */
|
||||
|
||||
#define EFX_REVERB_PRESET_ICEPALACE_SMALLROOM \
|
||||
{ 1.0000f, 0.8400f, 0.3162f, 0.5623f, 0.2818f, 1.5100f, 1.5300f, 0.2700f, 0.8913f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.1640f, 0.1400f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_ICEPALACE_SHORTPASSAGE \
|
||||
{ 1.0000f, 0.7500f, 0.3162f, 0.5623f, 0.2818f, 1.7900f, 1.4600f, 0.2800f, 0.5012f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0190f, { 0.0000f, 0.0000f, 0.0000f }, 0.1770f, 0.0900f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_ICEPALACE_MEDIUMROOM \
|
||||
{ 1.0000f, 0.8700f, 0.3162f, 0.5623f, 0.4467f, 2.2200f, 1.5300f, 0.3200f, 0.3981f, 0.0390f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0270f, { 0.0000f, 0.0000f, 0.0000f }, 0.1860f, 0.1200f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_ICEPALACE_LARGEROOM \
|
||||
{ 1.0000f, 0.8100f, 0.3162f, 0.5623f, 0.4467f, 3.1400f, 1.5300f, 0.3200f, 0.2512f, 0.0390f, { 0.0000f, 0.0000f, 0.0000f }, 1.0000f, 0.0270f, { 0.0000f, 0.0000f, 0.0000f }, 0.2140f, 0.1100f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_ICEPALACE_LONGPASSAGE \
|
||||
{ 1.0000f, 0.7700f, 0.3162f, 0.5623f, 0.3981f, 3.0100f, 1.4600f, 0.2800f, 0.7943f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0250f, { 0.0000f, 0.0000f, 0.0000f }, 0.1860f, 0.0400f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_ICEPALACE_HALL \
|
||||
{ 1.0000f, 0.7600f, 0.3162f, 0.4467f, 0.5623f, 5.4900f, 1.5300f, 0.3800f, 0.1122f, 0.0540f, { 0.0000f, 0.0000f, 0.0000f }, 0.6310f, 0.0520f, { 0.0000f, 0.0000f, 0.0000f }, 0.2260f, 0.1100f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_ICEPALACE_CUPBOARD \
|
||||
{ 1.0000f, 0.8300f, 0.3162f, 0.5012f, 0.2239f, 0.7600f, 1.5300f, 0.2600f, 1.1220f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.9953f, 0.0160f, { 0.0000f, 0.0000f, 0.0000f }, 0.1430f, 0.0800f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_ICEPALACE_COURTYARD \
|
||||
{ 1.0000f, 0.5900f, 0.3162f, 0.2818f, 0.3162f, 2.0400f, 1.2000f, 0.3800f, 0.3162f, 0.1730f, { 0.0000f, 0.0000f, 0.0000f }, 0.3162f, 0.0430f, { 0.0000f, 0.0000f, 0.0000f }, 0.2350f, 0.4800f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_ICEPALACE_ALCOVE \
|
||||
{ 1.0000f, 0.8400f, 0.3162f, 0.5623f, 0.2818f, 2.7600f, 1.4600f, 0.2800f, 1.1220f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.1610f, 0.0900f, 0.2500f, 0.0000f, 0.9943f, 12428.5000f, 99.6000f, 0.0000f, 0x1 }
|
||||
|
||||
/* Space Station Presets */
|
||||
|
||||
#define EFX_REVERB_PRESET_SPACESTATION_SMALLROOM \
|
||||
{ 0.2109f, 0.7000f, 0.3162f, 0.7079f, 0.8913f, 1.7200f, 0.8200f, 0.5500f, 0.7943f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0130f, { 0.0000f, 0.0000f, 0.0000f }, 0.1880f, 0.2600f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_SPACESTATION_SHORTPASSAGE \
|
||||
{ 0.2109f, 0.8700f, 0.3162f, 0.6310f, 0.8913f, 3.5700f, 0.5000f, 0.5500f, 1.0000f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0160f, { 0.0000f, 0.0000f, 0.0000f }, 0.1720f, 0.2000f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_SPACESTATION_MEDIUMROOM \
|
||||
{ 0.2109f, 0.7500f, 0.3162f, 0.6310f, 0.8913f, 3.0100f, 0.5000f, 0.5500f, 0.3981f, 0.0340f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0350f, { 0.0000f, 0.0000f, 0.0000f }, 0.2090f, 0.3100f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_SPACESTATION_LARGEROOM \
|
||||
{ 0.3645f, 0.8100f, 0.3162f, 0.6310f, 0.8913f, 3.8900f, 0.3800f, 0.6100f, 0.3162f, 0.0560f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0350f, { 0.0000f, 0.0000f, 0.0000f }, 0.2330f, 0.2800f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_SPACESTATION_LONGPASSAGE \
|
||||
{ 0.4287f, 0.8200f, 0.3162f, 0.6310f, 0.8913f, 4.6200f, 0.6200f, 0.5500f, 1.0000f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0310f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2300f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_SPACESTATION_HALL \
|
||||
{ 0.4287f, 0.8700f, 0.3162f, 0.6310f, 0.8913f, 7.1100f, 0.3800f, 0.6100f, 0.1778f, 0.1000f, { 0.0000f, 0.0000f, 0.0000f }, 0.6310f, 0.0470f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2500f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_SPACESTATION_CUPBOARD \
|
||||
{ 0.1715f, 0.5600f, 0.3162f, 0.7079f, 0.8913f, 0.7900f, 0.8100f, 0.5500f, 1.4125f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.7783f, 0.0180f, { 0.0000f, 0.0000f, 0.0000f }, 0.1810f, 0.3100f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_SPACESTATION_ALCOVE \
|
||||
{ 0.2109f, 0.7800f, 0.3162f, 0.7079f, 0.8913f, 1.1600f, 0.8100f, 0.5500f, 1.4125f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 1.0000f, 0.0180f, { 0.0000f, 0.0000f, 0.0000f }, 0.1920f, 0.2100f, 0.2500f, 0.0000f, 0.9943f, 3316.1001f, 458.2000f, 0.0000f, 0x1 }
|
||||
|
||||
/* Wooden Galleon Presets */
|
||||
|
||||
#define EFX_REVERB_PRESET_WOODEN_SMALLROOM \
|
||||
{ 1.0000f, 1.0000f, 0.3162f, 0.1122f, 0.3162f, 0.7900f, 0.3200f, 0.8700f, 1.0000f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0290f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_WOODEN_SHORTPASSAGE \
|
||||
{ 1.0000f, 1.0000f, 0.3162f, 0.1259f, 0.3162f, 1.7500f, 0.5000f, 0.8700f, 0.8913f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 0.6310f, 0.0240f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_WOODEN_MEDIUMROOM \
|
||||
{ 1.0000f, 1.0000f, 0.3162f, 0.1000f, 0.2818f, 1.4700f, 0.4200f, 0.8200f, 0.8913f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0290f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_WOODEN_LARGEROOM \
|
||||
{ 1.0000f, 1.0000f, 0.3162f, 0.0891f, 0.2818f, 2.6500f, 0.3300f, 0.8200f, 0.8913f, 0.0660f, { 0.0000f, 0.0000f, 0.0000f }, 0.7943f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_WOODEN_LONGPASSAGE \
|
||||
{ 1.0000f, 1.0000f, 0.3162f, 0.1000f, 0.3162f, 1.9900f, 0.4000f, 0.7900f, 1.0000f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.4467f, 0.0360f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_WOODEN_HALL \
|
||||
{ 1.0000f, 1.0000f, 0.3162f, 0.0794f, 0.2818f, 3.4500f, 0.3000f, 0.8200f, 0.8913f, 0.0880f, { 0.0000f, 0.0000f, 0.0000f }, 0.7943f, 0.0630f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_WOODEN_CUPBOARD \
|
||||
{ 1.0000f, 1.0000f, 0.3162f, 0.1413f, 0.3162f, 0.5600f, 0.4600f, 0.9100f, 1.1220f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0280f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_WOODEN_COURTYARD \
|
||||
{ 1.0000f, 0.6500f, 0.3162f, 0.0794f, 0.3162f, 1.7900f, 0.3500f, 0.7900f, 0.5623f, 0.1230f, { 0.0000f, 0.0000f, 0.0000f }, 0.1000f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_WOODEN_ALCOVE \
|
||||
{ 1.0000f, 1.0000f, 0.3162f, 0.1259f, 0.3162f, 1.2200f, 0.6200f, 0.9100f, 1.1220f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 0.7079f, 0.0240f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 4705.0000f, 99.6000f, 0.0000f, 0x1 }
|
||||
|
||||
/* Sports Presets */
|
||||
|
||||
#define EFX_REVERB_PRESET_SPORT_EMPTYSTADIUM \
|
||||
{ 1.0000f, 1.0000f, 0.3162f, 0.4467f, 0.7943f, 6.2600f, 0.5100f, 1.1000f, 0.0631f, 0.1830f, { 0.0000f, 0.0000f, 0.0000f }, 0.3981f, 0.0380f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_SPORT_SQUASHCOURT \
|
||||
{ 1.0000f, 0.7500f, 0.3162f, 0.3162f, 0.7943f, 2.2200f, 0.9100f, 1.1600f, 0.4467f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 0.7943f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.1260f, 0.1900f, 0.2500f, 0.0000f, 0.9943f, 7176.8999f, 211.2000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_SPORT_SMALLSWIMMINGPOOL \
|
||||
{ 1.0000f, 0.7000f, 0.3162f, 0.7943f, 0.8913f, 2.7600f, 1.2500f, 1.1400f, 0.6310f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.7943f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.1790f, 0.1500f, 0.8950f, 0.1900f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||
|
||||
#define EFX_REVERB_PRESET_SPORT_LARGESWIMMINGPOOL \
|
||||
{ 1.0000f, 0.8200f, 0.3162f, 0.7943f, 1.0000f, 5.4900f, 1.3100f, 1.1400f, 0.4467f, 0.0390f, { 0.0000f, 0.0000f, 0.0000f }, 0.5012f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.2220f, 0.5500f, 1.1590f, 0.2100f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||
|
||||
#define EFX_REVERB_PRESET_SPORT_GYMNASIUM \
|
||||
{ 1.0000f, 0.8100f, 0.3162f, 0.4467f, 0.8913f, 3.1400f, 1.0600f, 1.3500f, 0.3981f, 0.0290f, { 0.0000f, 0.0000f, 0.0000f }, 0.5623f, 0.0450f, { 0.0000f, 0.0000f, 0.0000f }, 0.1460f, 0.1400f, 0.2500f, 0.0000f, 0.9943f, 7176.8999f, 211.2000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_SPORT_FULLSTADIUM \
|
||||
{ 1.0000f, 1.0000f, 0.3162f, 0.0708f, 0.7943f, 5.2500f, 0.1700f, 0.8000f, 0.1000f, 0.1880f, { 0.0000f, 0.0000f, 0.0000f }, 0.2818f, 0.0380f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_SPORT_STADIUMTANNOY \
|
||||
{ 1.0000f, 0.7800f, 0.3162f, 0.5623f, 0.5012f, 2.5300f, 0.8800f, 0.6800f, 0.2818f, 0.2300f, { 0.0000f, 0.0000f, 0.0000f }, 0.5012f, 0.0630f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
/* Prefab Presets */
|
||||
|
||||
#define EFX_REVERB_PRESET_PREFAB_WORKSHOP \
|
||||
{ 0.4287f, 1.0000f, 0.3162f, 0.1413f, 0.3981f, 0.7600f, 1.0000f, 1.0000f, 1.0000f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||
|
||||
#define EFX_REVERB_PRESET_PREFAB_SCHOOLROOM \
|
||||
{ 0.4022f, 0.6900f, 0.3162f, 0.6310f, 0.5012f, 0.9800f, 0.4500f, 0.1800f, 1.4125f, 0.0170f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0150f, { 0.0000f, 0.0000f, 0.0000f }, 0.0950f, 0.1400f, 0.2500f, 0.0000f, 0.9943f, 7176.8999f, 211.2000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_PREFAB_PRACTISEROOM \
|
||||
{ 0.4022f, 0.8700f, 0.3162f, 0.3981f, 0.5012f, 1.1200f, 0.5600f, 0.1800f, 1.2589f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.0950f, 0.1400f, 0.2500f, 0.0000f, 0.9943f, 7176.8999f, 211.2000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_PREFAB_OUTHOUSE \
|
||||
{ 1.0000f, 0.8200f, 0.3162f, 0.1122f, 0.1585f, 1.3800f, 0.3800f, 0.3500f, 0.8913f, 0.0240f, { 0.0000f, 0.0000f, -0.0000f }, 0.6310f, 0.0440f, { 0.0000f, 0.0000f, 0.0000f }, 0.1210f, 0.1700f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 107.5000f, 0.0000f, 0x0 }
|
||||
|
||||
#define EFX_REVERB_PRESET_PREFAB_CARAVAN \
|
||||
{ 1.0000f, 1.0000f, 0.3162f, 0.0891f, 0.1259f, 0.4300f, 1.5000f, 1.0000f, 1.0000f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 1.9953f, 0.0120f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||
|
||||
/* Dome and Pipe Presets */
|
||||
|
||||
#define EFX_REVERB_PRESET_DOME_TOMB \
|
||||
{ 1.0000f, 0.7900f, 0.3162f, 0.3548f, 0.2239f, 4.1800f, 0.2100f, 0.1000f, 0.3868f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 1.6788f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 0.1770f, 0.1900f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x0 }
|
||||
|
||||
#define EFX_REVERB_PRESET_PIPE_SMALL \
|
||||
{ 1.0000f, 1.0000f, 0.3162f, 0.3548f, 0.2239f, 5.0400f, 0.1000f, 0.1000f, 0.5012f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 2.5119f, 0.0150f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_DOME_SAINTPAULS \
|
||||
{ 1.0000f, 0.8700f, 0.3162f, 0.3548f, 0.2239f, 10.4800f, 0.1900f, 0.1000f, 0.1778f, 0.0900f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0420f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.1200f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_PIPE_LONGTHIN \
|
||||
{ 0.2560f, 0.9100f, 0.3162f, 0.4467f, 0.2818f, 9.2100f, 0.1800f, 0.1000f, 0.7079f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 0.7079f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x0 }
|
||||
|
||||
#define EFX_REVERB_PRESET_PIPE_LARGE \
|
||||
{ 1.0000f, 1.0000f, 0.3162f, 0.3548f, 0.2239f, 8.4500f, 0.1000f, 0.1000f, 0.3981f, 0.0460f, { 0.0000f, 0.0000f, 0.0000f }, 1.5849f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_PIPE_RESONANT \
|
||||
{ 0.1373f, 0.9100f, 0.3162f, 0.4467f, 0.2818f, 6.8100f, 0.1800f, 0.1000f, 0.7079f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.0000f, 0.0220f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 20.0000f, 0.0000f, 0x0 }
|
||||
|
||||
/* Outdoors Presets */
|
||||
|
||||
#define EFX_REVERB_PRESET_OUTDOORS_BACKYARD \
|
||||
{ 1.0000f, 0.4500f, 0.3162f, 0.2512f, 0.5012f, 1.1200f, 0.3400f, 0.4600f, 0.4467f, 0.0690f, { 0.0000f, 0.0000f, -0.0000f }, 0.7079f, 0.0230f, { 0.0000f, 0.0000f, 0.0000f }, 0.2180f, 0.3400f, 0.2500f, 0.0000f, 0.9943f, 4399.1001f, 242.9000f, 0.0000f, 0x0 }
|
||||
|
||||
#define EFX_REVERB_PRESET_OUTDOORS_ROLLINGPLAINS \
|
||||
{ 1.0000f, 0.0000f, 0.3162f, 0.0112f, 0.6310f, 2.1300f, 0.2100f, 0.4600f, 0.1778f, 0.3000f, { 0.0000f, 0.0000f, -0.0000f }, 0.4467f, 0.0190f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9943f, 4399.1001f, 242.9000f, 0.0000f, 0x0 }
|
||||
|
||||
#define EFX_REVERB_PRESET_OUTDOORS_DEEPCANYON \
|
||||
{ 1.0000f, 0.7400f, 0.3162f, 0.1778f, 0.6310f, 3.8900f, 0.2100f, 0.4600f, 0.3162f, 0.2230f, { 0.0000f, 0.0000f, -0.0000f }, 0.3548f, 0.0190f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9943f, 4399.1001f, 242.9000f, 0.0000f, 0x0 }
|
||||
|
||||
#define EFX_REVERB_PRESET_OUTDOORS_CREEK \
|
||||
{ 1.0000f, 0.3500f, 0.3162f, 0.1778f, 0.5012f, 2.1300f, 0.2100f, 0.4600f, 0.3981f, 0.1150f, { 0.0000f, 0.0000f, -0.0000f }, 0.1995f, 0.0310f, { 0.0000f, 0.0000f, 0.0000f }, 0.2180f, 0.3400f, 0.2500f, 0.0000f, 0.9943f, 4399.1001f, 242.9000f, 0.0000f, 0x0 }
|
||||
|
||||
#define EFX_REVERB_PRESET_OUTDOORS_VALLEY \
|
||||
{ 1.0000f, 0.2800f, 0.3162f, 0.0282f, 0.1585f, 2.8800f, 0.2600f, 0.3500f, 0.1413f, 0.2630f, { 0.0000f, 0.0000f, -0.0000f }, 0.3981f, 0.1000f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.3400f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 107.5000f, 0.0000f, 0x0 }
|
||||
|
||||
/* Mood Presets */
|
||||
|
||||
#define EFX_REVERB_PRESET_MOOD_HEAVEN \
|
||||
{ 1.0000f, 0.9400f, 0.3162f, 0.7943f, 0.4467f, 5.0400f, 1.1200f, 0.5600f, 0.2427f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0290f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0800f, 2.7420f, 0.0500f, 0.9977f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_MOOD_HELL \
|
||||
{ 1.0000f, 0.5700f, 0.3162f, 0.3548f, 0.4467f, 3.5700f, 0.4900f, 2.0000f, 0.0000f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.1100f, 0.0400f, 2.1090f, 0.5200f, 0.9943f, 5000.0000f, 139.5000f, 0.0000f, 0x0 }
|
||||
|
||||
#define EFX_REVERB_PRESET_MOOD_MEMORY \
|
||||
{ 1.0000f, 0.8500f, 0.3162f, 0.6310f, 0.3548f, 4.0600f, 0.8200f, 0.5600f, 0.0398f, 0.0000f, { 0.0000f, 0.0000f, 0.0000f }, 1.1220f, 0.0000f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.4740f, 0.4500f, 0.9886f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||
|
||||
/* Driving Presets */
|
||||
|
||||
#define EFX_REVERB_PRESET_DRIVING_COMMENTATOR \
|
||||
{ 1.0000f, 0.0000f, 0.3162f, 0.5623f, 0.5012f, 2.4200f, 0.8800f, 0.6800f, 0.1995f, 0.0930f, { 0.0000f, 0.0000f, 0.0000f }, 0.2512f, 0.0170f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 1.0000f, 0.2500f, 0.0000f, 0.9886f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_DRIVING_PITGARAGE \
|
||||
{ 0.4287f, 0.5900f, 0.3162f, 0.7079f, 0.5623f, 1.7200f, 0.9300f, 0.8700f, 0.5623f, 0.0000f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0160f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.1100f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||
|
||||
#define EFX_REVERB_PRESET_DRIVING_INCAR_RACER \
|
||||
{ 0.0832f, 0.8000f, 0.3162f, 1.0000f, 0.7943f, 0.1700f, 2.0000f, 0.4100f, 1.7783f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 0.7079f, 0.0150f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 10268.2002f, 251.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_DRIVING_INCAR_SPORTS \
|
||||
{ 0.0832f, 0.8000f, 0.3162f, 0.6310f, 1.0000f, 0.1700f, 0.7500f, 0.4100f, 1.0000f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 0.5623f, 0.0000f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 10268.2002f, 251.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_DRIVING_INCAR_LUXURY \
|
||||
{ 0.2560f, 1.0000f, 0.3162f, 0.1000f, 0.5012f, 0.1300f, 0.4100f, 0.4600f, 0.7943f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 1.5849f, 0.0100f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 10268.2002f, 251.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_DRIVING_FULLGRANDSTAND \
|
||||
{ 1.0000f, 1.0000f, 0.3162f, 0.2818f, 0.6310f, 3.0100f, 1.3700f, 1.2800f, 0.3548f, 0.0900f, { 0.0000f, 0.0000f, 0.0000f }, 0.1778f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 10420.2002f, 250.0000f, 0.0000f, 0x0 }
|
||||
|
||||
#define EFX_REVERB_PRESET_DRIVING_EMPTYGRANDSTAND \
|
||||
{ 1.0000f, 1.0000f, 0.3162f, 1.0000f, 0.7943f, 4.6200f, 1.7500f, 1.4000f, 0.2082f, 0.0900f, { 0.0000f, 0.0000f, 0.0000f }, 0.2512f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.0000f, 0.9943f, 10420.2002f, 250.0000f, 0.0000f, 0x0 }
|
||||
|
||||
#define EFX_REVERB_PRESET_DRIVING_TUNNEL \
|
||||
{ 1.0000f, 0.8100f, 0.3162f, 0.3981f, 0.8913f, 3.4200f, 0.9400f, 1.3100f, 0.7079f, 0.0510f, { 0.0000f, 0.0000f, 0.0000f }, 0.7079f, 0.0470f, { 0.0000f, 0.0000f, 0.0000f }, 0.2140f, 0.0500f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 155.3000f, 0.0000f, 0x1 }
|
||||
|
||||
/* City Presets */
|
||||
|
||||
#define EFX_REVERB_PRESET_CITY_STREETS \
|
||||
{ 1.0000f, 0.7800f, 0.3162f, 0.7079f, 0.8913f, 1.7900f, 1.1200f, 0.9100f, 0.2818f, 0.0460f, { 0.0000f, 0.0000f, 0.0000f }, 0.1995f, 0.0280f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2000f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_CITY_SUBWAY \
|
||||
{ 1.0000f, 0.7400f, 0.3162f, 0.7079f, 0.8913f, 3.0100f, 1.2300f, 0.9100f, 0.7079f, 0.0460f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0280f, { 0.0000f, 0.0000f, 0.0000f }, 0.1250f, 0.2100f, 0.2500f, 0.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_CITY_MUSEUM \
|
||||
{ 1.0000f, 0.8200f, 0.3162f, 0.1778f, 0.1778f, 3.2800f, 1.4000f, 0.5700f, 0.2512f, 0.0390f, { 0.0000f, 0.0000f, -0.0000f }, 0.8913f, 0.0340f, { 0.0000f, 0.0000f, 0.0000f }, 0.1300f, 0.1700f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 107.5000f, 0.0000f, 0x0 }
|
||||
|
||||
#define EFX_REVERB_PRESET_CITY_LIBRARY \
|
||||
{ 1.0000f, 0.8200f, 0.3162f, 0.2818f, 0.0891f, 2.7600f, 0.8900f, 0.4100f, 0.3548f, 0.0290f, { 0.0000f, 0.0000f, -0.0000f }, 0.8913f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 0.1300f, 0.1700f, 0.2500f, 0.0000f, 0.9943f, 2854.3999f, 107.5000f, 0.0000f, 0x0 }
|
||||
|
||||
#define EFX_REVERB_PRESET_CITY_UNDERPASS \
|
||||
{ 1.0000f, 0.8200f, 0.3162f, 0.4467f, 0.8913f, 3.5700f, 1.1200f, 0.9100f, 0.3981f, 0.0590f, { 0.0000f, 0.0000f, 0.0000f }, 0.8913f, 0.0370f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.1400f, 0.2500f, 0.0000f, 0.9920f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_CITY_ABANDONED \
|
||||
{ 1.0000f, 0.6900f, 0.3162f, 0.7943f, 0.8913f, 3.2800f, 1.1700f, 0.9100f, 0.4467f, 0.0440f, { 0.0000f, 0.0000f, 0.0000f }, 0.2818f, 0.0240f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.2000f, 0.2500f, 0.0000f, 0.9966f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
/* Misc. Presets */
|
||||
|
||||
#define EFX_REVERB_PRESET_DUSTYROOM \
|
||||
{ 0.3645f, 0.5600f, 0.3162f, 0.7943f, 0.7079f, 1.7900f, 0.3800f, 0.2100f, 0.5012f, 0.0020f, { 0.0000f, 0.0000f, 0.0000f }, 1.2589f, 0.0060f, { 0.0000f, 0.0000f, 0.0000f }, 0.2020f, 0.0500f, 0.2500f, 0.0000f, 0.9886f, 13046.0000f, 163.3000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_CHAPEL \
|
||||
{ 1.0000f, 0.8400f, 0.3162f, 0.5623f, 1.0000f, 4.6200f, 0.6400f, 1.2300f, 0.4467f, 0.0320f, { 0.0000f, 0.0000f, 0.0000f }, 0.7943f, 0.0490f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 0.2500f, 0.1100f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
|
||||
|
||||
#define EFX_REVERB_PRESET_SMALLWATERROOM \
|
||||
{ 1.0000f, 0.7000f, 0.3162f, 0.4477f, 1.0000f, 1.5100f, 1.2500f, 1.1400f, 0.8913f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 1.4125f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.1790f, 0.1500f, 0.8950f, 0.1900f, 0.9920f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
|
||||
|
||||
/* NOLINTEND */
|
||||
#endif /* EFX_PRESETS_H */
|
||||
@@ -0,0 +1,778 @@
|
||||
/* This is free and unencumbered software released into the public domain.
|
||||
*
|
||||
* Anyone is free to copy, modify, publish, use, compile, sell, or
|
||||
* distribute this software, either in source code form or as a compiled
|
||||
* binary, for any purpose, commercial or non-commercial, and by any
|
||||
* means.
|
||||
*
|
||||
* In jurisdictions that recognize copyright laws, the author or authors
|
||||
* of this software dedicate any and all copyright interest in the
|
||||
* software to the public domain. We make this dedication for the benefit
|
||||
* of the public at large and to the detriment of our heirs and
|
||||
* successors. We intend this dedication to be an overt act of
|
||||
* relinquishment in perpetuity of all present and future rights to this
|
||||
* software under copyright law.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* For more information, please refer to <http://unlicense.org/>
|
||||
*/
|
||||
|
||||
/* This file is auto-generated! Please do not edit it manually.
|
||||
* Instead, modify the API in al.xml and regenerate using genheaders.py.
|
||||
*
|
||||
* Last regenerated: 2025-10-13 19:40:01.687690+00:00
|
||||
*/
|
||||
|
||||
#ifndef AL_EFX_H
|
||||
#define AL_EFX_H
|
||||
|
||||
/* NOLINTBEGIN */
|
||||
#include <float.h>
|
||||
|
||||
#include "alc.h"
|
||||
#include "al.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define ALC_EXT_EFX_NAME "ALC_EXT_EFX"
|
||||
|
||||
#define ALC_EFX_MAJOR_VERSION 0x20001
|
||||
#define ALC_EFX_MINOR_VERSION 0x20002
|
||||
#define ALC_MAX_AUXILIARY_SENDS 0x20003
|
||||
|
||||
/* Listener properties */
|
||||
#define AL_METERS_PER_UNIT 0x20004
|
||||
|
||||
/* Source properties. */
|
||||
#define AL_DIRECT_FILTER 0x20005
|
||||
#define AL_AUXILIARY_SEND_FILTER 0x20006
|
||||
#define AL_AIR_ABSORPTION_FACTOR 0x20007
|
||||
#define AL_ROOM_ROLLOFF_FACTOR 0x20008
|
||||
#define AL_CONE_OUTER_GAINHF 0x20009
|
||||
#define AL_DIRECT_FILTER_GAINHF_AUTO 0x2000A
|
||||
#define AL_AUXILIARY_SEND_FILTER_GAIN_AUTO 0x2000B
|
||||
#define AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO 0x2000C
|
||||
|
||||
/* Reverb effect parameters */
|
||||
#define AL_REVERB_DENSITY 0x0001
|
||||
#define AL_REVERB_DIFFUSION 0x0002
|
||||
#define AL_REVERB_GAIN 0x0003
|
||||
#define AL_REVERB_GAINHF 0x0004
|
||||
#define AL_REVERB_DECAY_TIME 0x0005
|
||||
#define AL_REVERB_DECAY_HFRATIO 0x0006
|
||||
#define AL_REVERB_REFLECTIONS_GAIN 0x0007
|
||||
#define AL_REVERB_REFLECTIONS_DELAY 0x0008
|
||||
#define AL_REVERB_LATE_REVERB_GAIN 0x0009
|
||||
#define AL_REVERB_LATE_REVERB_DELAY 0x000A
|
||||
#define AL_REVERB_AIR_ABSORPTION_GAINHF 0x000B
|
||||
#define AL_REVERB_ROOM_ROLLOFF_FACTOR 0x000C
|
||||
#define AL_REVERB_DECAY_HFLIMIT 0x000D
|
||||
|
||||
/* EAX Reverb effect parameters */
|
||||
#define AL_EAXREVERB_DENSITY 0x0001
|
||||
#define AL_EAXREVERB_DIFFUSION 0x0002
|
||||
#define AL_EAXREVERB_GAIN 0x0003
|
||||
#define AL_EAXREVERB_GAINHF 0x0004
|
||||
#define AL_EAXREVERB_GAINLF 0x0005
|
||||
#define AL_EAXREVERB_DECAY_TIME 0x0006
|
||||
#define AL_EAXREVERB_DECAY_HFRATIO 0x0007
|
||||
#define AL_EAXREVERB_DECAY_LFRATIO 0x0008
|
||||
#define AL_EAXREVERB_REFLECTIONS_GAIN 0x0009
|
||||
#define AL_EAXREVERB_REFLECTIONS_DELAY 0x000A
|
||||
#define AL_EAXREVERB_REFLECTIONS_PAN 0x000B
|
||||
#define AL_EAXREVERB_LATE_REVERB_GAIN 0x000C
|
||||
#define AL_EAXREVERB_LATE_REVERB_DELAY 0x000D
|
||||
#define AL_EAXREVERB_LATE_REVERB_PAN 0x000E
|
||||
#define AL_EAXREVERB_ECHO_TIME 0x000F
|
||||
#define AL_EAXREVERB_ECHO_DEPTH 0x0010
|
||||
#define AL_EAXREVERB_MODULATION_TIME 0x0011
|
||||
#define AL_EAXREVERB_MODULATION_DEPTH 0x0012
|
||||
#define AL_EAXREVERB_AIR_ABSORPTION_GAINHF 0x0013
|
||||
#define AL_EAXREVERB_HFREFERENCE 0x0014
|
||||
#define AL_EAXREVERB_LFREFERENCE 0x0015
|
||||
#define AL_EAXREVERB_ROOM_ROLLOFF_FACTOR 0x0016
|
||||
#define AL_EAXREVERB_DECAY_HFLIMIT 0x0017
|
||||
|
||||
/* Chorus effect parameters */
|
||||
#define AL_CHORUS_WAVEFORM 0x0001
|
||||
#define AL_CHORUS_PHASE 0x0002
|
||||
#define AL_CHORUS_RATE 0x0003
|
||||
#define AL_CHORUS_DEPTH 0x0004
|
||||
#define AL_CHORUS_FEEDBACK 0x0005
|
||||
#define AL_CHORUS_DELAY 0x0006
|
||||
|
||||
/* Distortion effect parameters */
|
||||
#define AL_DISTORTION_EDGE 0x0001
|
||||
#define AL_DISTORTION_GAIN 0x0002
|
||||
#define AL_DISTORTION_LOWPASS_CUTOFF 0x0003
|
||||
#define AL_DISTORTION_EQCENTER 0x0004
|
||||
#define AL_DISTORTION_EQBANDWIDTH 0x0005
|
||||
|
||||
/* Echo effect parameters */
|
||||
#define AL_ECHO_DELAY 0x0001
|
||||
#define AL_ECHO_LRDELAY 0x0002
|
||||
#define AL_ECHO_DAMPING 0x0003
|
||||
#define AL_ECHO_FEEDBACK 0x0004
|
||||
#define AL_ECHO_SPREAD 0x0005
|
||||
|
||||
/* Flanger effect parameters */
|
||||
#define AL_FLANGER_WAVEFORM 0x0001
|
||||
#define AL_FLANGER_PHASE 0x0002
|
||||
#define AL_FLANGER_RATE 0x0003
|
||||
#define AL_FLANGER_DEPTH 0x0004
|
||||
#define AL_FLANGER_FEEDBACK 0x0005
|
||||
#define AL_FLANGER_DELAY 0x0006
|
||||
|
||||
/* Frequency shifter effect parameters */
|
||||
#define AL_FREQUENCY_SHIFTER_FREQUENCY 0x0001
|
||||
#define AL_FREQUENCY_SHIFTER_LEFT_DIRECTION 0x0002
|
||||
#define AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION 0x0003
|
||||
|
||||
/* Vocal morpher effect parameters */
|
||||
#define AL_VOCAL_MORPHER_PHONEMEA 0x0001
|
||||
#define AL_VOCAL_MORPHER_PHONEMEA_COARSE_TUNING 0x0002
|
||||
#define AL_VOCAL_MORPHER_PHONEMEB 0x0003
|
||||
#define AL_VOCAL_MORPHER_PHONEMEB_COARSE_TUNING 0x0004
|
||||
#define AL_VOCAL_MORPHER_WAVEFORM 0x0005
|
||||
#define AL_VOCAL_MORPHER_RATE 0x0006
|
||||
|
||||
/* Pitchshifter effect parameters */
|
||||
#define AL_PITCH_SHIFTER_COARSE_TUNE 0x0001
|
||||
#define AL_PITCH_SHIFTER_FINE_TUNE 0x0002
|
||||
|
||||
/* Ringmodulator effect parameters */
|
||||
#define AL_RING_MODULATOR_FREQUENCY 0x0001
|
||||
#define AL_RING_MODULATOR_HIGHPASS_CUTOFF 0x0002
|
||||
#define AL_RING_MODULATOR_WAVEFORM 0x0003
|
||||
|
||||
/* Autowah effect parameters */
|
||||
#define AL_AUTOWAH_ATTACK_TIME 0x0001
|
||||
#define AL_AUTOWAH_RELEASE_TIME 0x0002
|
||||
#define AL_AUTOWAH_RESONANCE 0x0003
|
||||
#define AL_AUTOWAH_PEAK_GAIN 0x0004
|
||||
|
||||
/* Compressor effect parameters */
|
||||
#define AL_COMPRESSOR_ONOFF 0x0001
|
||||
|
||||
/* Equalizer effect parameters */
|
||||
#define AL_EQUALIZER_LOW_GAIN 0x0001
|
||||
#define AL_EQUALIZER_LOW_CUTOFF 0x0002
|
||||
#define AL_EQUALIZER_MID1_GAIN 0x0003
|
||||
#define AL_EQUALIZER_MID1_CENTER 0x0004
|
||||
#define AL_EQUALIZER_MID1_WIDTH 0x0005
|
||||
#define AL_EQUALIZER_MID2_GAIN 0x0006
|
||||
#define AL_EQUALIZER_MID2_CENTER 0x0007
|
||||
#define AL_EQUALIZER_MID2_WIDTH 0x0008
|
||||
#define AL_EQUALIZER_HIGH_GAIN 0x0009
|
||||
#define AL_EQUALIZER_HIGH_CUTOFF 0x000A
|
||||
|
||||
/* Effect type */
|
||||
#define AL_EFFECT_FIRST_PARAMETER 0x0000
|
||||
#define AL_EFFECT_LAST_PARAMETER 0x8000
|
||||
#define AL_EFFECT_TYPE 0x8001
|
||||
|
||||
/* Effect types, used with the AL_EFFECT_TYPE property */
|
||||
#define AL_EFFECT_NULL 0x0000
|
||||
#define AL_EFFECT_REVERB 0x0001
|
||||
#define AL_EFFECT_CHORUS 0x0002
|
||||
#define AL_EFFECT_DISTORTION 0x0003
|
||||
#define AL_EFFECT_ECHO 0x0004
|
||||
#define AL_EFFECT_FLANGER 0x0005
|
||||
#define AL_EFFECT_FREQUENCY_SHIFTER 0x0006
|
||||
#define AL_EFFECT_VOCAL_MORPHER 0x0007
|
||||
#define AL_EFFECT_PITCH_SHIFTER 0x0008
|
||||
#define AL_EFFECT_RING_MODULATOR 0x0009
|
||||
#define AL_EFFECT_AUTOWAH 0x000A
|
||||
#define AL_EFFECT_COMPRESSOR 0x000B
|
||||
#define AL_EFFECT_EQUALIZER 0x000C
|
||||
#define AL_EFFECT_EAXREVERB 0x8000
|
||||
|
||||
/* Auxiliary Effect Slot properties. */
|
||||
#define AL_EFFECTSLOT_EFFECT 0x0001
|
||||
#define AL_EFFECTSLOT_GAIN 0x0002
|
||||
#define AL_EFFECTSLOT_AUXILIARY_SEND_AUTO 0x0003
|
||||
|
||||
/* NULL Auxiliary Slot ID to disable a source send. */
|
||||
#define AL_EFFECTSLOT_NULL 0x0000
|
||||
|
||||
/* Lowpass filter parameters */
|
||||
#define AL_LOWPASS_GAIN 0x0001
|
||||
#define AL_LOWPASS_GAINHF 0x0002
|
||||
|
||||
/* Highpass filter parameters */
|
||||
#define AL_HIGHPASS_GAIN 0x0001
|
||||
#define AL_HIGHPASS_GAINLF 0x0002
|
||||
|
||||
/* Bandpass filter parameters */
|
||||
#define AL_BANDPASS_GAIN 0x0001
|
||||
#define AL_BANDPASS_GAINLF 0x0002
|
||||
#define AL_BANDPASS_GAINHF 0x0003
|
||||
|
||||
/* Filter type */
|
||||
#define AL_FILTER_FIRST_PARAMETER 0x0000
|
||||
#define AL_FILTER_LAST_PARAMETER 0x8000
|
||||
#define AL_FILTER_TYPE 0x8001
|
||||
|
||||
/* Filter types, used with the AL_FILTER_TYPE property */
|
||||
#define AL_FILTER_NULL 0x0000
|
||||
#define AL_FILTER_LOWPASS 0x0001
|
||||
#define AL_FILTER_HIGHPASS 0x0002
|
||||
#define AL_FILTER_BANDPASS 0x0003
|
||||
|
||||
/* Lowpass filter */
|
||||
#define AL_LOWPASS_MIN_GAIN 0.0f
|
||||
#define AL_LOWPASS_MAX_GAIN 1.0f
|
||||
#define AL_LOWPASS_DEFAULT_GAIN 1.0f
|
||||
|
||||
#define AL_LOWPASS_MIN_GAINHF 0.0f
|
||||
#define AL_LOWPASS_MAX_GAINHF 1.0f
|
||||
#define AL_LOWPASS_DEFAULT_GAINHF 1.0f
|
||||
|
||||
/* Highpass filter */
|
||||
#define AL_HIGHPASS_MIN_GAIN 0.0f
|
||||
#define AL_HIGHPASS_MAX_GAIN 1.0f
|
||||
#define AL_HIGHPASS_DEFAULT_GAIN 1.0f
|
||||
|
||||
#define AL_HIGHPASS_MIN_GAINLF 0.0f
|
||||
#define AL_HIGHPASS_MAX_GAINLF 1.0f
|
||||
#define AL_HIGHPASS_DEFAULT_GAINLF 1.0f
|
||||
|
||||
/* Bandpass filter */
|
||||
#define AL_BANDPASS_MIN_GAIN 0.0f
|
||||
#define AL_BANDPASS_MAX_GAIN 1.0f
|
||||
#define AL_BANDPASS_DEFAULT_GAIN 1.0f
|
||||
|
||||
#define AL_BANDPASS_MIN_GAINHF 0.0f
|
||||
#define AL_BANDPASS_MAX_GAINHF 1.0f
|
||||
#define AL_BANDPASS_DEFAULT_GAINHF 1.0f
|
||||
|
||||
#define AL_BANDPASS_MIN_GAINLF 0.0f
|
||||
#define AL_BANDPASS_MAX_GAINLF 1.0f
|
||||
#define AL_BANDPASS_DEFAULT_GAINLF 1.0f
|
||||
|
||||
/* Standard reverb effect */
|
||||
#define AL_REVERB_MIN_DENSITY 0.0f
|
||||
#define AL_REVERB_MAX_DENSITY 1.0f
|
||||
#define AL_REVERB_DEFAULT_DENSITY 1.0f
|
||||
|
||||
#define AL_REVERB_MIN_DIFFUSION 0.0f
|
||||
#define AL_REVERB_MAX_DIFFUSION 1.0f
|
||||
#define AL_REVERB_DEFAULT_DIFFUSION 1.0f
|
||||
|
||||
#define AL_REVERB_MIN_GAIN 0.0f
|
||||
#define AL_REVERB_MAX_GAIN 1.0f
|
||||
#define AL_REVERB_DEFAULT_GAIN 0.32f
|
||||
|
||||
#define AL_REVERB_MIN_GAINHF 0.0f
|
||||
#define AL_REVERB_MAX_GAINHF 1.0f
|
||||
#define AL_REVERB_DEFAULT_GAINHF 0.89f
|
||||
|
||||
#define AL_REVERB_MIN_DECAY_TIME 0.1f
|
||||
#define AL_REVERB_MAX_DECAY_TIME 20.0f
|
||||
#define AL_REVERB_DEFAULT_DECAY_TIME 1.49f
|
||||
|
||||
#define AL_REVERB_MIN_DECAY_HFRATIO 0.1f
|
||||
#define AL_REVERB_MAX_DECAY_HFRATIO 2.0f
|
||||
#define AL_REVERB_DEFAULT_DECAY_HFRATIO 0.83f
|
||||
|
||||
#define AL_REVERB_MIN_REFLECTIONS_GAIN 0.0f
|
||||
#define AL_REVERB_MAX_REFLECTIONS_GAIN 3.16f
|
||||
#define AL_REVERB_DEFAULT_REFLECTIONS_GAIN 0.05f
|
||||
|
||||
#define AL_REVERB_MIN_REFLECTIONS_DELAY 0.0f
|
||||
#define AL_REVERB_MAX_REFLECTIONS_DELAY 0.3f
|
||||
#define AL_REVERB_DEFAULT_REFLECTIONS_DELAY 0.007f
|
||||
|
||||
#define AL_REVERB_MIN_LATE_REVERB_GAIN 0.0f
|
||||
#define AL_REVERB_MAX_LATE_REVERB_GAIN 10.0f
|
||||
#define AL_REVERB_DEFAULT_LATE_REVERB_GAIN 1.26f
|
||||
|
||||
#define AL_REVERB_MIN_LATE_REVERB_DELAY 0.0f
|
||||
#define AL_REVERB_MAX_LATE_REVERB_DELAY 0.1f
|
||||
#define AL_REVERB_DEFAULT_LATE_REVERB_DELAY 0.011f
|
||||
|
||||
#define AL_REVERB_MIN_AIR_ABSORPTION_GAINHF 0.892f
|
||||
#define AL_REVERB_MAX_AIR_ABSORPTION_GAINHF 1.0f
|
||||
#define AL_REVERB_DEFAULT_AIR_ABSORPTION_GAINHF 0.994f
|
||||
|
||||
#define AL_REVERB_MIN_ROOM_ROLLOFF_FACTOR 0.0f
|
||||
#define AL_REVERB_MAX_ROOM_ROLLOFF_FACTOR 10.0f
|
||||
#define AL_REVERB_DEFAULT_ROOM_ROLLOFF_FACTOR 0.0f
|
||||
|
||||
#define AL_REVERB_MIN_DECAY_HFLIMIT AL_FALSE
|
||||
#define AL_REVERB_MAX_DECAY_HFLIMIT AL_TRUE
|
||||
#define AL_REVERB_DEFAULT_DECAY_HFLIMIT AL_TRUE
|
||||
|
||||
/* EAX reverb effect */
|
||||
#define AL_EAXREVERB_MIN_DENSITY 0.0f
|
||||
#define AL_EAXREVERB_MAX_DENSITY 1.0f
|
||||
#define AL_EAXREVERB_DEFAULT_DENSITY 1.0f
|
||||
|
||||
#define AL_EAXREVERB_MIN_DIFFUSION 0.0f
|
||||
#define AL_EAXREVERB_MAX_DIFFUSION 1.0f
|
||||
#define AL_EAXREVERB_DEFAULT_DIFFUSION 1.0f
|
||||
|
||||
#define AL_EAXREVERB_MIN_GAIN 0.0f
|
||||
#define AL_EAXREVERB_MAX_GAIN 1.0f
|
||||
#define AL_EAXREVERB_DEFAULT_GAIN 0.32f
|
||||
|
||||
#define AL_EAXREVERB_MIN_GAINHF 0.0f
|
||||
#define AL_EAXREVERB_MAX_GAINHF 1.0f
|
||||
#define AL_EAXREVERB_DEFAULT_GAINHF 0.89f
|
||||
|
||||
#define AL_EAXREVERB_MIN_GAINLF 0.0f
|
||||
#define AL_EAXREVERB_MAX_GAINLF 1.0f
|
||||
#define AL_EAXREVERB_DEFAULT_GAINLF 1.0f
|
||||
|
||||
#define AL_EAXREVERB_MIN_DECAY_TIME 0.1f
|
||||
#define AL_EAXREVERB_MAX_DECAY_TIME 20.0f
|
||||
#define AL_EAXREVERB_DEFAULT_DECAY_TIME 1.49f
|
||||
|
||||
#define AL_EAXREVERB_MIN_DECAY_HFRATIO 0.1f
|
||||
#define AL_EAXREVERB_MAX_DECAY_HFRATIO 2.0f
|
||||
#define AL_EAXREVERB_DEFAULT_DECAY_HFRATIO 0.83f
|
||||
|
||||
#define AL_EAXREVERB_MIN_DECAY_LFRATIO 0.1f
|
||||
#define AL_EAXREVERB_MAX_DECAY_LFRATIO 2.0f
|
||||
#define AL_EAXREVERB_DEFAULT_DECAY_LFRATIO 1.0f
|
||||
|
||||
#define AL_EAXREVERB_MIN_REFLECTIONS_GAIN 0.0f
|
||||
#define AL_EAXREVERB_MAX_REFLECTIONS_GAIN 3.16f
|
||||
#define AL_EAXREVERB_DEFAULT_REFLECTIONS_GAIN 0.05f
|
||||
|
||||
#define AL_EAXREVERB_MIN_REFLECTIONS_DELAY 0.0f
|
||||
#define AL_EAXREVERB_MAX_REFLECTIONS_DELAY 0.3f
|
||||
#define AL_EAXREVERB_DEFAULT_REFLECTIONS_DELAY 0.007f
|
||||
|
||||
#define AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ 0.0f
|
||||
|
||||
#define AL_EAXREVERB_MIN_LATE_REVERB_GAIN 0.0f
|
||||
#define AL_EAXREVERB_MAX_LATE_REVERB_GAIN 10.0f
|
||||
#define AL_EAXREVERB_DEFAULT_LATE_REVERB_GAIN 1.26f
|
||||
|
||||
#define AL_EAXREVERB_MIN_LATE_REVERB_DELAY 0.0f
|
||||
#define AL_EAXREVERB_MAX_LATE_REVERB_DELAY 0.1f
|
||||
#define AL_EAXREVERB_DEFAULT_LATE_REVERB_DELAY 0.011f
|
||||
|
||||
#define AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ 0.0f
|
||||
|
||||
#define AL_EAXREVERB_MIN_ECHO_TIME 0.075f
|
||||
#define AL_EAXREVERB_MAX_ECHO_TIME 0.25f
|
||||
#define AL_EAXREVERB_DEFAULT_ECHO_TIME 0.25f
|
||||
|
||||
#define AL_EAXREVERB_MIN_ECHO_DEPTH 0.0f
|
||||
#define AL_EAXREVERB_MAX_ECHO_DEPTH 1.0f
|
||||
#define AL_EAXREVERB_DEFAULT_ECHO_DEPTH 0.0f
|
||||
|
||||
#define AL_EAXREVERB_MIN_MODULATION_TIME 0.04f
|
||||
#define AL_EAXREVERB_MAX_MODULATION_TIME 4.0f
|
||||
#define AL_EAXREVERB_DEFAULT_MODULATION_TIME 0.25f
|
||||
|
||||
#define AL_EAXREVERB_MIN_MODULATION_DEPTH 0.0f
|
||||
#define AL_EAXREVERB_MAX_MODULATION_DEPTH 1.0f
|
||||
#define AL_EAXREVERB_DEFAULT_MODULATION_DEPTH 0.0f
|
||||
|
||||
#define AL_EAXREVERB_MIN_AIR_ABSORPTION_GAINHF 0.892f
|
||||
#define AL_EAXREVERB_MAX_AIR_ABSORPTION_GAINHF 1.0f
|
||||
#define AL_EAXREVERB_DEFAULT_AIR_ABSORPTION_GAINHF 0.994f
|
||||
|
||||
#define AL_EAXREVERB_MIN_HFREFERENCE 1000.0f
|
||||
#define AL_EAXREVERB_MAX_HFREFERENCE 20000.0f
|
||||
#define AL_EAXREVERB_DEFAULT_HFREFERENCE 5000.0f
|
||||
|
||||
#define AL_EAXREVERB_MIN_LFREFERENCE 20.0f
|
||||
#define AL_EAXREVERB_MAX_LFREFERENCE 1000.0f
|
||||
#define AL_EAXREVERB_DEFAULT_LFREFERENCE 250.0f
|
||||
|
||||
#define AL_EAXREVERB_MIN_ROOM_ROLLOFF_FACTOR 0.0f
|
||||
#define AL_EAXREVERB_MAX_ROOM_ROLLOFF_FACTOR 10.0f
|
||||
#define AL_EAXREVERB_DEFAULT_ROOM_ROLLOFF_FACTOR 0.0f
|
||||
|
||||
#define AL_EAXREVERB_MIN_DECAY_HFLIMIT AL_FALSE
|
||||
#define AL_EAXREVERB_MAX_DECAY_HFLIMIT AL_TRUE
|
||||
#define AL_EAXREVERB_DEFAULT_DECAY_HFLIMIT AL_TRUE
|
||||
|
||||
#define AL_CHORUS_WAVEFORM_SINUSOID 0
|
||||
#define AL_CHORUS_WAVEFORM_TRIANGLE 1
|
||||
|
||||
#define AL_CHORUS_MIN_WAVEFORM 0
|
||||
#define AL_CHORUS_MAX_WAVEFORM 1
|
||||
#define AL_CHORUS_DEFAULT_WAVEFORM 1
|
||||
|
||||
#define AL_CHORUS_MIN_PHASE -180
|
||||
#define AL_CHORUS_MAX_PHASE 180
|
||||
#define AL_CHORUS_DEFAULT_PHASE 90
|
||||
|
||||
#define AL_CHORUS_MIN_RATE 0.0f
|
||||
#define AL_CHORUS_MAX_RATE 10.0f
|
||||
#define AL_CHORUS_DEFAULT_RATE 1.1f
|
||||
|
||||
#define AL_CHORUS_MIN_DEPTH 0.0f
|
||||
#define AL_CHORUS_MAX_DEPTH 1.0f
|
||||
#define AL_CHORUS_DEFAULT_DEPTH 0.1f
|
||||
|
||||
#define AL_CHORUS_MIN_FEEDBACK -1.0f
|
||||
#define AL_CHORUS_MAX_FEEDBACK 1.0f
|
||||
#define AL_CHORUS_DEFAULT_FEEDBACK 0.25f
|
||||
|
||||
#define AL_CHORUS_MIN_DELAY 0.0f
|
||||
#define AL_CHORUS_MAX_DELAY 0.016f
|
||||
#define AL_CHORUS_DEFAULT_DELAY 0.016f
|
||||
|
||||
/* Distortion effect */
|
||||
#define AL_DISTORTION_MIN_EDGE 0.0f
|
||||
#define AL_DISTORTION_MAX_EDGE 1.0f
|
||||
#define AL_DISTORTION_DEFAULT_EDGE 0.2f
|
||||
|
||||
#define AL_DISTORTION_MIN_GAIN 0.01f
|
||||
#define AL_DISTORTION_MAX_GAIN 1.0f
|
||||
#define AL_DISTORTION_DEFAULT_GAIN 0.05f
|
||||
|
||||
#define AL_DISTORTION_MIN_LOWPASS_CUTOFF 80.0f
|
||||
#define AL_DISTORTION_MAX_LOWPASS_CUTOFF 24000.0f
|
||||
#define AL_DISTORTION_DEFAULT_LOWPASS_CUTOFF 8000.0f
|
||||
|
||||
#define AL_DISTORTION_MIN_EQCENTER 80.0f
|
||||
#define AL_DISTORTION_MAX_EQCENTER 24000.0f
|
||||
#define AL_DISTORTION_DEFAULT_EQCENTER 3600.0f
|
||||
|
||||
#define AL_DISTORTION_MIN_EQBANDWIDTH 80.0f
|
||||
#define AL_DISTORTION_MAX_EQBANDWIDTH 24000.0f
|
||||
#define AL_DISTORTION_DEFAULT_EQBANDWIDTH 3600.0f
|
||||
|
||||
/* Echo effect */
|
||||
#define AL_ECHO_MIN_DELAY 0.0f
|
||||
#define AL_ECHO_MAX_DELAY 0.207f
|
||||
#define AL_ECHO_DEFAULT_DELAY 0.1f
|
||||
|
||||
#define AL_ECHO_MIN_LRDELAY 0.0f
|
||||
#define AL_ECHO_MAX_LRDELAY 0.404f
|
||||
#define AL_ECHO_DEFAULT_LRDELAY 0.1f
|
||||
|
||||
#define AL_ECHO_MIN_DAMPING 0.0f
|
||||
#define AL_ECHO_MAX_DAMPING 0.99f
|
||||
#define AL_ECHO_DEFAULT_DAMPING 0.5f
|
||||
|
||||
#define AL_ECHO_MIN_FEEDBACK 0.0f
|
||||
#define AL_ECHO_MAX_FEEDBACK 1.0f
|
||||
#define AL_ECHO_DEFAULT_FEEDBACK 0.5f
|
||||
|
||||
#define AL_ECHO_MIN_SPREAD -1.0f
|
||||
#define AL_ECHO_MAX_SPREAD 1.0f
|
||||
#define AL_ECHO_DEFAULT_SPREAD -1.0f
|
||||
|
||||
/* Flanger effect */
|
||||
#define AL_FLANGER_WAVEFORM_SINUSOID 0
|
||||
#define AL_FLANGER_WAVEFORM_TRIANGLE 1
|
||||
|
||||
#define AL_FLANGER_MIN_WAVEFORM 0
|
||||
#define AL_FLANGER_MAX_WAVEFORM 1
|
||||
#define AL_FLANGER_DEFAULT_WAVEFORM 1
|
||||
|
||||
#define AL_FLANGER_MIN_PHASE -180
|
||||
#define AL_FLANGER_MAX_PHASE 180
|
||||
#define AL_FLANGER_DEFAULT_PHASE 0
|
||||
|
||||
#define AL_FLANGER_MIN_RATE 0.0f
|
||||
#define AL_FLANGER_MAX_RATE 10.0f
|
||||
#define AL_FLANGER_DEFAULT_RATE 0.27f
|
||||
|
||||
#define AL_FLANGER_MIN_DEPTH 0.0f
|
||||
#define AL_FLANGER_MAX_DEPTH 1.0f
|
||||
#define AL_FLANGER_DEFAULT_DEPTH 1.0f
|
||||
|
||||
#define AL_FLANGER_MIN_FEEDBACK -1.0f
|
||||
#define AL_FLANGER_MAX_FEEDBACK 1.0f
|
||||
#define AL_FLANGER_DEFAULT_FEEDBACK -0.5f
|
||||
|
||||
#define AL_FLANGER_MIN_DELAY 0.0f
|
||||
#define AL_FLANGER_MAX_DELAY 0.004f
|
||||
#define AL_FLANGER_DEFAULT_DELAY 0.002f
|
||||
|
||||
/* Frequency shifter effect */
|
||||
#define AL_FREQUENCY_SHIFTER_MIN_FREQUENCY 0.0f
|
||||
#define AL_FREQUENCY_SHIFTER_MAX_FREQUENCY 24000.0f
|
||||
#define AL_FREQUENCY_SHIFTER_DEFAULT_FREQUENCY 0.0f
|
||||
|
||||
#define AL_FREQUENCY_SHIFTER_MIN_LEFT_DIRECTION 0
|
||||
#define AL_FREQUENCY_SHIFTER_MAX_LEFT_DIRECTION 2
|
||||
#define AL_FREQUENCY_SHIFTER_DEFAULT_LEFT_DIRECTION 0
|
||||
|
||||
#define AL_FREQUENCY_SHIFTER_DIRECTION_DOWN 0
|
||||
#define AL_FREQUENCY_SHIFTER_DIRECTION_UP 1
|
||||
#define AL_FREQUENCY_SHIFTER_DIRECTION_OFF 2
|
||||
|
||||
#define AL_FREQUENCY_SHIFTER_MIN_RIGHT_DIRECTION 0
|
||||
#define AL_FREQUENCY_SHIFTER_MAX_RIGHT_DIRECTION 2
|
||||
#define AL_FREQUENCY_SHIFTER_DEFAULT_RIGHT_DIRECTION 0
|
||||
|
||||
/* Vocal morpher effect */
|
||||
#define AL_VOCAL_MORPHER_MIN_PHONEMEA 0
|
||||
#define AL_VOCAL_MORPHER_MAX_PHONEMEA 29
|
||||
#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEA 0
|
||||
|
||||
#define AL_VOCAL_MORPHER_MIN_PHONEMEA_COARSE_TUNING -24
|
||||
#define AL_VOCAL_MORPHER_MAX_PHONEMEA_COARSE_TUNING 24
|
||||
#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEA_COARSE_TUNING 0
|
||||
|
||||
#define AL_VOCAL_MORPHER_MIN_PHONEMEB 0
|
||||
#define AL_VOCAL_MORPHER_MAX_PHONEMEB 29
|
||||
#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEB 10
|
||||
|
||||
#define AL_VOCAL_MORPHER_MIN_PHONEMEB_COARSE_TUNING -24
|
||||
#define AL_VOCAL_MORPHER_MAX_PHONEMEB_COARSE_TUNING 24
|
||||
#define AL_VOCAL_MORPHER_DEFAULT_PHONEMEB_COARSE_TUNING 0
|
||||
|
||||
#define AL_VOCAL_MORPHER_PHONEME_A 0
|
||||
#define AL_VOCAL_MORPHER_PHONEME_E 1
|
||||
#define AL_VOCAL_MORPHER_PHONEME_I 2
|
||||
#define AL_VOCAL_MORPHER_PHONEME_O 3
|
||||
#define AL_VOCAL_MORPHER_PHONEME_U 4
|
||||
#define AL_VOCAL_MORPHER_PHONEME_AA 5
|
||||
#define AL_VOCAL_MORPHER_PHONEME_AE 6
|
||||
#define AL_VOCAL_MORPHER_PHONEME_AH 7
|
||||
#define AL_VOCAL_MORPHER_PHONEME_AO 8
|
||||
#define AL_VOCAL_MORPHER_PHONEME_EH 9
|
||||
#define AL_VOCAL_MORPHER_PHONEME_ER 10
|
||||
#define AL_VOCAL_MORPHER_PHONEME_IH 11
|
||||
#define AL_VOCAL_MORPHER_PHONEME_IY 12
|
||||
#define AL_VOCAL_MORPHER_PHONEME_UH 13
|
||||
#define AL_VOCAL_MORPHER_PHONEME_UW 14
|
||||
#define AL_VOCAL_MORPHER_PHONEME_B 15
|
||||
#define AL_VOCAL_MORPHER_PHONEME_D 16
|
||||
#define AL_VOCAL_MORPHER_PHONEME_F 17
|
||||
#define AL_VOCAL_MORPHER_PHONEME_G 18
|
||||
#define AL_VOCAL_MORPHER_PHONEME_J 19
|
||||
#define AL_VOCAL_MORPHER_PHONEME_K 20
|
||||
#define AL_VOCAL_MORPHER_PHONEME_L 21
|
||||
#define AL_VOCAL_MORPHER_PHONEME_M 22
|
||||
#define AL_VOCAL_MORPHER_PHONEME_N 23
|
||||
#define AL_VOCAL_MORPHER_PHONEME_P 24
|
||||
#define AL_VOCAL_MORPHER_PHONEME_R 25
|
||||
#define AL_VOCAL_MORPHER_PHONEME_S 26
|
||||
#define AL_VOCAL_MORPHER_PHONEME_T 27
|
||||
#define AL_VOCAL_MORPHER_PHONEME_V 28
|
||||
#define AL_VOCAL_MORPHER_PHONEME_Z 29
|
||||
|
||||
#define AL_VOCAL_MORPHER_WAVEFORM_SINUSOID 0
|
||||
#define AL_VOCAL_MORPHER_WAVEFORM_TRIANGLE 1
|
||||
#define AL_VOCAL_MORPHER_WAVEFORM_SAWTOOTH 2
|
||||
|
||||
#define AL_VOCAL_MORPHER_MIN_WAVEFORM 0
|
||||
#define AL_VOCAL_MORPHER_MAX_WAVEFORM 2
|
||||
#define AL_VOCAL_MORPHER_DEFAULT_WAVEFORM 0
|
||||
|
||||
#define AL_VOCAL_MORPHER_MIN_RATE 0.0f
|
||||
#define AL_VOCAL_MORPHER_MAX_RATE 10.0f
|
||||
#define AL_VOCAL_MORPHER_DEFAULT_RATE 1.41f
|
||||
|
||||
/* Pitch shifter effect */
|
||||
#define AL_PITCH_SHIFTER_MIN_COARSE_TUNE -12
|
||||
#define AL_PITCH_SHIFTER_MAX_COARSE_TUNE 12
|
||||
#define AL_PITCH_SHIFTER_DEFAULT_COARSE_TUNE 12
|
||||
|
||||
#define AL_PITCH_SHIFTER_MIN_FINE_TUNE -50
|
||||
#define AL_PITCH_SHIFTER_MAX_FINE_TUNE 50
|
||||
#define AL_PITCH_SHIFTER_DEFAULT_FINE_TUNE 0
|
||||
|
||||
/* Ring modulator effect */
|
||||
#define AL_RING_MODULATOR_MIN_FREQUENCY 0.0f
|
||||
#define AL_RING_MODULATOR_MAX_FREQUENCY 8000.0f
|
||||
#define AL_RING_MODULATOR_DEFAULT_FREQUENCY 440.0f
|
||||
|
||||
#define AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF 0.0f
|
||||
#define AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF 24000.0f
|
||||
#define AL_RING_MODULATOR_DEFAULT_HIGHPASS_CUTOFF 800.0f
|
||||
|
||||
#define AL_RING_MODULATOR_SINUSOID 0
|
||||
#define AL_RING_MODULATOR_SAWTOOTH 1
|
||||
#define AL_RING_MODULATOR_SQUARE 2
|
||||
|
||||
#define AL_RING_MODULATOR_MIN_WAVEFORM 0
|
||||
#define AL_RING_MODULATOR_MAX_WAVEFORM 2
|
||||
#define AL_RING_MODULATOR_DEFAULT_WAVEFORM 0
|
||||
|
||||
/* Autowah effect */
|
||||
#define AL_AUTOWAH_MIN_ATTACK_TIME 0.0001f
|
||||
#define AL_AUTOWAH_MAX_ATTACK_TIME 1.0f
|
||||
#define AL_AUTOWAH_DEFAULT_ATTACK_TIME 0.06f
|
||||
|
||||
#define AL_AUTOWAH_MIN_RELEASE_TIME 0.0001f
|
||||
#define AL_AUTOWAH_MAX_RELEASE_TIME 1.0f
|
||||
#define AL_AUTOWAH_DEFAULT_RELEASE_TIME 0.06f
|
||||
|
||||
#define AL_AUTOWAH_MIN_RESONANCE 2.0f
|
||||
#define AL_AUTOWAH_MAX_RESONANCE 1000.0f
|
||||
#define AL_AUTOWAH_DEFAULT_RESONANCE 1000.0f
|
||||
|
||||
#define AL_AUTOWAH_MIN_PEAK_GAIN 0.00003f
|
||||
#define AL_AUTOWAH_MAX_PEAK_GAIN 31621.0f
|
||||
#define AL_AUTOWAH_DEFAULT_PEAK_GAIN 11.22f
|
||||
|
||||
/* Compressor effect */
|
||||
#define AL_COMPRESSOR_MIN_ONOFF 0
|
||||
#define AL_COMPRESSOR_MAX_ONOFF 1
|
||||
#define AL_COMPRESSOR_DEFAULT_ONOFF 1
|
||||
|
||||
/* Equalizer effect */
|
||||
#define AL_EQUALIZER_MIN_LOW_GAIN 0.126f
|
||||
#define AL_EQUALIZER_MAX_LOW_GAIN 7.943f
|
||||
#define AL_EQUALIZER_DEFAULT_LOW_GAIN 1.0f
|
||||
|
||||
#define AL_EQUALIZER_MIN_LOW_CUTOFF 50.0f
|
||||
#define AL_EQUALIZER_MAX_LOW_CUTOFF 800.0f
|
||||
#define AL_EQUALIZER_DEFAULT_LOW_CUTOFF 200.0f
|
||||
|
||||
#define AL_EQUALIZER_MIN_MID1_GAIN 0.126f
|
||||
#define AL_EQUALIZER_MAX_MID1_GAIN 7.943f
|
||||
#define AL_EQUALIZER_DEFAULT_MID1_GAIN 1.0f
|
||||
|
||||
#define AL_EQUALIZER_MIN_MID1_CENTER 200.0f
|
||||
#define AL_EQUALIZER_MAX_MID1_CENTER 3000.0f
|
||||
#define AL_EQUALIZER_DEFAULT_MID1_CENTER 500.0f
|
||||
|
||||
#define AL_EQUALIZER_MIN_MID1_WIDTH 0.01f
|
||||
#define AL_EQUALIZER_MAX_MID1_WIDTH 1.0f
|
||||
#define AL_EQUALIZER_DEFAULT_MID1_WIDTH 1.0f
|
||||
|
||||
#define AL_EQUALIZER_MIN_MID2_GAIN 0.126f
|
||||
#define AL_EQUALIZER_MAX_MID2_GAIN 7.943f
|
||||
#define AL_EQUALIZER_DEFAULT_MID2_GAIN 1.0f
|
||||
|
||||
#define AL_EQUALIZER_MIN_MID2_CENTER 1000.0f
|
||||
#define AL_EQUALIZER_MAX_MID2_CENTER 8000.0f
|
||||
#define AL_EQUALIZER_DEFAULT_MID2_CENTER 3000.0f
|
||||
|
||||
#define AL_EQUALIZER_MIN_MID2_WIDTH 0.01f
|
||||
#define AL_EQUALIZER_MAX_MID2_WIDTH 1.0f
|
||||
#define AL_EQUALIZER_DEFAULT_MID2_WIDTH 1.0f
|
||||
|
||||
#define AL_EQUALIZER_MIN_HIGH_GAIN 0.126f
|
||||
#define AL_EQUALIZER_MAX_HIGH_GAIN 7.943f
|
||||
#define AL_EQUALIZER_DEFAULT_HIGH_GAIN 1.0f
|
||||
|
||||
#define AL_EQUALIZER_MIN_HIGH_CUTOFF 4000.0f
|
||||
#define AL_EQUALIZER_MAX_HIGH_CUTOFF 16000.0f
|
||||
#define AL_EQUALIZER_DEFAULT_HIGH_CUTOFF 6000.0f
|
||||
|
||||
/* Source parameter value ranges and defaults. */
|
||||
#define AL_MIN_AIR_ABSORPTION_FACTOR 0.0f
|
||||
#define AL_MAX_AIR_ABSORPTION_FACTOR 10.0f
|
||||
#define AL_DEFAULT_AIR_ABSORPTION_FACTOR 0.0f
|
||||
|
||||
#define AL_MIN_ROOM_ROLLOFF_FACTOR 0.0f
|
||||
#define AL_MAX_ROOM_ROLLOFF_FACTOR 10.0f
|
||||
#define AL_DEFAULT_ROOM_ROLLOFF_FACTOR 0.0f
|
||||
|
||||
#define AL_MIN_CONE_OUTER_GAINHF 0.0f
|
||||
#define AL_MAX_CONE_OUTER_GAINHF 1.0f
|
||||
#define AL_DEFAULT_CONE_OUTER_GAINHF 1.0f
|
||||
|
||||
#define AL_MIN_DIRECT_FILTER_GAINHF_AUTO AL_FALSE
|
||||
#define AL_MAX_DIRECT_FILTER_GAINHF_AUTO AL_TRUE
|
||||
#define AL_DEFAULT_DIRECT_FILTER_GAINHF_AUTO AL_TRUE
|
||||
|
||||
#define AL_MIN_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_FALSE
|
||||
#define AL_MAX_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_TRUE
|
||||
#define AL_DEFAULT_AUXILIARY_SEND_FILTER_GAIN_AUTO AL_TRUE
|
||||
|
||||
#define AL_MIN_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_FALSE
|
||||
#define AL_MAX_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_TRUE
|
||||
#define AL_DEFAULT_AUXILIARY_SEND_FILTER_GAINHF_AUTO AL_TRUE
|
||||
|
||||
/* Listener parameter value ranges and defaults */
|
||||
#define AL_MIN_METERS_PER_UNIT FLT_MIN
|
||||
#define AL_MAX_METERS_PER_UNIT FLT_MAX
|
||||
#define AL_DEFAULT_METERS_PER_UNIT 1.0f
|
||||
typedef void (AL_APIENTRY *LPALGENEFFECTS)(ALsizei n, ALuint *effects) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALDELETEEFFECTS)(ALsizei n, const ALuint *effects) AL_API_NOEXCEPT17;
|
||||
typedef ALboolean (AL_APIENTRY *LPALISEFFECT)(ALuint effect) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALEFFECTI)(ALuint effect, ALenum param, ALint iValue) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALEFFECTIV)(ALuint effect, ALenum param, const ALint *piValues) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALEFFECTF)(ALuint effect, ALenum param, ALfloat flValue) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALEFFECTFV)(ALuint effect, ALenum param, const ALfloat *pflValues) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETEFFECTI)(ALuint effect, ALenum param, ALint *iValue) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETEFFECTIV)(ALuint effect, ALenum param, ALint *piValues) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETEFFECTF)(ALuint effect, ALenum param, ALfloat *flValue) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETEFFECTFV)(ALuint effect, ALenum param, ALfloat *pflValues) AL_API_NOEXCEPT17;
|
||||
|
||||
typedef void (AL_APIENTRY *LPALGENFILTERS)(ALsizei n, ALuint *filters) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALDELETEFILTERS)(ALsizei n, const ALuint *filters) AL_API_NOEXCEPT17;
|
||||
typedef ALboolean (AL_APIENTRY *LPALISFILTER)(ALuint filter) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALFILTERI)(ALuint filter, ALenum param, ALint iValue) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALFILTERIV)(ALuint filter, ALenum param, const ALint *piValues) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALFILTERF)(ALuint filter, ALenum param, ALfloat flValue) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALFILTERFV)(ALuint filter, ALenum param, const ALfloat *pflValues) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETFILTERI)(ALuint filter, ALenum param, ALint *iValue) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETFILTERIV)(ALuint filter, ALenum param, ALint *piValues) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETFILTERF)(ALuint filter, ALenum param, ALfloat *flValue) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETFILTERFV)(ALuint filter, ALenum param, ALfloat *pflValues) AL_API_NOEXCEPT17;
|
||||
|
||||
typedef void (AL_APIENTRY *LPALGENAUXILIARYEFFECTSLOTS)(ALsizei n, ALuint *effectslots) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALDELETEAUXILIARYEFFECTSLOTS)(ALsizei n, const ALuint *effectslots) AL_API_NOEXCEPT17;
|
||||
typedef ALboolean (AL_APIENTRY *LPALISAUXILIARYEFFECTSLOT)(ALuint effectslot) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTI)(ALuint effectslot, ALenum param, ALint iValue) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTIV)(ALuint effectslot, ALenum param, const ALint *piValues) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTF)(ALuint effectslot, ALenum param, ALfloat flValue) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALAUXILIARYEFFECTSLOTFV)(ALuint effectslot, ALenum param, const ALfloat *pflValues) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTI)(ALuint effectslot, ALenum param, ALint *iValue) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTIV)(ALuint effectslot, ALenum param, ALint *piValues) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTF)(ALuint effectslot, ALenum param, ALfloat *flValue) AL_API_NOEXCEPT17;
|
||||
typedef void (AL_APIENTRY *LPALGETAUXILIARYEFFECTSLOTFV)(ALuint effectslot, ALenum param, ALfloat *pflValues) AL_API_NOEXCEPT17;
|
||||
|
||||
#ifdef AL_ALEXT_PROTOTYPES
|
||||
/* Effect object function types. */
|
||||
AL_API void AL_APIENTRY alGenEffects(ALsizei n, ALuint *effects) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alDeleteEffects(ALsizei n, const ALuint *effects) AL_API_NOEXCEPT;
|
||||
AL_API ALboolean AL_APIENTRY alIsEffect(ALuint effect) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alEffecti(ALuint effect, ALenum param, ALint iValue) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alEffectiv(ALuint effect, ALenum param, const ALint *piValues) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alEffectf(ALuint effect, ALenum param, ALfloat flValue) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alEffectfv(ALuint effect, ALenum param, const ALfloat *pflValues) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetEffecti(ALuint effect, ALenum param, ALint *iValue) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetEffectiv(ALuint effect, ALenum param, ALint *piValues) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetEffectf(ALuint effect, ALenum param, ALfloat *flValue) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetEffectfv(ALuint effect, ALenum param, ALfloat *pflValues) AL_API_NOEXCEPT;
|
||||
|
||||
/* Filter object function types. */
|
||||
AL_API void AL_APIENTRY alGenFilters(ALsizei n, ALuint *filters) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alDeleteFilters(ALsizei n, const ALuint *filters) AL_API_NOEXCEPT;
|
||||
AL_API ALboolean AL_APIENTRY alIsFilter(ALuint filter) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alFilteri(ALuint filter, ALenum param, ALint iValue) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alFilteriv(ALuint filter, ALenum param, const ALint *piValues) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alFilterf(ALuint filter, ALenum param, ALfloat flValue) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alFilterfv(ALuint filter, ALenum param, const ALfloat *pflValues) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetFilteri(ALuint filter, ALenum param, ALint *iValue) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetFilteriv(ALuint filter, ALenum param, ALint *piValues) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetFilterf(ALuint filter, ALenum param, ALfloat *flValue) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetFilterfv(ALuint filter, ALenum param, ALfloat *pflValues) AL_API_NOEXCEPT;
|
||||
|
||||
/* Auxiliary Effect Slot object function types. */
|
||||
AL_API void AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslots) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alDeleteAuxiliaryEffectSlots(ALsizei n, const ALuint *effectslots) AL_API_NOEXCEPT;
|
||||
AL_API ALboolean AL_APIENTRY alIsAuxiliaryEffectSlot(ALuint effectslot) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alAuxiliaryEffectSloti(ALuint effectslot, ALenum param, ALint iValue) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alAuxiliaryEffectSlotiv(ALuint effectslot, ALenum param, const ALint *piValues) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat flValue) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alAuxiliaryEffectSlotfv(ALuint effectslot, ALenum param, const ALfloat *pflValues) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetAuxiliaryEffectSloti(ALuint effectslot, ALenum param, ALint *iValue) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetAuxiliaryEffectSlotiv(ALuint effectslot, ALenum param, ALint *piValues) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetAuxiliaryEffectSlotf(ALuint effectslot, ALenum param, ALfloat *flValue) AL_API_NOEXCEPT;
|
||||
AL_API void AL_APIENTRY alGetAuxiliaryEffectSlotfv(ALuint effectslot, ALenum param, ALfloat *pflValues) AL_API_NOEXCEPT;
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern "C" */
|
||||
#endif
|
||||
/* NOLINTEND */
|
||||
|
||||
#endif /* AL_EFX_H */
|
||||
BIN
Binary file not shown.
+5862
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,57 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#define VER_PRODUCTMAJORVERSION 0
|
||||
#define VER_PRODUCTMINORVERSION 0
|
||||
|
||||
// This goes up with each build
|
||||
// 4J-JEV: This value is extracted with a regex so it can be placed as the version in the AppX manifest on Durango.
|
||||
#define VER_PRODUCTBUILD 560
|
||||
// This goes up if there is any change to network traffic or code in a build
|
||||
#define VER_NETWORK 560
|
||||
#define VER_PRODUCTBUILD_QFE 0
|
||||
|
||||
#define VER_FILEVERSION_STRING "1.6"
|
||||
#define VER_PRODUCTVERSION_STRING VER_FILEVERSION_STRING
|
||||
#define VER_FILEVERSION_STRING_W L"1.6"
|
||||
#define VER_PRODUCTVERSION_STRING_W VER_FILEVERSION_STRING_W
|
||||
#define VER_FILEBETA_STR ""
|
||||
#undef VER_FILEVERSION
|
||||
#define VER_FILEVERSION VER_PRODUCTMAJORVERSION, VER_PRODUCTMINORVERSION, VER_PRODUCTBUILD, VER_PRODUCTBUILD_QFE
|
||||
#define VER_PRODUCTVERSION VER_PRODUCTMAJORVERSION, VER_PRODUCTMINORVERSION, VER_PRODUCTBUILD, VER_PRODUCTBUILD_QFE
|
||||
|
||||
#if (VER_PRODUCTBUILD < 10)
|
||||
#define VER_FILEBPAD "000"
|
||||
#define VER_FILEBPAD_W L"000"
|
||||
#elif (VER_PRODUCTBUILD < 100)
|
||||
#define VER_FILEBPAD "00"
|
||||
#define VER_FILEBPAD_W L"00"
|
||||
#elif (VER_PRODUCTBUILD < 1000)
|
||||
#define VER_FILEBPAD "0"
|
||||
#define VER_FILEBPAD_W L"0"
|
||||
#else
|
||||
#define VER_FILEBPAD
|
||||
#define VER_FILEBPAD_W
|
||||
#endif
|
||||
|
||||
#define VER_WIDE_PREFIX(x) L##x
|
||||
|
||||
#define VER_FILEVERSION_STR2(x,y) VER_FILEVERSION_STRING "." VER_FILEBPAD #x "." #y
|
||||
#define VER_FILEVERSION_STR2_W(x,y) VER_FILEVERSION_STRING_W L"." VER_FILEBPAD_W VER_WIDE_PREFIX(#x) L"." VER_WIDE_PREFIX(#y)
|
||||
#define VER_FILEVERSION_STR1(x,y) VER_FILEVERSION_STR2(x, y)
|
||||
#define VER_FILEVERSION_STR1_W(x,y) VER_FILEVERSION_STR2_W(x, y)
|
||||
|
||||
#undef VER_FILEVERSION_STR
|
||||
#define VER_FILEVERSION_STR VER_FILEVERSION_STR1(VER_PRODUCTBUILD, VER_PRODUCTBUILD_QFE)
|
||||
#define VER_PRODUCTVERSION_STR VER_FILEVERSION_STR1(VER_PRODUCTBUILD, VER_PRODUCTBUILD_QFE)
|
||||
|
||||
#define VER_FILEVERSION_STR_W VER_FILEVERSION_STR1_W(VER_PRODUCTBUILD, VER_PRODUCTBUILD_QFE)
|
||||
#define VER_PRODUCTVERSION_STR_W VER_FILEVERSION_STR1_W(VER_PRODUCTBUILD, VER_PRODUCTBUILD_QFE)
|
||||
|
||||
#if (VER_PRODUCTBUILD_QFE >= 256)
|
||||
#error "QFE number cannot exceed 255"
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,176 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
class C4JMemoryPool
|
||||
{
|
||||
public:
|
||||
unsigned int Align(unsigned int val, unsigned int align) { return int((val+(align-1))/align) * align; }
|
||||
virtual void* Alloc(size_t size) = 0;
|
||||
virtual void Free(void* ptr) = 0;
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Fast Efficient Fixed-Size Memory Pool : No Loops and No Overhead
|
||||
// http://www.alogicalmind.com/memory_pools/index.htm
|
||||
class C4JMemoryPoolFixed : public C4JMemoryPool
|
||||
{
|
||||
// Basic type define
|
||||
typedef unsigned int uint;
|
||||
typedef unsigned char uchar;
|
||||
uint m_numOfBlocks; // Num of blocks
|
||||
uint m_sizeOfEachBlock; // Size of each block
|
||||
uint m_numFreeBlocks; // Num of remaining blocks
|
||||
uint m_numInitialized; // Num of initialized blocks
|
||||
uchar* m_memStart; // Beginning of memory pool
|
||||
uchar* m_memEnd; // End of memory pool
|
||||
uchar* m_next; // Num of next free block
|
||||
// CRITICAL_SECTION m_CS;
|
||||
public:
|
||||
C4JMemoryPoolFixed()
|
||||
{
|
||||
m_numOfBlocks = 0;
|
||||
m_sizeOfEachBlock = 0;
|
||||
m_numFreeBlocks = 0;
|
||||
m_numInitialized = 0;
|
||||
m_memStart = NULL;
|
||||
m_memEnd = NULL;
|
||||
m_next = 0;
|
||||
}
|
||||
|
||||
C4JMemoryPoolFixed(uint sizeOfEachBlock, uint numOfBlocks)
|
||||
{
|
||||
CreatePool(sizeOfEachBlock, numOfBlocks);
|
||||
}
|
||||
|
||||
~C4JMemoryPoolFixed() { DestroyPool(); }
|
||||
|
||||
void CreatePool(uint sizeOfEachBlock, uint numOfBlocks)
|
||||
{
|
||||
assert(sizeOfEachBlock >= 4); // has to be at least the size of an int, for book keeping
|
||||
m_numOfBlocks = numOfBlocks;
|
||||
m_sizeOfEachBlock = sizeOfEachBlock;
|
||||
m_numFreeBlocks = numOfBlocks;
|
||||
m_numInitialized = 0;
|
||||
m_memStart = new uchar[ m_sizeOfEachBlock *
|
||||
m_numOfBlocks ];
|
||||
m_memEnd = m_memStart + (m_sizeOfEachBlock * m_numOfBlocks);
|
||||
m_next = m_memStart;
|
||||
// InitializeCriticalSection(&m_CS);
|
||||
}
|
||||
|
||||
void DestroyPool()
|
||||
{
|
||||
delete[] m_memStart;
|
||||
m_memStart = NULL;
|
||||
}
|
||||
|
||||
uchar* AddrFromIndex(uint i) const
|
||||
{
|
||||
return m_memStart + ( i * m_sizeOfEachBlock );
|
||||
}
|
||||
|
||||
uint IndexFromAddr(const uchar* p) const
|
||||
{
|
||||
return (((uint)(p - m_memStart)) / m_sizeOfEachBlock);
|
||||
}
|
||||
|
||||
virtual void* Alloc(size_t size)
|
||||
{
|
||||
if(size > m_sizeOfEachBlock)
|
||||
return ::malloc(size);
|
||||
// EnterCriticalSection(&m_CS);
|
||||
if (m_numInitialized < m_numOfBlocks )
|
||||
{
|
||||
uint* p = (uint*)AddrFromIndex( m_numInitialized );
|
||||
*p = m_numInitialized + 1;
|
||||
m_numInitialized++;
|
||||
}
|
||||
void* ret = NULL;
|
||||
if ( m_numFreeBlocks > 0 )
|
||||
{
|
||||
ret = (void*)m_next;
|
||||
--m_numFreeBlocks;
|
||||
if (m_numFreeBlocks!=0)
|
||||
{
|
||||
m_next = AddrFromIndex( *((uint*)m_next) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_next = NULL;
|
||||
}
|
||||
}
|
||||
// LeaveCriticalSection(&m_CS);
|
||||
return ret;
|
||||
}
|
||||
|
||||
virtual void Free(void* ptr)
|
||||
{
|
||||
if(ptr < m_memStart || ptr > m_memEnd)
|
||||
{
|
||||
::free(ptr);
|
||||
return;
|
||||
}
|
||||
// EnterCriticalSection(&m_CS);
|
||||
if (m_next != NULL)
|
||||
{
|
||||
(*(uint*)ptr) = IndexFromAddr( m_next );
|
||||
m_next = (uchar*)ptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
*((uint*)ptr) = m_numOfBlocks;
|
||||
m_next = (uchar*)ptr;
|
||||
}
|
||||
++m_numFreeBlocks;
|
||||
// LeaveCriticalSection(&m_CS);
|
||||
}
|
||||
}; // End pool class
|
||||
|
||||
|
||||
// this pool will constantly grow until it is reset (automatically when all allocs have been "freed")
|
||||
class C4JMemoryPoolGrow : public C4JMemoryPool
|
||||
{
|
||||
uint32_t m_totalSize;
|
||||
uint32_t m_memUsed;
|
||||
uint32_t m_numAllocations;
|
||||
uint8_t* m_pMemory;
|
||||
uint32_t m_currentOffset;
|
||||
|
||||
public:
|
||||
C4JMemoryPoolGrow(uint32_t size = 64*1024)
|
||||
{
|
||||
size = Align(size, 4);
|
||||
m_totalSize = size;
|
||||
m_pMemory = new uint8_t[size];
|
||||
m_currentOffset = 0;
|
||||
m_memUsed = 0;
|
||||
m_numAllocations = 0;
|
||||
}
|
||||
|
||||
virtual void* Alloc(size_t size)
|
||||
{
|
||||
size = Align(size, 4); // 4 byte align the memory
|
||||
assert((m_currentOffset + size) < m_totalSize); // make sure we haven't ran out of space
|
||||
void* returnMem = &m_pMemory[m_currentOffset]; // grab the return memory
|
||||
m_currentOffset += size;
|
||||
m_numAllocations++;
|
||||
return returnMem;
|
||||
}
|
||||
virtual void Free(void* ptr)
|
||||
{
|
||||
m_numAllocations--;
|
||||
if(m_numAllocations == 0)
|
||||
m_currentOffset = 0; // reset the pool when we reach zero allocations
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
|
||||
|
||||
#pragma once
|
||||
#include "..\Minecraft.Client\Common\C4JMemoryPool.h"
|
||||
|
||||
// Custom allocator, takes a C4JMemoryPool class, which can be one of a number of pool implementations.
|
||||
|
||||
template <class T>
|
||||
class C4JPoolAllocator
|
||||
{
|
||||
public:
|
||||
typedef T value_type;
|
||||
typedef size_t size_type;
|
||||
typedef ptrdiff_t difference_type;
|
||||
|
||||
typedef T* pointer;
|
||||
typedef const T* const_pointer;
|
||||
|
||||
typedef T& reference;
|
||||
typedef const T& const_reference;
|
||||
|
||||
//! A struct to construct an allocator for a different type.
|
||||
template<typename U>
|
||||
struct rebind { typedef C4JPoolAllocator<U> other; };
|
||||
|
||||
|
||||
C4JMemoryPool* m_pPool;
|
||||
bool m_selfAllocated;
|
||||
|
||||
C4JPoolAllocator( C4JMemoryPool* pool = new C4JMemoryPoolFixed(32, 4096 )) : m_pPool( pool ), m_selfAllocated(true)
|
||||
{
|
||||
printf("allocated mempool\n");
|
||||
}
|
||||
|
||||
template<typename U>
|
||||
C4JPoolAllocator(C4JPoolAllocator<U> const& obj) : m_pPool( obj.m_pPool ), m_selfAllocated(false) // copy constructor
|
||||
{
|
||||
printf("C4JPoolAllocator constructed from 0x%08x\n", &obj);
|
||||
assert(obj.m_pPool);
|
||||
}
|
||||
private:
|
||||
|
||||
public:
|
||||
|
||||
~C4JPoolAllocator()
|
||||
{
|
||||
if(m_selfAllocated)
|
||||
delete m_pPool;
|
||||
}
|
||||
|
||||
pointer address( reference r ) const { return &r; }
|
||||
const_pointer address( const_reference r ) const { return &r; }
|
||||
|
||||
pointer allocate( size_type n, const void* /*hint*/=0 )
|
||||
{
|
||||
assert(m_pPool);
|
||||
return (pointer)m_pPool->Alloc(n * sizeof(T));
|
||||
}
|
||||
|
||||
void deallocate( pointer p, size_type /*n*/ )
|
||||
{
|
||||
assert(m_pPool);
|
||||
m_pPool->Free(p);
|
||||
}
|
||||
|
||||
void construct( pointer p, const T& val )
|
||||
{
|
||||
new (p) T(val);
|
||||
}
|
||||
|
||||
void destroy( pointer p )
|
||||
{
|
||||
p->~T();
|
||||
}
|
||||
|
||||
size_type max_size() const
|
||||
{
|
||||
return ULONG_MAX / sizeof(T);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
template <class T>
|
||||
bool
|
||||
operator==( const C4JPoolAllocator<T>& left, const C4JPoolAllocator<T>& right )
|
||||
{
|
||||
if (left.m_pPool == right.m_pPool)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
template <class T>
|
||||
bool
|
||||
operator!=( const C4JPoolAllocator<T>& left, const C4JPoolAllocator<T>& right)
|
||||
{
|
||||
if (left.m_pPool != right.m_pPool)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,381 @@
|
||||
#include "stdafx.h"
|
||||
#include "ColourTable.h"
|
||||
#include "..\..\..\Minecraft.World\StringHelpers.h"
|
||||
|
||||
unordered_map<wstring,eMinecraftColour> ColourTable::s_colourNamesMap;
|
||||
|
||||
wchar_t *ColourTable::ColourTableElements[eMinecraftColour_COUNT] =
|
||||
{
|
||||
L"NOTSET",
|
||||
|
||||
L"Foliage_Evergreen",
|
||||
L"Foliage_Birch",
|
||||
L"Foliage_Default",
|
||||
L"Foliage_Common",
|
||||
L"Foliage_Ocean",
|
||||
L"Foliage_Plains",
|
||||
L"Foliage_Desert",
|
||||
L"Foliage_ExtremeHills",
|
||||
L"Foliage_Forest",
|
||||
L"Foliage_Taiga",
|
||||
L"Foliage_Swampland",
|
||||
L"Foliage_River",
|
||||
L"Foliage_Hell",
|
||||
L"Foliage_Sky",
|
||||
L"Foliage_FrozenOcean",
|
||||
L"Foliage_FrozenRiver",
|
||||
L"Foliage_IcePlains",
|
||||
L"Foliage_IceMountains",
|
||||
L"Foliage_MushroomIsland",
|
||||
L"Foliage_MushroomIslandShore",
|
||||
L"Foliage_Beach",
|
||||
L"Foliage_DesertHills",
|
||||
L"Foliage_ForestHills",
|
||||
L"Foliage_TaigaHills",
|
||||
L"Foliage_ExtremeHillsEdge",
|
||||
L"Foliage_Jungle",
|
||||
L"Foliage_JungleHills",
|
||||
|
||||
L"Grass_Common",
|
||||
L"Grass_Ocean",
|
||||
L"Grass_Plains",
|
||||
L"Grass_Desert",
|
||||
L"Grass_ExtremeHills",
|
||||
L"Grass_Forest",
|
||||
L"Grass_Taiga",
|
||||
L"Grass_Swampland",
|
||||
L"Grass_River",
|
||||
L"Grass_Hell",
|
||||
L"Grass_Sky",
|
||||
L"Grass_FrozenOcean",
|
||||
L"Grass_FrozenRiver",
|
||||
L"Grass_IcePlains",
|
||||
L"Grass_IceMountains",
|
||||
L"Grass_MushroomIsland",
|
||||
L"Grass_MushroomIslandShore",
|
||||
L"Grass_Beach",
|
||||
L"Grass_DesertHills",
|
||||
L"Grass_ForestHills",
|
||||
L"Grass_TaigaHills",
|
||||
L"Grass_ExtremeHillsEdge",
|
||||
L"Grass_Jungle",
|
||||
L"Grass_JungleHills",
|
||||
|
||||
L"Water_Ocean",
|
||||
L"Water_Plains",
|
||||
L"Water_Desert",
|
||||
L"Water_ExtremeHills",
|
||||
L"Water_Forest",
|
||||
L"Water_Taiga",
|
||||
L"Water_Swampland",
|
||||
L"Water_River",
|
||||
L"Water_Hell",
|
||||
L"Water_Sky",
|
||||
L"Water_FrozenOcean",
|
||||
L"Water_FrozenRiver",
|
||||
L"Water_IcePlains",
|
||||
L"Water_IceMountains",
|
||||
L"Water_MushroomIsland",
|
||||
L"Water_MushroomIslandShore",
|
||||
L"Water_Beach",
|
||||
L"Water_DesertHills",
|
||||
L"Water_ForestHills",
|
||||
L"Water_TaigaHills",
|
||||
L"Water_ExtremeHillsEdge",
|
||||
L"Water_Jungle",
|
||||
L"Water_JungleHills",
|
||||
|
||||
L"Sky_Ocean",
|
||||
L"Sky_Plains",
|
||||
L"Sky_Desert",
|
||||
L"Sky_ExtremeHills",
|
||||
L"Sky_Forest",
|
||||
L"Sky_Taiga",
|
||||
L"Sky_Swampland",
|
||||
L"Sky_River",
|
||||
L"Sky_Hell",
|
||||
L"Sky_Sky",
|
||||
L"Sky_FrozenOcean",
|
||||
L"Sky_FrozenRiver",
|
||||
L"Sky_IcePlains",
|
||||
L"Sky_IceMountains",
|
||||
L"Sky_MushroomIsland",
|
||||
L"Sky_MushroomIslandShore",
|
||||
L"Sky_Beach",
|
||||
L"Sky_DesertHills",
|
||||
L"Sky_ForestHills",
|
||||
L"Sky_TaigaHills",
|
||||
L"Sky_ExtremeHillsEdge",
|
||||
L"Sky_Jungle",
|
||||
L"Sky_JungleHills",
|
||||
|
||||
L"Tile_RedstoneDust",
|
||||
L"Tile_RedstoneDustUnlit",
|
||||
L"Tile_RedstoneDustLitMin",
|
||||
L"Tile_RedstoneDustLitMax",
|
||||
L"Tile_StemMin",
|
||||
L"Tile_StemMax",
|
||||
L"Tile_WaterLily",
|
||||
|
||||
L"Sky_Dawn_Dark",
|
||||
L"Sky_Dawn_Bright",
|
||||
|
||||
L"Material_None",
|
||||
L"Material_Grass",
|
||||
L"Material_Sand",
|
||||
L"Material_Cloth",
|
||||
L"Material_Fire",
|
||||
L"Material_Ice",
|
||||
L"Material_Metal",
|
||||
L"Material_Plant",
|
||||
L"Material_Snow",
|
||||
L"Material_Clay",
|
||||
L"Material_Dirt",
|
||||
L"Material_Stone",
|
||||
L"Material_Water",
|
||||
L"Material_Wood",
|
||||
L"Material_Emerald",
|
||||
|
||||
L"Particle_Note_00",
|
||||
L"Particle_Note_01",
|
||||
L"Particle_Note_02",
|
||||
L"Particle_Note_03",
|
||||
L"Particle_Note_04",
|
||||
L"Particle_Note_05",
|
||||
L"Particle_Note_06",
|
||||
L"Particle_Note_07",
|
||||
L"Particle_Note_08",
|
||||
L"Particle_Note_09",
|
||||
L"Particle_Note_10",
|
||||
L"Particle_Note_11",
|
||||
L"Particle_Note_12",
|
||||
L"Particle_Note_13",
|
||||
L"Particle_Note_14",
|
||||
L"Particle_Note_15",
|
||||
L"Particle_Note_16",
|
||||
L"Particle_Note_17",
|
||||
L"Particle_Note_18",
|
||||
L"Particle_Note_19",
|
||||
L"Particle_Note_20",
|
||||
L"Particle_Note_21",
|
||||
L"Particle_Note_22",
|
||||
L"Particle_Note_23",
|
||||
L"Particle_Note_24",
|
||||
|
||||
L"Particle_NetherPortal",
|
||||
L"Particle_EnderPortal",
|
||||
L"Particle_Smoke",
|
||||
L"Particle_Ender",
|
||||
|
||||
L"Particle_Explode",
|
||||
L"Particle_HugeExplosion",
|
||||
|
||||
L"Particle_DripWater",
|
||||
L"Particle_DripLavaStart",
|
||||
L"Particle_DripLavaEnd",
|
||||
|
||||
L"Particle_EnchantmentTable",
|
||||
L"Particle_DragonBreathMin",
|
||||
L"Particle_DragonBreathMax",
|
||||
L"Particle_Suspend",
|
||||
|
||||
L"Particle_CritStart", // arrow in air
|
||||
L"Particle_CritEnd", // arrow in air
|
||||
|
||||
L"Effect_MovementSpeed",
|
||||
L"Effect_MovementSlowDown",
|
||||
L"Effect_DigSpeed",
|
||||
L"Effect_DigSlowdown",
|
||||
L"Effect_DamageBoost",
|
||||
L"Effect_Heal",
|
||||
L"Effect_Harm",
|
||||
L"Effect_Jump",
|
||||
L"Effect_Confusion",
|
||||
L"Effect_Regeneration",
|
||||
L"Effect_DamageResistance",
|
||||
L"Effect_FireResistance",
|
||||
L"Effect_WaterBreathing",
|
||||
L"Effect_Invisiblity",
|
||||
L"Effect_Blindness",
|
||||
L"Effect_NightVision",
|
||||
L"Effect_Hunger",
|
||||
L"Effect_Weakness",
|
||||
L"Effect_Poison",
|
||||
L"Effect_Wither",
|
||||
L"Effect_HealthBoost",
|
||||
L"Effect_Absorption",
|
||||
L"Effect_Saturation",
|
||||
|
||||
L"Potion_BaseColour",
|
||||
|
||||
L"Mob_Creeper_Colour1",
|
||||
L"Mob_Creeper_Colour2",
|
||||
L"Mob_Skeleton_Colour1",
|
||||
L"Mob_Skeleton_Colour2",
|
||||
L"Mob_Spider_Colour1",
|
||||
L"Mob_Spider_Colour2",
|
||||
L"Mob_Zombie_Colour1",
|
||||
L"Mob_Zombie_Colour2",
|
||||
L"Mob_Slime_Colour1",
|
||||
L"Mob_Slime_Colour2",
|
||||
L"Mob_Ghast_Colour1",
|
||||
L"Mob_Ghast_Colour2",
|
||||
L"Mob_PigZombie_Colour1",
|
||||
L"Mob_PigZombie_Colour2",
|
||||
L"Mob_Enderman_Colour1",
|
||||
L"Mob_Enderman_Colour2",
|
||||
L"Mob_CaveSpider_Colour1",
|
||||
L"Mob_CaveSpider_Colour2",
|
||||
L"Mob_Silverfish_Colour1",
|
||||
L"Mob_Silverfish_Colour2",
|
||||
L"Mob_Blaze_Colour1",
|
||||
L"Mob_Blaze_Colour2",
|
||||
L"Mob_LavaSlime_Colour1",
|
||||
L"Mob_LavaSlime_Colour2",
|
||||
L"Mob_Pig_Colour1",
|
||||
L"Mob_Pig_Colour2",
|
||||
L"Mob_Sheep_Colour1",
|
||||
L"Mob_Sheep_Colour2",
|
||||
L"Mob_Cow_Colour1",
|
||||
L"Mob_Cow_Colour2",
|
||||
L"Mob_Chicken_Colour1",
|
||||
L"Mob_Chicken_Colour2",
|
||||
L"Mob_Squid_Colour1",
|
||||
L"Mob_Squid_Colour2",
|
||||
L"Mob_Wolf_Colour1",
|
||||
L"Mob_Wolf_Colour2",
|
||||
L"Mob_MushroomCow_Colour1",
|
||||
L"Mob_MushroomCow_Colour2",
|
||||
L"Mob_Ocelot_Colour1",
|
||||
L"Mob_Ocelot_Colour2",
|
||||
L"Mob_Villager_Colour1",
|
||||
L"Mob_Villager_Colour2",
|
||||
L"Mob_Bat_Colour1",
|
||||
L"Mob_Bat_Colour2",
|
||||
L"Mob_Witch_Colour1",
|
||||
L"Mob_Witch_Colour2",
|
||||
L"Mob_Horse_Colour1",
|
||||
L"Mob_Horse_Colour2",
|
||||
|
||||
L"Armour_Default_Leather_Colour",
|
||||
L"Under_Water_Clear_Colour",
|
||||
L"Under_Lava_Clear_Colour",
|
||||
L"In_Cloud_Base_Colour",
|
||||
|
||||
L"Under_Water_Fog_Colour",
|
||||
L"Under_Lava_Fog_Colour",
|
||||
L"In_Cloud_Fog_Colour",
|
||||
|
||||
L"Default_Fog_Colour",
|
||||
L"Nether_Fog_Colour",
|
||||
L"End_Fog_Colour",
|
||||
|
||||
L"Sign_Text",
|
||||
L"Map_Text",
|
||||
|
||||
L"Leash_Light_Colour",
|
||||
L"Leash_Dark_Colour",
|
||||
|
||||
L"Fire_Overlay",
|
||||
|
||||
L"HTMLColor_0",
|
||||
L"HTMLColor_1",
|
||||
L"HTMLColor_2",
|
||||
L"HTMLColor_3",
|
||||
L"HTMLColor_4",
|
||||
L"HTMLColor_5",
|
||||
L"HTMLColor_6",
|
||||
L"HTMLColor_7",
|
||||
L"HTMLColor_8",
|
||||
L"HTMLColor_9",
|
||||
L"HTMLColor_a",
|
||||
L"HTMLColor_b",
|
||||
L"HTMLColor_c",
|
||||
L"HTMLColor_d",
|
||||
L"HTMLColor_e",
|
||||
L"HTMLColor_f",
|
||||
L"HTMLColor_dark_0",
|
||||
L"HTMLColor_dark_1",
|
||||
L"HTMLColor_dark_2",
|
||||
L"HTMLColor_dark_3",
|
||||
L"HTMLColor_dark_4",
|
||||
L"HTMLColor_dark_5",
|
||||
L"HTMLColor_dark_6",
|
||||
L"HTMLColor_dark_7",
|
||||
L"HTMLColor_dark_8",
|
||||
L"HTMLColor_dark_9",
|
||||
L"HTMLColor_dark_a",
|
||||
L"HTMLColor_dark_b",
|
||||
L"HTMLColor_dark_c",
|
||||
L"HTMLColor_dark_d",
|
||||
L"HTMLColor_dark_e",
|
||||
L"HTMLColor_dark_f",
|
||||
L"HTMLColor_T1",
|
||||
L"HTMLColor_T2",
|
||||
L"HTMLColor_T3",
|
||||
L"HTMLColor_Black",
|
||||
L"HTMLColor_White",
|
||||
L"Color_EnchantText",
|
||||
L"Color_EnchantTextFocus",
|
||||
L"Color_EnchantTextDisabled",
|
||||
L"Color_RenamedItemTitle",
|
||||
};
|
||||
|
||||
void ColourTable::staticCtor()
|
||||
{
|
||||
for(unsigned int i = eMinecraftColour_NOT_SET; i < eMinecraftColour_COUNT; ++i)
|
||||
{
|
||||
s_colourNamesMap.insert( unordered_map<wstring,eMinecraftColour>::value_type( ColourTableElements[i], (eMinecraftColour)i) );
|
||||
}
|
||||
}
|
||||
|
||||
ColourTable::ColourTable(PBYTE pbData, DWORD dwLength)
|
||||
{
|
||||
loadColoursFromData(pbData, dwLength);
|
||||
}
|
||||
|
||||
ColourTable::ColourTable(ColourTable *defaultColours, PBYTE pbData, DWORD dwLength)
|
||||
{
|
||||
// 4J Stu - Default the colours that of the table passed in
|
||||
XMemCpy( (void *)m_colourValues, (void *)defaultColours->m_colourValues, sizeof(int) * eMinecraftColour_COUNT);
|
||||
loadColoursFromData(pbData, dwLength);
|
||||
}
|
||||
void ColourTable::loadColoursFromData(PBYTE pbData, DWORD dwLength)
|
||||
{
|
||||
byteArray src(pbData, dwLength);
|
||||
|
||||
ByteArrayInputStream bais(src);
|
||||
DataInputStream dis(&bais);
|
||||
|
||||
int versionNumber = dis.readInt();
|
||||
int coloursCount = dis.readInt();
|
||||
|
||||
for(int i = 0; i < coloursCount; ++i)
|
||||
{
|
||||
wstring colourId = dis.readUTF();
|
||||
int colourValue = dis.readInt();
|
||||
setColour(colourId, colourValue);
|
||||
AUTO_VAR(it,s_colourNamesMap.find(colourId));
|
||||
}
|
||||
|
||||
bais.reset();
|
||||
}
|
||||
|
||||
void ColourTable::setColour(const wstring &colourName, int value)
|
||||
{
|
||||
AUTO_VAR(it,s_colourNamesMap.find(colourName));
|
||||
if(it != s_colourNamesMap.end())
|
||||
{
|
||||
m_colourValues[(int)it->second] = value;
|
||||
}
|
||||
}
|
||||
|
||||
void ColourTable::setColour(const wstring &colourName, const wstring &value)
|
||||
{
|
||||
setColour(colourName, _fromHEXString<int>(value));
|
||||
}
|
||||
|
||||
unsigned int ColourTable::getColour(eMinecraftColour id)
|
||||
{
|
||||
return m_colourValues[(int)id];
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
class ColourTable
|
||||
{
|
||||
private:
|
||||
unsigned int m_colourValues[eMinecraftColour_COUNT];
|
||||
|
||||
static wchar_t *ColourTableElements[eMinecraftColour_COUNT];
|
||||
static unordered_map<wstring,eMinecraftColour> s_colourNamesMap;
|
||||
|
||||
public:
|
||||
static void staticCtor();
|
||||
|
||||
ColourTable(PBYTE pbData, DWORD dwLength);
|
||||
ColourTable(ColourTable *defaultColours, PBYTE pbData, DWORD dwLength);
|
||||
|
||||
unsigned int getColour(eMinecraftColour id);
|
||||
unsigned int getColor(eMinecraftColour id) { return getColour(id); }
|
||||
|
||||
void loadColoursFromData(PBYTE pbData, DWORD dwLength);
|
||||
void setColour(const wstring &colourName, int value);
|
||||
void setColour(const wstring &colourName, const wstring &value);
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CommonMedia", "CommonMedia.vcxproj", "{21BBD32C-AF5E-4741-8B80-3B73FC0D0F27}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(TeamFoundationVersionControl) = preSolution
|
||||
SccNumberOfProjects = 2
|
||||
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
|
||||
SccTeamFoundationServer = http://tfs_server:8080/tfs/storiespark
|
||||
SccProjectUniqueName0 = CommonMedia.vcxproj
|
||||
SccLocalPath0 = .
|
||||
SccLocalPath1 = .
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{21BBD32C-AF5E-4741-8B80-3B73FC0D0F27}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{21BBD32C-AF5E-4741-8B80-3B73FC0D0F27}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{21BBD32C-AF5E-4741-8B80-3B73FC0D0F27}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{21BBD32C-AF5E-4741-8B80-3B73FC0D0F27}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,115 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Media\ChestMenu720.swf" />
|
||||
<None Include="Media\CreateWorldMenu720.swf" />
|
||||
<None Include="Media\CreativeMenu720.swf" />
|
||||
<None Include="Media\DebugMenu720.swf" />
|
||||
<None Include="Media\FullscreenProgress720.swf" />
|
||||
<None Include="Media\HUD720.swf" />
|
||||
<None Include="Media\InventoryMenu720.swf" />
|
||||
<None Include="Media\languages.loc" />
|
||||
<None Include="Media\LaunchMoreOptionsMenu720.swf" />
|
||||
<None Include="Media\LoadMenu720.swf" />
|
||||
<None Include="Media\LoadOrJoinMenu720.swf" />
|
||||
<None Include="Media\MainMenu720.swf" />
|
||||
<None Include="Media\media.arc" />
|
||||
<None Include="Media\Panorama720.swf" />
|
||||
<None Include="Media\PauseMenu720.swf" />
|
||||
<None Include="Media\skin.swf" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Media\strings.resx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="Media\media.txt" />
|
||||
<Text Include="Media\strings_begin.txt" />
|
||||
<Text Include="Media\strings_Controls.txt" />
|
||||
<Text Include="Media\strings_Credits.txt" />
|
||||
<Text Include="Media\strings_Descriptions.txt" />
|
||||
<Text Include="Media\strings_end.txt" />
|
||||
<Text Include="Media\strings_HowToPlay.txt" />
|
||||
<Text Include="Media\strings_ItemsAndTiles.txt" />
|
||||
<Text Include="Media\strings_Misc.txt" />
|
||||
<Text Include="Media\strings_PotionsAndEnchantments.txt" />
|
||||
<Text Include="Media\strings_Tips.txt" />
|
||||
<Text Include="Media\strings_Tooltips.txt" />
|
||||
<Text Include="Media\strings_Tutorial.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Durango\strings.h" />
|
||||
<ClInclude Include="..\Orbis\strings.h" />
|
||||
<ClInclude Include="..\PS3\strings.h" />
|
||||
<ClInclude Include="..\Windows64\strings.h" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{21BBD32C-AF5E-4741-8B80-3B73FC0D0F27}</ProjectGuid>
|
||||
<Keyword>MakeFileProj</Keyword>
|
||||
<SccProjectName>SAK</SccProjectName>
|
||||
<SccAuxPath>SAK</SccAuxPath>
|
||||
<SccLocalPath>SAK</SccLocalPath>
|
||||
<SccProvider>SAK</SccProvider>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Makefile</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Makefile</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v110</PlatformToolset>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<NMakePreprocessorDefinitions>WIN32;_DEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
|
||||
<NMakeBuildCommandLine>echo Creating languages.loc
|
||||
copy .\Media\strings.resx .\Media\en-EN.lang
|
||||
copy .\Media\fr-FR\strings.resx .\Media\fr-FR\fr-FR.lang
|
||||
copy .\Media\ja-JP\strings.resx .\Media\ja-JP\ja-JP.lang
|
||||
..\..\..\Tools\NewLocalisationPacker.exe --static .\Media .\Media\languages.loc
|
||||
|
||||
echo Making archive
|
||||
..\..\..\Tools\ArchiveFilePacker.exe -cd $(ProjectDir)\Media media.arc media.txt
|
||||
|
||||
echo Copying Durango strings.h
|
||||
copy .\Media\strings.h ..\Durango\strings.h
|
||||
|
||||
echo Copying PS3 strings.h
|
||||
copy .\Media\strings.h ..\PS3\strings.h
|
||||
|
||||
echo Copying PS4 strings.h
|
||||
copy .\Media\strings.h ..\Orbis\strings.h
|
||||
|
||||
echo Copying Win strings.h
|
||||
copy .\Media\strings.h ..\Windows64\strings.h</NMakeBuildCommandLine>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<NMakePreprocessorDefinitions>WIN32;NDEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
</ItemDefinitionGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,136 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="IggyMedia">
|
||||
<UniqueIdentifier>{55c7ab2e-b3e5-4aed-9ffe-3308591d9c34}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Strings">
|
||||
<UniqueIdentifier>{eaa0eb72-0b27-4080-ad53-f68e42f37ba8}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Archive">
|
||||
<UniqueIdentifier>{711ad95b-eb56-4e18-b001-34ad7b8075a3}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Archive\Win64">
|
||||
<UniqueIdentifier>{1432ec3d-c5d0-46da-91b6-e7737095a97e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Archive\PS4">
|
||||
<UniqueIdentifier>{4b2aeaf1-04d7-454d-b2d9-08364799831c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Archive\PS3">
|
||||
<UniqueIdentifier>{4b0eaef6-fa2f-4605-b0da-a81ffb5659bc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Archive\Durango">
|
||||
<UniqueIdentifier>{bf1c74da-21f1-4bdd-98ed-83457946e4cc}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Media\ChestMenu720.swf">
|
||||
<Filter>IggyMedia</Filter>
|
||||
</None>
|
||||
<None Include="Media\CreateWorldMenu720.swf">
|
||||
<Filter>IggyMedia</Filter>
|
||||
</None>
|
||||
<None Include="Media\CreativeMenu720.swf">
|
||||
<Filter>IggyMedia</Filter>
|
||||
</None>
|
||||
<None Include="Media\DebugMenu720.swf">
|
||||
<Filter>IggyMedia</Filter>
|
||||
</None>
|
||||
<None Include="Media\FullscreenProgress720.swf">
|
||||
<Filter>IggyMedia</Filter>
|
||||
</None>
|
||||
<None Include="Media\HUD720.swf">
|
||||
<Filter>IggyMedia</Filter>
|
||||
</None>
|
||||
<None Include="Media\InventoryMenu720.swf">
|
||||
<Filter>IggyMedia</Filter>
|
||||
</None>
|
||||
<None Include="Media\media.arc">
|
||||
<Filter>Archive</Filter>
|
||||
</None>
|
||||
<None Include="Media\languages.loc">
|
||||
<Filter>Archive</Filter>
|
||||
</None>
|
||||
<None Include="Media\skin.swf">
|
||||
<Filter>IggyMedia</Filter>
|
||||
</None>
|
||||
<None Include="Media\MainMenu720.swf">
|
||||
<Filter>IggyMedia</Filter>
|
||||
</None>
|
||||
<None Include="Media\Panorama720.swf">
|
||||
<Filter>IggyMedia</Filter>
|
||||
</None>
|
||||
<None Include="Media\LoadOrJoinMenu720.swf">
|
||||
<Filter>IggyMedia</Filter>
|
||||
</None>
|
||||
<None Include="Media\LaunchMoreOptionsMenu720.swf">
|
||||
<Filter>IggyMedia</Filter>
|
||||
</None>
|
||||
<None Include="Media\LoadMenu720.swf">
|
||||
<Filter>IggyMedia</Filter>
|
||||
</None>
|
||||
<None Include="Media\PauseMenu720.swf">
|
||||
<Filter>IggyMedia</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Media\strings.resx">
|
||||
<Filter>Strings</Filter>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="Media\strings_begin.txt">
|
||||
<Filter>Strings</Filter>
|
||||
</Text>
|
||||
<Text Include="Media\strings_Controls.txt">
|
||||
<Filter>Strings</Filter>
|
||||
</Text>
|
||||
<Text Include="Media\strings_Credits.txt">
|
||||
<Filter>Strings</Filter>
|
||||
</Text>
|
||||
<Text Include="Media\strings_Descriptions.txt">
|
||||
<Filter>Strings</Filter>
|
||||
</Text>
|
||||
<Text Include="Media\strings_end.txt">
|
||||
<Filter>Strings</Filter>
|
||||
</Text>
|
||||
<Text Include="Media\strings_HowToPlay.txt">
|
||||
<Filter>Strings</Filter>
|
||||
</Text>
|
||||
<Text Include="Media\strings_ItemsAndTiles.txt">
|
||||
<Filter>Strings</Filter>
|
||||
</Text>
|
||||
<Text Include="Media\strings_Misc.txt">
|
||||
<Filter>Strings</Filter>
|
||||
</Text>
|
||||
<Text Include="Media\strings_PotionsAndEnchantments.txt">
|
||||
<Filter>Strings</Filter>
|
||||
</Text>
|
||||
<Text Include="Media\strings_Tips.txt">
|
||||
<Filter>Strings</Filter>
|
||||
</Text>
|
||||
<Text Include="Media\strings_Tooltips.txt">
|
||||
<Filter>Strings</Filter>
|
||||
</Text>
|
||||
<Text Include="Media\strings_Tutorial.txt">
|
||||
<Filter>Strings</Filter>
|
||||
</Text>
|
||||
<Text Include="Media\media.txt">
|
||||
<Filter>Archive</Filter>
|
||||
</Text>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Durango\strings.h">
|
||||
<Filter>Archive\Durango</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\PS3\strings.h">
|
||||
<Filter>Archive\PS3</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Orbis\strings.h">
|
||||
<Filter>Archive\PS4</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Windows64\strings.h">
|
||||
<Filter>Archive\Win64</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,9 @@
|
||||
#include "stdafx.h"
|
||||
#include "ConsoleGameMode.h"
|
||||
#include "..\Common\Tutorial\Tutorial.h"
|
||||
|
||||
ConsoleGameMode::ConsoleGameMode(int iPad, Minecraft *minecraft, ClientConnection *connection)
|
||||
: TutorialMode(iPad, minecraft, connection)
|
||||
{
|
||||
tutorial = new Tutorial(iPad);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#pragma once
|
||||
#include "..\Common\Tutorial\TutorialMode.h"
|
||||
|
||||
class ConsoleGameMode : public TutorialMode
|
||||
{
|
||||
public:
|
||||
ConsoleGameMode(int iPad, Minecraft *minecraft, ClientConnection *connection);
|
||||
|
||||
virtual bool isImplemented() { return true; }
|
||||
};
|
||||
@@ -0,0 +1,72 @@
|
||||
#pragma once
|
||||
|
||||
enum eAward
|
||||
{
|
||||
eAward_TakingInventory=0,
|
||||
eAward_GettingWood,
|
||||
eAward_Benchmarking,
|
||||
eAward_TimeToMine,
|
||||
eAward_HotTopic,
|
||||
eAward_AquireHardware,
|
||||
eAward_TimeToFarm,
|
||||
eAward_BakeBread,
|
||||
eAward_TheLie,
|
||||
eAward_GettingAnUpgrade,
|
||||
eAward_DeliciousFish,
|
||||
eAward_OnARail,
|
||||
eAward_TimeToStrike,
|
||||
eAward_MonsterHunter,
|
||||
eAward_CowTipper,
|
||||
eAward_WhenPigsFly,
|
||||
eAward_LeaderOfThePack,
|
||||
eAward_MOARTools,
|
||||
eAward_DispenseWithThis,
|
||||
eAward_InToTheNether,
|
||||
|
||||
eAward_mine100Blocks,
|
||||
eAward_kill10Creepers,
|
||||
eAward_eatPorkChop,
|
||||
eAward_play100Days,
|
||||
eAward_arrowKillCreeper,
|
||||
eAward_socialPost,
|
||||
|
||||
#ifndef _XBOX
|
||||
// 4J Stu - Does not map to any Xbox achievements
|
||||
eAward_snipeSkeleton,
|
||||
eAward_diamonds,
|
||||
eAward_portal,
|
||||
eAward_ghast,
|
||||
eAward_blazeRod,
|
||||
eAward_potion,
|
||||
eAward_theEnd,
|
||||
eAward_winGame,
|
||||
eAward_enchantments,
|
||||
eAward_overkill,
|
||||
eAward_bookcase,
|
||||
#endif
|
||||
|
||||
#ifdef _EXTENDED_ACHIEVEMENTS
|
||||
eAward_adventuringTime,
|
||||
eAward_repopulation,
|
||||
//eAward_porkChop,
|
||||
eAward_diamondsToYou,
|
||||
//eAward_passingTheTime,
|
||||
//eAward_archer,
|
||||
eAward_theHaggler,
|
||||
eAward_potPlanter,
|
||||
eAward_itsASign,
|
||||
eAward_ironBelly,
|
||||
eAward_haveAShearfulDay,
|
||||
eAward_rainbowCollection,
|
||||
eAward_stayinFrosty,
|
||||
eAward_chestfulOfCobblestone,
|
||||
eAward_renewableEnergy,
|
||||
eAward_musicToMyEars,
|
||||
eAward_bodyGuard,
|
||||
eAward_ironMan,
|
||||
eAward_zombieDoctor,
|
||||
eAward_lionTamer,
|
||||
#endif
|
||||
|
||||
eAward_Max,
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
|
||||
enum eDebugSetting
|
||||
{
|
||||
eDebugSetting_LoadSavesFromDisk,
|
||||
eDebugSetting_WriteSavesToDisk,
|
||||
eDebugSetting_FreezePlayers, //eDebugSetting_InterfaceOff,
|
||||
eDebugSetting_Safearea,
|
||||
eDebugSetting_MobsDontAttack,
|
||||
eDebugSetting_FreezeTime,
|
||||
eDebugSetting_DisableWeather,
|
||||
eDebugSetting_CraftAnything,
|
||||
eDebugSetting_UseDpadForDebug,
|
||||
eDebugSetting_MobsDontTick,
|
||||
eDebugSetting_ArtTools, //eDebugSetting_InstantDestroy,
|
||||
eDebugSetting_ShowUIConsole,
|
||||
eDebugSetting_DistributableSave,
|
||||
eDebugSetting_DebugLeaderboards,
|
||||
eDebugSetting_EnableHeightWaterOverride, //eDebugSetting_TipsAlwaysOn,
|
||||
eDebugSetting_SuperflatNether,
|
||||
//eDebugSetting_LightDarkBackground,
|
||||
eDebugSetting_RegularLightning,
|
||||
eDebugSetting_EnableBiomeOverride, //eDebugSetting_GoToNether,
|
||||
//eDebugSetting_GoToEnd,
|
||||
eDebugSetting_GoToOverworld,
|
||||
eDebugSetting_UnlockAllDLC, // eDebugSetting_ToggleFont,
|
||||
eDebugSetting_ShowUIMarketingGuide,
|
||||
eDebugSetting_Max,
|
||||
};
|
||||
|
||||
enum eDebugButton
|
||||
{
|
||||
eDebugButton_Theme=0,
|
||||
eDebugButton_Avatar_Item_1,
|
||||
eDebugButton_Avatar_Item_2,
|
||||
eDebugButton_Avatar_Item_3,
|
||||
eDebugButton_Gamerpic_1,
|
||||
eDebugButton_Gamerpic_2,
|
||||
eDebugButton_CheckTips,
|
||||
eDebugButton_WipeLeaderboards,
|
||||
eDebugButton_Max,
|
||||
};
|
||||
@@ -0,0 +1,40 @@
|
||||
#include "stdafx.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Name: DebugSpewV()
|
||||
// Desc: Internal helper function
|
||||
//--------------------------------------------------------------------------------------
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
static VOID DebugSpewV( const CHAR* strFormat, const va_list pArgList )
|
||||
{
|
||||
#if defined __PS3__ || defined __ORBIS__ || defined __PSVITA__
|
||||
assert(0);
|
||||
#else
|
||||
CHAR str[2048];
|
||||
// Use the secure CRT to avoid buffer overruns. Specify a count of
|
||||
// _TRUNCATE so that too long strings will be silently truncated
|
||||
// rather than triggering an error.
|
||||
_vsnprintf_s( str, _TRUNCATE, strFormat, pArgList );
|
||||
OutputDebugStringA( str );
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Name: DebugSpew()
|
||||
// Desc: Prints formatted debug spew
|
||||
//--------------------------------------------------------------------------------------
|
||||
#ifdef _Printf_format_string_ // VC++ 2008 and later support this annotation
|
||||
VOID CDECL DebugSpew( _In_z_ _Printf_format_string_ const CHAR* strFormat, ... )
|
||||
#else
|
||||
VOID CDECL DebugPrintf( const CHAR* strFormat, ... )
|
||||
#endif
|
||||
{
|
||||
#ifndef _CONTENT_PACKAGE
|
||||
va_list pArgList;
|
||||
va_start( pArgList, strFormat );
|
||||
DebugSpewV( strFormat, pArgList );
|
||||
va_end( pArgList );
|
||||
#endif
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,939 @@
|
||||
#pragma once
|
||||
|
||||
using namespace std;
|
||||
|
||||
#include "Audio/Consoles_SoundEngine.h"
|
||||
|
||||
#include <xuiapp.h>
|
||||
#include "..\Common\Tutorial\TutorialEnum.h"
|
||||
|
||||
#ifdef _XBOX
|
||||
#include "..\Common\XUI\XUI_Helper.h"
|
||||
#include "..\Common\XUI\XUI_HelpCredits.h"
|
||||
#endif
|
||||
#include "UI\UIStructs.h"
|
||||
|
||||
#include "..\..\Minecraft.World\DisconnectPacket.h"
|
||||
#include <xsocialpost.h>
|
||||
|
||||
#include "..\StringTable.h"
|
||||
#include "..\Common\DLC\DLCManager.h"
|
||||
#include "..\Common\GameRules\ConsoleGameRulesConstants.h"
|
||||
#include "..\Common\GameRules\GameRuleManager.h"
|
||||
#include "..\SkinBox.h"
|
||||
#include "..\ArchiveFile.h"
|
||||
|
||||
typedef struct _JoinFromInviteData
|
||||
{
|
||||
DWORD dwUserIndex; // dwUserIndex
|
||||
DWORD dwLocalUsersMask; // dwUserMask
|
||||
const INVITE_INFO *pInviteInfo; // pInviteInfo
|
||||
}
|
||||
JoinFromInviteData;
|
||||
|
||||
class Player;
|
||||
class Inventory;
|
||||
class Level;
|
||||
class FurnaceTileEntity;
|
||||
class Container;
|
||||
class DispenserTileEntity;
|
||||
class SignTileEntity;
|
||||
class BrewingStandTileEntity;
|
||||
class CommandBlockEntity;
|
||||
class HopperTileEntity;
|
||||
class MinecartHopper;
|
||||
class EntityHorse;
|
||||
class BeaconTileEntity;
|
||||
class LocalPlayer;
|
||||
class DLCPack;
|
||||
class LevelRuleset;
|
||||
class ConsoleSchematicFile;
|
||||
class Model;
|
||||
class ModelPart;
|
||||
class StringTable;
|
||||
class Merchant;
|
||||
|
||||
class CMinecraftAudio;
|
||||
|
||||
class CMinecraftApp
|
||||
|
||||
#ifdef _XBOX
|
||||
: public CXuiModule
|
||||
#endif
|
||||
{
|
||||
private:
|
||||
static int s_iHTMLFontSizesA[eHTMLSize_COUNT];
|
||||
|
||||
public:
|
||||
|
||||
CMinecraftApp();
|
||||
|
||||
static const float fSafeZoneX; // 5% of 1280
|
||||
static const float fSafeZoneY; // 5% of 720
|
||||
|
||||
typedef std::vector <PMEMDATA> VMEMFILES;
|
||||
typedef std::vector <PNOTIFICATION> VNOTIFICATIONS;
|
||||
|
||||
// storing skin files
|
||||
std::vector <wstring > vSkinNames;
|
||||
DLCManager m_dlcManager;
|
||||
|
||||
// storing credits text from the DLC
|
||||
std::vector <wstring > m_vCreditText; // hold the credit text lines so we can avoid duplicating them
|
||||
|
||||
|
||||
// In builds prior to TU5, the size of the GAME_SETTINGS struct was 204 bytes. We added a few new values to the internal struct in TU5, and even though we
|
||||
// changed the size of the ucUnused array to be decreased by the size of the values we added, the packing of the struct has introduced some extra
|
||||
// padding that resulted in the GAME_SETTINGS struct being 208 bytes. The knock-on effect from this was that all the stats, which come after the game settings
|
||||
// in the profile data, we being read offset by 4 bytes. We need to ensure that the GAME_SETTINGS struct does not grow larger than 204 bytes or if we need it
|
||||
// to then we need to rebuild the profile data completely and increase the profile version. There should be enough free space to grow larger for a few more updates
|
||||
// as long as we take into account the padding issues and check that settings are still stored at the same positions when we read them
|
||||
static const int GAME_SETTINGS_PROFILE_DATA_BYTES = 204;
|
||||
|
||||
#ifdef _EXTENDED_ACHIEVEMENTS
|
||||
/* 4J-JEV:
|
||||
* We need more space in the profile data because of the new achievements and statistics
|
||||
* necessary for the new expanded achievement set.
|
||||
*/
|
||||
static const int GAME_DEFINED_PROFILE_DATA_BYTES = 2*972; // per user
|
||||
#else
|
||||
static const int GAME_DEFINED_PROFILE_DATA_BYTES = 972; // per user
|
||||
#endif
|
||||
unsigned int uiGameDefinedDataChangedBitmask;
|
||||
|
||||
void DebugPrintf(const char *szFormat, ...);
|
||||
void DebugPrintfVerbose(bool bVerbose, const char *szFormat, ...); // Conditional printf
|
||||
void DebugPrintf(int user, const char *szFormat, ...);
|
||||
|
||||
static const int USER_NONE = 0; // disables printf
|
||||
static const int USER_GENERAL = 1;
|
||||
static const int USER_JV = 2;
|
||||
static const int USER_MH = 3;
|
||||
static const int USER_PB = 4;
|
||||
static const int USER_RR = 5;
|
||||
static const int USER_SR = 6;
|
||||
static const int USER_UI = 7; // 4J Stu - This also makes it appear on the UI console
|
||||
|
||||
void HandleButtonPresses();
|
||||
bool IntroRunning() { return m_bIntroRunning;}
|
||||
void SetIntroRunning(bool bSet) {m_bIntroRunning=bSet;}
|
||||
#ifdef _CONTENT_PACKAGE
|
||||
#ifndef _FINAL_BUILD
|
||||
bool PartnernetPasswordRunning() { return m_bPartnernetPasswordRunning;}
|
||||
void SetPartnernetPasswordRunning(bool bSet) {m_bPartnernetPasswordRunning=bSet;}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
bool IsAppPaused();
|
||||
void SetAppPaused(bool val);
|
||||
static int DisplaySavingMessage(LPVOID pParam,const C4JStorage::ESavingMessage eMsg, int iPad);
|
||||
bool GetGameStarted() {return m_bGameStarted;}
|
||||
void SetGameStarted(bool bVal) { if(bVal) DebugPrintf("SetGameStarted - true\n"); else DebugPrintf("SetGameStarted - false\n"); m_bGameStarted = bVal; m_bIsAppPaused = !bVal;}
|
||||
int GetLocalPlayerCount(void);
|
||||
bool LoadInventoryMenu(int iPad,shared_ptr<LocalPlayer> player, bool bNavigateBack=false);
|
||||
bool LoadCreativeMenu(int iPad,shared_ptr<LocalPlayer> player,bool bNavigateBack=false);
|
||||
bool LoadEnchantingMenu(int iPad,shared_ptr<Inventory> inventory, int x, int y, int z, Level *level, const wstring &name);
|
||||
bool LoadFurnaceMenu(int iPad,shared_ptr<Inventory> inventory, shared_ptr<FurnaceTileEntity> furnace);
|
||||
bool LoadBrewingStandMenu(int iPad,shared_ptr<Inventory> inventory, shared_ptr<BrewingStandTileEntity> brewingStand);
|
||||
bool LoadContainerMenu(int iPad,shared_ptr<Container> inventory, shared_ptr<Container> container);
|
||||
bool LoadTrapMenu(int iPad,shared_ptr<Container> inventory, shared_ptr<DispenserTileEntity> trap);
|
||||
bool LoadCrafting2x2Menu(int iPad,shared_ptr<LocalPlayer> player);
|
||||
bool LoadCrafting3x3Menu(int iPad,shared_ptr<LocalPlayer> player, int x, int y, int z);
|
||||
bool LoadFireworksMenu(int iPad,shared_ptr<LocalPlayer> player, int x, int y, int z);
|
||||
bool LoadSignEntryMenu(int iPad,shared_ptr<SignTileEntity> sign);
|
||||
bool LoadRepairingMenu(int iPad,shared_ptr<Inventory> inventory, Level *level, int x, int y, int z);
|
||||
bool LoadTradingMenu(int iPad, shared_ptr<Inventory> inventory, shared_ptr<Merchant> trader, Level *level, const wstring &name);
|
||||
|
||||
bool LoadCommandBlockMenu(int iPad, shared_ptr<CommandBlockEntity> commandBlock) { return false; }
|
||||
bool LoadHopperMenu(int iPad ,shared_ptr<Inventory> inventory, shared_ptr<HopperTileEntity> hopper);
|
||||
bool LoadHopperMenu(int iPad ,shared_ptr<Inventory> inventory, shared_ptr<MinecartHopper> hopper);
|
||||
bool LoadHorseMenu(int iPad ,shared_ptr<Inventory> inventory, shared_ptr<Container> container, shared_ptr<EntityHorse> horse);
|
||||
bool LoadBeaconMenu(int iPad ,shared_ptr<Inventory> inventory, shared_ptr<BeaconTileEntity> beacon);
|
||||
|
||||
bool GetTutorialMode() { return m_bTutorialMode;}
|
||||
void SetTutorialMode(bool bSet) {m_bTutorialMode=bSet;}
|
||||
|
||||
void SetSpecialTutorialCompletionFlag(int iPad, int index);
|
||||
|
||||
static LPCWSTR GetString(int iID);
|
||||
|
||||
eGameMode GetGameMode() { return m_eGameMode;}
|
||||
void SetGameMode(eGameMode eMode) { m_eGameMode=eMode;}
|
||||
|
||||
eXuiAction GetGlobalXuiAction() {return m_eGlobalXuiAction;}
|
||||
void SetGlobalXuiAction(eXuiAction action) {m_eGlobalXuiAction=action;}
|
||||
eXuiAction GetXuiAction(int iPad) {return m_eXuiAction[iPad];}
|
||||
void SetAction(int iPad, eXuiAction action, LPVOID param = NULL);
|
||||
void SetTMSAction(int iPad, eTMSAction action) {m_eTMSAction[iPad]=action; }
|
||||
eTMSAction GetTMSAction(int iPad) {return m_eTMSAction[iPad];}
|
||||
eXuiServerAction GetXuiServerAction(int iPad) {return m_eXuiServerAction[iPad];}
|
||||
LPVOID GetXuiServerActionParam(int iPad) {return m_eXuiServerActionParam[iPad];}
|
||||
void SetXuiServerAction(int iPad, eXuiServerAction action, LPVOID param = NULL) {m_eXuiServerAction[iPad]=action; m_eXuiServerActionParam[iPad] = param;}
|
||||
eXuiServerAction GetGlobalXuiServerAction() {return m_eGlobalXuiServerAction;}
|
||||
void SetGlobalXuiServerAction(eXuiServerAction action) {m_eGlobalXuiServerAction=action;}
|
||||
|
||||
DisconnectPacket::eDisconnectReason GetDisconnectReason() { return m_disconnectReason; }
|
||||
void SetDisconnectReason(DisconnectPacket::eDisconnectReason bVal) { m_disconnectReason = bVal; }
|
||||
|
||||
bool GetChangingSessionType() { return m_bChangingSessionType; }
|
||||
void SetChangingSessionType(bool bVal) { m_bChangingSessionType = bVal; }
|
||||
|
||||
bool GetReallyChangingSessionType() { return m_bReallyChangingSessionType; }
|
||||
void SetReallyChangingSessionType(bool bVal) { m_bReallyChangingSessionType = bVal; }
|
||||
|
||||
|
||||
// 4J Stu - Added so that we can call this when a confirmation box is selected
|
||||
static void SetActionConfirmed(LPVOID param);
|
||||
void HandleXuiActions(void);
|
||||
|
||||
// 4J Stu - Functions used for Minecon and other promo work
|
||||
bool GetLoadSavesFromFolderEnabled() { return m_bLoadSavesFromFolderEnabled; }
|
||||
void SetLoadSavesFromFolderEnabled(bool bVal) { m_bLoadSavesFromFolderEnabled = bVal; }
|
||||
|
||||
// 4J Stu - Useful for debugging
|
||||
bool GetWriteSavesToFolderEnabled() { return m_bWriteSavesToFolderEnabled; }
|
||||
void SetWriteSavesToFolderEnabled(bool bVal) { m_bWriteSavesToFolderEnabled = bVal; }
|
||||
bool GetMobsDontAttackEnabled() { return m_bMobsDontAttack; }
|
||||
void SetMobsDontAttackEnabled(bool bVal) { m_bMobsDontAttack = bVal; }
|
||||
bool GetUseDPadForDebug() { return m_bUseDPadForDebug; }
|
||||
void SetUseDPadForDebug(bool bVal) { m_bUseDPadForDebug = bVal; }
|
||||
bool GetMobsDontTickEnabled() { return m_bMobsDontTick; }
|
||||
void SetMobsDontTickEnabled(bool bVal) { m_bMobsDontTick = bVal; }
|
||||
|
||||
bool GetFreezePlayers() { return m_bFreezePlayers; }
|
||||
void SetFreezePlayers(bool bVal) { m_bFreezePlayers = bVal; }
|
||||
|
||||
// debug -0 show safe area
|
||||
void ShowSafeArea(BOOL bShow)
|
||||
{
|
||||
#ifdef _XBOX
|
||||
CXuiSceneBase::ShowSafeArea( bShow );
|
||||
#endif
|
||||
}
|
||||
// 4J-PB - to capture the social post screenshot
|
||||
virtual void CaptureScreenshot(int iPad) {};
|
||||
//void GetPreviewImage(int iPad,XSOCIAL_PREVIEWIMAGE *preview);
|
||||
|
||||
void InitGameSettings();
|
||||
static int OldProfileVersionCallback(LPVOID pParam,unsigned char *pucData, const unsigned short usVersion, const int iPad);
|
||||
|
||||
#if ( defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__ )
|
||||
wstring toStringOptionsStatus(const C4JStorage::eOptionsCallback &eStatus);
|
||||
static int DefaultOptionsCallback(LPVOID pParam,C4JStorage::PROFILESETTINGS *pSettings, const int iPad);
|
||||
int SetDefaultOptions(C4JStorage::PROFILESETTINGS *pSettings,const int iPad,bool bWriteProfile=true);
|
||||
#ifdef __ORBIS__
|
||||
static int OptionsDataCallback(LPVOID pParam,int iPad,unsigned short usVersion,C4JStorage::eOptionsCallback eStatus,int iBlocksRequired);
|
||||
int GetOptionsBlocksRequired(int iPad);
|
||||
#else
|
||||
static int OptionsDataCallback(LPVOID pParam,int iPad,unsigned short usVersion,C4JStorage::eOptionsCallback eStatus);
|
||||
#endif
|
||||
|
||||
C4JStorage::eOptionsCallback GetOptionsCallbackStatus(int iPad);
|
||||
|
||||
void SetOptionsCallbackStatus(int iPad, C4JStorage::eOptionsCallback eStatus);
|
||||
#else
|
||||
static int DefaultOptionsCallback(LPVOID pParam,C_4JProfile::PROFILESETTINGS *pSettings, const int iPad);
|
||||
int SetDefaultOptions(C_4JProfile::PROFILESETTINGS *pSettings,const int iPad);
|
||||
#endif
|
||||
virtual void SetRichPresenceContext(int iPad, int contextId) = 0;
|
||||
|
||||
|
||||
void SetGameSettings(int iPad,eGameSetting eVal,unsigned char ucVal);
|
||||
unsigned char GetGameSettings(int iPad,eGameSetting eVal);
|
||||
unsigned char GetGameSettings(eGameSetting eVal); // for the primary pad
|
||||
void SetPlayerSkin(int iPad,const wstring &name);
|
||||
void SetPlayerSkin(int iPad,DWORD dwSkinId);
|
||||
void SetPlayerCape(int iPad,const wstring &name);
|
||||
void SetPlayerCape(int iPad,DWORD dwCapeId);
|
||||
void SetPlayerFavoriteSkin(int iPad, int iIndex,unsigned int uiSkinID);
|
||||
unsigned int GetPlayerFavoriteSkin(int iPad,int iIndex);
|
||||
unsigned char GetPlayerFavoriteSkinsPos(int iPad);
|
||||
void SetPlayerFavoriteSkinsPos(int iPad,int iPos);
|
||||
unsigned int GetPlayerFavoriteSkinsCount(int iPad);
|
||||
void ValidateFavoriteSkins(int iPad); // check the DLC is available for the skins
|
||||
|
||||
// Mash-up pack worlds hide/display
|
||||
void HideMashupPackWorld(int iPad, unsigned int iMashupPackID);
|
||||
void EnableMashupPackWorlds(int iPad);
|
||||
unsigned int GetMashupPackWorlds(int iPad);
|
||||
|
||||
// Minecraft language select
|
||||
void SetMinecraftLanguage(int iPad, unsigned char ucLanguage);
|
||||
unsigned char GetMinecraftLanguage(int iPad);
|
||||
void SetMinecraftLocale(int iPad, unsigned char ucLanguage);
|
||||
unsigned char GetMinecraftLocale(int iPad);
|
||||
|
||||
// 4J-PB - set a timer when the user navigates the quickselect, so we can bring the opacity back to defaults for a short time
|
||||
unsigned int GetOpacityTimer(int iPad) { return m_uiOpacityCountDown[iPad]; }
|
||||
void SetOpacityTimer(int iPad) { m_uiOpacityCountDown[iPad]=120; } // 6 seconds
|
||||
void TickOpacityTimer(int iPad) { if(m_uiOpacityCountDown[iPad]>0) m_uiOpacityCountDown[iPad]--;}
|
||||
|
||||
public:
|
||||
wstring GetPlayerSkinName(int iPad);
|
||||
DWORD GetPlayerSkinId(int iPad);
|
||||
wstring GetPlayerCapeName(int iPad);
|
||||
DWORD GetPlayerCapeId(int iPad);
|
||||
DWORD GetAdditionalModelParts(int iPad);
|
||||
void CheckGameSettingsChanged(bool bOverride5MinuteTimer=false, int iPad=XUSER_INDEX_ANY);
|
||||
void ApplyGameSettingsChanged(int iPad);
|
||||
void ClearGameSettingsChangedFlag(int iPad);
|
||||
void ActionGameSettings(int iPad,eGameSetting eVal);
|
||||
unsigned int GetGameSettingsDebugMask(int iPad=-1,bool bOverridePlayer=false);
|
||||
void SetGameSettingsDebugMask(int iPad, unsigned int uiVal);
|
||||
void ActionDebugMask(int iPad, bool bSetAllClear=false);
|
||||
|
||||
//
|
||||
bool IsLocalMultiplayerAvailable();
|
||||
|
||||
// for sign in change monitoring
|
||||
static void SignInChangeCallback(LPVOID pParam, bool bVal, unsigned int uiSignInData);
|
||||
static void ClearSignInChangeUsersMask();
|
||||
static int SignoutExitWorldThreadProc( void* lpParameter );
|
||||
static int PrimaryPlayerSignedOutReturned(void *pParam, int iPad, const C4JStorage::EMessageResult);
|
||||
static int EthernetDisconnectReturned(void *pParam, int iPad, const C4JStorage::EMessageResult);
|
||||
static void ProfileReadErrorCallback(void *pParam);
|
||||
|
||||
// FATAL LOAD ERRORS
|
||||
virtual void FatalLoadError();
|
||||
|
||||
// Notifications from the game listener to be passed to the qnet listener
|
||||
static void NotificationsCallback(LPVOID pParam,DWORD dwNotification, unsigned int uiParam);
|
||||
|
||||
// for the ethernet being disconnected
|
||||
static void LiveLinkChangeCallback(LPVOID pParam,BOOL bConnected);
|
||||
bool GetLiveLinkRequired() {return m_bLiveLinkRequired;}
|
||||
void SetLiveLinkRequired(bool required) {m_bLiveLinkRequired=required;}
|
||||
|
||||
static void UpsellReturnedCallback(LPVOID pParam, eUpsellType type, eUpsellResponse result, int iUserData);
|
||||
|
||||
#if defined __PS3__ || defined __PSVITA__ || defined __ORBIS__
|
||||
static int NowDisplayFullVersionPurchase(void *pParam, bool bContinue, int iPad);
|
||||
static int MustSignInFullVersionPurchaseReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
#endif
|
||||
#if defined __PS3__ || defined __PSVITA__ || defined __ORBIS__
|
||||
static int MustSignInFullVersionPurchaseReturnedExitTrial(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
#endif
|
||||
|
||||
#ifdef _DEBUG_MENUS_ENABLED
|
||||
bool DebugSettingsOn() { return m_bDebugOptions;}
|
||||
bool DebugArtToolsOn();
|
||||
#else
|
||||
bool DebugSettingsOn() { return false;}
|
||||
bool DebugArtToolsOn() { return false;}
|
||||
#endif
|
||||
void SetDebugSequence(const char *pchSeq);
|
||||
static int DebugInputCallback(LPVOID pParam);
|
||||
//bool UploadFileToGlobalStorage(int iQuadrant, C4JStorage::eGlobalStorage eStorageFacility, wstring *wsFile );
|
||||
|
||||
// Installed DLC
|
||||
bool StartInstallDLCProcess(int iPad);
|
||||
static int DLCInstalledCallback(LPVOID pParam,int iOfferC,int iPad);
|
||||
void HandleDLCLicenseChange();
|
||||
static int DLCMountedCallback(LPVOID pParam,int iPad,DWORD dwErr,DWORD dwLicenceMask);
|
||||
void MountNextDLC(int iPad);
|
||||
//static int DLCReadCallback(LPVOID pParam,C4JStorage::DLC_FILE_DETAILS *pDLCData);
|
||||
void HandleDLC(DLCPack *pack);
|
||||
bool DLCInstallPending() {return m_bDLCInstallPending;}
|
||||
bool DLCInstallProcessCompleted() {return m_bDLCInstallProcessCompleted;}
|
||||
void ClearDLCInstalled() { m_bDLCInstallProcessCompleted=false;}
|
||||
static int MarketplaceCountsCallback(LPVOID pParam,C4JStorage::DLC_TMS_DETAILS *,int iPad);
|
||||
|
||||
bool AlreadySeenCreditText(const wstring &wstemp);
|
||||
|
||||
void ClearNewDLCAvailable(void) { m_bNewDLCAvailable=false; m_bSeenNewDLCTip=true;}
|
||||
bool GetNewDLCAvailable() { return m_bNewDLCAvailable;}
|
||||
void DisplayNewDLCTipAgain() { m_bSeenNewDLCTip=false;}
|
||||
bool DisplayNewDLCTip() { if(!m_bSeenNewDLCTip) { m_bSeenNewDLCTip=true; return true;} else return false;}
|
||||
|
||||
// functions to store launch data, and to exit the game - required due to possibly being on a demo disc
|
||||
virtual void StoreLaunchData();
|
||||
virtual void ExitGame();
|
||||
|
||||
bool isXuidNotch(PlayerUID xuid);
|
||||
bool isXuidDeadmau5(PlayerUID xuid);
|
||||
|
||||
void AddMemoryTextureFile(const wstring &wName, PBYTE pbData, DWORD dwBytes);
|
||||
void RemoveMemoryTextureFile(const wstring &wName);
|
||||
void GetMemFileDetails(const wstring &wName,PBYTE *ppbData,DWORD *pdwBytes);
|
||||
bool IsFileInMemoryTextures(const wstring &wName);
|
||||
|
||||
// Texture Pack Data files (icon, banner, comparison shot & text)
|
||||
void AddMemoryTPDFile(int iConfig,PBYTE pbData,DWORD dwBytes);
|
||||
void RemoveMemoryTPDFile(int iConfig);
|
||||
bool IsFileInTPD(int iConfig);
|
||||
void GetTPD(int iConfig,PBYTE *ppbData,DWORD *pdwBytes);
|
||||
int GetTPDSize() {return m_MEM_TPD.size();}
|
||||
#ifndef __PS3__
|
||||
int GetTPConfigVal(WCHAR *pwchDataFile);
|
||||
#endif
|
||||
|
||||
bool DefaultCapeExists();
|
||||
//void InstallDefaultCape(); // attempt to install the default cape once per game launch
|
||||
|
||||
// invites
|
||||
//void ProcessInvite(JoinFromInviteData *pJoinData);
|
||||
void ProcessInvite(DWORD dwUserIndex, DWORD dwLocalUsersMask, const INVITE_INFO * pInviteInfo);
|
||||
|
||||
// Add credits for DLC installed
|
||||
void AddCreditText(LPCWSTR lpStr);
|
||||
|
||||
private:
|
||||
PlayerUID m_xuidNotch;
|
||||
#ifdef _DURANGO
|
||||
unordered_map<PlayerUID, PBYTE, PlayerUID::Hash> m_GTS_Files;
|
||||
#else
|
||||
unordered_map<PlayerUID, PBYTE> m_GTS_Files;
|
||||
#endif
|
||||
|
||||
// for storing memory textures - player skin
|
||||
unordered_map<wstring, PMEMDATA> m_MEM_Files;
|
||||
// for storing texture pack data files
|
||||
unordered_map<int, PMEMDATA> m_MEM_TPD;
|
||||
CRITICAL_SECTION csMemFilesLock; // For locking access to the above map
|
||||
CRITICAL_SECTION csMemTPDLock; // For locking access to the above map
|
||||
|
||||
VNOTIFICATIONS m_vNotifications;
|
||||
|
||||
public:
|
||||
// launch data
|
||||
BYTE* m_pLaunchData;
|
||||
DWORD m_dwLaunchDataSize;
|
||||
|
||||
public:
|
||||
// BAN LIST
|
||||
void AddLevelToBannedLevelList(int iPad,PlayerUID xuid, char *pszLevelName, bool bWriteToTMS);
|
||||
bool IsInBannedLevelList(int iPad, PlayerUID xuid, char *pszLevelName);
|
||||
void RemoveLevelFromBannedLevelList(int iPad, PlayerUID xuid, char *pszLevelName);
|
||||
void InvalidateBannedList(int iPad);
|
||||
void SetUniqueMapName(char *pszUniqueMapName);
|
||||
char *GetUniqueMapName(void);
|
||||
#ifdef _XBOX_ONE
|
||||
void AddLevelToBannedLevelList(int iPad, PBANNEDLISTDATA pBannedListData, bool bWriteToTMS);
|
||||
#endif
|
||||
|
||||
|
||||
public:
|
||||
bool GetResourcesLoaded() {return m_bResourcesLoaded;}
|
||||
void SetResourcesLoaded(bool bVal) {m_bResourcesLoaded=bVal;}
|
||||
|
||||
public:
|
||||
bool m_bGameStarted;
|
||||
bool m_bIntroRunning;
|
||||
bool m_bTutorialMode;
|
||||
bool m_bIsAppPaused;
|
||||
|
||||
bool m_bChangingSessionType;
|
||||
bool m_bReallyChangingSessionType;
|
||||
|
||||
bool m_bDisplayFullVersionPurchase; // for after signing in during the trial, and trying to unlock full version on an upsell
|
||||
|
||||
void loadMediaArchive();
|
||||
void loadStringTable();
|
||||
|
||||
protected:
|
||||
ArchiveFile *m_mediaArchive;
|
||||
StringTable *m_stringTable;
|
||||
|
||||
public:
|
||||
int getArchiveFileSize(const wstring &filename);
|
||||
bool hasArchiveFile(const wstring &filename);
|
||||
byteArray getArchiveFile(const wstring &filename);
|
||||
|
||||
private:
|
||||
|
||||
static int BannedLevelDialogReturned(void *pParam,int iPad,const C4JStorage::EMessageResult);
|
||||
static int TexturePackDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
|
||||
VBANNEDLIST *m_vBannedListA[XUSER_MAX_COUNT];
|
||||
|
||||
void HandleButtonPresses(int iPad);
|
||||
|
||||
bool m_bResourcesLoaded;
|
||||
|
||||
// Global string table for this application.
|
||||
//CXuiStringTable StringTable;
|
||||
|
||||
|
||||
// Container scene for some menu
|
||||
|
||||
// CXuiScene debugContainerScene;
|
||||
|
||||
|
||||
//bool m_bSplitScreenEnabled;
|
||||
|
||||
|
||||
#ifdef _CONTENT_PACKAGE
|
||||
#ifndef _FINAL_BUILD
|
||||
bool m_bPartnernetPasswordRunning;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
eGameMode m_eGameMode; // single or multiplayer
|
||||
|
||||
static unsigned int m_uiLastSignInData;
|
||||
|
||||
// We've got sizeof(GAME_SETTINGS) bytes reserved at the start of the gamedefined data per player for settings
|
||||
GAME_SETTINGS *GameSettingsA[XUSER_MAX_COUNT];
|
||||
|
||||
// For promo work
|
||||
bool m_bLoadSavesFromFolderEnabled;
|
||||
|
||||
// For debugging
|
||||
bool m_bWriteSavesToFolderEnabled;
|
||||
bool m_bMobsDontAttack;
|
||||
bool m_bUseDPadForDebug;
|
||||
bool m_bMobsDontTick;
|
||||
bool m_bFreezePlayers;
|
||||
|
||||
// 4J : WESTY : For taking screen shots.
|
||||
//bool m_bInterfaceRenderingOff;
|
||||
//bool m_bHandRenderingOff;
|
||||
|
||||
DisconnectPacket::eDisconnectReason m_disconnectReason;
|
||||
|
||||
public:
|
||||
virtual void RunFrame() {};
|
||||
|
||||
|
||||
|
||||
static const DWORD m_dwOfferID = 0x00000001;
|
||||
|
||||
// timer
|
||||
void InitTime();
|
||||
void UpdateTime();
|
||||
|
||||
// trial timer
|
||||
void SetTrialTimerStart(void);
|
||||
float getTrialTimer(void);
|
||||
|
||||
// notifications from the game for qnet
|
||||
VNOTIFICATIONS *GetNotifications() {return &m_vNotifications;}
|
||||
|
||||
private:
|
||||
|
||||
|
||||
// To avoid problems with threads being kicked off from xuis that alter things that may be in progress within the run_middle,
|
||||
// we'll action these at the end of the game loop
|
||||
eXuiAction m_eXuiAction[XUSER_MAX_COUNT];
|
||||
eTMSAction m_eTMSAction[XUSER_MAX_COUNT];
|
||||
LPVOID m_eXuiActionParam[XUSER_MAX_COUNT];
|
||||
eXuiAction m_eGlobalXuiAction;
|
||||
eXuiServerAction m_eXuiServerAction[XUSER_MAX_COUNT];
|
||||
LPVOID m_eXuiServerActionParam[XUSER_MAX_COUNT];
|
||||
eXuiServerAction m_eGlobalXuiServerAction;
|
||||
|
||||
bool m_bLiveLinkRequired;
|
||||
|
||||
static int UnlockFullExitReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int UnlockFullSaveReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int UnlockFullInviteReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int TrialOverReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int ExitAndJoinFromInvite(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int ExitAndJoinFromInviteSaveDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int ExitAndJoinFromInviteAndSaveReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int ExitAndJoinFromInviteDeclineSaveReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int FatalErrorDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
static int WarningTrialTexturePackReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
|
||||
JoinFromInviteData m_InviteData;
|
||||
bool m_bDebugOptions; // toggle debug things on or off
|
||||
|
||||
// Trial timer
|
||||
float m_fTrialTimerStart,mfTrialPausedTime;
|
||||
typedef struct TimeInfo
|
||||
{
|
||||
LARGE_INTEGER qwTime;
|
||||
LARGE_INTEGER qwAppTime;
|
||||
|
||||
float fAppTime;
|
||||
float fElapsedTime;
|
||||
float fSecsPerTick;
|
||||
} TIMEINFO;
|
||||
|
||||
TimeInfo m_Time;
|
||||
|
||||
protected:
|
||||
static const int MAX_TIPS_GAMETIP = 50;
|
||||
static const int MAX_TIPS_TRIVIATIP = 20;
|
||||
static TIPSTRUCT m_GameTipA[MAX_TIPS_GAMETIP];
|
||||
static TIPSTRUCT m_TriviaTipA[MAX_TIPS_TRIVIATIP];
|
||||
static Random *TipRandom;
|
||||
public:
|
||||
void InitialiseTips();
|
||||
UINT GetNextTip();
|
||||
int GetHTMLColour(eMinecraftColour colour);
|
||||
int GetHTMLColor(eMinecraftColour colour) { return GetHTMLColour(colour); }
|
||||
int GetHTMLFontSize(EHTMLFontSize size);
|
||||
wstring FormatHTMLString(int iPad, const wstring &desc, int shadowColour = 0xFFFFFFFF);
|
||||
wstring GetActionReplacement(int iPad, unsigned char ucAction);
|
||||
wstring GetVKReplacement(unsigned int uiVKey);
|
||||
wstring GetIconReplacement(unsigned int uiIcon);
|
||||
|
||||
float getAppTime() { return m_Time.fAppTime; }
|
||||
void UpdateTrialPausedTimer() { mfTrialPausedTime+= m_Time.fElapsedTime;}
|
||||
|
||||
static int RemoteSaveThreadProc( void* lpParameter );
|
||||
static void ExitGameFromRemoteSave( LPVOID lpParameter );
|
||||
static int ExitGameFromRemoteSaveDialogReturned(void *pParam,int iPad,C4JStorage::EMessageResult result);
|
||||
private:
|
||||
UINT m_TipIDA[MAX_TIPS_GAMETIP+MAX_TIPS_TRIVIATIP];
|
||||
UINT m_uiCurrentTip;
|
||||
static int TipsSortFunction(const void* a, const void* b);
|
||||
|
||||
// XML
|
||||
public:
|
||||
|
||||
// Hold a vector of terrain feature positions
|
||||
void AddTerrainFeaturePosition(_eTerrainFeatureType,int,int);
|
||||
void ClearTerrainFeaturePosition();
|
||||
_eTerrainFeatureType IsTerrainFeature(int x,int z);
|
||||
bool GetTerrainFeaturePosition(_eTerrainFeatureType eType, int *pX, int *pZ);
|
||||
std::vector <FEATURE_DATA *> m_vTerrainFeatures;
|
||||
|
||||
static HRESULT RegisterMojangData(WCHAR *, PlayerUID, WCHAR *, WCHAR *);
|
||||
MOJANG_DATA *GetMojangDataForXuid(PlayerUID xuid);
|
||||
static HRESULT RegisterConfigValues(WCHAR *pType, int iValue);
|
||||
|
||||
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
HRESULT RegisterDLCData(char *pchDLCName, unsigned int uiSortIndex, char *pchImageURL);
|
||||
bool GetDLCFullOfferIDForSkinID(const wstring &FirstSkin,ULONGLONG *pullVal);
|
||||
DLC_INFO *GetDLCInfoForTrialOfferID(ULONGLONG ullOfferID_Trial);
|
||||
DLC_INFO *GetDLCInfoForFullOfferID(ULONGLONG ullOfferID_Full);
|
||||
#elif defined(_XBOX_ONE)
|
||||
static HRESULT RegisterDLCData(eDLCContentType, WCHAR *, WCHAR *, WCHAR *, WCHAR *, int, unsigned int);
|
||||
//bool GetDLCFullOfferIDForSkinID(const wstring &FirstSkin,WCHAR *pwchProductId);
|
||||
bool GetDLCFullOfferIDForSkinID(const wstring &FirstSkin,wstring &wsProductId);
|
||||
DLC_INFO *GetDLCInfoForFullOfferID(WCHAR *pwchProductId);
|
||||
DLC_INFO *GetDLCInfoForProductName(WCHAR *pwchProductName);
|
||||
#else
|
||||
static HRESULT RegisterDLCData(WCHAR *, WCHAR *, int, __uint64, __uint64, WCHAR *, unsigned int, int, WCHAR *pDataFile);
|
||||
bool GetDLCFullOfferIDForSkinID(const wstring &FirstSkin,ULONGLONG *pullVal);
|
||||
DLC_INFO *GetDLCInfoForTrialOfferID(ULONGLONG ullOfferID_Trial);
|
||||
DLC_INFO *GetDLCInfoForFullOfferID(ULONGLONG ullOfferID_Full);
|
||||
#endif
|
||||
|
||||
unsigned int GetDLCCreditsCount();
|
||||
SCreditTextItemDef * GetDLCCredits(int iIndex);
|
||||
|
||||
// TMS
|
||||
void ReadDLCFileFromTMS(int iPad,eTMSAction action, bool bCallback=false);
|
||||
void ReadXuidsFileFromTMS(int iPad,eTMSAction action,bool bCallback=false);
|
||||
|
||||
// images for save thumbnail/social post
|
||||
virtual void CaptureSaveThumbnail() =0;
|
||||
virtual void GetSaveThumbnail(PBYTE*,DWORD*)=0;
|
||||
virtual void ReleaseSaveThumbnail()=0;
|
||||
virtual void GetScreenshot(int iPad,PBYTE *pbData,DWORD *pdwSize)=0;
|
||||
|
||||
virtual void ReadBannedList(int iPad, eTMSAction action=(eTMSAction)0, bool bCallback=false)=0;
|
||||
|
||||
private:
|
||||
|
||||
std::vector <SCreditTextItemDef *> vDLCCredits;
|
||||
|
||||
#if defined(__PS3__) || defined(__ORBIS__) || defined (__PSVITA__)
|
||||
static unordered_map<PlayerUID,MOJANG_DATA *, PlayerUID::Hash > MojangData;
|
||||
static unordered_map<int, char * > DLCTextures_PackID; // for mash-up packs & texture packs
|
||||
static unordered_map<string,DLC_INFO * > DLCInfo;
|
||||
static unordered_map<wstring, ULONGLONG > DLCInfo_SkinName; // skin name, full offer id
|
||||
#elif defined(_DURANGO)
|
||||
static unordered_map<PlayerUID,MOJANG_DATA *, PlayerUID::Hash > MojangData;
|
||||
static unordered_map<int, wstring > DLCTextures_PackID; // for mash-up packs & texture packs
|
||||
//static unordered_map<wstring,DLC_INFO * > DLCInfo_Trial; // full offerid, dlc_info
|
||||
static unordered_map<wstring,DLC_INFO * > DLCInfo_Full; // full offerid, dlc_info
|
||||
static unordered_map<wstring, wstring > DLCInfo_SkinName; // skin name, full offer id
|
||||
#else
|
||||
static unordered_map<PlayerUID,MOJANG_DATA * > MojangData;
|
||||
static unordered_map<int, ULONGLONG > DLCTextures_PackID; // for mash-up packs & texture packs
|
||||
static unordered_map<ULONGLONG,DLC_INFO * > DLCInfo_Trial; // full offerid, dlc_info
|
||||
static unordered_map<ULONGLONG,DLC_INFO * > DLCInfo_Full; // full offerid, dlc_info
|
||||
static unordered_map<wstring, ULONGLONG > DLCInfo_SkinName; // skin name, full offer id
|
||||
#endif
|
||||
// bool m_bRead_TMS_XUIDS_XML; // track whether we have already read the TMS xuids.xml file
|
||||
// bool m_bRead_TMS_DLCINFO_XML; // track whether we have already read the TMS DLC.xml file
|
||||
|
||||
bool m_bDefaultCapeInstallAttempted; // have we attempted to install the default cape from tms
|
||||
|
||||
//bool m_bwasHidingGui; // 4J Stu - Removed 1.8.2 bug fix (TU6) as not needed
|
||||
bool m_bDLCInstallProcessCompleted;
|
||||
bool m_bDLCInstallPending;
|
||||
int m_iTotalDLC;
|
||||
int m_iTotalDLCInstalled;
|
||||
|
||||
public:
|
||||
// 4J Stu - We need to be able to detect when a guest player signs in or out causing other guest players to change their xuid
|
||||
// The simplest way to do this is to check if their guest number has changed, so store the last known one here
|
||||
// 4J Stu - Now storing the whole XUSER_SIGNIN_INFO so we can detect xuid changes
|
||||
XUSER_SIGNIN_INFO m_currentSigninInfo[XUSER_MAX_COUNT];
|
||||
|
||||
//void OverrideFontRenderer(bool set, bool immediate = true);
|
||||
// void ToggleFontRenderer() { OverrideFontRenderer(!m_bFontRendererOverridden,false); }
|
||||
BANNEDLIST BannedListA[XUSER_MAX_COUNT];
|
||||
|
||||
private:
|
||||
// XUI_FontRenderer *m_fontRenderer;
|
||||
// bool m_bFontRendererOverridden;
|
||||
// bool m_bOverrideFontRenderer;
|
||||
|
||||
|
||||
bool m_bRead_BannedListA[XUSER_MAX_COUNT];
|
||||
char m_pszUniqueMapName[14];
|
||||
bool m_BanListCheck[XUSER_MAX_COUNT];
|
||||
|
||||
public:
|
||||
void SetBanListCheck(int iPad,bool bVal) {m_BanListCheck[iPad]=bVal;}
|
||||
bool GetBanListCheck(int iPad) { return m_BanListCheck[iPad];}
|
||||
// AUTOSAVE
|
||||
public:
|
||||
void SetAutosaveTimerTime(void);
|
||||
bool AutosaveDue(void);
|
||||
unsigned int SecondsToAutosave();
|
||||
private:
|
||||
unsigned int m_uiAutosaveTimer;
|
||||
unsigned int m_uiOpacityCountDown[XUSER_MAX_COUNT];
|
||||
|
||||
// DLC
|
||||
bool m_bNewDLCAvailable;
|
||||
bool m_bSeenNewDLCTip;
|
||||
|
||||
// Host options
|
||||
private:
|
||||
unsigned int m_uiGameHostSettings;
|
||||
static unsigned char m_szPNG[8];
|
||||
|
||||
#ifdef _LARGE_WORLDS
|
||||
unsigned int m_GameNewWorldSize;
|
||||
bool m_bGameNewWorldSizeUseMoat;
|
||||
unsigned int m_GameNewHellScale;
|
||||
#endif
|
||||
unsigned int FromBigEndian(unsigned int uiValue);
|
||||
|
||||
public:
|
||||
|
||||
|
||||
void SetGameHostOption(eGameHostOption eVal,unsigned int uiVal);
|
||||
void SetGameHostOption(unsigned int &uiHostSettings, eGameHostOption eVal,unsigned int uiVal);
|
||||
unsigned int GetGameHostOption(eGameHostOption eVal);
|
||||
unsigned int GetGameHostOption(unsigned int uiHostSettings, eGameHostOption eVal);
|
||||
|
||||
#ifdef _LARGE_WORLDS
|
||||
void SetGameNewWorldSize(unsigned int newSize, bool useMoat) { m_GameNewWorldSize = newSize; m_bGameNewWorldSizeUseMoat = useMoat; }
|
||||
unsigned int GetGameNewWorldSize() { return m_GameNewWorldSize; }
|
||||
unsigned int GetGameNewWorldSizeUseMoat() { return m_bGameNewWorldSizeUseMoat; }
|
||||
void SetGameNewHellScale(unsigned int newScale) { m_GameNewHellScale = newScale; }
|
||||
unsigned int GetGameNewHellScale() { return m_GameNewHellScale; }
|
||||
#endif
|
||||
void SetResetNether(bool bResetNether) {m_bResetNether=bResetNether;}
|
||||
bool GetResetNether() {return m_bResetNether;}
|
||||
bool CanRecordStatsAndAchievements();
|
||||
|
||||
// World seed from png image
|
||||
void GetImageTextData(PBYTE pbImageData, DWORD dwImageBytes,unsigned char *pszSeed,unsigned int &uiHostOptions,bool &bHostOptionsRead,DWORD &uiTexturePack);
|
||||
unsigned int CreateImageTextData(PBYTE bTextMetadata, __int64 seed, bool hasSeed, unsigned int uiHostOptions, unsigned int uiTexturePackId);
|
||||
|
||||
// Game rules
|
||||
GameRuleManager m_gameRules;
|
||||
|
||||
public:
|
||||
void processSchematics(LevelChunk *levelChunk);
|
||||
void processSchematicsLighting(LevelChunk *levelChunk);
|
||||
void loadDefaultGameRules();
|
||||
vector<LevelGenerationOptions *> *getLevelGenerators() { return m_gameRules.getLevelGenerators(); }
|
||||
void setLevelGenerationOptions(LevelGenerationOptions *levelGen);
|
||||
LevelRuleset *getGameRuleDefinitions() { return m_gameRules.getGameRuleDefinitions(); }
|
||||
LevelGenerationOptions *getLevelGenerationOptions() { return m_gameRules.getLevelGenerationOptions(); }
|
||||
LPCWSTR GetGameRulesString(const wstring &key);
|
||||
|
||||
private:
|
||||
BYTE m_playerColours[MINECRAFT_NET_MAX_PLAYERS]; // An array of QNet small-id's
|
||||
unsigned int m_playerGamePrivileges[MINECRAFT_NET_MAX_PLAYERS];
|
||||
|
||||
public:
|
||||
void UpdatePlayerInfo(BYTE networkSmallId, SHORT playerColourIndex, unsigned int playerGamePrivileges);
|
||||
short GetPlayerColour(BYTE networkSmallId);
|
||||
unsigned int GetPlayerPrivileges(BYTE networkSmallId);
|
||||
|
||||
wstring getEntityName(eINSTANCEOF type);
|
||||
|
||||
|
||||
|
||||
unsigned int AddDLCRequest(eDLCMarketplaceType eContentType, bool bPromote=false);
|
||||
bool RetrieveNextDLCContent();
|
||||
bool CheckTMSDLCCanStop();
|
||||
static int DLCOffersReturned(void *pParam, int iOfferC, DWORD dwType, int iPad);
|
||||
DWORD GetDLCContentType(eDLCContentType eType) { return m_dwContentTypeA[eType];}
|
||||
eDLCContentType Find_eDLCContentType(DWORD dwType);
|
||||
int GetDLCOffersCount() { return m_iDLCOfferC;}
|
||||
bool DLCContentRetrieved(eDLCMarketplaceType eType);
|
||||
void TickDLCOffersRetrieved();
|
||||
void ClearAndResetDLCDownloadQueue();
|
||||
bool RetrieveNextTMSPPContent();
|
||||
void TickTMSPPFilesRetrieved();
|
||||
void ClearTMSPPFilesRetrieved();
|
||||
unsigned int AddTMSPPFileTypeRequest(eDLCContentType eType, bool bPromote=false);
|
||||
int GetDLCInfoTexturesOffersCount();
|
||||
#if defined( __PS3__) || defined(__ORBIS__) || defined(__PSVITA__)
|
||||
DLC_INFO *GetDLCInfo(int iIndex);
|
||||
DLC_INFO *GetDLCInfo(char *);
|
||||
DLC_INFO *GetDLCInfoFromTPackID(int iTPID);
|
||||
bool GetDLCNameForPackID(const int iPackID,char **ppchKeyID);
|
||||
char * GetDLCInfoTextures(int iIndex);
|
||||
int GetDLCInfoCount();
|
||||
#else
|
||||
|
||||
#ifdef _XBOX_ONE
|
||||
static int TMSPPFileReturned(LPVOID pParam,int iPad,int iUserData,LPVOID, WCHAR *wchFilename);
|
||||
unordered_map<wstring,DLC_INFO * > *GetDLCInfo();
|
||||
#else
|
||||
static int TMSPPFileReturned(LPVOID pParam,int iPad,int iUserData,C4JStorage::PTMSPP_FILEDATA pFileData, LPCSTR szFilename);
|
||||
#endif
|
||||
DLC_INFO *GetDLCInfoTrialOffer(int iIndex);
|
||||
DLC_INFO *GetDLCInfoFullOffer(int iIndex);
|
||||
|
||||
int GetDLCInfoTrialOffersCount();
|
||||
int GetDLCInfoFullOffersCount();
|
||||
#ifdef _XBOX_ONE
|
||||
bool GetDLCFullOfferIDForPackID(const int iPackID,wstring &wsProductId);
|
||||
wstring GetDLCInfoTexturesFullOffer(int iIndex);
|
||||
|
||||
#else
|
||||
bool GetDLCFullOfferIDForPackID(const int iPackID,ULONGLONG *pullVal);
|
||||
ULONGLONG GetDLCInfoTexturesFullOffer(int iIndex);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void SetCorruptSaveDeleted(bool bVal) {m_bCorruptSaveDeleted=bVal;}
|
||||
bool GetCorruptSaveDeleted(void) {return m_bCorruptSaveDeleted;}
|
||||
|
||||
void EnterSaveNotificationSection();
|
||||
void LeaveSaveNotificationSection();
|
||||
private:
|
||||
CRITICAL_SECTION m_saveNotificationCriticalSection;
|
||||
int m_saveNotificationDepth;
|
||||
// Download Status
|
||||
|
||||
//Request current_download;
|
||||
vector<DLCRequest *> m_DLCDownloadQueue;
|
||||
vector<TMSPPRequest *> m_TMSPPDownloadQueue;
|
||||
static DWORD m_dwContentTypeA[e_Marketplace_MAX];
|
||||
int m_iDLCOfferC;
|
||||
bool m_bAllDLCContentRetrieved;
|
||||
bool m_bAllTMSContentRetrieved;
|
||||
bool m_bTickTMSDLCFiles;
|
||||
CRITICAL_SECTION csDLCDownloadQueue;
|
||||
CRITICAL_SECTION csTMSPPDownloadQueue;
|
||||
CRITICAL_SECTION csAdditionalModelParts;
|
||||
CRITICAL_SECTION csAdditionalSkinBoxes;
|
||||
CRITICAL_SECTION csAnimOverrideBitmask;
|
||||
bool m_bCorruptSaveDeleted;
|
||||
|
||||
DWORD m_dwAdditionalModelParts[XUSER_MAX_COUNT];
|
||||
|
||||
BYTE *m_pBannedListFileBuffer;
|
||||
DWORD m_dwBannedListFileSize;
|
||||
|
||||
public:
|
||||
DWORD m_dwDLCFileSize;
|
||||
BYTE *m_pDLCFileBuffer;
|
||||
|
||||
// static int CallbackReadXuidsFileFromTMS(LPVOID lpParam, WCHAR *wchFilename, int iPad, bool bResult, int iAction);
|
||||
// static int CallbackDLCFileFromTMS(LPVOID lpParam, WCHAR *wchFilename, int iPad, bool bResult, int iAction);
|
||||
// static int CallbackBannedListFileFromTMS(LPVOID lpParam, WCHAR *wchFilename, int iPad, bool bResult, int iAction);
|
||||
|
||||
// Storing additional model parts per skin texture
|
||||
void SetAdditionalSkinBoxes(DWORD dwSkinID, SKIN_BOX *SkinBoxA, DWORD dwSkinBoxC);
|
||||
vector<ModelPart *> * SetAdditionalSkinBoxes(DWORD dwSkinID, vector<SKIN_BOX *> *pvSkinBoxA);
|
||||
vector<ModelPart *> *GetAdditionalModelParts(DWORD dwSkinID);
|
||||
vector<SKIN_BOX *> *GetAdditionalSkinBoxes(DWORD dwSkinID);
|
||||
void SetAnimOverrideBitmask(DWORD dwSkinID,unsigned int uiAnimOverrideBitmask);
|
||||
unsigned int GetAnimOverrideBitmask(DWORD dwSkinID);
|
||||
|
||||
static DWORD getSkinIdFromPath(const wstring &skin);
|
||||
static wstring getSkinPathFromId(DWORD skinId);
|
||||
|
||||
virtual int LoadLocalTMSFile(WCHAR *wchTMSFile)=0;
|
||||
virtual int LoadLocalTMSFile(WCHAR *wchTMSFile, eFileExtensionType eExt)=0;
|
||||
virtual void FreeLocalTMSFiles(eTMSFileType eType)=0;
|
||||
virtual int GetLocalTMSFileIndex(WCHAR *wchTMSFile,bool bFilenameIncludesExtension,eFileExtensionType eEXT)=0;
|
||||
|
||||
virtual bool GetTMSGlobalFileListRead() { return true;}
|
||||
virtual bool GetTMSDLCInfoRead() { return true;}
|
||||
virtual bool GetTMSXUIDsFileRead() { return true;}
|
||||
|
||||
bool GetBanListRead(int iPad) { return m_bRead_BannedListA[iPad];}
|
||||
void SetBanListRead(int iPad,bool bVal) { m_bRead_BannedListA[iPad]=bVal;}
|
||||
void ClearBanList(int iPad) { BannedListA[iPad].pBannedList=NULL;BannedListA[iPad].dwBytes=0;}
|
||||
|
||||
DWORD GetRequiredTexturePackID() {return m_dwRequiredTexturePackID;}
|
||||
void SetRequiredTexturePackID(DWORD dwID) {m_dwRequiredTexturePackID=dwID;}
|
||||
|
||||
virtual void GetFileFromTPD(eTPDFileType eType,PBYTE pbData,DWORD dwBytes,PBYTE *ppbData,DWORD *pdwBytes ) {*ppbData = NULL; *pdwBytes = 0;}
|
||||
|
||||
//XTITLE_DEPLOYMENT_TYPE getDeploymentType() { return m_titleDeploymentType; }
|
||||
|
||||
private:
|
||||
// vector of additional skin model parts, indexed by the skin texture id
|
||||
unordered_map<DWORD, vector<ModelPart *> *> m_AdditionalModelParts;
|
||||
unordered_map<DWORD, vector<SKIN_BOX *> *> m_AdditionalSkinBoxes;
|
||||
unordered_map<DWORD, unsigned int> m_AnimOverrides;
|
||||
|
||||
|
||||
bool m_bResetNether;
|
||||
DWORD m_dwRequiredTexturePackID;
|
||||
#ifdef _XBOX_ONE
|
||||
vector <PBYTE> m_vTMSPPData;
|
||||
#endif
|
||||
|
||||
#if ( defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__)
|
||||
C4JStorage::eOptionsCallback m_eOptionsStatusA[XUSER_MAX_COUNT];
|
||||
|
||||
#ifdef __ORBIS__
|
||||
int m_eOptionsBlocksRequiredA[XUSER_MAX_COUNT];
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
// 4J-PB - language and locale functions
|
||||
public:
|
||||
|
||||
void LocaleAndLanguageInit();
|
||||
void getLocale(vector<wstring> &vecWstrLocales);
|
||||
DWORD get_eMCLang(WCHAR *pwchLocale);
|
||||
DWORD get_xcLang(WCHAR *pwchLocale);
|
||||
|
||||
void SetTickTMSDLCFiles(bool bVal);
|
||||
|
||||
wstring getFilePath(DWORD packId, wstring filename, bool bAddDataFolder, wstring mountPoint = L"TPACK:");
|
||||
|
||||
private:
|
||||
unordered_map<int, wstring>m_localeA;
|
||||
unordered_map<wstring, int>m_eMCLangA;
|
||||
unordered_map<wstring, int>m_xcLangA;
|
||||
wstring getRootPath(DWORD packId, bool allowOverride, bool bAddDataFolder, wstring mountPoint);
|
||||
public:
|
||||
|
||||
#ifdef _XBOX
|
||||
// bool m_bTransferSavesToXboxOne;
|
||||
// unsigned int m_uiTransferSlotC;
|
||||
|
||||
#elif defined (__PS3__)
|
||||
|
||||
#elif defined _DURANGO
|
||||
|
||||
#elif defined _WINDOWS64
|
||||
//CMinecraftAudio audio;
|
||||
#else // PS4
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef _XBOX_ONE
|
||||
public:
|
||||
void SetReachedMainMenu();
|
||||
bool HasReachedMainMenu();
|
||||
private:
|
||||
bool m_hasReachedMainMenu;
|
||||
#endif
|
||||
};
|
||||
|
||||
//singleton
|
||||
//extern CMinecraftApp app;
|
||||
@@ -0,0 +1,216 @@
|
||||
#include "stdafx.h"
|
||||
#include "DLCManager.h"
|
||||
#include "DLCAudioFile.h"
|
||||
#if defined _XBOX || defined _WINDOWS64
|
||||
#include "..\..\Xbox\XML\ATGXmlParser.h"
|
||||
#include "..\..\Xbox\XML\xmlFilesCallback.h"
|
||||
#endif
|
||||
|
||||
DLCAudioFile::DLCAudioFile(const wstring &path) : DLCFile(DLCManager::e_DLCType_Audio,path)
|
||||
{
|
||||
m_pbData = NULL;
|
||||
m_dwBytes = 0;
|
||||
}
|
||||
|
||||
void DLCAudioFile::addData(PBYTE pbData, DWORD dwBytes)
|
||||
{
|
||||
m_pbData = pbData;
|
||||
m_dwBytes = dwBytes;
|
||||
|
||||
processDLCDataFile(pbData,dwBytes);
|
||||
}
|
||||
|
||||
PBYTE DLCAudioFile::getData(DWORD &dwBytes)
|
||||
{
|
||||
dwBytes = m_dwBytes;
|
||||
return m_pbData;
|
||||
}
|
||||
|
||||
WCHAR *DLCAudioFile::wchTypeNamesA[]=
|
||||
{
|
||||
L"CUENAME",
|
||||
L"CREDIT",
|
||||
};
|
||||
|
||||
DLCAudioFile::EAudioParameterType DLCAudioFile::getParameterType(const wstring ¶mName)
|
||||
{
|
||||
EAudioParameterType type = e_AudioParamType_Invalid;
|
||||
|
||||
for(DWORD i = 0; i < e_AudioParamType_Max; ++i)
|
||||
{
|
||||
if(paramName.compare(wchTypeNamesA[i]) == 0)
|
||||
{
|
||||
type = (EAudioParameterType)i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return type;
|
||||
}
|
||||
|
||||
void DLCAudioFile::addParameter(EAudioType type, EAudioParameterType ptype, const wstring &value)
|
||||
{
|
||||
switch(ptype)
|
||||
{
|
||||
|
||||
case e_AudioParamType_Credit: // If this parameter exists, then mark this as free
|
||||
//add it to the DLC credits list
|
||||
|
||||
// we'll need to justify this text since we don't have a lot of room for lines of credits
|
||||
{
|
||||
// don't look for duplicate in the music credits
|
||||
|
||||
//if(app.AlreadySeenCreditText(value)) break;
|
||||
|
||||
int maximumChars = 55;
|
||||
|
||||
bool bIsSDMode=!RenderManager.IsHiDef() && !RenderManager.IsWidescreen();
|
||||
|
||||
if(bIsSDMode)
|
||||
{
|
||||
maximumChars = 45;
|
||||
}
|
||||
|
||||
switch(XGetLanguage())
|
||||
{
|
||||
case XC_LANGUAGE_JAPANESE:
|
||||
case XC_LANGUAGE_TCHINESE:
|
||||
case XC_LANGUAGE_KOREAN:
|
||||
maximumChars = 35;
|
||||
break;
|
||||
}
|
||||
wstring creditValue = value;
|
||||
while (creditValue.length() > maximumChars)
|
||||
{
|
||||
unsigned int i = 1;
|
||||
while (i < creditValue.length() && (i + 1) <= maximumChars)
|
||||
{
|
||||
i++;
|
||||
}
|
||||
int iLast=(int)creditValue.find_last_of(L" ",i);
|
||||
switch(XGetLanguage())
|
||||
{
|
||||
case XC_LANGUAGE_JAPANESE:
|
||||
case XC_LANGUAGE_TCHINESE:
|
||||
case XC_LANGUAGE_KOREAN:
|
||||
iLast = maximumChars;
|
||||
break;
|
||||
default:
|
||||
iLast=(int)creditValue.find_last_of(L" ",i);
|
||||
break;
|
||||
}
|
||||
|
||||
// if a space was found, include the space on this line
|
||||
if(iLast!=i)
|
||||
{
|
||||
iLast++;
|
||||
}
|
||||
|
||||
app.AddCreditText((creditValue.substr(0, iLast)).c_str());
|
||||
creditValue = creditValue.substr(iLast);
|
||||
}
|
||||
app.AddCreditText(creditValue.c_str());
|
||||
|
||||
}
|
||||
break;
|
||||
case e_AudioParamType_Cuename:
|
||||
m_parameters[type].push_back(value);
|
||||
//m_parameters[(int)type] = value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool DLCAudioFile::processDLCDataFile(PBYTE pbData, DWORD dwLength)
|
||||
{
|
||||
unordered_map<int, EAudioParameterType> parameterMapping;
|
||||
unsigned int uiCurrentByte=0;
|
||||
|
||||
// File format defined in the AudioPacker
|
||||
// File format: Version 1
|
||||
|
||||
unsigned int uiVersion=*(unsigned int *)pbData;
|
||||
uiCurrentByte+=sizeof(int);
|
||||
|
||||
if(uiVersion < CURRENT_AUDIO_VERSION_NUM)
|
||||
{
|
||||
if(pbData!=NULL) delete [] pbData;
|
||||
app.DebugPrintf("DLC version of %d is too old to be read\n", uiVersion);
|
||||
return false;
|
||||
}
|
||||
|
||||
unsigned int uiParameterTypeCount=*(unsigned int *)&pbData[uiCurrentByte];
|
||||
uiCurrentByte+=sizeof(int);
|
||||
C4JStorage::DLC_FILE_PARAM *pParams = (C4JStorage::DLC_FILE_PARAM *)&pbData[uiCurrentByte];
|
||||
|
||||
for(unsigned int i=0;i<uiParameterTypeCount;i++)
|
||||
{
|
||||
// Map DLC strings to application strings, then store the DLC index mapping to application index
|
||||
wstring parameterName((WCHAR *)pParams->wchData);
|
||||
EAudioParameterType type = getParameterType(parameterName);
|
||||
if( type != e_AudioParamType_Invalid )
|
||||
{
|
||||
parameterMapping[pParams->dwType] = type;
|
||||
}
|
||||
uiCurrentByte+= sizeof(C4JStorage::DLC_FILE_PARAM)+(pParams->dwWchCount*sizeof(WCHAR));
|
||||
pParams = (C4JStorage::DLC_FILE_PARAM *)&pbData[uiCurrentByte];
|
||||
}
|
||||
unsigned int uiFileCount=*(unsigned int *)&pbData[uiCurrentByte];
|
||||
uiCurrentByte+=sizeof(int);
|
||||
C4JStorage::DLC_FILE_DETAILS *pFile = (C4JStorage::DLC_FILE_DETAILS *)&pbData[uiCurrentByte];
|
||||
|
||||
DWORD dwTemp=uiCurrentByte;
|
||||
for(unsigned int i=0;i<uiFileCount;i++)
|
||||
{
|
||||
dwTemp+=sizeof(C4JStorage::DLC_FILE_DETAILS)+pFile->dwWchCount*sizeof(WCHAR);
|
||||
pFile = (C4JStorage::DLC_FILE_DETAILS *)&pbData[dwTemp];
|
||||
}
|
||||
PBYTE pbTemp=((PBYTE )pFile);
|
||||
pFile = (C4JStorage::DLC_FILE_DETAILS *)&pbData[uiCurrentByte];
|
||||
|
||||
for(unsigned int i=0;i<uiFileCount;i++)
|
||||
{
|
||||
EAudioType type = (EAudioType)pFile->dwType;
|
||||
// Params
|
||||
unsigned int uiParameterCount=*(unsigned int *)pbTemp;
|
||||
pbTemp+=sizeof(int);
|
||||
pParams = (C4JStorage::DLC_FILE_PARAM *)pbTemp;
|
||||
for(unsigned int j=0;j<uiParameterCount;j++)
|
||||
{
|
||||
//EAudioParameterType paramType = e_AudioParamType_Invalid;
|
||||
|
||||
AUTO_VAR(it, parameterMapping.find( pParams->dwType ));
|
||||
|
||||
if(it != parameterMapping.end() )
|
||||
{
|
||||
addParameter(type,(EAudioParameterType)pParams->dwType,(WCHAR *)pParams->wchData);
|
||||
}
|
||||
pbTemp+=sizeof(C4JStorage::DLC_FILE_PARAM)+(sizeof(WCHAR)*pParams->dwWchCount);
|
||||
pParams = (C4JStorage::DLC_FILE_PARAM *)pbTemp;
|
||||
}
|
||||
// Move the pointer to the start of the next files data;
|
||||
pbTemp+=pFile->uiFileSize;
|
||||
uiCurrentByte+=sizeof(C4JStorage::DLC_FILE_DETAILS)+pFile->dwWchCount*sizeof(WCHAR);
|
||||
|
||||
pFile=(C4JStorage::DLC_FILE_DETAILS *)&pbData[uiCurrentByte];
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int DLCAudioFile::GetCountofType(DLCAudioFile::EAudioType eType)
|
||||
{
|
||||
return m_parameters[eType].size();
|
||||
}
|
||||
|
||||
|
||||
wstring &DLCAudioFile::GetSoundName(int iIndex)
|
||||
{
|
||||
int iWorldType=e_AudioType_Overworld;
|
||||
while(iIndex>=m_parameters[iWorldType].size())
|
||||
{
|
||||
iIndex-=m_parameters[iWorldType].size();
|
||||
iWorldType++;
|
||||
}
|
||||
return m_parameters[iWorldType].at(iIndex);
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
#pragma once
|
||||
#include "DLCFile.h"
|
||||
|
||||
class DLCAudioFile : public DLCFile
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
// If you add to the Enum,then you need to add the array of type names
|
||||
// These are the names used in the XML for the parameters
|
||||
enum EAudioType
|
||||
{
|
||||
e_AudioType_Invalid = -1,
|
||||
|
||||
e_AudioType_Overworld = 0,
|
||||
e_AudioType_Nether,
|
||||
e_AudioType_End,
|
||||
|
||||
e_AudioType_Max,
|
||||
};
|
||||
enum EAudioParameterType
|
||||
{
|
||||
e_AudioParamType_Invalid = -1,
|
||||
|
||||
e_AudioParamType_Cuename = 0,
|
||||
e_AudioParamType_Credit,
|
||||
|
||||
e_AudioParamType_Max,
|
||||
|
||||
};
|
||||
static WCHAR *wchTypeNamesA[e_AudioParamType_Max];
|
||||
|
||||
DLCAudioFile(const wstring &path);
|
||||
|
||||
virtual void addData(PBYTE pbData, DWORD dwBytes);
|
||||
virtual PBYTE getData(DWORD &dwBytes);
|
||||
|
||||
bool processDLCDataFile(PBYTE pbData, DWORD dwLength);
|
||||
int GetCountofType(DLCAudioFile::EAudioType ptype);
|
||||
wstring &GetSoundName(int iIndex);
|
||||
|
||||
private:
|
||||
using DLCFile::addParameter;
|
||||
|
||||
PBYTE m_pbData;
|
||||
DWORD m_dwBytes;
|
||||
static const int CURRENT_AUDIO_VERSION_NUM=1;
|
||||
//unordered_map<int, wstring> m_parameters;
|
||||
vector<wstring> m_parameters[e_AudioType_Max];
|
||||
|
||||
// use the EAudioType to order these
|
||||
void addParameter(DLCAudioFile::EAudioType type, DLCAudioFile::EAudioParameterType ptype, const wstring &value);
|
||||
DLCAudioFile::EAudioParameterType getParameterType(const wstring ¶mName);
|
||||
};
|
||||
@@ -0,0 +1,12 @@
|
||||
#include "stdafx.h"
|
||||
#include "DLCManager.h"
|
||||
#include "DLCCapeFile.h"
|
||||
|
||||
DLCCapeFile::DLCCapeFile(const wstring &path) : DLCFile(DLCManager::e_DLCType_Cape,path)
|
||||
{
|
||||
}
|
||||
|
||||
void DLCCapeFile::addData(PBYTE pbData, DWORD dwBytes)
|
||||
{
|
||||
app.AddMemoryTextureFile(m_path,pbData,dwBytes);
|
||||
}
|
||||
Loaded 100 of 18807 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user