mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-06-04 10:26:19 -04:00
match and link pad.c
This commit is contained in:
@@ -38,6 +38,8 @@ libu64/gfxprint.c:
|
||||
.sbss: [0x80218630, 0x80218638]
|
||||
libu64/gfxprint_data.c:
|
||||
.data: [0x800dc810, 0x800dd090]
|
||||
libu64/pad.c:
|
||||
.text: [0x8005b9a8, 0x8005ba2c]
|
||||
libc64/aprintf.c:
|
||||
.text: [0x8005cbdc, 0x8005cc14]
|
||||
#libc64/math64.c: //not match
|
||||
|
||||
@@ -16,6 +16,12 @@ typedef struct {
|
||||
/* 0x12 */ OSContPad off;
|
||||
} pad_t;
|
||||
|
||||
|
||||
int pad_physical_stick_x(pad_t*);
|
||||
int pad_physical_stick_y(pad_t*);
|
||||
void pad_set_logical_stick(pad_t*, int, int);
|
||||
void pad_correct_stick(pad_t*);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
#include "libu64/pad.h"
|
||||
|
||||
|
||||
int pad_physical_stick_x(pad_t* pad){
|
||||
return pad->now.stick_x;
|
||||
}
|
||||
|
||||
int pad_physical_stick_y(pad_t* pad){
|
||||
return pad->now.stick_y;
|
||||
}
|
||||
|
||||
void pad_set_logical_stick(pad_t* pad, int x, int y){
|
||||
pad->off.stick_x = x;
|
||||
pad->off.stick_y = y;
|
||||
}
|
||||
|
||||
void pad_correct_stick(pad_t* pad){
|
||||
|
||||
int x = pad_physical_stick_x(pad);
|
||||
int y = pad_physical_stick_y(pad);
|
||||
|
||||
pad_set_logical_stick(pad,((x * 60) / 72), ((y * 60) / 72));
|
||||
}
|
||||
+1
-1
Submodule tools/ppcdis updated: 83260829c5...eca3f3015a
Reference in New Issue
Block a user