diff --git a/src/Animations.c b/src/Animations.c index 693d1dc9a..e6da228c2 100644 --- a/src/Animations.c +++ b/src/Animations.c @@ -12,7 +12,7 @@ #include "Options.h" #include "Logger.h" -#ifndef CC_BUILD_NOFPUHARDWARE +#ifdef CC_BUILD_ANIMATIONS static void Animations_Update(int loc, struct Bitmap* bmp, int stride); #ifdef CC_BUILD_LOWMEM diff --git a/src/Core.h b/src/Core.h index 7f27c40d5..47abfc73a 100644 --- a/src/Core.h +++ b/src/Core.h @@ -143,6 +143,7 @@ typedef cc_uint8 cc_bool; #define CC_BUILD_RESOURCES #define CC_BUILD_PLUGINS #define CC_BUILD_ANIMATIONS +#define CC_BUILD_HELDBLOCK #define CC_BUILD_FILESYSTEM #define CC_BUILD_ADVLIGHTING /*#define CC_BUILD_GL11*/ @@ -382,7 +383,7 @@ typedef cc_uint8 cc_bool; #define CC_BUILD_HTTPCLIENT #define CC_BUILD_TOUCH #define CC_BUILD_SMALLSTACK - #define CC_BUILD_NOFPUHARDWARE + #undef CC_BUILD_ANIMATIONS /* Very costly in FPU less system */ #undef CC_BUILD_ADVLIGHTING #elif defined __WIIU__ #define CC_BUILD_WIIU @@ -410,9 +411,10 @@ typedef cc_uint8 cc_bool; #define CC_BUILD_COOPTHREADED #define CC_BUILD_NOMUSIC #define CC_BUILD_NOSOUNDS - #define CC_BUILD_NOFPUHARDWARE #undef CC_BUILD_RESOURCES #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_FILESYSTEM #elif defined OS2 @@ -432,9 +434,10 @@ typedef cc_uint8 cc_bool; #define CC_BUILD_NOSOUNDS #define CC_BUILD_SMALLSTACK #define CC_BUILD_TINYSTACK - #define CC_BUILD_NOFPUHARDWARE #undef CC_BUILD_RESOURCES #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_FILESYSTEM #endif @@ -501,3 +504,4 @@ struct Texture { TextureRec uv; }; #endif + diff --git a/src/HeldBlockRenderer.c b/src/HeldBlockRenderer.c index c0adc37f0..bd276f4d2 100644 --- a/src/HeldBlockRenderer.c +++ b/src/HeldBlockRenderer.c @@ -11,6 +11,7 @@ #include "Options.h" cc_bool HeldBlockRenderer_Show; +#ifdef CC_BUILD_HELDBLOCK static BlockID held_block; static struct Entity held_entity; static struct Matrix held_blockProj; @@ -253,11 +254,7 @@ static void OnInit(void) { held_entity.VTABLE = &heldEntity_VTABLE; held_entity.NoShade = true; -#ifdef CC_BUILD_NOFPUHARDWARE - HeldBlockRenderer_Show = false; -#else HeldBlockRenderer_Show = Options_GetBool(OPT_SHOW_BLOCK_IN_HAND, true); -#endif held_lastBlock = Inventory_SelectedBlock; Event_Register_(&GfxEvents.ProjectionChanged, NULL, OnProjectionChanged); @@ -265,6 +262,12 @@ static void OnInit(void) { Event_Register_(&UserEvents.BlockChanged, NULL, OnBlockChanged); 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 = { OnInit /* Init */