coop-deluxe / sm64coopdx

An official continuation of https://github.com/djoslin0/sm64ex-coop on sm64coopdx for the enhancements and progress it already has.
https://sm64coopdx.com
286 stars 41 forks source link

Allow user to change music in menu #212

Open EmeraldLoc opened 1 month ago

EmeraldLoc commented 1 month ago

The word "Music" does need translation, since it's 1 word, should I just use google translate?

I tried to make it as simple as it can be to add/remove songs to the main menu. All you have to do is edit the gMainMenuSounds, everything else is done for you.

gMainMenuSounds is a structure of a new type, MainMenuSounds, which contains a name, and a sound. configMenuSounds was changed to a int, and it now references an entry in the gMainMenuSounds table. The stuff done in level_update.c is very self explanatory. Stage music is handled with a custom definition, STAGE_MUSIC, that's set to the integer 0. This is also passed into gMainMenuSounds. Something very important is that the stage music entry needs to ALWAYS be last in the table, this will be discussed later in this message. The main part I'm not super happy with is getting staff roll integration to work. When staff roll is toggled, I chose, as I don't know of any other methods, to recreate the panel. The reason is that the selection box's selection needs to be updated, and whether or not Stage Music exists needs to be updated as well.

Cooliokid956 commented 1 month ago

The word "Music" does need translation, since it's 1 word, should I just use google translate?

The word "Music" is available in [SOUND]:MUSIC_VOLUME, use the power of context clues to find the word "Music" in some of the trickier translations!

Flower35 commented 1 month ago

The word "Music" does need translation, since it's 1 word, should I just use google translate?

The word "Music" is available in [SOUND]:MUSIC_VOLUME, use the power of context clues to find the word "Music" in some of the trickier translations!

Sorry, that's actually a terrible advice 😃

Quoting Wikipedia:

In linguistics, declension (verb: to decline) is the changing of the form of a word, generally to express its syntactic function in the sentence, by way of some inflection.

Unlike English, many languages use suffixes to specify subjects and objects and word cases in general.


And an example from Polish.ini:

MUSIC_VOLUME = "Głośność Muzyki"

Here, „Głośność Muzyki” literally (and naturally) translates as "Volume of the Music"


For "Music" as a single noun, the correct translation will be:

MUSIC = "Muzyka"

Similarly for Czech.ini (MUSIC = "písnička") and Russian.ini (MUSIC = "музыка"), although it would be nice if some native speaker / translator could verify these. 🙂