Merge branch 'add-generic-sfx' into 'master'

Add generic SFX (and use two of 'em for virtual keyboard)

See merge request KartKrew/Kart!1930
This commit is contained in:
James R. 2024-02-24 07:21:45 +00:00
commit db49975d67
3 changed files with 37 additions and 7 deletions

View file

@ -95,7 +95,7 @@ boolean M_ChangeStringCvar(INT32 choice)
{ {
strlcat(menutyping.cache, paste, MAXSTRINGLENGTH); strlcat(menutyping.cache, paste, MAXSTRINGLENGTH);
S_StartSound(NULL, sfx_s3k5b); // Tails S_StartSound(NULL, sfx_tmxbdn); // Tails
} }
} }
else if (len > 0 /*&& (copypastemode == CVCPM_COPY else if (len > 0 /*&& (copypastemode == CVCPM_COPY
@ -108,9 +108,12 @@ boolean M_ChangeStringCvar(INT32 choice)
{ {
// A cut should wipe. // A cut should wipe.
strcpy(menutyping.cache, ""); strcpy(menutyping.cache, "");
S_StartSound(NULL, sfx_tmxbup); // Tails
}
else
{
S_StartSound(NULL, sfx_tmxbdn); // Tails
} }
S_StartSound(NULL, sfx_s3k5b); // Tails
} }
return true; return true;
@ -128,7 +131,7 @@ boolean M_ChangeStringCvar(INT32 choice)
len = strlen(menutyping.cache); len = strlen(menutyping.cache);
menutyping.cache[len - 1] = 0; menutyping.cache[len - 1] = 0;
S_StartSound(NULL, sfx_s3k5b); // Tails S_StartSound(NULL, sfx_tmxbup); // Tails
} }
return true; return true;
case KEY_DEL: case KEY_DEL:
@ -136,7 +139,7 @@ boolean M_ChangeStringCvar(INT32 choice)
{ {
strcpy(menutyping.cache, ""); strcpy(menutyping.cache, "");
S_StartSound(NULL, sfx_s3k5b); // Tails S_StartSound(NULL, sfx_tmxbup); // Tails
} }
return true; return true;
default: default:
@ -148,7 +151,7 @@ boolean M_ChangeStringCvar(INT32 choice)
menutyping.cache[len++] = (char)choice; menutyping.cache[len++] = (char)choice;
menutyping.cache[len] = 0; menutyping.cache[len] = 0;
S_StartSound(NULL, sfx_s3k5b); // Tails S_StartSound(NULL, sfx_tmxbdn); // Tails
} }
return true; return true;
} }

View file

@ -1403,7 +1403,6 @@ sfxinfo_t S_sfx[NUMSFX] =
{"krti11", false, 48, 65, -1, NULL, 0, -1, -1, LUMPERROR, ""}, {"krti11", false, 48, 65, -1, NULL, 0, -1, -1, LUMPERROR, ""},
{"krti12", false, 48, 65, -1, NULL, 0, -1, -1, LUMPERROR, ""}, {"krti12", false, 48, 65, -1, NULL, 0, -1, -1, LUMPERROR, ""},
// Gunstar Heroes
// Gunstar Heroes // Gunstar Heroes
{"gsha0", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, {"gsha0", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
{"gsha1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, {"gsha1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
@ -1494,6 +1493,20 @@ sfxinfo_t S_sfx[NUMSFX] =
{"gshf0", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, {"gshf0", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
{"gshf1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, {"gshf1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
// Generic menu SFX
{"tmxatt", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Attention
{"tmxawd", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Award
{"tmxbak", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Back
{"tmxdsm", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Dismiss
{"tmxerr", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Error
{"tmxfwd", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Forward
{"tmxnah", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // "Nah"
{"tmxqst", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Question
{"tmxsuc", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Success
{"tmxunx", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Unexpected item in bagging area
{"tmxbdn", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Button down
{"tmxbup", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Button up
// SRB2kart - Skin sounds // SRB2kart - Skin sounds
{"kwin", false, 64, 96, -1, NULL, 0, SKSKWIN, -1, LUMPERROR, ""}, {"kwin", false, 64, 96, -1, NULL, 0, SKSKWIN, -1, LUMPERROR, ""},
{"klose", false, 64, 96, -1, NULL, 0, SKSKLOSE, -1, LUMPERROR, ""}, {"klose", false, 64, 96, -1, NULL, 0, SKSKLOSE, -1, LUMPERROR, ""},

View file

@ -1569,6 +1569,20 @@ typedef enum
sfx_gshf0, sfx_gshf0,
sfx_gshf1, sfx_gshf1,
// Generic menu SFX
sfx_tmxatt,
sfx_tmxawd,
sfx_tmxbak,
sfx_tmxdsm,
sfx_tmxerr,
sfx_tmxfwd,
sfx_tmxnah,
sfx_tmxqst,
sfx_tmxsuc,
sfx_tmxunx,
sfx_tmxbdn,
sfx_tmxbup,
// And LASTLY, Kart's skin sounds. // And LASTLY, Kart's skin sounds.
sfx_kwin, sfx_kwin,
sfx_klose, sfx_klose,