mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-14 01:55:19 -04:00
Held block is visible on NDS by default
This commit is contained in:
parent
4f184e46f5
commit
06353a8fe5
@ -12,7 +12,7 @@
|
|||||||
#include "Options.h"
|
#include "Options.h"
|
||||||
#include "Logger.h"
|
#include "Logger.h"
|
||||||
|
|
||||||
#ifndef CC_BUILD_NOFPUHARDWARE
|
#ifdef CC_BUILD_ANIMATIONS
|
||||||
static void Animations_Update(int loc, struct Bitmap* bmp, int stride);
|
static void Animations_Update(int loc, struct Bitmap* bmp, int stride);
|
||||||
|
|
||||||
#ifdef CC_BUILD_LOWMEM
|
#ifdef CC_BUILD_LOWMEM
|
||||||
|
10
src/Core.h
10
src/Core.h
@ -143,6 +143,7 @@ typedef cc_uint8 cc_bool;
|
|||||||
#define CC_BUILD_RESOURCES
|
#define CC_BUILD_RESOURCES
|
||||||
#define CC_BUILD_PLUGINS
|
#define CC_BUILD_PLUGINS
|
||||||
#define CC_BUILD_ANIMATIONS
|
#define CC_BUILD_ANIMATIONS
|
||||||
|
#define CC_BUILD_HELDBLOCK
|
||||||
#define CC_BUILD_FILESYSTEM
|
#define CC_BUILD_FILESYSTEM
|
||||||
#define CC_BUILD_ADVLIGHTING
|
#define CC_BUILD_ADVLIGHTING
|
||||||
/*#define CC_BUILD_GL11*/
|
/*#define CC_BUILD_GL11*/
|
||||||
@ -382,7 +383,7 @@ typedef cc_uint8 cc_bool;
|
|||||||
#define CC_BUILD_HTTPCLIENT
|
#define CC_BUILD_HTTPCLIENT
|
||||||
#define CC_BUILD_TOUCH
|
#define CC_BUILD_TOUCH
|
||||||
#define CC_BUILD_SMALLSTACK
|
#define CC_BUILD_SMALLSTACK
|
||||||
#define CC_BUILD_NOFPUHARDWARE
|
#undef CC_BUILD_ANIMATIONS /* Very costly in FPU less system */
|
||||||
#undef CC_BUILD_ADVLIGHTING
|
#undef CC_BUILD_ADVLIGHTING
|
||||||
#elif defined __WIIU__
|
#elif defined __WIIU__
|
||||||
#define CC_BUILD_WIIU
|
#define CC_BUILD_WIIU
|
||||||
@ -410,9 +411,10 @@ typedef cc_uint8 cc_bool;
|
|||||||
#define CC_BUILD_COOPTHREADED
|
#define CC_BUILD_COOPTHREADED
|
||||||
#define CC_BUILD_NOMUSIC
|
#define CC_BUILD_NOMUSIC
|
||||||
#define CC_BUILD_NOSOUNDS
|
#define CC_BUILD_NOSOUNDS
|
||||||
#define CC_BUILD_NOFPUHARDWARE
|
|
||||||
#undef CC_BUILD_RESOURCES
|
#undef CC_BUILD_RESOURCES
|
||||||
#undef CC_BUILD_NETWORKING
|
#undef CC_BUILD_NETWORKING
|
||||||
|
#undef CC_BUILD_ANIMATIONS /* Very costly in FPU less system */
|
||||||
|
#undef CC_BUILD_HELDBLOCK /* Very costly in FPU less system */
|
||||||
#undef CC_BUILD_ADVLIGHTING
|
#undef CC_BUILD_ADVLIGHTING
|
||||||
#undef CC_BUILD_FILESYSTEM
|
#undef CC_BUILD_FILESYSTEM
|
||||||
#elif defined OS2
|
#elif defined OS2
|
||||||
@ -432,9 +434,10 @@ typedef cc_uint8 cc_bool;
|
|||||||
#define CC_BUILD_NOSOUNDS
|
#define CC_BUILD_NOSOUNDS
|
||||||
#define CC_BUILD_SMALLSTACK
|
#define CC_BUILD_SMALLSTACK
|
||||||
#define CC_BUILD_TINYSTACK
|
#define CC_BUILD_TINYSTACK
|
||||||
#define CC_BUILD_NOFPUHARDWARE
|
|
||||||
#undef CC_BUILD_RESOURCES
|
#undef CC_BUILD_RESOURCES
|
||||||
#undef CC_BUILD_NETWORKING
|
#undef CC_BUILD_NETWORKING
|
||||||
|
#undef CC_BUILD_ANIMATIONS /* Very costly in FPU less system */
|
||||||
|
#undef CC_BUILD_HELDBLOCK /* Very costly in FPU less system */
|
||||||
#undef CC_BUILD_ADVLIGHTING
|
#undef CC_BUILD_ADVLIGHTING
|
||||||
#undef CC_BUILD_FILESYSTEM
|
#undef CC_BUILD_FILESYSTEM
|
||||||
#endif
|
#endif
|
||||||
@ -501,3 +504,4 @@ struct Texture {
|
|||||||
TextureRec uv;
|
TextureRec uv;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include "Options.h"
|
#include "Options.h"
|
||||||
|
|
||||||
cc_bool HeldBlockRenderer_Show;
|
cc_bool HeldBlockRenderer_Show;
|
||||||
|
#ifdef CC_BUILD_HELDBLOCK
|
||||||
static BlockID held_block;
|
static BlockID held_block;
|
||||||
static struct Entity held_entity;
|
static struct Entity held_entity;
|
||||||
static struct Matrix held_blockProj;
|
static struct Matrix held_blockProj;
|
||||||
@ -253,11 +254,7 @@ static void OnInit(void) {
|
|||||||
held_entity.VTABLE = &heldEntity_VTABLE;
|
held_entity.VTABLE = &heldEntity_VTABLE;
|
||||||
held_entity.NoShade = true;
|
held_entity.NoShade = true;
|
||||||
|
|
||||||
#ifdef CC_BUILD_NOFPUHARDWARE
|
|
||||||
HeldBlockRenderer_Show = false;
|
|
||||||
#else
|
|
||||||
HeldBlockRenderer_Show = Options_GetBool(OPT_SHOW_BLOCK_IN_HAND, true);
|
HeldBlockRenderer_Show = Options_GetBool(OPT_SHOW_BLOCK_IN_HAND, true);
|
||||||
#endif
|
|
||||||
held_lastBlock = Inventory_SelectedBlock;
|
held_lastBlock = Inventory_SelectedBlock;
|
||||||
|
|
||||||
Event_Register_(&GfxEvents.ProjectionChanged, NULL, OnProjectionChanged);
|
Event_Register_(&GfxEvents.ProjectionChanged, NULL, OnProjectionChanged);
|
||||||
@ -265,6 +262,12 @@ static void OnInit(void) {
|
|||||||
Event_Register_(&UserEvents.BlockChanged, NULL, OnBlockChanged);
|
Event_Register_(&UserEvents.BlockChanged, NULL, OnBlockChanged);
|
||||||
Event_Register_(&GfxEvents.ContextLost, NULL, OnContextLost);
|
Event_Register_(&GfxEvents.ContextLost, NULL, OnContextLost);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
void HeldBlockRenderer_ClickAnim(cc_bool digging) { }
|
||||||
|
void HeldBlockRenderer_Render(float delta) { }
|
||||||
|
|
||||||
|
static void OnInit(void) { }
|
||||||
|
#endif
|
||||||
|
|
||||||
struct IGameComponent HeldBlockRenderer_Component = {
|
struct IGameComponent HeldBlockRenderer_Component = {
|
||||||
OnInit /* Init */
|
OnInit /* Init */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user