Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix the filenames for the code files + minor fixes #1159

Merged
merged 6 commits into from
Feb 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 10 additions & 30 deletions decompiler/config/all-types.gc
Original file line number Diff line number Diff line change
Expand Up @@ -22121,7 +22121,7 @@
(define-extern anim-test-obj-remove-invalid (function anim-test-obj symbol))
(define-extern anim-tester-post (function none :behavior anim-tester))
(define-extern anim-tester-string-get-frame!! (function list-field string symbol))
(define-extern anim-tester-load-object-seqs (function symbol))
(define-extern anim-tester-load-object-seqs (function anim-tester string symbol))
(define-extern anim-tester-add-object (function string none))
(define-extern anim-tester-set-name (function string object))
(define-extern anim-tester-add-sequence (function string none))
Expand Down Expand Up @@ -33807,7 +33807,7 @@
;; - Unknowns

(define-extern *lavayellowtarp-sg* skeleton-group)
(define-extern ripple-for-lavatube-lava ripple-wave-set) ;; unknown type
(define-extern ripple-for-lavatube-lava ripple-wave-set)
(define-extern *lavaballoon-sg* skeleton-group)
(define-extern *chainmine-sg* skeleton-group)
(define-extern *lavafallsewerb-sg* skeleton-group)
Expand Down Expand Up @@ -34054,35 +34054,15 @@

;; - Types

; (deftype lava (water-anim)
; ()
; :method-count-assert 28
; :size-assert #xd0
; :heap-base #x60
; :flag-assert #x1c006000d0
; ;; not enough basic ops
; (:methods
; (dummy-9 () none 9)
; (dummy-10 () none 10)
; (dummy-11 () none 11)
; (dummy-12 () none 12)
; (dummy-13 () none 13)
; (dummy-14 () none 14)
; (dummy-15 () none 15)
; (dummy-16 () none 16)
; (dummy-17 () none 17)
; (dummy-18 () none 18)
; (dummy-19 () none 19)
; (dummy-20 () none 20)
; (dummy-21 () none 21)
; (dummy-22 () none 22)
; (dummy-23 () none 23)
; (dummy-24 () none 24)
; (dummy-25 () none 25)
; (dummy-26 () none 26)
; (dummy-27 () none 27)
; )
(deftype lava (water-anim)
()
;:method-count-assert 28
;:size-assert #xd0
;:heap-base #x60
;:flag-assert #x1c006000d0
)

(define-extern ripple-for-lava ripple-wave-set)

;; cavegeyserrock

Expand Down
10 changes: 7 additions & 3 deletions game/kernel/fileio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,13 @@ char* DecodeFileName(const char* name) {
* @param new_string: if true, allocate a new global string for file name.
* will otherwise use a static buffer.
* DONE, Had unused int, char*, and MakeFileNameInfo params.
* PC PORT NOTE : Changed some paths so that they work for us (namely, got rid of 'host')
*/
char* MakeFileName(int type, const char* name, int new_string) {
using namespace versions;
// start with network filesystem
kstrcpy(buffer_633, "host:");
// kstrcpy(buffer_633, "host:");
kstrcpy(buffer_633, "");
char* buf = strend(buffer_633);

// prefix to build directory
Expand Down Expand Up @@ -308,11 +310,13 @@ char* MakeFileName(int type, const char* name, int new_string) {
} else if (type == DATA_FILE_TYPE) {
// GOAL object file, but containing data instead of code.
// likely packed by a tool that isn't the GOAL compiler.
sprintf(buf, "%sdata/%s.go", prefix, name);
// sprintf(buf, "%sdata/%s.go", prefix, name);
sprintf(buf, "%sout/obj/%s.go", prefix, name);
} else if (type == TX_PAGE_FILE_TYPE) {
// Texture Page
// part of level files, so it has a version number.
sprintf(buf, "%sdata/texture-page%d/%s.go", prefix, TX_PAGE_VERSION, name);
// sprintf(buf, "%sdata/texture-page%d/%s.go", prefix, TX_PAGE_VERSION, name);
sprintf(buf, "%sout/obj/%s.go", prefix, name);
} else if (type == JA_FILE_TYPE) {
// Art JA (joint animation? no idea)
// part of level files, so it has a version number
Expand Down
3 changes: 0 additions & 3 deletions game/kernel/klink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -580,9 +580,6 @@ uint32_t link_control::work_v2() {
if (m_segment_process == 0) {
m_heap_gap =
m_object_data - m_heap->current; // distance between end of heap and start of object
if (m_object_data.offset < m_heap->current.offset) {
ASSERT(false);
}
}

if (m_heap_gap <
Expand Down
1 change: 1 addition & 0 deletions game/kernel/kscheme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2101,6 +2101,7 @@ u64 loadc(const char* file_name, kheapinfo* heap, u32 flags) {
/*!
* Load Object? Uses DATA_FILE_TYPE and doesn't inform listener about the load, or execute a
* top level segment if a V3 is loaded. Doesn't load off the CD.
* This is used in some debug code to load art-groups directly.
*/
u64 loado(u32 file_name_in, u32 heap_in) {
char loadName[272];
Expand Down
3 changes: 3 additions & 0 deletions game/runtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@

#include "common/goal_constants.h"
#include "common/cross_os_debug/xdbg.h"
#include "common/util/FileUtil.h"

u8* g_ee_main_mem = nullptr;
std::thread::id g_main_thread_id = std::thread::id();
Expand Down Expand Up @@ -277,6 +278,8 @@ u32 exec_runtime(int argc, char** argv) {
g_argv = argv;
g_main_thread_id = std::this_thread::get_id();

file_util::create_dir_if_needed("game_config/");

// parse opengoal arguments
bool enable_display = true;
for (int i = 1; i < argc; i++) {
Expand Down
28 changes: 14 additions & 14 deletions goal_src/build/all_files.gc
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@
"goal_src/levels/citadel/citadel-sages.gc"
"goal_src/levels/snow/snow-bunny.gc"
"goal_src/levels/citadel/citb-bunny.gc"
"goal_src/levels/citadel/citb-drop-plat-CIT.gc"
"goal_src/levels/l1_only/citb-drop-plat-L1.gc"
"goal_src/levels/citadel/citb-drop-plat.gc"
"goal_src/old/citb-drop-plat-OLD.gc"
"goal_src/levels/citadel/assistant-citadel.gc"
"goal_src/levels/demo/demo-obs.gc"
"goal_src/levels/demo/static-screen.gc"
Expand All @@ -362,8 +362,8 @@
"goal_src/levels/finalboss/green-eco-lurker.gc"
"goal_src/levels/finalboss/robotboss.gc"
"goal_src/levels/finalboss/final-door.gc"
"goal_src/levels/finalboss/sage-finalboss-FIN.gc"
"goal_src/levels/l1_only/sage-finalboss-L1.gc"
"goal_src/levels/finalboss/sage-finalboss.gc"
"goal_src/old/sage-finalboss-OLD.gc"
"goal_src/levels/intro/evilbro.gc"
"goal_src/levels/jungleb/jungleb-obs.gc"
"goal_src/levels/jungleb/plat-flip.gc"
Expand All @@ -377,18 +377,18 @@
"goal_src/levels/jungle/jungle-obs.gc"
"goal_src/levels/jungle/jungle-mirrors.gc"
"goal_src/levels/jungle/junglefish.gc"
"goal_src/levels/jungle/fisher-JUN.gc"
"goal_src/levels/jungle/fisher-JUNGLE-L1.gc"
"goal_src/levels/jungle/fisher.gc"
"goal_src/old/fisher-OLD.gc"
"goal_src/levels/jungle/jungle-part.gc"
"goal_src/levels/common/launcherdoor.gc"
"goal_src/levels/l1_only/target-racer-h-L1-RACERP.gc"
"goal_src/levels/racer_common/target-racer-h-FIC-LAV-MIS-OGR-ROL.gc"
"goal_src/old/target-racer-h-OLD.gc"
"goal_src/levels/racer_common/target-racer-h.gc"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finally! No more typing -FIC-LAV-MIS-OGR-ROL!

"goal_src/levels/racer_common/racer-part.gc"
"goal_src/levels/racer_common/racer.gc"
"goal_src/levels/l1_only/target-racer-L1-RACERP.gc"
"goal_src/levels/racer_common/target-racer-FIC-LAV-MIS-OGR-ROL.gc"
"goal_src/levels/l1_only/racer-states-L1-RACERP.gc"
"goal_src/levels/racer_common/racer-states-FIC-LAV-MIS-OGR-ROL.gc"
"goal_src/old/target-racer-OLD.gc"
"goal_src/levels/racer_common/target-racer.gc"
"goal_src/old/racer-states-OLD.gc"
"goal_src/levels/racer_common/racer-states.gc"
"goal_src/levels/racer_common/collide-reaction-racer.gc"
"goal_src/levels/common/blocking-plane.gc"
"goal_src/levels/flut_common/flut-part.gc"
Expand All @@ -399,8 +399,8 @@
"goal_src/levels/village1/assistant.gc"
"goal_src/levels/village1/sage.gc"
"goal_src/levels/village1/yakow.gc"
"goal_src/levels/l1_only/village-obs-L1.gc"
"goal_src/levels/village1/village-obs-VI1.gc"
"goal_src/old/village-obs-OLD.gc"
"goal_src/levels/village1/village-obs.gc"
"goal_src/levels/village1/fishermans-boat.gc"
"goal_src/levels/village1/village1-part.gc"
"goal_src/levels/village1/village1-part2.gc"
Expand Down
28 changes: 14 additions & 14 deletions goal_src/build/all_objs.json
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@
["citadel-sages", "citadel-sages", 3, ["CIT", "L1"], "levels/citadel"],
["snow-bunny", "snow-bunny", 3, ["CIT", "L1", "SNO"], "levels/snow"],
["citb-bunny", "citb-bunny", 3, ["CIT", "L1"], "levels/citadel"],
["citb-drop-plat-CIT", "citb-drop-plat", 3, ["CIT"], "levels/citadel"],
["citb-drop-plat-L1", "citb-drop-plat", 3, ["L1"], "levels/l1_only"],
["citb-drop-plat", "citb-drop-plat", 3, ["CIT"], "levels/citadel"],
["citb-drop-plat-OLD", "citb-drop-plat", 3, ["L1"], "old"],
["assistant-citadel", "assistant-citadel", 3, ["CIT", "L1"], "levels/citadel"],
["tpage-1415", "tpage-1415", 4, ["CIT"], "levels/citadel"],
["tpage-1417", "tpage-1417", 4, ["CIT"], "levels/citadel"],
Expand Down Expand Up @@ -474,8 +474,8 @@
["green-eco-lurker", "green-eco-lurker", 3, ["FIN", "L1"], "levels/finalboss"],
["robotboss", "robotboss", 3, ["FIN", "L1"], "levels/finalboss"],
["final-door", "final-door", 3, ["FIN", "L1"], "levels/finalboss"],
["sage-finalboss-FIN", "sage-finalboss", 3, ["FIN"], "levels/finalboss"],
["sage-finalboss-L1", "sage-finalboss", 3, ["L1"], "levels/l1_only"],
["sage-finalboss", "sage-finalboss", 3, ["FIN"], "levels/finalboss"],
["sage-finalboss-OLD", "sage-finalboss", 3, ["L1"], "old"],
["tpage-1419", "tpage-1419", 4, ["FIN"], "levels/finalboss"],
["tpage-1420", "tpage-1420", 4, ["FIN"], "levels/finalboss"],
["tpage-634", "tpage-634", 4, ["FIN"], "levels/finalboss"],
Expand Down Expand Up @@ -535,8 +535,8 @@
["jungle-obs", "jungle-obs", 3, ["JUN", "JUNGLE", "L1"], "levels/jungle"],
["jungle-mirrors", "jungle-mirrors", 3, ["JUN", "JUNGLE", "L1"], "levels/jungle"],
["junglefish", "junglefish", 3, ["JUN", "JUNGLE", "L1"], "levels/jungle"],
["fisher-JUN", "fisher", 3, ["JUN"], "levels/jungle"],
["fisher-JUNGLE-L1", "fisher", 3, ["JUNGLE", "L1"], "levels/jungle"],
["fisher", "fisher", 3, ["JUN"], "levels/jungle"],
["fisher-OLD", "fisher", 3, ["JUNGLE", "L1"], "old"],
["jungle-part", "jungle-part", 3, ["JUN", "JUNGLE", "L1"], "levels/jungle"],
["launcherdoor", "launcherdoor", 3, ["JUN", "JUNGLE", "L1", "MAI", "MAINCAVE", "SUN", "SUNKEN"], "levels/common"],
["tpage-385", "tpage-385", 4, ["JUN"], "levels/jungle"],
Expand Down Expand Up @@ -572,14 +572,14 @@
["towertop-ag", "towertop", 4, ["JUN"], "levels/jungle"],
["water-anim-jungle-ag", "water-anim-jungle", 4, ["JUN"], "levels/jungle"],
["jungle-vis", "jungle-vis", 4, ["JUN"], "levels/jungle"],
["target-racer-h-L1-RACERP", "target-racer-h", 3, ["L1", "RACERP"], "levels/l1_only"],
["target-racer-h-FIC-LAV-MIS-OGR-ROL", "target-racer-h", 3, ["FIC", "LAV", "MIS", "OGR", "ROL"], "levels/racer_common"],
["target-racer-h-OLD", "target-racer-h", 3, ["L1", "RACERP"], "old"],
["target-racer-h", "target-racer-h", 3, ["FIC", "LAV", "MIS", "OGR", "ROL"], "levels/racer_common"],
["racer-part", "racer-part", 3, ["L1", "FIC", "LAV", "MIS", "OGR", "RACERP", "ROL"], "levels/racer_common"],
["racer", "racer", 3, ["L1", "FIC", "LAV", "MIS", "OGR", "RACERP", "ROL"], "levels/racer_common"],
["target-racer-L1-RACERP", "target-racer", 3, ["L1", "RACERP"], "levels/l1_only"],
["target-racer-FIC-LAV-MIS-OGR-ROL", "target-racer", 3, ["FIC", "LAV", "MIS", "OGR", "ROL"], "levels/racer_common"],
["racer-states-L1-RACERP", "racer-states", 3, ["L1", "RACERP"], "levels/l1_only"],
["racer-states-FIC-LAV-MIS-OGR-ROL", "racer-states", 3, ["FIC", "LAV", "MIS", "OGR", "ROL"], "levels/racer_common"],
["target-racer-OLD", "target-racer", 3, ["L1", "RACERP"], "old"],
["target-racer", "target-racer", 3, ["FIC", "LAV", "MIS", "OGR", "ROL"], "levels/racer_common"],
["racer-states-OLD", "racer-states", 3, ["L1", "RACERP"], "old"],
["racer-states", "racer-states", 3, ["FIC", "LAV", "MIS", "OGR", "ROL"], "levels/racer_common"],
["collide-reaction-racer", "collide-reaction-racer", 3, ["L1", "FIC", "LAV", "MIS", "OGR", "RACERP", "ROL"], "levels/racer_common"],
["eichar-racer+0-ag", "eichar-racer+0", 4, ["L1", "FIC", "LAV", "MIS", "OGR", "RACERP", "ROL"], "levels/racer_common"],
["tpage-1119", "tpage-1119", 4, ["L1", "FIC", "LAV", "MIS", "OGR", "RACERP", "ROL"], "levels/racer_common"],
Expand All @@ -593,8 +593,8 @@
["assistant", "assistant", 3, ["L1", "VI1"], "levels/village1"],
["sage", "sage", 3, ["L1", "VI1"], "levels/village1"],
["yakow", "yakow", 3, ["L1", "VI1"], "levels/village1"],
["village-obs-L1", "village-obs", 3, ["L1"], "levels/l1_only"],
["village-obs-VI1", "village-obs", 3, ["VI1"], "levels/village1"],
["village-obs-OLD", "village-obs", 3, ["L1"], "old"],
["village-obs", "village-obs", 3, ["VI1"], "levels/village1"],
["fishermans-boat", "fishermans-boat", 3, ["L1", "VI1"], "levels/village1"],
["village1-part", "village1-part", 3, ["L1", "VI1"], "levels/village1"],
["village1-part2", "village1-part2", 3, ["L1", "VI1"], "levels/village1"],
Expand Down
Loading