mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-14 18:15:28 -04:00
PS3/Vita/WiiU: Enable support for all features
This commit is contained in:
parent
add2537ecf
commit
abfa1f0b97
@ -293,7 +293,6 @@ typedef cc_uint8 cc_bool;
|
||||
#elif defined __vita__
|
||||
#define CC_BUILD_PSVITA
|
||||
#define CC_BUILD_CONSOLE
|
||||
#define CC_BUILD_LOWMEM
|
||||
#define CC_BUILD_OPENAL
|
||||
#define CC_BUILD_HTTPCLIENT
|
||||
#define CC_BUILD_BEARSSL
|
||||
@ -309,7 +308,6 @@ typedef cc_uint8 cc_bool;
|
||||
#elif defined PLAT_PS3
|
||||
#define CC_BUILD_PS3
|
||||
#define CC_BUILD_CONSOLE
|
||||
#define CC_BUILD_LOWMEM
|
||||
#define CC_BUILD_OPENAL
|
||||
#define CC_BUILD_HTTPCLIENT
|
||||
#define CC_BUILD_BEARSSL
|
||||
@ -342,7 +340,6 @@ typedef cc_uint8 cc_bool;
|
||||
#elif defined __WIIU__
|
||||
#define CC_BUILD_WIIU
|
||||
#define CC_BUILD_CONSOLE
|
||||
#define CC_BUILD_LOWMEM
|
||||
#define CC_BUILD_COOPTHREADED
|
||||
#define CC_BUILD_OPENAL
|
||||
#define CC_BUILD_HTTPCLIENT
|
||||
|
@ -20,6 +20,17 @@ static float held_swingY;
|
||||
static double held_time, held_period = 0.25;
|
||||
static BlockID held_lastBlock;
|
||||
|
||||
/* Since not using Entity_SetModel, which normally automatically does this */
|
||||
static void SetHeldModel(struct Model* model) {
|
||||
#ifdef CC_BUILD_CONSOLE
|
||||
static int maxVertices;
|
||||
if (model->maxVertices <= maxVertices) return;
|
||||
|
||||
maxVertices = model->maxVertices;
|
||||
Gfx_DeleteDynamicVb(&held_entity.ModelVB);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void HeldBlockRenderer_RenderModel(void) {
|
||||
static const cc_string block = String_FromConst("block");
|
||||
struct Model* model;
|
||||
@ -30,6 +41,7 @@ static void HeldBlockRenderer_RenderModel(void) {
|
||||
|
||||
if (Blocks.Draw[held_block] == DRAW_GAS) {
|
||||
model = LocalPlayer_Instance.Base.Model;
|
||||
SetHeldModel(model);
|
||||
Vec3_Set(held_entity.ModelScale, 1.0f,1.0f,1.0f);
|
||||
|
||||
Gfx_SetAlphaTest(true);
|
||||
@ -37,6 +49,7 @@ static void HeldBlockRenderer_RenderModel(void) {
|
||||
Gfx_SetAlphaTest(false);
|
||||
} else {
|
||||
model = Model_Get(&block);
|
||||
SetHeldModel(model);
|
||||
Vec3_Set(held_entity.ModelScale, 0.4f,0.4f,0.4f);
|
||||
|
||||
Gfx_SetupAlphaState(Blocks.Draw[held_block]);
|
||||
|
@ -182,7 +182,7 @@ static struct VertexTextured* real_vertices;
|
||||
static GfxResourceID modelVB;
|
||||
|
||||
void Model_LockVB(struct Entity* entity, int verticesCount) {
|
||||
#ifdef CC_BUILD_LOWMEM
|
||||
#ifdef CC_BUILD_CONSOLE
|
||||
if (!entity->ModelVB) {
|
||||
entity->ModelVB = Gfx_CreateDynamicVb(VERTEX_FORMAT_TEXTURED, Models.Active->maxVertices);
|
||||
}
|
||||
|
@ -701,7 +701,7 @@ void Window_DrawFramebuffer(Rect2D r, struct Bitmap* bmp) {
|
||||
NSRect rect;
|
||||
rect.origin.x = r.x;
|
||||
rect.origin.y = Window_Main.Height - r.y - r.height;
|
||||
rect.size.width = r.ridth;
|
||||
rect.size.width = r.width;
|
||||
rect.size.height = r.height;
|
||||
|
||||
[viewHandle setNeedsDisplayInRect:rect];
|
||||
|
Loading…
x
Reference in New Issue
Block a user