diff options
author | Treeki <treeki@gmail.com> | 2012-02-12 21:55:40 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-02-12 21:55:40 +0100 |
commit | 46cb2c50bc4f7dfe55085d842cdc77f225fabf06 (patch) | |
tree | 706cd78fe954b0d1c60a6f8ce73460b295d40991 | |
parent | dd8e68c2d5e71f4ad0b2fb74911d704a8ea699ce (diff) | |
download | kamek-46cb2c50bc4f7dfe55085d842cdc77f225fabf06.tar.gz kamek-46cb2c50bc4f7dfe55085d842cdc77f225fabf06.zip |
new bits for Tile God to block effects and sounds
Diffstat (limited to '')
-rw-r--r-- | src/tilegod.cpp | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/tilegod.cpp b/src/tilegod.cpp index 5162148..5f69778 100644 --- a/src/tilegod.cpp +++ b/src/tilegod.cpp @@ -44,7 +44,7 @@ int daChengeBlock_c::onCreate() { height = settings & 0xF; width = (settings & 0xF0) >> 4; blockType = (settings & 0xF000) >> 12; - pattern = (Pattern)((settings & 0xF0000) >> 16); + pattern = (Pattern)((settings & 0x30000) >> 16); isPermanent = (settings & 0xF0000000) >> 28; if (width == 0) @@ -140,25 +140,31 @@ void daChengeBlock_c::doStuff(Action action, bool wasCalledOnCreation) { default: shardType = 0xFFFF; } - if (shardType == 0xFFFF) { - SpawnEffect("Wm_en_burst_ss", 0, &effectPos, 0, 0); - } else { - u32 sets = (shardType << 8) | 3; - effectPos.y -= 8; - dEffectBreakMgr_c::instance->spawnTile(&effectPos, sets, 0); + if (!(settings & 0x40000)) { + if (shardType == 0xFFFF) { + SpawnEffect("Wm_en_burst_ss", 0, &effectPos, 0, 0); + } else { + u32 sets = (shardType << 8) | 3; + effectPos.y -= 8; + dEffectBreakMgr_c::instance->spawnTile(&effectPos, sets, 0); + } } - Vec2 soundPos; - ConvertStagePositionToScreenPosition(&soundPos, &effectPos); - SoundPlayingClass::instance2->PlaySoundAtPosition(SE_OBJ_BLOCK_BREAK, &soundPos, 0); + if (!(settings & 0x80000)) { + Vec2 soundPos; + ConvertStagePositionToScreenPosition(&soundPos, &effectPos); + SoundPlayingClass::instance2->PlaySoundAtPosition(SE_OBJ_BLOCK_BREAK, &soundPos, 0); + } } } else { effectPos.x = ((float)(worldX)) + 8.0f; effectPos.y = ((float)(-worldY)) - 8.0f; effectPos.z = pos.z; - if (blockType != 2) { - SpawnEffect("Wm_en_burst_ss", 0, &effectPos, 0, 0); + if (!(settings & 0x40000)) { + if (blockType != 2) { + SpawnEffect("Wm_en_burst_ss", 0, &effectPos, 0, 0); + } } } } |