mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-14 18:15:28 -04:00
Some options shouldn't apply in classic mode
This commit is contained in:
parent
b2cb63a6e9
commit
1f8a3dbe96
17
src/Game.c
17
src/Game.c
@ -331,23 +331,24 @@ static void Game_WarnFunc(const cc_string* msg) {
|
||||
}
|
||||
|
||||
static void LoadOptions(void) {
|
||||
Game_ClassicMode = Options_GetBool(OPT_CLASSIC_MODE, false);
|
||||
Game_ClassicHacks = Options_GetBool(OPT_CLASSIC_HACKS, false);
|
||||
Game_AllowCustomBlocks = Options_GetBool(OPT_CUSTOM_BLOCKS, true);
|
||||
Game_SimpleArmsAnim = Options_GetBool(OPT_SIMPLE_ARMS_ANIM, false);
|
||||
Game_ViewBobbing = Options_GetBool(OPT_VIEW_BOBBING, true);
|
||||
Game_ClassicMode = Options_GetBool(OPT_CLASSIC_MODE, false);
|
||||
Game_ClassicHacks = Options_GetBool(OPT_CLASSIC_HACKS, false);
|
||||
Game_Anaglyph3D = Options_GetBool(OPT_ANAGLYPH3D, false);
|
||||
Game_ViewBobbing = Options_GetBool(OPT_VIEW_BOBBING, true);
|
||||
|
||||
Game_AllowCustomBlocks = !Game_ClassicMode && Options_GetBool(OPT_CUSTOM_BLOCKS, true);
|
||||
Game_SimpleArmsAnim = !Game_ClassicMode && Options_GetBool(OPT_SIMPLE_ARMS_ANIM, false);
|
||||
Game_BreakableLiquids = !Game_ClassicMode && Options_GetBool(OPT_MODIFIABLE_LIQUIDS, false);
|
||||
Game_AllowServerTextures = !Game_ClassicMode && Options_GetBool(OPT_SERVER_TEXTURES, true);
|
||||
|
||||
Game_ViewDistance = Options_GetInt(OPT_VIEW_DISTANCE, 8, 4096, DEFAULT_VIEWDIST);
|
||||
Game_UserViewDistance = Game_ViewDistance;
|
||||
Game_BreakableLiquids = !Game_ClassicMode && Options_GetBool(OPT_MODIFIABLE_LIQUIDS, false);
|
||||
Game_AllowServerTextures = Options_GetBool(OPT_SERVER_TEXTURES, true);
|
||||
/* TODO: Do we need to support option to skip SSL */
|
||||
/*cc_bool skipSsl = Options_GetBool("skip-ssl-check", false);
|
||||
if (skipSsl) {
|
||||
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
|
||||
Options.Set("skip-ssl-check", false);
|
||||
}*/
|
||||
Game_Anaglyph3D = Options_GetBool(OPT_ANAGLYPH3D, false);
|
||||
}
|
||||
|
||||
#ifdef CC_BUILD_PLUGINS
|
||||
|
@ -414,10 +414,6 @@ void Gfx_UpdateTexture(GfxResourceID texId, int x, int y, struct Bitmap* part, i
|
||||
struct GPUTexture* tex = (struct GPUTexture*)texId;
|
||||
ToMortonTexture(&tex->texture, x, y, part, rowWidth);
|
||||
}
|
||||
|
||||
void Gfx_UpdateTexturePart(GfxResourceID texId, int x, int y, struct Bitmap* part, cc_bool mipmaps) {
|
||||
Gfx_UpdateTexture(texId, x, y, part, part->width, mipmaps);
|
||||
}
|
||||
void Gfx_DeleteTexture(GfxResourceID* texId) {
|
||||
GPUTexture_Unref(texId);
|
||||
}
|
||||
|
@ -270,10 +270,6 @@ void Gfx_UpdateTexture(GfxResourceID texId, int x, int y, struct Bitmap* part, i
|
||||
ID3D11Resource_Release(res);
|
||||
}
|
||||
|
||||
void Gfx_UpdateTexturePart(GfxResourceID texId, int x, int y, struct Bitmap* part, cc_bool mipmaps) {
|
||||
Gfx_UpdateTexture(texId, x, y, part, part->width, mipmaps);
|
||||
}
|
||||
|
||||
void Gfx_DeleteTexture(GfxResourceID* texId) {
|
||||
ID3D11ShaderResourceView* view = (ID3D11ShaderResourceView*)(*texId);
|
||||
ID3D11Resource* res = NULL;
|
||||
|
@ -373,10 +373,6 @@ void Gfx_UpdateTexture(GfxResourceID texId, int x, int y, struct Bitmap* part, i
|
||||
if (mipmaps) D3D9_DoMipmaps(texture, x, y, part, rowWidth, true);
|
||||
}
|
||||
|
||||
void Gfx_UpdateTexturePart(GfxResourceID texId, int x, int y, struct Bitmap* part, cc_bool mipmaps) {
|
||||
Gfx_UpdateTexture(texId, x, y, part, part->width, mipmaps);
|
||||
}
|
||||
|
||||
void Gfx_BindTexture(GfxResourceID texId) {
|
||||
cc_result res = IDirect3DDevice9_SetTexture(device, 0, (IDirect3DBaseTexture9*)texId);
|
||||
if (res) Logger_Abort2(res, "D3D9_BindTexture");
|
||||
|
@ -324,10 +324,6 @@ void Gfx_UpdateTexture(GfxResourceID texId, int x, int y, struct Bitmap* part, i
|
||||
// TODO: Do we need to flush VRAM?
|
||||
}
|
||||
|
||||
void Gfx_UpdateTexturePart(GfxResourceID texId, int x, int y, struct Bitmap* part, cc_bool mipmaps) {
|
||||
Gfx_UpdateTexture(texId, x, y, part, part->width, mipmaps);
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*-----------------------------------------------------State management----------------------------------------------------*
|
||||
|
@ -161,10 +161,6 @@ void Gfx_UpdateTexture(GfxResourceID texId, int x, int y, struct Bitmap* part, i
|
||||
GX_InvalidateTexAll();
|
||||
}
|
||||
|
||||
void Gfx_UpdateTexturePart(GfxResourceID texId, int x, int y, struct Bitmap* part, cc_bool mipmaps) {
|
||||
Gfx_UpdateTexture(texId, x, y, part, part->width, mipmaps);
|
||||
}
|
||||
|
||||
void Gfx_DeleteTexture(GfxResourceID* texId) {
|
||||
GfxResourceID data = *texId;
|
||||
if (data) Mem_Free(data);
|
||||
|
@ -222,10 +222,6 @@ void Gfx_UpdateTexture(GfxResourceID texId, int x, int y, struct Bitmap* part, i
|
||||
glSurfaceTexImageN64(GL_TEXTURE_2D, 0, fb, ¶ms);
|
||||
}
|
||||
|
||||
void Gfx_UpdateTexturePart(GfxResourceID texId, int x, int y, struct Bitmap* part, cc_bool mipmaps) {
|
||||
Gfx_UpdateTexture(texId, x, y, part, part->width, mipmaps);
|
||||
}
|
||||
|
||||
void Gfx_DeleteTexture(GfxResourceID* texId) {
|
||||
CCTexture* tex = (CCTexture*)(*texId);
|
||||
if (!tex) return;
|
||||
|
@ -154,10 +154,6 @@ void Gfx_UpdateTexture(GfxResourceID texId, int x, int y, struct Bitmap* part, i
|
||||
}
|
||||
}
|
||||
|
||||
void Gfx_UpdateTexturePart(GfxResourceID texId, int x, int y, struct Bitmap* part, cc_bool mipmaps) {
|
||||
Gfx_UpdateTexture(texId, x, y, part, part->width, mipmaps);
|
||||
}
|
||||
|
||||
void Gfx_DeleteTexture(GfxResourceID* texId) {
|
||||
int texture = (int)(*texId);
|
||||
if (texture) glDeleteTextures(1, &texture);
|
||||
|
@ -271,10 +271,6 @@ void Gfx_UpdateTexture(GfxResourceID texId, int x, int y, struct Bitmap* part, i
|
||||
// TODO
|
||||
}
|
||||
|
||||
void Gfx_UpdateTexturePart(GfxResourceID texId, int x, int y, struct Bitmap* part, cc_bool mipmaps) {
|
||||
Gfx_UpdateTexture(texId, x, y, part, part->width, mipmaps);
|
||||
}
|
||||
|
||||
void Gfx_EnableMipmaps(void) { }
|
||||
void Gfx_DisableMipmaps(void) { }
|
||||
|
||||
|
@ -235,10 +235,6 @@ void Gfx_UpdateTexture(GfxResourceID texId, int x, int y, struct Bitmap* part, i
|
||||
// TODO
|
||||
}
|
||||
|
||||
void Gfx_UpdateTexturePart(GfxResourceID texId, int x, int y, struct Bitmap* part, cc_bool mipmaps) {
|
||||
// TODO
|
||||
}
|
||||
|
||||
void Gfx_EnableMipmaps(void) { }
|
||||
void Gfx_DisableMipmaps(void) { }
|
||||
|
||||
|
@ -625,10 +625,6 @@ void Gfx_UpdateTexture(GfxResourceID texId, int x, int y, struct Bitmap* part, i
|
||||
/* TODO */
|
||||
}
|
||||
|
||||
void Gfx_UpdateTexturePart(GfxResourceID texId, int x, int y, struct Bitmap* part, cc_bool mipmaps) {
|
||||
Gfx_UpdateTexture(texId, x, y, part, part->width, mipmaps);
|
||||
}
|
||||
|
||||
void Gfx_EnableMipmaps(void) { }
|
||||
void Gfx_DisableMipmaps(void) { }
|
||||
|
||||
|
@ -140,10 +140,6 @@ void Gfx_UpdateTexture(GfxResourceID texId, int x, int y, struct Bitmap* part, i
|
||||
}
|
||||
}*/
|
||||
|
||||
void Gfx_UpdateTexturePart(GfxResourceID texId, int x, int y, struct Bitmap* part, cc_bool mipmaps) {
|
||||
Gfx_UpdateTexture(texId, x, y, part, part->width, mipmaps);
|
||||
}
|
||||
|
||||
void Gfx_DeleteTexture(GfxResourceID* texId) {
|
||||
GfxResourceID data = *texId;
|
||||
if (data) Mem_Free(data);
|
||||
|
@ -694,10 +694,6 @@ void Gfx_UpdateTexture(GfxResourceID texId, int x, int y, struct Bitmap* part, i
|
||||
//sceKernelDcacheWritebackInvalidateRange(dst, (tex->width * part->height) * 4);
|
||||
}
|
||||
|
||||
void Gfx_UpdateTexturePart(GfxResourceID texId, int x, int y, struct Bitmap* part, cc_bool mipmaps) {
|
||||
Gfx_UpdateTexture(texId, x, y, part, part->width, mipmaps);
|
||||
}
|
||||
|
||||
void Gfx_DeleteTexture(GfxResourceID* texId) {
|
||||
GPUTexture_Unref(texId);
|
||||
}
|
||||
|
@ -126,10 +126,6 @@ void Gfx_UpdateTexture(GfxResourceID texId, int x, int y, struct Bitmap* part, i
|
||||
// TODO
|
||||
}
|
||||
|
||||
void Gfx_UpdateTexturePart(GfxResourceID texId, int x, int y, struct Bitmap* part, cc_bool mipmaps) {
|
||||
Gfx_UpdateTexture(texId, x, y, part, part->width, mipmaps);
|
||||
}
|
||||
|
||||
void Gfx_EnableMipmaps(void) { }
|
||||
void Gfx_DisableMipmaps(void) { }
|
||||
|
||||
|
@ -99,10 +99,6 @@ void Gfx_UpdateTexture(GfxResourceID texId, int x, int y, struct Bitmap* part, i
|
||||
CopyTextureData(dst, tex->width * 4, part, rowWidth << 2);
|
||||
}
|
||||
|
||||
void Gfx_UpdateTexturePart(GfxResourceID texId, int x, int y, struct Bitmap* part, cc_bool mipmaps) {
|
||||
Gfx_UpdateTexture(texId, x, y, part, part->width, mipmaps);
|
||||
}
|
||||
|
||||
void Gfx_EnableMipmaps(void) { }
|
||||
void Gfx_DisableMipmaps(void) { }
|
||||
|
||||
|
@ -128,10 +128,6 @@ void Gfx_UpdateTexture(GfxResourceID texId, int x, int y, struct Bitmap* part, i
|
||||
GX2Invalidate(GX2_INVALIDATE_MODE_CPU_TEXTURE, tex->surface.image, tex->surface.imageSize);
|
||||
}
|
||||
|
||||
void Gfx_UpdateTexturePart(GfxResourceID texId, int x, int y, struct Bitmap* part, cc_bool mipmaps) {
|
||||
Gfx_UpdateTexture(texId, x, y, part, part->width, mipmaps);
|
||||
}
|
||||
|
||||
void Gfx_BindTexture(GfxResourceID texId) {
|
||||
if (!texId) texId = white_square;
|
||||
pendingTex = (GX2Texture*)texId;
|
||||
|
@ -231,10 +231,6 @@ void Gfx_UpdateTexture(GfxResourceID texId, int originX, int originY, struct Bit
|
||||
}
|
||||
}
|
||||
|
||||
void Gfx_UpdateTexturePart(GfxResourceID texId, int x, int y, struct Bitmap* part, cc_bool mipmaps) {
|
||||
Gfx_UpdateTexture(texId, x, y, part, part->width, mipmaps);
|
||||
}
|
||||
|
||||
void Gfx_DeleteTexture(GfxResourceID* texId) {
|
||||
CCTexture* tex = (CCTexture*)(*texId);
|
||||
if (!tex) return;
|
||||
|
@ -121,10 +121,6 @@ void Gfx_UpdateTexture(GfxResourceID texId, int x, int y, struct Bitmap* part, i
|
||||
SetTexturePartData(xtex, x, y, part, rowWidth, 0);
|
||||
}
|
||||
|
||||
void Gfx_UpdateTexturePart(GfxResourceID texId, int x, int y, struct Bitmap* part, cc_bool mipmaps) {
|
||||
Gfx_UpdateTexture(texId, x, y, part, part->width, mipmaps);
|
||||
}
|
||||
|
||||
void Gfx_BindTexture(GfxResourceID texId) {
|
||||
struct XenosSurface* xtex = (struct XenosSurface*)texId;
|
||||
Xe_SetTexture(xe, 0, xtex);
|
||||
|
@ -152,10 +152,6 @@ void Gfx_UpdateTexture(GfxResourceID texId, int x, int y, struct Bitmap* part, i
|
||||
if (mipmaps) Gfx_DoMipmaps(x, y, part, rowWidth, true);
|
||||
}
|
||||
|
||||
void Gfx_UpdateTexturePart(GfxResourceID texId, int x, int y, struct Bitmap* part, cc_bool mipmaps) {
|
||||
Gfx_UpdateTexture(texId, x, y, part, part->width, mipmaps);
|
||||
}
|
||||
|
||||
void Gfx_DeleteTexture(GfxResourceID* texId) {
|
||||
GLuint id = (GLuint)(*texId);
|
||||
if (id) glDeleteTextures(1, &id);
|
||||
|
@ -324,6 +324,10 @@ void Gfx_RecreateTexture(GfxResourceID* tex, struct Bitmap* bmp, cc_uint8 flags,
|
||||
*tex = Gfx_CreateTexture(bmp, flags, mipmaps);
|
||||
}
|
||||
|
||||
void Gfx_UpdateTexturePart(GfxResourceID texId, int x, int y, struct Bitmap* part, cc_bool mipmaps) {
|
||||
Gfx_UpdateTexture(texId, x, y, part, part->width, mipmaps);
|
||||
}
|
||||
|
||||
static void CopyTextureData(void* dst, int dstStride, const struct Bitmap* src, int srcStride) {
|
||||
/* We need to copy scanline by scanline, as generally srcStride != dstStride */
|
||||
cc_uint8* src_ = (cc_uint8*)src->scan0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user