mirror of
https://github.com/open-goal/jak-project
synced 2026-09-07 19:40:48 -04:00
fix upper 32 bits in certain format args being discarded (#1606)
This commit is contained in:
@@ -229,7 +229,7 @@ s32 format_impl_jak1(uint64_t* args) {
|
||||
s8 arg0 = argument_data[0].data[0];
|
||||
s32 desired_length = arg0;
|
||||
*output_ptr = 0;
|
||||
u32 in = arg_regs[arg_reg_idx++];
|
||||
u64 in = arg_regs[arg_reg_idx++];
|
||||
print_object(in);
|
||||
if (desired_length != -1) {
|
||||
s32 print_len = strlen(output_ptr);
|
||||
@@ -272,7 +272,7 @@ s32 format_impl_jak1(uint64_t* args) {
|
||||
s8 arg0 = argument_data[0].data[0];
|
||||
s32 desired_length = arg0;
|
||||
*output_ptr = 0;
|
||||
u32 in = arg_regs[arg_reg_idx++];
|
||||
u64 in = arg_regs[arg_reg_idx++];
|
||||
|
||||
// if it's a string
|
||||
if (((in & 0x7) == 0x4) && *Ptr<u32>(in - 4) == *(s7 + FIX_SYM_STRING_TYPE)) {
|
||||
@@ -329,7 +329,7 @@ s32 format_impl_jak1(uint64_t* args) {
|
||||
case 'p': {
|
||||
*output_ptr = 0;
|
||||
s8 arg0 = argument_data[0].data[0];
|
||||
u32 in = arg_regs[arg_reg_idx++];
|
||||
u64 in = arg_regs[arg_reg_idx++];
|
||||
if (arg0 == -1) {
|
||||
print_object(in);
|
||||
} else {
|
||||
@@ -350,7 +350,7 @@ s32 format_impl_jak1(uint64_t* args) {
|
||||
case 'i': {
|
||||
*output_ptr = 0;
|
||||
s8 arg0 = argument_data[0].data[0];
|
||||
u32 in = arg_regs[arg_reg_idx++];
|
||||
u64 in = arg_regs[arg_reg_idx++];
|
||||
if (arg0 == -1) {
|
||||
inspect_object(in);
|
||||
} else {
|
||||
|
||||
@@ -1034,7 +1034,7 @@ u64 method_set(u32 type_, u32 method_id, u32 method) {
|
||||
/*!
|
||||
* Call a GOAL method of a given type.
|
||||
*/
|
||||
u64 call_method_of_type(u32 arg, Ptr<Type> type, u32 method_id) {
|
||||
u64 call_method_of_type(u64 arg, Ptr<Type> type, u32 method_id) {
|
||||
if (((type.offset < SymbolTable2.offset || 0x7ffffff < type.offset) && // not in normal memory
|
||||
(type.offset < 0x84000 || 0x100000 <= type.offset)) // not in kernel memory
|
||||
|| ((type.offset & OFFSET_MASK) != BASIC_OFFSET)) { // invalid type
|
||||
|
||||
@@ -63,7 +63,7 @@ u64 new_pair(u32 heap, u32 type, u32 car, u32 cdr);
|
||||
u64 inspect_object(u32 obj);
|
||||
u64 print_object(u32 obj);
|
||||
Ptr<Symbol> find_symbol_from_c(const char* name);
|
||||
u64 call_method_of_type(u32 arg, Ptr<Type> type, u32 method_id);
|
||||
u64 call_method_of_type(u64 arg, Ptr<Type> type, u32 method_id);
|
||||
Ptr<Type> intern_type_from_c(const char* name, u64 methods);
|
||||
u64 call_method_of_type_arg2(u32 arg, Ptr<Type> type, u32 method_id, u32 a1, u32 a2);
|
||||
u64 alloc_heap_object(u32 heap, u32 type, u32 size, u32 pp);
|
||||
|
||||
@@ -588,7 +588,7 @@
|
||||
|
||||
(if *target*
|
||||
(stop 'play))
|
||||
(set! *atx* (process-spawn anim-tester-x :from *pc-dead-pool* :stack-size (* 8 1024)))
|
||||
(set! *atx* (process-spawn anim-tester-x :from *pc-dead-pool*))
|
||||
(set! *camera-orbit-target* *atx*)
|
||||
(send-event *camera* 'change-state cam-free-floating 0)
|
||||
)
|
||||
|
||||
@@ -1084,7 +1084,6 @@
|
||||
|
||||
|
||||
;; the actor pool for PC processes! it has space for 4 processes, with 16K of space.
|
||||
(defconstant PC_PROC_DEFAULT_STACK_SIZE 1024)
|
||||
(define *pc-dead-pool* (new 'global 'dead-pool 4 (* 16 1024) '*pc-dead-pool*))
|
||||
|
||||
|
||||
|
||||
@@ -794,8 +794,7 @@
|
||||
(subtitle-stop)
|
||||
)
|
||||
|
||||
(set! *subtitle* (process-spawn subtitle :from *pc-dead-pool* :to *display-pool*
|
||||
:stack-size PC_PROC_DEFAULT_STACK_SIZE))
|
||||
(set! *subtitle* (process-spawn subtitle :from *pc-dead-pool* :to *display-pool*))
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user