mirror of
https://github.com/open-goal/jak-project
synced 2026-08-21 14:54:53 -04:00
decomp3: some engine files (#3319)
- `vector-h` - `gravity-h` - `bounding-box-h` - `matrix-h` - `quaternion-h` - `euler-h` - `transform-h` - `geometry-h` - `trigonometry-h` - `transformq-h` - `bounding-box` - `matrix` - `matrix-compose` - `transform` - `quaternion` - `euler` - `trigonometry` Not a whole lot of changes, just a couple of new functions and one new file (`matrix-compose`).
This commit is contained in:
+13
-7
@@ -3,30 +3,36 @@ import os
|
||||
|
||||
jak1_files = None
|
||||
jak2_files = None
|
||||
jak3_files = None
|
||||
|
||||
with open('./goal_src/jak1/build/all_objs.json', 'r') as f:
|
||||
jak1_files = json.load(f)
|
||||
with open('./goal_src/jak2/build/all_objs.json', 'r') as f:
|
||||
jak2_files = json.load(f)
|
||||
with open('./goal_src/jak3/build/all_objs.json', 'r') as f:
|
||||
jak3_files = json.load(f)
|
||||
|
||||
def get_file_list(game_name):
|
||||
if game_name == "jak1":
|
||||
return jak1_files
|
||||
else:
|
||||
return jak2_files
|
||||
match game_name:
|
||||
case "jak1":
|
||||
return jak1_files
|
||||
case "jak2":
|
||||
return jak2_files
|
||||
case "jak3":
|
||||
return jak3_files
|
||||
|
||||
def get_gsrc_path_from_filename(game_name, file_name):
|
||||
file_list = get_file_list(game_name)
|
||||
src_path = ""
|
||||
for f in file_list:
|
||||
if f[2] != 3:
|
||||
if f[2] != 3 and f[2] != 5:
|
||||
continue
|
||||
if f[0] == file_name:
|
||||
src_path = f[4]
|
||||
break
|
||||
path = "./goal_src/{}/{}/{}.gc".format(game_name, src_path, file_name)
|
||||
if not os.path.exists(path):
|
||||
print("{} couldn't find in /goal_src/{}!".format(file_name, game_name))
|
||||
print("couldn't find {} in /goal_src/{}!".format(file_name, game_name))
|
||||
exit(1)
|
||||
return path
|
||||
|
||||
@@ -37,7 +43,7 @@ def get_ref_path_from_filename(game_name, file_name, ref_folder):
|
||||
file_list = get_file_list(game_name)
|
||||
src_path = ""
|
||||
for f in file_list:
|
||||
if f[2] != 3:
|
||||
if f[2] != 3 and f[2] != 5:
|
||||
continue
|
||||
if f[0] == file_name:
|
||||
src_path = f[4]
|
||||
|
||||
Reference in New Issue
Block a user