d_raiden2: update zteamys

Harmonization to tabs
This commit is contained in:
taoenwen 2024-05-31 01:10:25 +08:00
parent 15f6c2724f
commit e8235b6fb1
1 changed files with 46 additions and 46 deletions

View File

@ -1202,59 +1202,59 @@ struct cop_sortstr {
}; };
static void merge(cop_sortstr arr[], cop_sortstr left[], int left_size, cop_sortstr right[], int right_size, int ascending) { static void merge(cop_sortstr arr[], cop_sortstr left[], int left_size, cop_sortstr right[], int right_size, int ascending) {
int i = 0, j = 0, k = 0; int i = 0, j = 0, k = 0;
int comparison; int comparison;
while (i < left_size && j < right_size) { while (i < left_size && j < right_size) {
if (ascending) { if (ascending) {
comparison = (left[i].sortby <= right[j].sortby); comparison = (left[i].sortby <= right[j].sortby);
} else { } else {
comparison = (left[i].sortby >= right[j].sortby); comparison = (left[i].sortby >= right[j].sortby);
} }
if (comparison) { if (comparison) {
arr[k] = left[i]; arr[k] = left[i];
i++; i++;
} else { } else {
arr[k] = right[j]; arr[k] = right[j];
j++; j++;
} }
k++; k++;
} }
while (i < left_size) { while (i < left_size) {
arr[k] = left[i]; arr[k] = left[i];
i++; i++;
k++; k++;
} }
while (j < right_size) { while (j < right_size) {
arr[k] = right[j]; arr[k] = right[j];
j++; j++;
k++; k++;
} }
} }
static void mergeSort(cop_sortstr arr[], int size, int ascending) { static void mergeSort(cop_sortstr arr[], int size, int ascending) {
if (size <= 1) if (size <= 1)
return; return;
int mid = size / 2; int mid = size / 2;
cop_sortstr* left = (cop_sortstr*)BurnMalloc(mid * sizeof(cop_sortstr)); cop_sortstr* left = (cop_sortstr*)BurnMalloc(mid * sizeof(cop_sortstr));
cop_sortstr* right = (cop_sortstr*)BurnMalloc((size - mid) * sizeof(cop_sortstr)); cop_sortstr* right = (cop_sortstr*)BurnMalloc((size - mid) * sizeof(cop_sortstr));
for (int i = 0; i < mid; i++) for (int i = 0; i < mid; i++)
left[i] = arr[i]; left[i] = arr[i];
for (int i = mid; i < size; i++) for (int i = mid; i < size; i++)
right[i - mid] = arr[i]; right[i - mid] = arr[i];
mergeSort(left, mid, ascending); mergeSort(left, mid, ascending);
mergeSort(right, size - mid, ascending); mergeSort(right, size - mid, ascending);
merge(arr, left, mid, right, size - mid, ascending); merge(arr, left, mid, right, size - mid, ascending);
BurnFree(left); BurnFree(left);
BurnFree(right); BurnFree(right);
} }
static void cop_sort_dma_trig_write(UINT16 data) static void cop_sort_dma_trig_write(UINT16 data)
@ -5862,13 +5862,13 @@ struct BurnDriver BurnDrvZteamym = {
// Zero Team USA (God, Hack) // Zero Team USA (God, Hack)
// Modified by YanYan // Modified by YanYan
// GOTVG 20240227 // GOTVG 20240413
static struct BurnRomInfo zteamysRomDesc[] = { static struct BurnRomInfo zteamysRomDesc[] = {
{ "ztys__1.u024.5k", 0x040000, 0xb18507f8, 1 | BRF_PRG | BRF_ESS }, // 0 V30 Code { "ztys__1.u024.5k", 0x040000, 0x472e93cd, 1 | BRF_PRG | BRF_ESS }, // 0 V30 Code
{ "ztys__3.u023.6k", 0x040000, 0x085be47f, 1 | BRF_PRG | BRF_ESS }, // 1 { "ztys__3.u023.6k", 0x040000, 0x60f0cc00, 1 | BRF_PRG | BRF_ESS }, // 1
{ "ztys__2.u025.6l", 0x040000, 0x40483d13, 1 | BRF_PRG | BRF_ESS }, // 2 { "ztys__2.u025.6l", 0x040000, 0x14fd9f50, 1 | BRF_PRG | BRF_ESS }, // 2
{ "ztys__4.u026.5l", 0x040000, 0x28237717, 1 | BRF_PRG | BRF_ESS }, // 3 { "ztys__4.u026.5l", 0x040000, 0x65bc51a6, 1 | BRF_PRG | BRF_ESS }, // 3
ZEROTEAM_COMPONENTS ZEROTEAM_COMPONENTS
}; };