Files
jak-project/game/kernel/jak2/kmachine.h
T
Tyler Wilding f699675ede g/jak2: initial Discord RPC implementation (#2100)
Notable things:
- This assert is hit when trying to save the pc-settings file, NYI
https://github.com/open-goal/jak-project/blob/e630b506903d7f7028dff89702be7f586c2120e7/game/kernel/common/Symbol4.h#L14
so right now settings aren't persisted. But RPC defaults to on
- The existing functions can probably be made generic based off the game
version, but I didn't spend time refactoring them yet as they aren't
really ready to be used in jak 2 yet (we have no screenshots for the
levels for example)
2023-01-07 10:34:01 -05:00

68 lines
1.7 KiB
C++

#pragma once
#include <optional>
#include "common/common_types.h"
#include "SQLiteCpp/SQLiteCpp.h"
namespace jak2 {
void InitParms(int argc, const char* const* argv);
void InitIOP();
int InitMachine();
int ShutdownMachine();
void InitMachineScheme();
extern std::optional<SQLite::Database> sql_db;
void initialize_sql_db();
struct MouseInfo {
// ((active symbol :offset-assert 4)
u32 active;
// (cursor basic :offset-assert 8)
u32 cursor;
// (valid symbol :offset-assert 12)
u32 valid;
// (id uint8 :offset-assert 16)
u8 id;
u8 pad;
// (status uint16 :offset-assert 18)
u16 status;
// (button0 uint16 :offset-assert 20)
u16 button0;
// (deltax int8 :offset-assert 22)
s8 deltax;
// (deltay int8 :offset-assert 23)
s8 deltay;
// (wheel uint8 :offset-assert 24)
u8 wheel;
u8 pad1[3];
// (change-time time-frame :offset-assert 32)
// (button0-abs uint32 3 :offset-assert 40)
// (button0-shadow-abs uint32 1 :offset-assert 52)
// (button0-rel uint32 3 :offset-assert 56)
// (pos vector 2 :inline :offset-assert 80)
u32 pad2[13];
// (posx float :offset 80)
float posx;
// (posy float :offset 84)
float posy;
// (oldposx float :offset 96 :do-not-decompile)
// (oldposy float :offset 100)
// (speedx float :offset 92)
// (speedy float :offset 108)
};
struct DiscordInfo {
u32 orb_count; // (pointer float)
u32 gem_count; // (pointer float)
u32 death_count; // (pointer int32)
u32 status; // string
u32 level; // string
u32 cutscene; // symbol - bool
u32 time_of_day; // (pointer float
float percent_completed; // float
};
} // namespace jak2