mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-14 10:05:44 -04:00
Fix plugin incompatibility
This commit is contained in:
parent
47fdeb17a5
commit
fcdaf165ec
@ -25,14 +25,14 @@ void Gfx_Create(void) {
|
|||||||
glAlphaFunc(7);
|
glAlphaFunc(7);
|
||||||
|
|
||||||
glClearDepth(GL_MAX_DEPTH);
|
glClearDepth(GL_MAX_DEPTH);
|
||||||
glViewport(0, 0, 255, 191);
|
Gfx_SetViewport(0, 0, 256, 192);
|
||||||
|
|
||||||
vramSetBankA(VRAM_A_TEXTURE);
|
vramSetBankA(VRAM_A_TEXTURE);
|
||||||
vramSetBankB(VRAM_B_TEXTURE);
|
vramSetBankB(VRAM_B_TEXTURE);
|
||||||
vramSetBankC(VRAM_C_TEXTURE);
|
vramSetBankC(VRAM_C_TEXTURE);
|
||||||
vramSetBankD(VRAM_D_TEXTURE);
|
vramSetBankD(VRAM_D_TEXTURE);
|
||||||
|
|
||||||
glPolyFmt(POLY_ALPHA(31) | POLY_CULL_NONE);
|
Gfx_SetFaceCulling(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
cc_bool Gfx_TryRestoreContext(void) {
|
cc_bool Gfx_TryRestoreContext(void) {
|
||||||
@ -67,7 +67,11 @@ void Gfx_SetVSync(cc_bool vsync) {
|
|||||||
void Gfx_OnWindowResize(void) {
|
void Gfx_OnWindowResize(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Gfx_SetViewport(int x, int y, int w, int h) { }
|
void Gfx_SetViewport(int x, int y, int w, int h) {
|
||||||
|
int x2 = x + w - 1, y2 = y + h - 1;
|
||||||
|
GFX_VIEWPORT = x | (y << 8) | (x2 << 16) | (y2 << 24);
|
||||||
|
}
|
||||||
|
|
||||||
void Gfx_SetScissor (int x, int y, int w, int h) { }
|
void Gfx_SetScissor (int x, int y, int w, int h) { }
|
||||||
|
|
||||||
void Gfx_BeginFrame(void) {
|
void Gfx_BeginFrame(void) {
|
||||||
|
@ -18,7 +18,7 @@ http://www.devmaster.net/articles/raytracing_series/A%20faster%20voxel%20travers
|
|||||||
*/
|
*/
|
||||||
struct RayTracer {
|
struct RayTracer {
|
||||||
IVec3 pos; /* Coordinates of block within world */
|
IVec3 pos; /* Coordinates of block within world */
|
||||||
Vec3 origin, dir, invDir;
|
Vec3 origin, dir;
|
||||||
Vec3 Min, Max; /* Min/max coords of block's bounding box. */
|
Vec3 Min, Max; /* Min/max coords of block's bounding box. */
|
||||||
BlockID block;
|
BlockID block;
|
||||||
IVec3 step;
|
IVec3 step;
|
||||||
@ -28,6 +28,7 @@ struct RayTracer {
|
|||||||
IVec3 translatedPos; /* Coords of the neighbouring block that is closest to the player */
|
IVec3 translatedPos; /* Coords of the neighbouring block that is closest to the player */
|
||||||
cc_bool valid; /* Whether the ray tracer actually intersected with a block */
|
cc_bool valid; /* Whether the ray tracer actually intersected with a block */
|
||||||
Face closest; /* Face of the intersected block that is closet to the player */
|
Face closest; /* Face of the intersected block that is closet to the player */
|
||||||
|
Vec3 invDir;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Marks the given ray tracer as having no result. */
|
/* Marks the given ray tracer as having no result. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user