Allow names for voicegroups and use a macro for use with drumsets (#2149)

mid2agb has been modified to allow more than just numbers when naming voicegroups and voicegroups have been renamed to match. A "voice_group" macro has been set up with a optional parameter for the starting note will shift the offset by the specified amount * 0xC which is the length of 1 voice in a voicegroup. All drumset voicegroups have a "starting_note" of 36.
This commit is contained in:
Josh
2025-07-30 19:43:08 +01:00
committed by GitHub
parent f85baa5358
commit 0dfec24967
325 changed files with 2626 additions and 2786 deletions

View File

@@ -46,7 +46,7 @@ static int s_memaccParam2;
void PrintAgbHeader()
{
std::fprintf(g_outputFile, "\t.include \"MPlayDef.s\"\n\n");
std::fprintf(g_outputFile, "\t.equ\t%s_grp, voicegroup%03u\n", g_asmLabel.c_str(), g_voiceGroup);
std::fprintf(g_outputFile, "\t.equ\t%s_grp, voicegroup%s\n", g_asmLabel.c_str(), g_voiceGroup.c_str());
std::fprintf(g_outputFile, "\t.equ\t%s_pri, %u\n", g_asmLabel.c_str(), g_priority);
if (g_reverb >= 0)

View File

@@ -35,7 +35,7 @@ FILE* g_outputFile = nullptr;
std::string g_asmLabel;
int g_masterVolume = 127;
int g_voiceGroup = 0;
std::string g_voiceGroup = "_dummy";
int g_priority = 0;
int g_reverb = -1;
int g_clocksPerBeat = 1;
@@ -52,7 +52,7 @@ bool g_compressionEnabled = true;
"\n"
"options -L??? label for assembler (default:output_file)\n"
" -V??? master volume (default:127)\n"
" -G??? voice group number (default:0)\n"
" -G??? voice group label (default:_dummy)\n"
" -P??? priority (default:0)\n"
" -R??? reverb (default:off)\n"
" -X 48 clocks/beat (default:24 clocks/beat)\n"
@@ -149,7 +149,7 @@ int main(int argc, char** argv)
arg = GetArgument(argc, argv, i);
if (arg == nullptr)
PrintUsage();
g_voiceGroup = std::stoi(arg);
g_voiceGroup = arg;
break;
case 'L':
arg = GetArgument(argc, argv, i);

View File

@@ -29,7 +29,7 @@ extern FILE* g_outputFile;
extern std::string g_asmLabel;
extern int g_masterVolume;
extern int g_voiceGroup;
extern std::string g_voiceGroup;
extern int g_priority;
extern int g_reverb;
extern int g_clocksPerBeat;