Hi there!
Context: I'm making a homemade controler for n64 to do macros (Combos) on SuperSmash Bros. Each characters(12 of them) has 4 combos for every maps (9 of thems). Wich makes a possibility of 432 combos!
Basics of my code:
1-My loop function starts by stocking the infos above in three int variables, that way it know what characters is played on what map and which combo I want to do.
2-If a certain button is pressed, it goes through three stades of switch (Character -> map -> 1 out of 4 combo) that leads to the calling of the sub fonctions containing the wanted macro (combo).
Here's a fragment to give you the big idea (warning: french comments:
switch (Per) //Regarde quel personnage est joué
{
case 1: //Luigi
switch(Map) //Regarde sur quel Map le personnage est joué
case 1: //Peach Castle
switch(MacSel) //Regarde quel Macro (Combo) est activé et fait appel à la fonction Combo désiré
case 1: //Combo 1
//CALLING THE VOID FONCTION PERFORMING THE COMBO1//
break;
case 2: //Combo 2
//CALLING THE VOID FONCTION PERFORMING THE COMBO2//
break;
case 3: //Combo 3
//CALLING THE VOID FONCTION PERFORMING THE COMBO3//
break;
case 4: //Combo 4
//CALLING THE VOID FONCTION PERFORMING THE COMBO4//
break;
end it goes on for the 432 possibilities...
Problem: I want to know if there could be is a simpler or cleaner way to call my 'combos' subfunctions...
I'm trying to recall my C courses notion to find something that could help me but I thought that you guys might be interested in giving me a hint!
Thank you in advance and greetings from Quebec!