Files
coco875 a1f0d32d66 Update decomp clang (#67)
* Update menus.c (#634)

* Update common_data.yml (#635)

* Renames for screenId and other changes (#636)

* screenId renames

* Rename surface map to collision mesh (#637)

* Rename some stack vars (#638)

* Fix syntax error (#639)

* Rename some stack vars

* Update collision.c

* Collision Documentation (#640)

* Collision related renames

* update doxygen (#649)

* change bool (#644)

Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>

* Update (#642)

* Delete trig_tables_bss.c (#650)

* fix typo audio (#656)

* fix typo src actor (#657)

Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>

* fix typo include (#658)

* fix course (#659)

* fix typo debug (#660)

* fix typo data (#661)

* replace number with const (#665)

* fix typo buffers (#655)

* fix typo buffers

* tweak ld file

* rename to sMemoryPool

* add a warning

---------

* fix typo src (#654)

* fix typo src

* fix non matcing

* Update code_80091750.c

---------

* fix typo racing (#653)

* fix typo racing

* get it match

* replace G_LINE3D to G_QUAD

---------

* fix typo src (#652)

* fix ending typo (#651)

* Action more info when it doesn't match and fix first diff (#662)

* Update linux-compile.yml

* fix first-diff

* Update first-diff.py

---------

* document texture of kart (#663)

* document texture of kart

* change screenPlayerId to screenId

* some documentation around object

* Revert "some documentation around object"

This reverts commit cbb39078e036bf2a417bed67359e910213acab28.

* more rename

---------

* Make evaluate_collision_players_palm_tree better (#667)

This matches just the same as before,	but using those two casts instead of
shifts seems more likely to be accurate to the original source code

Signed-off-by: Gabriel Ravier <gabravier@gmail.com>

* add fedora instruciton (#666)

* start documenting animation (#668)

* start documenting animation

* Update course_data.c

* change comment

* update libultra asm (#648)

* update libultra asm

* fix gcc __osThreadTail

---------

* Document Vehicles (#641)

* start doc collision

* fix merge

* finish rename fonction related to vehicle

* document around waypoint of vehicle

* make some modification

* make some change and rename one

* copy_ to oldPos

* doc smoke ferry and train

* some rename

* fix some renaming

* precise index

* rename a funciton

* simplify waypoint_vehicles

* change some name

* change some name

* rename move_to_point_direction

* fix some conflict

* Update code_80005FD0.c

* Update code_80005FD0.h

---------

* Label a save info loop (#645)

* save info

* more gcc progress

* fix a value and do a rename (#669)

* update clang and add action (#664)

* update clang and add action

* try clang on course folder only

* forget two file

* Update course_displaylists.inc.c

* forget few other file

* Update course_vertices.inc.c

* format all code while get it match

* second pass

* format other dir

* disable clang format on bad ido code

* fix some tabulation

* revert format on tool dir

* Update clang-format.yml

* ignore gbi.h

* add some read me instruction

* fix error

* format and fixing error

* Update README.md

---------

* Update linkonly_generator.py (#670)

* format more file

* update

* fix compilation issue

* remove course_metadata folder

* re add course metadata folder

* fix banshee bordwalk crash

* fix windows eurk

* Update CMakeLists.txt

---------
2024-08-27 17:47:39 -06:00

119 lines
4.6 KiB
C

#ifndef SOUNDS_H
#define SOUNDS_H
//! @todo format like sm64 sounds.h
// The sound cue bit fields can be split up into its basic pieces and put back together.
// Sound Magic Definition:
// First Byte (Upper Nibble): Sound Bank (not the same as audio bank!)
// First Byte (Lower Nibble): Bitflags for audio playback?
// Third/Second Byte: Priority
// Third/Second Byte (Upper Nibble): More bitflags
// Third/Second Byte (Lower Nibble): Sound Status (this is set to SOUND_STATUS_PLAYING when passed to the audio driver.)
// Fourth Byte: Sound ID
#define SOUND_ARG_LOAD(sound_bank, byte2, byte3, sound_id) \
((sound_bank << 24) | (byte2 << 16) | (byte3 << 8) | sound_id)
/* Intro */
#define SOUND_INTRO_LOGO SOUND_ARG_LOAD(0x49, 0x01, 0x80, 0x08) // SOUND_ARG_LOAD(0x49, 0x01, 0x80, 0x08)
// Welcome to Mario Kart. Used in intro and credits.
#define SOUND_INTRO_WELCOME SOUND_ARG_LOAD(0x49, 0x00, 0x90, 0x09)
#define SOUND_INTRO_ENTER_MENU SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x1A)
/* Menus */
#define SOUND_MENU_OK_CLICKED SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x16)
#define SOUND_MENU_CURSOR_MOVE SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x00)
#define SOUND_MENU_GO_BACK SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x02)
// Used elsewhere, seems same as above sound.
#define SOUND_ACTION_GO_BACK_2 SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x05)
#define SOUND_ACTION_UNKNOWN_CONFIRMATION SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x06)
#define SOUND_MENU_SELECT SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x01)
// Mario Grand Prix
#define SOUND_MENU_GP SOUND_ARG_LOAD(0x49, 0x00, 0x90, 0x0A)
// Versus
#define SOUND_MENU_VERSUS SOUND_ARG_LOAD(0x49, 0x00, 0x90, 0x0C)
// Time Trials
#define SOUND_MENU_TIME_TRIALS SOUND_ARG_LOAD(0x49, 0x00, 0x90, 0x0B)
// Battle
#define SOUND_MENU_BATTLE SOUND_ARG_LOAD(0x49, 0x00, 0x90, 0x0D)
// Select a level (Select a CC)
#define SOUND_MENU_SELECT_LEVEL SOUND_ARG_LOAD(0x49, 0x00, 0x90, 0x0E)
// OK?
#define SOUND_MENU_OK SOUND_ARG_LOAD(0x49, 0x00, 0x90, 0x0F)
// Select your player
#define SOUND_MENU_SELECT_PLAYER SOUND_ARG_LOAD(0x49, 0x00, 0x90, 0x12)
// Select map
#define SOUND_MENU_SELECT_MAP SOUND_ARG_LOAD(0x49, 0x00, 0x90, 0x13)
// Plays in option if no controller pak.
#define SOUND_MENU_FILE_NOT_FOUND SOUND_ARG_LOAD(0x49, 0x00, 0xFF, 0x07)
// Option
#define SOUND_MENU_OPTION SOUND_ARG_LOAD(0x49, 0x00, 0x90, 0x10)
// Data
#define SOUND_MENU_DATA SOUND_ARG_LOAD(0x49, 0x00, 0x90, 0x11)
// On delete course record?
#define SOUND_MENU_EXPLOSION SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x1D)
#define SOUND_MENU_STEREO SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x24)
#define SOUND_MENU_HEADPHONES SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x25)
#define SOUND_MENU_MONO SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x29)
/* Staging */
// Red and orange staging lights that Lakitu holds.
#define SOUND_ACTION_COUNTDOWN_LIGHT SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x03)
#define SOUND_ACTION_GREEN_LIGHT SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x04)
// Activates when light turns green.
#define SOUND_ACTION_REV_ENGINE SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x18)
#define SOUND_ACTION_REV_ENGINE_2 SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x19)
/* Racing */
// Volume Mode and unknown
#define SOUND_ACTION_PING SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x1C)
#define SOUND_ACTION_TYRE_SQUEAL SOUND_ARG_LOAD(0x01, 0x00, 0xF9, 0x08)
// Falling rock and bomb sound.
#define SOUND_ACTION_EXPLOSION SOUND_ARG_LOAD(0x19, 0x00, 0x90, 0x05)
#define SOUND_ACTION_EXPLOSION_2 SOUND_ARG_LOAD(0x19, 0x00, 0xF0, 0x0C)
/* Items */
// There's likely more of these but they are in func arguments.
// Did not rename in-case unrelated.
#define SOUND_ITEM_STAR SOUND_ARG_LOAD(0x31, 0x02, 0x90, 0x08)
#define SOUND_ITEM_THUNDERBOLT SOUND_ARG_LOAD(0x51, 0x01, 0xC0, 0x0C)
/* Score Screen */
// Coin pickup sound (perfect fourth; B to E)
#define SOUND_ACTION_COUNT_SCORE SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x17)
#define SOUND_ACTION_NEXT_COURSE SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x15)
// Same sound as ENTER_MENU
#define SOUND_ACTION_CONTINUE_UNKNOWN SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x1B)
/* Ceremony */
// Congratulation
#define SOUND_CEREMONY_CONGRATULATION SOUND_ARG_LOAD(0x49, 0x00, 0x90, 0x14)
#define SOUND_CEREMONY_BALLOON_POP SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x1E)
#define SOUND_CEREMONY_FISH SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x1F)
#define SOUND_CEREMONY_FISH_2 SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x20)
#define SOUND_CEREMONY_SHOOT_TROPHY SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x21)
#define SOUND_CEREMONY_PODIUM SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x22)
// The sound of the trophy. Plays in the background
#define SOUND_CEREMONY_TROPHY SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x23)
/* Credits */
// Hey, you're very good. See you next time!
#define SOUND_CREDITS_FAREWELL SOUND_ARG_LOAD(0x49, 0x00, 0x80, 0x26)
#endif // SOUNDS_H