mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
Merge pull request #315 from DavidSM64/fixscore
Fixed score script. Also decompiled func_80028CD0
This commit is contained in:
+4
-1
@@ -1397,7 +1397,10 @@ typedef struct ObjectSegment {
|
||||
|
||||
union {
|
||||
/* 0x0034 */ f32 unk34;
|
||||
/* 0x0034 */ s16 levelSegmentIndex;
|
||||
struct {
|
||||
/* 0x0034 */ s16 levelSegmentIndex;
|
||||
/* 0x0036 */ s16 unk36;
|
||||
};
|
||||
} unk34_a;
|
||||
|
||||
union {
|
||||
|
||||
+44
-4
@@ -138,9 +138,9 @@ s32 D_8011D2B8[20];
|
||||
s32 D_8011D308;
|
||||
LevelModel *D_8011D30C;
|
||||
s32 *D_8011D310;
|
||||
s32 D_8011D314;
|
||||
s32 D_8011D318;
|
||||
s32 D_8011D31C;
|
||||
f32 D_8011D314;
|
||||
f32 D_8011D318;
|
||||
f32 D_8011D31C;
|
||||
s32 *D_8011D320[4];
|
||||
unk8011D330 *D_8011D330;
|
||||
s32 D_8011D334;
|
||||
@@ -621,7 +621,47 @@ void render_skydome(void) {
|
||||
}
|
||||
}
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_0255E0/func_80028CD0.s")
|
||||
void func_800B8C04(s32, s32, s32, s32, s32);
|
||||
|
||||
void func_80028CD0(s32 updateRate) {
|
||||
s32 i;
|
||||
s32 numRacers;
|
||||
s32 sp3C;
|
||||
Object** racers; // sp38?
|
||||
s32 temp_v0;
|
||||
Object_Racer *racer;
|
||||
|
||||
D_8011B0B0 = func_80069D20();
|
||||
sp3C = get_object_render_stack_pos();
|
||||
func_80031018();
|
||||
set_and_normalize_D_8011AFE8((f32) D_8011D468.x / 65536.0f, (f32) D_8011D468.y / 65536.0f, (f32) D_8011D468.z / 65536.0f);
|
||||
temp_v0 = D_8011B0B0->segment.unk34_a.levelSegmentIndex;
|
||||
if ((temp_v0 >= 0) && (temp_v0 < gCurrentLevelModel->numberOfSegments)) {
|
||||
D_8011B0D4 = (s32) gCurrentLevelModel->segments[temp_v0].unk28;
|
||||
} else {
|
||||
D_8011B0D4 = -1;
|
||||
}
|
||||
D_8011D314 = D_8011B0B0->segment.trans.x_position;
|
||||
D_8011D318 = D_8011B0B0->segment.trans.y_position;
|
||||
D_8011D31C = D_8011B0B0->segment.trans.z_position;
|
||||
if (D_8011D384 != 0) {
|
||||
func_800B8B8C();
|
||||
racers = get_racer_objects(&numRacers);
|
||||
if ((D_8011B0B0->segment.unk34_a.unk36 != 7) && (numRacers > 0) && (!check_if_showing_cutscene_camera())) {
|
||||
i = -1;
|
||||
do {
|
||||
i++;
|
||||
racer = &racers[i]->unk64->racer;
|
||||
} while((i < (numRacers - 1)) && (sp3C != (racer->playerIndex)));
|
||||
func_800B8C04(racers[i]->segment.trans.x_position, racers[i]->segment.trans.y_position, racers[i]->segment.trans.z_position, get_object_render_stack_pos(), updateRate);
|
||||
} else {
|
||||
func_800B8C04((s32) D_8011B0B0->segment.trans.x_position, (s32) D_8011B0B0->segment.trans.y_position, (s32) D_8011B0B0->segment.trans.z_position, get_object_render_stack_pos(), updateRate);
|
||||
}
|
||||
}
|
||||
get_current_level_header()->unk3 = 1;
|
||||
render_level_geometry_and_objects();
|
||||
}
|
||||
|
||||
|
||||
void func_80028FA0(s32 arg0) {
|
||||
D_8011B0FC = arg0;
|
||||
|
||||
+30
-16
@@ -2,30 +2,44 @@ import re
|
||||
import sys
|
||||
import argparse
|
||||
import time
|
||||
import os
|
||||
from file_util import FileUtil
|
||||
from score_display import ScoreDisplay
|
||||
|
||||
ASM_FOLDERS = [
|
||||
'./asm/unknown_0251F0',
|
||||
'./asm/unknown_031D30',
|
||||
'./asm/unknown_062930',
|
||||
'./asm/unknown_070110',
|
||||
'./asm/gzip',
|
||||
'./asm',
|
||||
'./lib/asm',
|
||||
'./lib/asm/exception',
|
||||
]
|
||||
|
||||
BLACKLIST = [
|
||||
'/non_matchings/'
|
||||
]
|
||||
|
||||
filelist = []
|
||||
|
||||
for asmDir in ASM_FOLDERS:
|
||||
for root, dirs, files in os.walk(asmDir):
|
||||
for file in files:
|
||||
fullPath = os.path.join(root,file)
|
||||
skipThis = False
|
||||
for blackListEntry in BLACKLIST:
|
||||
if blackListEntry in fullPath:
|
||||
skipThis = True
|
||||
break
|
||||
if not skipThis and fullPath.endswith('.s'):
|
||||
filelist.append(fullPath)
|
||||
|
||||
# These will automatically be added to the adventure one percentage.
|
||||
ASM_LABELS = [ 'entrypoint' ]
|
||||
for folder in ASM_FOLDERS:
|
||||
GLABEL_REGEX = r'glabel ([0-9A-Za-z_]+)'
|
||||
filenames = FileUtil.get_filenames_from_directory(folder, extensions=('.s',))
|
||||
for filename in filenames:
|
||||
with open(folder + '/' + filename, 'r') as asmFile:
|
||||
text = asmFile.read()
|
||||
matches = re.finditer(GLABEL_REGEX, text, re.MULTILINE)
|
||||
for matchNum, match in enumerate(matches, start=1):
|
||||
ASM_LABELS.append(match.groups()[0])
|
||||
ASM_LABELS = []
|
||||
GLABEL_REGEX = r'glabel ([0-9A-Za-z_]+)'
|
||||
for filename in filelist:
|
||||
with open(filename, 'r') as asmFile:
|
||||
text = asmFile.read()
|
||||
matches = re.finditer(GLABEL_REGEX, text, re.MULTILINE)
|
||||
for matchNum, match in enumerate(matches, start=1):
|
||||
glabel = match.groups()[0]
|
||||
if not glabel in ASM_LABELS:
|
||||
ASM_LABELS.append(glabel)
|
||||
|
||||
BUILD_DIRECTORY = './build/us_1.0'
|
||||
SRC_DIRECTORY = './src'
|
||||
|
||||
Reference in New Issue
Block a user