mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-07-23 21:37:14 +00:00
nuke old Miles SoundEngine, more ifdef removal
This commit is contained in:
parent
8f04e231bd
commit
daf56bc296
File diff suppressed because it is too large
Load diff
|
|
@ -142,9 +142,7 @@ private:
|
||||||
float getMasterMusicVolume();
|
float getMasterMusicVolume();
|
||||||
// platform specific functions
|
// platform specific functions
|
||||||
int initAudioHardware(int iMinSpeakers) { return iMinSpeakers; }
|
int initAudioHardware(int iMinSpeakers) { return iMinSpeakers; }
|
||||||
#if defined(__linux__)
|
|
||||||
void updateMiniAudio();
|
void updateMiniAudio();
|
||||||
#endif
|
|
||||||
|
|
||||||
int GetRandomishTrack(int iStart, int iEnd);
|
int GetRandomishTrack(int iStart, int iEnd);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -640,7 +640,7 @@ void GameRuleManager::processSchematicsLighting(LevelChunk* levelChunk) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameRuleManager::loadDefaultGameRules() {
|
void GameRuleManager::loadDefaultGameRules() {
|
||||||
#if !defined(__linux__)
|
#if 0
|
||||||
#if defined(_WINDOWS64)
|
#if defined(_WINDOWS64)
|
||||||
File packedTutorialFile("Windows64Media\\Tutorial\\Tutorial.pck");
|
File packedTutorialFile("Windows64Media\\Tutorial\\Tutorial.pck");
|
||||||
if (!packedTutorialFile.exists())
|
if (!packedTutorialFile.exists())
|
||||||
|
|
@ -656,6 +656,8 @@ void GameRuleManager::loadDefaultGameRules() {
|
||||||
app.GetString(IDS_TUTORIALSAVENAME));
|
app.GetString(IDS_TUTORIALSAVENAME));
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
// 4jcraft: brought over from TU18 so the tutorial world loads from assets
|
||||||
|
// TODO clean this up
|
||||||
std::string fpTutorial = "Tutorial.pck";
|
std::string fpTutorial = "Tutorial.pck";
|
||||||
if (app.getArchiveFileSize(fpTutorial) >= 0) {
|
if (app.getArchiveFileSize(fpTutorial) >= 0) {
|
||||||
DLCPack* pack = new DLCPack("", 0xffffffff);
|
DLCPack* pack = new DLCPack("", 0xffffffff);
|
||||||
|
|
|
||||||
|
|
@ -471,9 +471,7 @@ File Minecraft::getWorkingDirectory(const std::string& applicationName) {
|
||||||
// 4jcraft: ported to C++
|
// 4jcraft: ported to C++
|
||||||
std::string userHome = getenv("HOME");
|
std::string userHome = getenv("HOME");
|
||||||
File* workingDirectory;
|
File* workingDirectory;
|
||||||
#if defined(__linux__)
|
#if defined(_WINDOWS64)
|
||||||
workingDirectory = new File(userHome, '.' + applicationName + '/');
|
|
||||||
#elif defined(_WINDOWS64)
|
|
||||||
std::string applicationData = getenv("APPDATA");
|
std::string applicationData = getenv("APPDATA");
|
||||||
if (!applicationData.empty()) {
|
if (!applicationData.empty()) {
|
||||||
workingDirectory =
|
workingDirectory =
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#ifdef __linux__
|
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/glu.h>
|
#include <GL/glu.h>
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
#include "java/File.h"
|
||||||
#include "renderer/gl/gl_compat.h"
|
#include "renderer/gl/gl_compat.h"
|
||||||
|
|
||||||
#undef GL_SMOOTH
|
#undef GL_SMOOTH
|
||||||
|
|
@ -42,125 +42,6 @@ void glEndQueryARB(int);
|
||||||
void glGetQueryObjectuARB(int, int, IntBuffer*);
|
void glGetQueryObjectuARB(int, int, IntBuffer*);
|
||||||
void glReadPixels(int, int, int, int, int, int, ByteBuffer*);
|
void glReadPixels(int, int, int, int, int, int, ByteBuffer*);
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
const int GL_BYTE = 0;
|
|
||||||
const int GL_FLOAT = 0;
|
|
||||||
const int GL_UNSIGNED_BYTE = 0;
|
|
||||||
|
|
||||||
const int GL_COLOR_ARRAY = 0;
|
|
||||||
const int GL_VERTEX_ARRAY = 0;
|
|
||||||
const int GL_NORMAL_ARRAY = 0;
|
|
||||||
const int GL_TEXTURE_COORD_ARRAY = 0;
|
|
||||||
|
|
||||||
const int GL_COMPILE = 0x1300;
|
|
||||||
|
|
||||||
const int GL_NORMALIZE = 0;
|
|
||||||
|
|
||||||
const int GL_RESCALE_NORMAL = 0;
|
|
||||||
|
|
||||||
const int GL_SMOOTH = 0;
|
|
||||||
const int GL_FLAT = 0;
|
|
||||||
|
|
||||||
const int GL_RGBA = 0;
|
|
||||||
const int GL_BGRA = 1;
|
|
||||||
const int GL_BGR = 0;
|
|
||||||
|
|
||||||
const int GL_SAMPLES_PASSED_ARB = 0;
|
|
||||||
const int GL_QUERY_RESULT_AVAILABLE_ARB = 0;
|
|
||||||
const int GL_QUERY_RESULT_ARB = 0;
|
|
||||||
|
|
||||||
const int GL_POLYGON_OFFSET_FILL = 0;
|
|
||||||
|
|
||||||
const int GL_FRONT = 0;
|
|
||||||
const int GL_BACK = 1;
|
|
||||||
const int GL_FRONT_AND_BACK = 2;
|
|
||||||
|
|
||||||
const int GL_COLOR_MATERIAL = 0;
|
|
||||||
|
|
||||||
const int GL_AMBIENT_AND_DIFFUSE = 0;
|
|
||||||
|
|
||||||
const int GL_TEXTURE1 = 0;
|
|
||||||
const int GL_TEXTURE0 = 1;
|
|
||||||
|
|
||||||
void glFlush();
|
|
||||||
void glTexGeni(int, int, int);
|
|
||||||
void glTexGen(int, int, FloatBuffer*);
|
|
||||||
void glReadPixels(int, int, int, int, int, int, ByteBuffer*);
|
|
||||||
void glClearDepth(double);
|
|
||||||
void glCullFace(int);
|
|
||||||
void glDeleteLists(int, int);
|
|
||||||
void glGenTextures(IntBuffer*);
|
|
||||||
int glGenTextures();
|
|
||||||
int glGenLists(int);
|
|
||||||
void glLight(int, int, FloatBuffer*);
|
|
||||||
void glLightModel(int, FloatBuffer*);
|
|
||||||
void glGetFloat(int a, FloatBuffer* b);
|
|
||||||
void glTexCoordPointer(int, int, int, int);
|
|
||||||
void glTexCoordPointer(int, int, FloatBuffer*);
|
|
||||||
void glNormalPointer(int, int, int);
|
|
||||||
void glNormalPointer(int, ByteBuffer*);
|
|
||||||
void glEnableClientState(int);
|
|
||||||
void glDisableClientState(int);
|
|
||||||
void glColorPointer(int, bool, int, ByteBuffer*);
|
|
||||||
void glColorPointer(int, int, int, int);
|
|
||||||
void glVertexPointer(int, int, int, int);
|
|
||||||
void glVertexPointer(int, int, FloatBuffer*);
|
|
||||||
void glDrawArrays(int, int, int);
|
|
||||||
void glTranslatef(float, float, float);
|
|
||||||
void glRotatef(float, float, float, float);
|
|
||||||
void glNewList(int, int);
|
|
||||||
void glEndList(int vertexCount = 0);
|
|
||||||
void glCallList(int);
|
|
||||||
void glPopMatrix();
|
|
||||||
void glPushMatrix();
|
|
||||||
void glColor3f(float, float, float);
|
|
||||||
void glScalef(float, float, float);
|
|
||||||
void glMultMatrixf(float*);
|
|
||||||
void glColor4f(float, float, float, float);
|
|
||||||
void glDisable(int);
|
|
||||||
void glEnable(int);
|
|
||||||
void glBlendFunc(int, int);
|
|
||||||
void glDepthMask(bool);
|
|
||||||
void glNormal3f(float, float, float);
|
|
||||||
void glDepthFunc(int);
|
|
||||||
void glMatrixMode(int);
|
|
||||||
void glLoadIdentity();
|
|
||||||
void glBindTexture(int, int);
|
|
||||||
void glTexParameteri(int, int, int);
|
|
||||||
void glTexImage2D(int, int, int, int, int, int, int, int, ByteBuffer*);
|
|
||||||
void glDeleteTextures(IntBuffer*);
|
|
||||||
void glDeleteTextures(int);
|
|
||||||
void glCallLists(IntBuffer*);
|
|
||||||
void glGenQueriesARB(IntBuffer*);
|
|
||||||
void glColorMask(bool, bool, bool, bool);
|
|
||||||
void glBeginQueryARB(int, int);
|
|
||||||
void glEndQueryARB(int);
|
|
||||||
void glGetQueryObjectuARB(int, int, IntBuffer*);
|
|
||||||
void glShadeModel(int);
|
|
||||||
void glPolygonOffset(float, float);
|
|
||||||
void glLineWidth(float);
|
|
||||||
void glScaled(double, double, double);
|
|
||||||
void gluPerspective(float, float, float, float);
|
|
||||||
void glClear(int);
|
|
||||||
void glViewport(int, int, int, int);
|
|
||||||
void glAlphaFunc(int, float);
|
|
||||||
void glOrtho(float, float, float, float, float, float);
|
|
||||||
void glClearColor(float, float, float, float);
|
|
||||||
void glFogi(int, int);
|
|
||||||
void glFogf(int, float);
|
|
||||||
void glFog(int, FloatBuffer*);
|
|
||||||
void glColorMaterial(int, int);
|
|
||||||
void glMultiTexCoord2f(int, float, float);
|
|
||||||
|
|
||||||
void glClientActiveTexture(int);
|
|
||||||
void glActiveTexture(int);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __linux__
|
|
||||||
#include "java/File.h"
|
|
||||||
|
|
||||||
class GL11 {
|
class GL11 {
|
||||||
public:
|
public:
|
||||||
static const int GL_SMOOTH = 0x1D01;
|
static const int GL_SMOOTH = 0x1D01;
|
||||||
|
|
@ -179,23 +60,6 @@ public:
|
||||||
static void glBufferDataARB(int, ByteBuffer*, int) {}
|
static void glBufferDataARB(int, ByteBuffer*, int) {}
|
||||||
static void glGenBuffersARB(IntBuffer*) {}
|
static void glGenBuffersARB(IntBuffer*) {}
|
||||||
};
|
};
|
||||||
#else
|
|
||||||
class GL11 {
|
|
||||||
public:
|
|
||||||
static const int GL_SMOOTH = 0;
|
|
||||||
static const int GL_FLAT = 0;
|
|
||||||
static void glShadeModel(int) {};
|
|
||||||
};
|
|
||||||
|
|
||||||
class ARBVertexBufferObject {
|
|
||||||
public:
|
|
||||||
static const int GL_ARRAY_BUFFER_ARB = 0;
|
|
||||||
static const int GL_STREAM_DRAW_ARB = 0;
|
|
||||||
static void glBindBufferARB(int, int) {}
|
|
||||||
static void glBufferDataARB(int, ByteBuffer*, int) {}
|
|
||||||
static void glGenBuffersARB(IntBuffer*) {}
|
|
||||||
};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class Level;
|
class Level;
|
||||||
class Player;
|
class Player;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue