mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-09 15:28:21 -04:00
Glass should have metal step sound like classic
This commit is contained in:
parent
33d73d9f4d
commit
e4fa7264ba
@ -358,15 +358,16 @@ static cc_result Music_PlayOgg(struct Stream* source) {
|
|||||||
struct AudioChunk chunks[AUDIO_MAX_BUFFERS] = { 0 };
|
struct AudioChunk chunks[AUDIO_MAX_BUFFERS] = { 0 };
|
||||||
int inUse, i, cur;
|
int inUse, i, cur;
|
||||||
cc_result res;
|
cc_result res;
|
||||||
|
|
||||||
#if CC_BUILD_MAXSTACK <= (64 * 1024)
|
#if CC_BUILD_MAXSTACK <= (64 * 1024)
|
||||||
struct VorbisState* vorbis = (struct VorbisState*)Mem_TryAllocCleared(1, sizeof(struct VorbisState));
|
struct VorbisState* vorbis = (struct VorbisState*)Mem_TryAllocCleared(1, sizeof(struct VorbisState));
|
||||||
struct OggState* ogg = (struct OggState*)Mem_TryAllocCleared(1, sizeof(struct OggState));
|
struct OggState* ogg = (struct OggState*)Mem_TryAllocCleared(1, sizeof(struct OggState));
|
||||||
if (!vorbis || !ogg) return ERR_OUT_OF_MEMORY;
|
if (!vorbis || !ogg) return ERR_OUT_OF_MEMORY;
|
||||||
#else
|
#else
|
||||||
struct OggState _ogg;
|
struct OggState _ogg;
|
||||||
struct OggState* ogg = &ogg;
|
struct OggState* ogg = &_ogg;
|
||||||
struct VorbisState _vorbis;
|
struct VorbisState _vorbis;
|
||||||
struct VorbisState* vorbis = &vorbis;
|
struct VorbisState* vorbis = &_vorbis;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Ogg_Init(ogg, source);
|
Ogg_Init(ogg, source);
|
||||||
|
@ -41,7 +41,8 @@ static const struct SimpleBlockDef invalid_blockDef = {
|
|||||||
|
|
||||||
/* Properties for all built-in blocks (Classic and CPE blocks) */
|
/* Properties for all built-in blocks (Classic and CPE blocks) */
|
||||||
static const struct SimpleBlockDef core_blockDefs[] = {
|
static const struct SimpleBlockDef core_blockDefs[] = {
|
||||||
/*NAME TOP SID BOT HEI FOG_COLOR DENS BRIT BLOCKS GRAV DRAW_MODE COLLIDE_MODE DIG_SOUND STEP_SOUND */
|
/*NAME TOP SID BOT HEI FOG_COLOR DENS BRIGHT BLOCKS GRAV DRAW_MODE COLLIDE_MODE DIG_SOUND STEP_SOUND */
|
||||||
|
/* TEX ES TOM GHT ITY NESS LIGHT ITY */
|
||||||
{ "Air", 0, 0, 0, 16, FOG_NONE , 0, BRIT_NONE, false, 100, DRAW_GAS, COLLIDE_NONE, SOUND_NONE, SOUND_NONE },
|
{ "Air", 0, 0, 0, 16, FOG_NONE , 0, BRIT_NONE, false, 100, DRAW_GAS, COLLIDE_NONE, SOUND_NONE, SOUND_NONE },
|
||||||
{ "Stone", 1, 1, 1, 16, FOG_NONE , 0, BRIT_NONE, true, 100, DRAW_OPAQUE, COLLIDE_SOLID, SOUND_STONE, SOUND_STONE },
|
{ "Stone", 1, 1, 1, 16, FOG_NONE , 0, BRIT_NONE, true, 100, DRAW_OPAQUE, COLLIDE_SOLID, SOUND_STONE, SOUND_STONE },
|
||||||
{ "Grass", 0, 3, 2, 16, FOG_NONE , 0, BRIT_NONE, true, 100, DRAW_OPAQUE, COLLIDE_SOLID, SOUND_GRASS, SOUND_GRASS },
|
{ "Grass", 0, 3, 2, 16, FOG_NONE , 0, BRIT_NONE, true, 100, DRAW_OPAQUE, COLLIDE_SOLID, SOUND_GRASS, SOUND_GRASS },
|
||||||
@ -64,7 +65,7 @@ static const struct SimpleBlockDef core_blockDefs[] = {
|
|||||||
{ "Log", 21, 20, 21, 16, FOG_NONE , 0, BRIT_NONE, true, 100, DRAW_OPAQUE, COLLIDE_SOLID, SOUND_WOOD, SOUND_WOOD },
|
{ "Log", 21, 20, 21, 16, FOG_NONE , 0, BRIT_NONE, true, 100, DRAW_OPAQUE, COLLIDE_SOLID, SOUND_WOOD, SOUND_WOOD },
|
||||||
{ "Leaves", 22, 22, 22, 16, FOG_NONE , 0, BRIT_NONE, false, 40, DRAW_TRANSPARENT_THICK, COLLIDE_SOLID, SOUND_GRASS, SOUND_GRASS },
|
{ "Leaves", 22, 22, 22, 16, FOG_NONE , 0, BRIT_NONE, false, 40, DRAW_TRANSPARENT_THICK, COLLIDE_SOLID, SOUND_GRASS, SOUND_GRASS },
|
||||||
{ "Sponge", 48, 48, 48, 16, FOG_NONE , 0, BRIT_NONE, true, 90, DRAW_OPAQUE, COLLIDE_SOLID, SOUND_GRASS, SOUND_GRASS },
|
{ "Sponge", 48, 48, 48, 16, FOG_NONE , 0, BRIT_NONE, true, 90, DRAW_OPAQUE, COLLIDE_SOLID, SOUND_GRASS, SOUND_GRASS },
|
||||||
{ "Glass", 49, 49, 49, 16, FOG_NONE , 0, BRIT_NONE, false, 100, DRAW_TRANSPARENT, COLLIDE_SOLID, SOUND_GLASS,SOUND_STONE},
|
{ "Glass", 49, 49, 49, 16, FOG_NONE , 0, BRIT_NONE, false, 100, DRAW_TRANSPARENT, COLLIDE_SOLID, SOUND_GLASS,SOUND_METAL},
|
||||||
{ "Red", 64, 64, 64, 16, FOG_NONE , 0, BRIT_NONE, true, 100, DRAW_OPAQUE, COLLIDE_SOLID, SOUND_CLOTH, SOUND_CLOTH },
|
{ "Red", 64, 64, 64, 16, FOG_NONE , 0, BRIT_NONE, true, 100, DRAW_OPAQUE, COLLIDE_SOLID, SOUND_CLOTH, SOUND_CLOTH },
|
||||||
{ "Orange", 65, 65, 65, 16, FOG_NONE , 0, BRIT_NONE, true, 100, DRAW_OPAQUE, COLLIDE_SOLID, SOUND_CLOTH, SOUND_CLOTH },
|
{ "Orange", 65, 65, 65, 16, FOG_NONE , 0, BRIT_NONE, true, 100, DRAW_OPAQUE, COLLIDE_SOLID, SOUND_CLOTH, SOUND_CLOTH },
|
||||||
{ "Yellow", 66, 66, 66, 16, FOG_NONE , 0, BRIT_NONE, true, 100, DRAW_OPAQUE, COLLIDE_SOLID, SOUND_CLOTH, SOUND_CLOTH },
|
{ "Yellow", 66, 66, 66, 16, FOG_NONE , 0, BRIT_NONE, true, 100, DRAW_OPAQUE, COLLIDE_SOLID, SOUND_CLOTH, SOUND_CLOTH },
|
||||||
@ -116,7 +117,8 @@ static const struct SimpleBlockDef core_blockDefs[] = {
|
|||||||
|
|
||||||
{ "Crate", 53, 53, 53, 16, FOG_NONE , 0, BRIT_NONE, true, 100, DRAW_OPAQUE, COLLIDE_SOLID, SOUND_WOOD, SOUND_WOOD },
|
{ "Crate", 53, 53, 53, 16, FOG_NONE , 0, BRIT_NONE, true, 100, DRAW_OPAQUE, COLLIDE_SOLID, SOUND_WOOD, SOUND_WOOD },
|
||||||
{ "Stone brick", 52, 52, 52, 16, FOG_NONE , 0, BRIT_NONE, true, 100, DRAW_OPAQUE, COLLIDE_SOLID, SOUND_STONE, SOUND_STONE }
|
{ "Stone brick", 52, 52, 52, 16, FOG_NONE , 0, BRIT_NONE, true, 100, DRAW_OPAQUE, COLLIDE_SOLID, SOUND_STONE, SOUND_STONE }
|
||||||
/*NAME TOP SID BOT HEI FOG_COLOR DENS BRIT BLOCKS GRAV DRAW_MODE COLLIDE_MODE DIG_SOUND STEP_SOUND */
|
/*NAME TOP SID BOT HEI FOG_COLOR DENS BRIGHT BLOCKS GRAV DRAW_MODE COLLIDE_MODE DIG_SOUND STEP_SOUND */
|
||||||
|
/* TEX ES TOM GHT ITY NESS LIGHT ITY */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Returns a backwards compatible collide type of a block */
|
/* Returns a backwards compatible collide type of a block */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user