|
1 | 1 | #include "randomizer.h" |
2 | 2 |
|
| 3 | +#include "audio_wrappers.h" |
3 | 4 | #include "event.h" |
4 | 5 | #include "in_game_cutscene.h" |
| 6 | +#include "particle.h" |
5 | 7 | #include "projectile_util.h" |
| 8 | +#include "samus.h" |
6 | 9 | #include "sprite.h" |
7 | 10 |
|
8 | 11 | #include "data/randomizer_data.h" |
9 | 12 | #include "data/text_data.h" |
10 | 13 |
|
| 14 | +#include "constants/audio.h" |
11 | 15 | #include "constants/event.h" |
12 | 16 | #include "constants/in_game_cutscene.h" |
13 | 17 | #include "constants/menus/pause_screen.h" |
| 18 | +#include "constants/particle.h" |
14 | 19 | #include "constants/randomizer.h" |
15 | 20 | #include "constants/samus.h" |
16 | 21 | #include "constants/sprite.h" |
@@ -86,7 +91,8 @@ const struct MinorLocation* RandoGetMinorLocation(Area area, u8 room, u8 blockX, |
86 | 91 | } |
87 | 92 |
|
88 | 93 | /** |
89 | | - * @brief TODO |
| 94 | + * @brief Handles collecting an item, including updating equipment, spawning |
| 95 | + * a message banner, and updating events |
90 | 96 | */ |
91 | 97 | static void RandoCollectItem(RandoItemType item, u8 hintedBy) |
92 | 98 | { |
@@ -236,6 +242,17 @@ static void RandoCollectItem(RandoItemType item, u8 hintedBy) |
236 | 242 | message = MESSAGE_ZIPLINES; |
237 | 243 | EventFunction(EVENT_ACTION_SETTING, EVENT_ZIPLINES_ACTIVATED); |
238 | 244 | break; |
| 245 | + |
| 246 | + case RIT_ICE_TRAP: |
| 247 | + message = MESSAGE_ICE_TRAP; |
| 248 | + // Play freeze sound |
| 249 | + SoundPlayNotAlreadyPlaying(SOUND_FREEZING_SPRITE); |
| 250 | + // Add charged ice beam effect |
| 251 | + ParticleSet(gSamusData.yPosition + (gSamusPhysics.hitboxTop / 2), |
| 252 | + gSamusData.xPosition, PE_FREEZING_SPRITE_WITH_CHARGED_ICE); |
| 253 | + // TODO: Freeze Samus |
| 254 | + SamusSetPose(SPOSE_KNOCKBACK_REQUEST); |
| 255 | + break; |
239 | 256 | } |
240 | 257 |
|
241 | 258 | // Spawn the message banner |
|
0 commit comments