119 switch (task->
step) {
134 if (task->
side != -1) {
135 if (task->
side == 0) {
156 switch (task->
step) {
171 if (task->
side != -1) {
172 if (task->
side == 0) {
206 switch (task->
step) {
221 if (task->
stage != -1) {
234 switch (task->
step) {
251 if (task->
side == -1) {
273 if (task->
side == -1) {
276 if (task->
effect != 0x12) {
326 switch (task->
state) {
355 switch (task->
step) {
412 switch (task->
state) {
415 for (i = 0; i < 2; i++) {
416 for (j = 0; j < 14; j++) {
438 if (pressed & (1 <<
PAD_UP)) {
439 for (k = 0; k < steps; k++) {
449 for (k = 0; k < steps; k++) {
474 for (m = 0; m < 14; m++) {
483 for (n = 0; n < 14; n++) {
527 switch (task->
state) {
530 for (i = 0; i < 12; i++) {
533 for (i = 0; i < 3; i++) {
554 if (pressed & (1 <<
PAD_UP)) {
555 for (k = 0; k < steps; k++) {
563 for (k = 0; k < steps; k++) {
581 for (j = 0; j < 12; j++) {
589 for (j = 0; j < 3; j++) {
623 switch (task->
state) {
626 for (n = 0; n < 14; n++) {
638 if (pressed & (1 <<
PAD_UP)) {
639 for (j = 0; j < steps; j++) {
646 }
else if (pressed & (1 <<
PAD_DOWN)) {
647 for (j = 0; j < steps; j++) {
664 for (i = 0; i < 14; i++) {
707 switch (task->
state) {
711 for (i = 0; i < 2; i++) {
712 list = &task->
lists[i];
723 for (j = 0; j < 0x3E; j++) {
724 if (motions[j] != 0) {
734 for (j = 0; j < list->
shown; j++) {
756 if (pressed & (1 <<
PAD_UP)) {
757 for (k = 0; k < steps; k++) {
767 for (k = 0; k < steps; k++) {
788 for (side = 0; side < 2; side++) {
789 for (m = 0; m < task->
lists[side].
shown; m++) {
826 for (i = 0; i < 2; i++) {
827 list = &task->
lists[i];
838 if (effects[0] == 0) {
844 for (j = 0; j < 0x13; j++) {
845 if (effects[j] != 0) {
861 for (j = 0; j < list->
shown; j++) {
872 for (side = 0; side < 2; side++) {
873 for (m = 0; m < task->
lists[side].
shown; m++) {
893 switch (task->
state) {
915 if (pressed & (1 <<
PAD_UP)) {
916 for (k = 0; k < steps; k++) {
926 for (k = 0; k < steps; k++) {
972 "\x83\x66\x83\x62\x83\x68\0\0"
974 "\x82\xA9\x82\xA2\x82\xD3\x82\xAD\0\0\0\0"
976 "\x83\x4C\x83\x81\x83\x7C\x81\x5B\x83\x59\0\0"
978 "\x83\x5F\x83\x81\x81\x5B\x83\x57\0\0\0\0"
980 "\x82\x72\x83\x74\x83\x46\x83\x43\x83\x58\x83\x41\x83\x62\x83\x76\0\0\0\0"
982 "\x83\x74\x83\x46\x83\x43\x83\x58\x83\x41\x83\x62\x83\x76\0\0"
984 "\x82\xBD\x82\xBD\x82\xA9\x82\xA4\x81\x7C\x82\x55\0\0\0\0"
986 "\x82\xBD\x82\xBD\x82\xA9\x82\xA4\x81\x7C\x82\x54\0\0\0\0"
988 "\x82\xBD\x82\xBD\x82\xA9\x82\xA4\x81\x7C\x82\x53\0\0\0\0"
990 "\x82\xBD\x82\xBD\x82\xA9\x82\xA4\x81\x7C\x82\x52\0\0\0\0"
992 "\x82\xBD\x82\xBD\x82\xA9\x82\xA4\x81\x7C\x82\x51\0\0\0\0"
994 "\x82\xBD\x82\xBD\x82\xA9\x82\xA4\x81\x7C\x82\x50"
1003 "\x82\x6C\x82\x64\x82\x65\x82\x73\x82\x4F\x82\x4F\x82\x54\x82\x54\0\0\0\0"
1005 "\x82\x6C\x82\x64\x82\x65\x82\x73\x82\x4F\x82\x4F\x82\x54\x82\x53\0\0\0\0"
1007 "\x82\x6C\x82\x64\x82\x65\x82\x73\x82\x4F\x82\x4F\x82\x54\x82\x52\0\0\0\0"
1009 "\x82\x6C\x82\x64\x82\x65\x82\x73\x82\x4F\x82\x4F\x82\x54\x82\x51\0\0\0\0"
1011 "\x82\x6C\x82\x64\x82\x65\x82\x73\x82\x4F\x82\x4F\x82\x54\x82\x50\0\0\0\0"
1013 "\x82\x6C\x82\x64\x82\x65\x82\x73\x82\x4F\x82\x4F\x82\x54\x82\x4F\0\0\0\0"
1015 "\x82\x6C\x82\x64\x82\x65\x82\x73\x82\x4F\x82\x4F\x82\x53\x82\x58\0\0\0\0"
1017 "\x82\x6C\x82\x64\x82\x65\x82\x73\x82\x4F\x82\x4F\x82\x53\x82\x57\0\0\0\0"
1019 "\x82\x6C\x82\x64\x82\x65\x82\x73\x82\x4F\x82\x4F\x82\x53\x82\x56\0\0\0\0"
1021 "\x82\x6C\x82\x64\x82\x65\x82\x73\x82\x4F\x82\x4F\x82\x53\x82\x55\0\0\0\0"
1023 "\x82\x6C\x82\x64\x82\x65\x82\x73\x82\x4F\x82\x4F\x82\x53\x82\x54\0\0\0\0"
1025 "\x82\x6C\x82\x64\x82\x65\x82\x73\x82\x4F\x82\x4F\x82\x53\x82\x53\0\0\0\0"
1027 "\x82\x6C\x82\x64\x82\x65\x82\x73\x82\x4F\x82\x4F\x82\x53\x82\x52\0\0\0\0"
1029 "\x82\x6C\x82\x64\x82\x65\x82\x73\x82\x4F\x82\x4F\x82\x53\x82\x51\0\0\0\0"
1031 "\x82\x6C\x82\x64\x82\x65\x82\x73\x82\x4F\x82\x4F\x82\x53\x82\x50\0\0\0\0"
1033 "\x82\x6C\x82\x64\x82\x65\x82\x73\x82\x4F\x82\x4F\x82\x53\x82\x4F\0\0\0\0"
1035 "\x82\x6C\x82\x64\x82\x65\x82\x73\x82\x4F\x82\x4F\x82\x52\x82\x58\0\0\0\0"
1037 "\x82\x6C\x82\x64\x82\x65\x82\x73\x82\x4F\x82\x4F\x82\x52\x82\x57\0\0\0\0"
1039 "\x82\x6C\x82\x64\x82\x65\x82\x73\x82\x4F\x82\x4F\x82\x52\x82\x56\0\0\0\0"
1041 "\x82\x6C\x82\x64\x82\x65\x82\x73\x82\x4F\x82\x4F\x82\x52\x82\x55\0\0\0\0"
1043 "\x82\x6C\x82\x64\x82\x65\x82\x73\x82\x4F\x82\x4F\x82\x52\x82\x54\0\0\0\0"
1045 "\x82\x6C\x82\x64\x82\x65\x82\x73\x82\x4F\x82\x4F\x82\x52\x82\x53\0\0\0\0"
1047 "\x82\x6C\x82\x64\x82\x65\x82\x73\x82\x4F\x82\x4F\x82\x52\x82\x52\0\0\0\0"
1049 "\x82\x6C\x82\x64\x82\x65\x82\x73\x82\x4F\x82\x4F\x82\x52\x82\x51\0\0\0\0"
1051 "\x82\x6C\x82\x64\x82\x65\x82\x73\x82\x4F\x82\x4F\x82\x52\x82\x50\0\0\0\0"
1053 "\x82\x6C\x82\x64\x82\x65\x82\x73\x82\x4F\x82\x4F\x82\x52\x82\x4F\0\0\0\0"
1055 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x51\x82\x58\0\0\0\0"
1057 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x51\x82\x57\0\0\0\0"
1059 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x51\x82\x56\0\0\0\0"
1061 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x51\x82\x55\0\0\0\0"
1063 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x51\x82\x54\0\0\0\0"
1065 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x51\x82\x53\0\0\0\0"
1067 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x51\x82\x52\0\0\0\0"
1069 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x51\x82\x51\0\0\0\0"
1071 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x51\x82\x50\0\0\0\0"
1073 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x51\x82\x4F\0\0\0\0"
1075 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x50\x82\x58\0\0\0\0"
1077 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x50\x82\x57\0\0\0\0"
1079 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x50\x82\x56\0\0\0\0"
1081 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x50\x82\x55\0\0\0\0"
1083 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x50\x82\x54\0\0\0\0"
1085 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x50\x82\x53\0\0\0\0"
1087 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x50\x82\x52\0\0\0\0"
1089 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x50\x82\x51\0\0\0\0"
1091 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x50\x82\x50\0\0\0\0"
1093 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x50\x82\x4F\0\0\0\0"
1095 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x4F\x82\x58\0\0\0\0"
1097 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x4F\x82\x57\0\0\0\0"
1099 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x4F\x82\x56\0\0\0\0"
1101 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x4F\x82\x55\0\0\0\0"
1103 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x4F\x82\x54\0\0\0\0"
1105 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x4F\x82\x53\0\0\0\0"
1107 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x4F\x82\x52\0\0\0\0"
1109 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x4F\x82\x51\0\0\0\0"
1111 "\x82\x6C\x82\x65\x82\x72\x82\x73\x82\x66\x82\x4F\x82\x4F\x82\x50"
1120 "\x83\x57\x83\x87\x83\x4F\x83\x8C\x83\x58\x81\x7C\x82\x54\0\0"
1122 "\x83\x57\x83\x87\x83\x4F\x83\x8C\x83\x58\x81\x7C\x82\x53\0\0"
1124 "\x83\x57\x83\x87\x83\x4F\x83\x8C\x83\x58\x81\x7C\x82\x52\0\0"
1126 "\x83\x57\x83\x87\x83\x4F\x83\x8C\x83\x58\x81\x7C\x82\x51\0\0"
1128 "\x83\x57\x83\x87\x83\x4F\x83\x8C\x83\x58\x81\x7C\x82\x50\0\0"
1130 "\x83\x57\x83\x87\x83\x4F\x83\x8C\x83\x58\x81\x7C\x82\x4F\0\0"
1132 "\x83\x71\x83\x62\x83\x54\x83\x63\x81\x7C\x82\x54\0\0\0\0"
1134 "\x83\x71\x83\x62\x83\x54\x83\x63\x81\x7C\x82\x53\0\0\0\0"
1136 "\x83\x71\x83\x62\x83\x54\x83\x63\x81\x7C\x82\x52\0\0\0\0"
1138 "\x83\x71\x83\x62\x83\x54\x83\x63\x81\x7C\x82\x51\0\0\0\0"
1140 "\x83\x71\x83\x62\x83\x54\x83\x63\x81\x7C\x82\x50\0\0\0\0"
1142 "\x83\x71\x83\x62\x83\x54\x83\x63\x81\x7C\x82\x4F\0\0\0\0"
1144 "\x83\x8F\x81\x46\x83\x7D\x81\x46\x83\x4A\x81\x7C\x82\x54\0\0"
1146 "\x83\x8F\x81\x46\x83\x7D\x81\x46\x83\x4A\x81\x7C\x82\x53\0\0"
1148 "\x83\x8F\x81\x46\x83\x7D\x81\x46\x83\x4A\x81\x7C\x82\x52\0\0"
1150 "\x83\x8F\x81\x46\x83\x7D\x81\x46\x83\x4A\x81\x7C\x82\x51\0\0"
1152 "\x83\x8F\x81\x46\x83\x7D\x81\x46\x83\x4A\x81\x7C\x82\x50\0\0"
1154 "\x83\x8F\x81\x46\x83\x7D\x81\x46\x83\x4A\x81\x7C\x82\x4F\0\0"
1156 "\x83\x8F\x81\x46\x83\x7D\x81\x46\x83\x45\x81\x7C\x82\x54\0\0"
1158 "\x83\x8F\x81\x46\x83\x7D\x81\x46\x83\x45\x81\x7C\x82\x53\0\0"
1160 "\x83\x8F\x81\x46\x83\x7D\x81\x46\x83\x45\x81\x7C\x82\x52\0\0"
1162 "\x83\x8F\x81\x46\x83\x7D\x81\x46\x83\x45\x81\x7C\x82\x51\0\0"
1164 "\x83\x8F\x81\x46\x83\x7D\x81\x46\x83\x45\x81\x7C\x82\x50\0\0"
1166 "\x83\x8F\x81\x46\x83\x7D\x81\x46\x83\x45\x81\x7C\x82\x4F\0\0"
1168 "\x83\x8F\x81\x46\x83\x75\x81\x46\x82\x52\x81\x7C\x82\x54\0\0"
1170 "\x83\x8F\x81\x46\x83\x75\x81\x46\x82\x52\x81\x7C\x82\x53\0\0"
1172 "\x83\x8F\x81\x46\x83\x75\x81\x46\x82\x52\x81\x7C\x82\x52\0\0"
1174 "\x83\x8F\x81\x46\x83\x75\x81\x46\x82\x52\x81\x7C\x82\x51\0\0"
1176 "\x83\x8F\x81\x46\x83\x75\x81\x46\x82\x52\x81\x7C\x82\x50\0\0"
1178 "\x83\x8F\x81\x46\x83\x75\x81\x46\x82\x52\x81\x7C\x82\x4F\0\0"
1180 "\x83\x8F\x81\x46\x83\x75\x81\x46\x82\x51\x81\x7C\x82\x54\0\0"
1182 "\x83\x8F\x81\x46\x83\x75\x81\x46\x82\x51\x81\x7C\x82\x53\0\0"
1184 "\x83\x8F\x81\x46\x83\x75\x81\x46\x82\x51\x81\x7C\x82\x52\0\0"
1186 "\x83\x8F\x81\x46\x83\x75\x81\x46\x82\x51\x81\x7C\x82\x51\0\0"
1188 "\x83\x8F\x81\x46\x83\x75\x81\x46\x82\x51\x81\x7C\x82\x50\0\0"
1190 "\x83\x8F\x81\x46\x83\x75\x81\x46\x82\x51\x81\x7C\x82\x4F\0\0"
1192 "\x83\x8F\x81\x46\x83\x75\x81\x46\x82\x50\x81\x7C\x82\x54\0\0"
1194 "\x83\x8F\x81\x46\x83\x75\x81\x46\x82\x50\x81\x7C\x82\x53\0\0"
1196 "\x83\x8F\x81\x46\x83\x75\x81\x46\x82\x50\x81\x7C\x82\x52\0\0"
1198 "\x83\x8F\x81\x46\x83\x75\x81\x46\x82\x50\x81\x7C\x82\x51\0\0"
1200 "\x83\x8F\x81\x46\x83\x75\x81\x46\x82\x50\x81\x7C\x82\x50\0\0"
1202 "\x83\x8F\x81\x46\x83\x75\x81\x46\x82\x50\x81\x7C\x82\x4F\0\0"
1204 "\x83\x5E\x83\x5E\x83\x4A\x83\x45\x81\x7C\x82\x54\0\0\0\0"
1206 "\x83\x5E\x83\x5E\x83\x4A\x83\x45\x81\x7C\x82\x53\0\0\0\0"
1208 "\x83\x5E\x83\x5E\x83\x4A\x83\x45\x81\x7C\x82\x52\0\0\0\0"
1210 "\x83\x5E\x83\x5E\x83\x4A\x83\x45\x81\x7C\x82\x51\0\0\0\0"
1212 "\x83\x5E\x83\x5E\x83\x4A\x83\x45\x81\x7C\x82\x50\0\0\0\0"
1214 "\x83\x5E\x83\x5E\x83\x4A\x83\x45\x81\x7C\x82\x4F\0\0\0\0"
1216 "\x82\xA2\x82\xA9\x82\xE8\0\0"
1218 "\x83\x4C\x83\x81\x83\x7C\x81\x5B\x83\x59\0\0"
1220 "\x82\xA8\x82\xAB\x82\xA0\x82\xAA\x82\xE8\0\0"
1222 "\x83\x66\x83\x62\x83\x68\0\0"
1224 "\x82\x6B\x83\x5F\x83\x81\x81\x5B\x83\x57\x81\x7C\x82\x54\0\0"
1226 "\x82\x6B\x83\x5F\x83\x81\x81\x5B\x83\x57\x81\x7C\x82\x53\0\0"
1228 "\x82\x6B\x83\x5F\x83\x81\x81\x5B\x83\x57\x81\x7C\x82\x52\0\0"
1230 "\x82\x6B\x83\x5F\x83\x81\x81\x5B\x83\x57\x81\x7C\x82\x51\0\0"
1232 "\x82\x6B\x83\x5F\x83\x81\x81\x5B\x83\x57\x81\x7C\x82\x50\0\0"
1234 "\x82\x6B\x83\x5F\x83\x81\x81\x5B\x83\x57\x81\x7C\x82\x4F\0\0"
1236 "\x82\x72\x83\x5F\x83\x81\x81\x5B\x83\x57\0\0"
1238 "\x83\x4B\x81\x5B\x83\x68\0\0"
1240 "\x83\x45\x83\x46\x83\x43\x83\x67\x81\x7C\x82\x50\0\0\0\0"
1242 "\x83\x45\x83\x46\x83\x43\x83\x67\x81\x7C\x82\x4F"
1251 "\x82\x6F\x82\x71\x82\x6E\x81\x46\x82\xC7\x82\xAD\0\0\0\0"
1253 "\x83\x58\x83\x65\x81\x5B\x83\x5E\x83\x58\x81\x46\x83\x5F\x83\x41\0\0\0\0"
1255 "\x83\x58\x83\x65\x81\x5B\x83\x5E\x83\x58\x81\x46\x83\x5F\0\0"
1257 "\x83\x74\x83\x42\x81\x5B\x83\x8B\x83\x68\x81\x46\x83\x52\0\0"
1259 "\x83\x41\x83\x43\x83\x65\x83\x80\x81\x46\x83\x5F\0\0\0\0"
1261 "\x83\x8F\x81\x46\x83\x7D\x81\x46\x83\x45\x81\x46\x82\x52\0\0"
1263 "\x83\x57\x83\x87\x83\x4F\x83\x8C\x83\x58\0\0"
1265 "\x83\x71\x83\x62\x83\x54\x83\x63\0\0\0\0"
1267 "\x83\x8F\x81\x46\x83\x7D\x81\x46\x83\x4A\0\0"
1269 "\x83\x8F\x81\x46\x83\x7D\x81\x46\x83\x45\0\0"
1271 "\x83\x8F\x81\x46\x83\x75\x81\x46\x82\x52\0\0"
1273 "\x83\x8F\x81\x46\x83\x75\x81\x46\x82\x51\0\0"
1275 "\x83\x8F\x81\x46\x83\x75\x81\x46\x82\x50\0\0"
1277 "\x82\xBD\x82\xBD\x82\xA9\x82\xA4\0\0\0\0"
1279 "\x83\x4B\x81\x5B\x83\x68\0\0"
1281 "\x83\x66\x83\x62\x83\x68\0\0"
1283 "\x82\x6B\x83\x5F\x83\x81\x81\x5B\x83\x57\0\0"
1285 "\x82\x72\x83\x5F\x83\x81\x81\x5B\x83\x57\0\0"
1287 "\x83\x45\x83\x46\x83\x43\x83\x67\0\0\0\0"
1289 "\x81\x7C\x82\x6D\x82\x6E\x82\x6D\x82\x64\x81\x7C"
1297#define WFIGHTTS_STR(offset) ((char *)WFIGHTTS_strings + (offset))
1304 {0x017A, 0x01B9}, {0x016E, 0x0073}, {0x0103, 0x00CA}, {0x016E, 0x01B4},
1305 {0x0091, 0x00C5}, {0x001F, 0x0089}, {0x0097, 0x006C},
1309 { 0, 0 }, { 320, 0 }, { 0, 240 }, { 320, 240 },
1312 { 0x80, 0x80, 0x80, 0 }, { 0x80, 0x80, 0x80, 0 },
1313 { 0x80, 0x80, 0x80, 0 }, { 0x80, 0x80, 0x80, 0 },
FighterCache FIGHTSTG_fighterCache
the fighters' data, loaded one at a time
Battle FIGHTSTG_battle
the battle: its fighters, speed and drawing functions
#define BATTLE_LAYER_MENUS
the HUD, the menus and the messages
#define BATTLE_LAYER_CAMERA
The battle's layers, over the screen's (SCREEN_LAYER)
#define BATTLE_TASK_MODELS
the fighters'
#define FIGHTSTG_CREATE_LAYERS(screen, frontCallbacks)
The body of WFIGHTMN's and WFIGHTTS's layer setups: the display and the battle's layers on SCREEN (a ...
BattleCamera * FIGHTSTG_createBattleCamera(s32 layerId)
Creates the battle camera (BATTLE_TASK_CAMERA) on a layer.
BattleScript * FIGHTSTG_createBattleScript(void)
Creates a battle script, which plays a technique (FIGHTSTG_updateBattleScript)
static void setUpBattle(BattleTest *task, BattleTestChildren *children)
Frees the files, loads the sound bank and plays the music, loads the images, then creates the battle'...
CameraView WFIGHTTS_enemyView
char * WFIGHTTS_stageNames[]
s16 WFIGHTTS_fighters[][2]
The partner and the enemy the battle test starts with, by the mode's argument.
void WFIGHTTS_initLayers(void)
Sets up the display and the battle test's layers.
void WFIGHTTS_cameraList(BattleTestList *task, CameraListWindows *windows)
The camera list: the partner's 12 cameras on the right and the enemy's 3 on the left (RIGHT and LEFT ...
char * WFIGHTTS_effectNames[]
s32 WFIGHTTS_fighterScrolls[2]
static void runCameraList(BattleTest *task, BattleTestChildren *children)
Page 2: the camera list; L1 and R1 go to the next and previous lists, and a camera picked of a side's...
static void runPlayPage(BattleTest *task, BattleTestChildren *children)
Page 0: CROSS goes back to the last list, and R1, R2 and L2 play an entrance, a Digimon change and a ...
void WFIGHTTS_fighterList(BattleTestList *task, BattleTestWindows *windows)
The fighter list: the partners on the right and the enemies on the left, fourteen shown at a time (RI...
s32 WFIGHTTS_fighterCursors[2]
BattleTestMotions * WFIGHTTS_createMotionList(s32 *side, s32 *motion)
Starts the motion list, which sets *SIDE and *MOTION.
Task * WFIGHTTS_start(void)
WFIGHTTS's entry point: creates the battle test, though with 0 bytes for its fields and for its child...
char * WFIGHTTS_partnerCameraNames[]
the cameras' names: the partner's 12 and the enemy's 3
void WFIGHTTS_loadImages(void)
Loads the battle test's images into VRAM.
BattleTestList * WFIGHTTS_createFighterList(s32 *side, s32 *pick)
Starts the fighter list, which sets *SIDE and *PICK.
BattleTestCursors WFIGHTTS_effectCursors
static void runStageList(BattleTest *task, BattleTestChildren *children)
Page 3: the stage list; L1 and R1 go to the next and previous lists, and a stage picked replaces the ...
DVECTOR WFIGHTTS_backPoints[4]
the full-screen quad behind the lists, and its grey
static void moveDisplay(void)
With R2 held, the pad moves the display and START puts it back; without, sets the normal display mode...
static void pickEffect(BattleTest *task, BattleTestChildren *children)
Page 5 once its list is open: L1 and R1 go to the next and previous lists, and an effect picked plays...
void WFIGHTTS_effectList(BattleTestEffects *task, BattleTestWindows *windows)
The effect list, like the motion list: fills its lists (fillEffectLists), then CROSS sets the side an...
CVECTOR WFIGHTTS_backColors[4]
BattleTestList * WFIGHTTS_createCameraList(s32 *side, s32 *pick)
Starts the camera list, which sets *SIDE and *PICK.
s32 WFIGHTTS_displayX
where R2 with the pad moves the display to
s32 WFIGHTTS_cameraSide
the camera list's side, and each side's camera
void WFIGHTTS_battleTest(BattleTest *task, BattleTestChildren *children)
The battle test: sets up the battle (setUpBattle), then runs its pages.
static void drawEffectNames(BattleTestEffects *task, BattleTestWindows *windows)
Draws both sides' effect names, the one under the cursor blinking.
static void runMotionList(BattleTest *task, BattleTestChildren *children)
Page 4: the motion list; L1 and R1 go to the next and previous lists, and a motion picked is given to...
static void fillEffectLists(BattleTestEffects *task, BattleTestWindows *windows)
Fills both sides' lists with the effects their fighter has (only "none" without any) and creates thei...
BattleTestStageList * WFIGHTTS_createStageList(s32 *result)
Starts the stage list, which sets *RESULT.
s32 WFIGHTTS_cameraPicks[2]
#define WFIGHTTS_STR(offset)
const char WFIGHTTS_strings[0x9C0]
The strings of the tables below, as GCC emitted them: each table's last to first, and each padded to ...
s32 WFIGHTTS_fighterSide
the fighter list's side, and each side's cursor and scroll
char * WFIGHTTS_motionNames[]
the motions' and the effects' names, for their lists
void WFIGHTTS_motionList(BattleTestMotions *task, BattleTestWindows *windows)
The motion list: the partner's motions on the right and the enemy's on the left, fourteen shown at a ...
s32 WFIGHTTS_speedMode
the battle's speed (FIGHTSTG_battle.speed.mode), which SELECT cycles
BattleTestCursors WFIGHTTS_motionCursors
char * WFIGHTTS_enemyCameraNames[]
void WFIGHTTS_stageList(BattleTestStageList *task, TextWindow **windows)
The fight stage list: 14 of the 55 stages at a time (UP and DOWN, ten at a time with SQUARE held); it...
CameraView WFIGHTTS_partnerView
the views the camera list fades to, from the partner's and the enemy's cameras
BattleTestEffects * WFIGHTTS_createEffectList(s32 *side, s32 *effect)
Starts the effect list, which sets *SIDE and *EFFECT.
RECT WFIGHTTS_screen
The screen, for the layers.
static void runFighterList(BattleTest *task, BattleTestChildren *children)
Page 1: the fighter list; L1 and R1 go to the next and previous lists, and a fighter picked replaces ...
WFIGHTTS.PRO: the battle test, a debug menu.
CameraTurn * FIGHTSTG_startCameraTurn(void)
Starts the camera's turn around the fighters.
DigimonChange * FIGHTSTG_startDigimonChange(s32 key1, s32 key2)
Starts a partner's Digimon change (FIGHTSTG_updateDigimonChange)
GfxState GFX
GFX: the graphics state and its methods.
HitEffect * FIGHTSTG_startHitEffect()
WFIGHTMN passes the damage as a third argument, which it doesn't read; its code loads it,...
GameState GAME
The save data, the game mode and the methods.
Entrance * FIGHTSTG_startEntrance(s32 id, s32 side, s32 weak)
Starts a fighter's entrance: Digimon id on the player's side (side 0) or the enemy's.
#define FILE_BATTLE_IMAGES_3
#define FILE_BATTLE_IMAGES_4
#define FILE_BATTLE_IMAGES_1
#define FILE_BATTLE_IMAGES_2
#define TEXT_DIGIMON_NAMES
DIGNAM.
#define FILE_BATTLE_IMAGES
FileCache FILE_CACHE
The file cache.
#define SCREEN_WIDTH
The screen the modes draw on (setDisplayMode, their layers' rects)
Lights * FIGHTSTG_createLights(s32 layerId)
Creates the stage lights (id 0x13) for layer layerId.
Models * FIGHTSTG_createModels(void)
Creates the fighters' models (Models), with no fighters yet.
PadState PAD
Controller input: cleared by initPad, then the methods.
#define PAD_SELECT
Logical buttons: bits of PadSlot.held/pressed/repeated, which readPadButtons builds from the raw pad ...
#define PAD_PRESSED(button)
One button of pad 1: newly pressed, auto-repeated while held, or held.
void FIGHTSTG_setPlayerTurnStep(s32 substate)
Sets the player's turn's substate, while it runs (4 picks the next fighter)
PlayerTurn * FIGHTSTG_startPlayerTurn(void)
Starts the player's turn (FIGHTSTG_updatePlayerTurn, id 0xE)
TaskRegistry TASK_REGISTRY
SoundState SOUND
rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall i...
#define MUSIC_BATTLE
BATL0000: the maps' random battles (AreaBattle, nearly all of them)
FightStage * FIGHTSTG_createStage(s32 id, s32 fadeInTime)
Creates the fight stage (id 0x15), which loads stage id and fades it in over fadeInTime.
CameraView *(* getEnemyView)(struct BattleCamera *task)
void(* set)(struct BattleCamera *task, CameraView *view)
void(* fade)(struct BattleCamera *task, CameraView *from, CameraView *to, s32 time)
from: NULL for the current
s32 enemy
the script is the enemy's (nonzero) or the partner's
s32 sound
what the sound commands' 0x62 and 0x63 stand for on a hit
s32 hits[4]
0 a hit, 3 a miss; [3] how it ended
s32 index
the script, in the fighter's archive
s32 stage
what the stage command's 0x38 stands for
s32 music
the battle's music
s32 stage
the battle's fight stage
The battle test's children.
BattleChild task
what plays, NULL when done
BattleTestList * fighters
BattleTestStageList * stages
BattleTestMotions * motions
PlayerTurn * commands
the player's turn (FIGHTSTG_startPlayerTurn)
BattleTestEffects * effects
Where the motion and the effect lists are: the fighters they were made for, the list LEFT and RIGHT p...
A fighter's effects, in the effect list (WFIGHTTS_effectList): each one plus 1, or just a 0 for a fig...
BattleTestEffectList lists[2]
the partner's, the enemy's
void(* nextState)(struct BattleTestEffects *task)
void(* setState)(struct BattleTestEffects *task, s32 state)
s32 * effect
the effect picked
The fighters' and the cameras' lists (WFIGHTTS_fighterList, WFIGHTTS_cameraList)
void(* setState)(struct BattleTestList *task, s32 state)
s32 * side
0 the partner, 1 the enemy, -1 for none
s32 * pick
set to 0 when it starts
void(* nextState)(struct BattleTestList *task)
A fighter's motions, in the motion list (WFIGHTTS_motionList)
s32 motions[0x3E]
the ones the fighter has
void(* setState)(struct BattleTestMotions *task, s32 state)
BattleTestMotionList lists[2]
the partner's, the enemy's
s32 * motion
the motion picked
void(* nextState)(struct BattleTestMotions *task)
void(* nextState)(struct BattleTestStageList *task)
s32 * result
the stage picked, 1-55, or -1
void(* setState)(struct BattleTestStageList *task, s32 state)
The fighter, motion and effect lists' windows, by list.
TextWindow * windows[2][14]
The battle test (WFIGHTTS_battleTest).
s32 page
the last list, which CROSS goes back to
s32 camera
by the fighter's motion
void(* nextSubstate)(struct BattleTest *task)
void(* nextStep)(struct BattleTest *task)
s32 side
0 the partner, 1 the enemy, -1 for none
void(* setSubstate)(struct BattleTest *task, s32 substate)
void(* nextState)(struct BattleTest *task)
void(* drawBlendedQuad)(s32 layerId, s32 depth, DVECTOR *xy, CVECTOR *colors)
void(* setSpeed)(s32 mode)
The camera list's windows: the partners' cameras and the enemies'.
Where the battle camera looks from and to, as a GsRVIEW2 with the transform of its coordinate system.
s32 rz
the roll, in degrees
s32 proj
the projection distance
void(* setStage)(struct FightStage *task, s32 stage, s32 fadeOutTime, s32 fadeInTime)
FighterInfo * partnerInfo
both hold the info found, read by isEnemy
An enemy's FighterInfo: it has 3 cameras where a partner has 12.
void(* cacheEntry)(s32 index)
FIGHTSTG_cacheFighter: the list's entry at index.
FighterInfo *(* getInfo)(s32 id)
A fighter's entry in its file, from FIGHTSTG_fighterCache.funcs.getInfo.
ShortVec3 camPos[12]
the cameras that look at it; an enemy has 3 of each and then their count
s32 effects
its effect scripts' archive
void *(* getEntry)(u32 fileAndIndex)
void(* setDisplayMode)(s32 w, s32 h, s32 hires, s32 interlace)
s32 motion
the motion to play
The fighters' models (FIGHTSTG_createModels), registered as BATTLE_TASK_MODELS: up to four,...
void(* face)(struct Models *task, s32 id)
ids under 0x10 are one side
void(* add)(struct Models *task, s32 id, s32 fighter, s32 visible)
s32(* getFighter)(struct Models *task, s32 id)
ModelControl *(* get)(struct Models *task, s32 id)
s32(* getRepeated)(s32 pad)
s32(* getPressed)(s32 pad)
short(* playSound)(s32 id)
returns the voice of a key-on
void *(* find)(s32 id, s32 key1, s32 key2)
Any task, seen through its header.
A text window (createTextWindow): up to six text buffers (0 is shown, 1-5 are "work" buffers that con...
void(* setVisible)(struct TextWindow *obj, u8 arg)
Uploads TIM images to VRAM (initTimLoader); acts on TIM_LOADER.
void(* setImagePos)()
(x, y)
void(* loadArchive)()
(archive): each image 64 halfwords to the right
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find
void * createTaskWithId(void(*update)(), s32 size, s32 childrenSize, s32 id)
Allocates a zeroed task of size bytes (header included) with room for childrenSize / 4 child tasks.
TextWindow * createTextWindow(s16 layerId, s16 style, s16 x, s16 y)
A text window on a layer, in a font style, at (x, y)
void initTimLoader(TimLoader *obj)
Clears a TIM loader, gives it its methods and binds it.
Entrance * entrance
a fighter's (FIGHTSTG_startEntrance)
DigimonChange * change
a partner's Digimon change (FIGHTSTG_startDigimonChange)
HitEffect * hitEffect
effect 0x33, then a script (FIGHTSTG_startHitEffect)
BattleScript * script
a technique's (FIGHTSTG_createBattleScript)
CameraTurn * cameraTurn
when the player loses (FIGHTSTG_startCameraTurn)