Skip to main content

pckernel-common

source

Types


entity-debug-inspect

entity-debug-inspect: basicsource
Fields
type: type
scroll-y: int16
scroll-y-max: int16
entity: entity
show-actor-info: symbol
Methods
set-entity!(obj: entity-debug-inspect, e: entity) => entitysource

set the entity to inspect

update-pad(obj: entity-debug-inspect, pad-idx: int) => nonesource

respond to pad inputs

Functions


bcd->dec

bcd->dec(bcd: uint) => uintsource

Convert a number encoded in BCD to its decimal equivalent

file-stream-read-float

file-stream-read-float(file: file-stream) => floatsource

file-stream-read-int

file-stream-read-int(file: file-stream) => intsource

file-stream-read-symbol

file-stream-read-symbol(file: file-stream) => symbolsource

file-stream-read-word

file-stream-read-word(file: file-stream) => stringsource

file-stream-seek-past-whitespace

file-stream-seek-past-whitespace(file: file-stream) => intsource

find-flava-log

find-flava-log(music: symbol, flava-idx: int) => symbolsource

return #t if the given music's flava is logged into the pc-settings, #f otherwise.

find-music-log

find-music-log(music: symbol) => symbolsource

return #t if the given music is logged into the pc-settings, #f otherwise.

print-music-log(out: object) => intsource

Variables


*collision-mode*

*collision-mode*: pc-collision-modesource

*collision-renderer*

*collision-renderer*: symbolsource

*collision-wireframe*

*collision-wireframe*: symbolsource

*entity-debug-inspect*

*entity-debug-inspect*: entity-debug-inspectsource

*pc-cheat-temp*

*pc-cheat-temp*: pointersource

pckernel-h

source

Types


pc-bingo-info

pc-bingo-info: structuresource

pc-cstring-64

pc-cstring-64: structuresource
Fields
chars: uint8
last: uint8

pc-game-secrets

pc-game-secrets: structuresource
Fields
art: pc-jak1-concept-art
music: pc-music-log-entry
hard-fish-hiscore: int32
hard-rats?: symbol
hard-rats-hiscore: int32
hard-rats-hiwave: int32
hero-mode?: symbol
hud-map?: symbol
hud-counters?: symbol
hud-watch?: symbol
watch-12hr?: symbol

pc-music-log-entry

pc-music-log-entry: structuresource
Fields
name: symbol
flava-mask: int32

pc-settings

pc-settings: basicsource
Fields
type: type
version: pckernel-version
target-fps: int16
width: int32
height: int32
win-width: int32
win-height: int32
real-width: int32
real-height: int32
lbox-width: int32
lbox-height: int32
dpi-x: float
dpi-y: float
aspect-ratio-auto?: symbol
aspect-ratio: float
aspect-ratio-scale: float
aspect-ratio-reciprocal: float
aspect-custom-x: int
aspect-custom-y: int
display-mode: symbol
letterbox?: symbol
vsync?: symbol
font-scale: float
monitor: int32
os: symbol
user: symbol
debug?: symbol
movie?: symbol
ignore-controller-win-unfocused?: symbol
controller-hp-led?: symbol
controller-eco-led?: symbol
stick-deadzone: float
keyboard-enabled?: symbol
mouse-enabled?: symbol
mouse-camera?: symbol
mouse-xsens: float
mouse-ysens: float
mouse-movement?: symbol
auto-hide-cursor?: symbol
audio-latency-ms: int16
audio-pan-override: float
audio-volume-override: float
audio-channel-nb: int16
gfx-renderer: pc-gfx-renderer
gfx-resolution: float
gfx-anisotropy: float
gfx-msaa: int32
ps2-read-speed?: symbol
ps2-parts?: symbol
ps2-music?: symbol
ps2-se?: symbol
ps2-hints?: symbol
ps2-lod-dist?: symbol
force-envmap?: symbol
shrub-dist-mod: float
lod-dist-mod: float
lod-force-tfrag: int8
lod-force-tie: int8
lod-force-ocean: int8
lod-force-actor: int8
force-actors?: symbol
use-vis?: symbol
hinttitles?: symbol
text-language: pc-subtitle-lang
subtitle-speaker?: symbol
first-camera-h-inverted?: symbol
first-camera-v-inverted?: symbol
third-camera-h-inverted?: symbol
third-camera-v-inverted?: symbol
music-fadeout?: symbol
music-fadein?: symbol
bingo: pc-bingo-info
secrets: pc-game-secrets
scenes-seen: uint8
discord-rpc?: symbol
speedrunner-mode?: symbol
cheats: pc-cheats
cheats-known: pc-cheats
flava-hack: int64
Methods
set-defaults!(obj: pc-settings) => nonesource

Set default settings for the object that aren't handled by the file reading,
this is intended to be called upon object creation.

This is to avoid propagating events to the runtime informing it needs to make changes on startup
when there really is no changes to be made. ie. changing the window size multiple times when ultimately
the true value is within the file that we are about to read.

TODO - it would probably be a lot cleaner to have one struct for the file, and another for settings that
are manipulated at runtime so there is a clear separation of responsibilities

set-defaults-input!(obj: pc-settings) => nonesource

Set default general input settings

set-defaults-controller!(obj: pc-settings) => nonesource

Set default controller settings

set-defaults-mouse!(obj: pc-settings) => nonesource

Set default mouse settings

update(obj: pc-settings) => nonesource

Update settings to/from PC kernel. Call this at the start of every frame.
This will update things like the aspect-ratio, which will be used for graphics code later.

update-from-os(obj: pc-settings) => nonesource

Update settings from the C kernel to GOAL.

update-to-os(obj: pc-settings) => nonesource

Update settings from GOAL to the C kernel.

update-discord-rpc(obj: pc-settings-jak2) => nonesource

update discord rpc module

update-speedrun(obj: pc-settings-jak2) => nonesource

update speedrun module

update-video-hacks(obj: pc-settings-jak2) => objectsource

update the graphics hacks used for the progress menu. ugh.

reset(obj: pc-settings) => nonesource

Reset back to default settings

reset-audio(obj: pc-settings) => nonesource

Set the default audio settings

reset-input(obj: pc-settings, device: symbol) => nonesource

Set the default input settings

reset-gfx(obj: pc-settings) => nonesource

Set the default graphics settings

reset-ps2(obj: pc-settings) => nonesource

Set the default ps2 settings

reset-misc(obj: pc-settings) => nonesource

Set the default misc settings

reset-original-camera(obj: pc-settings) => nonesource

Set the original game's camera controls

reset-extra(obj: pc-settings) => nonesource

Set the default goodies settings

print-debug-misc(obj: pc-settings-jak2) => objectsource

prints various miscellaneous debug text to the game console, according to what's enabled in this object.

draw(obj: pc-settings, buf: dma-buffer) => objectsource

debug draw some things on-screen

draw-memory(obj: pc-settings-jak2, buf: dma-buffer) => symbolsource

draw the memory heap status in the bottom right corner

set-display-mode!(obj: pc-settings, mode: symbol) => intsource

sets the game's display mode

set-size!(obj: pc-settings, width: int, height: int) => nonesource

sets the size of the display window

set-aspect!(obj: pc-settings, aw: int, ah: int) => nonesource

set the aspect ratio used for rendering. this forces native widescreen and takes width and height ratios.

set-aspect-ratio!(obj: pc-settings, aspect: float) => nonesource

set the aspect ratio used for rendering.

set-frame-rate!(obj: pc-settings, rate: int) => intsource

set the target framerate.

set-monitor!(obj: pc-settings, monitor: int) => nonesource

set the monitor to use when in fullscreen/borderless

set-game-setting!(obj: pc-settings-jak2, setting: symbol, value: symbol) => objectsource
get-game-setting(obj: pc-settings-jak2, setting: symbol) => symbolsource
set-game-language!(obj: pc-settings-jak2, lang: language-enum) => language-enumsource
get-game-language(obj: pc-settings-jak2) => language-enumsource
get-current-game-width(obj: pc-settings) => intsource

return the current width in pixels of the visible portion of the game

get-current-game-height(obj: pc-settings) => intsource

return the current height in pixels of the visible portion of the game

read-from-file(obj: pc-settings, filename: string) => symbolsource

read settings from a file

write-to-file(obj: pc-settings, filename: string) => symbolsource

write settings to a file

handle-input-settings(obj: pc-settings, file: file-stream) => objectsource

handle the text parsing input for the 'settings' group

handle-output-settings(obj: pc-settings, file: file-stream) => objectsource

handle the text writing output for the 'settings' group

update-cheats(obj: pc-settings) => intsource

run cheats.

update-music-log(obj: pc-settings) => intsource

update music log settings.

add-to-music-log(obj: pc-settings, music: symbol, flava: int) => intsource

add music and flava information to the music log.
if music already exists, adds flava. if flava already exists, nothing happens.

commit-to-file(obj: pc-settings) => nonesource

commits the current settings to the file

load-settings(obj: pc-settings) => intsource

load

set-ignore-controller-in-bg!(obj: pc-settings, val: symbol) => nonesource

sets whether or not to ignore controller inputs if the window is in the background

set-enable-keyboard!(obj: pc-settings, val: symbol) => nonesource

sets whether to ignore keyboard input events

update-mouse-controls!(obj: pc-settings) => nonesource

Uses whatever is set on the pc-settings to update the runtime on how it should interpret mouse events

pckernel-version

pckernel-version: int64source

Variables


*display-actor-bank*

*display-actor-bank*: symbolsource

*display-actor-counts*

*display-actor-counts*: symbolsource

*display-heap-status*

*display-heap-status*: symbolsource

*display-pad-debug*

*display-pad-debug*: symbolsource

*display-sha*

*display-sha*: symbolsource

*display-text-box*

*display-text-box*: symbolsource

*pc-temp-string-1*

*pc-temp-string-1*: stringsource

*pc-temp-string*

*pc-temp-string*: stringsource

ASPECT_16X9

const ASPECT_16X9: unknownsource

ASPECT_16X9_SCALE

const ASPECT_16X9_SCALE: unknownsource

ASPECT_4X3

const ASPECT_4X3: unknownsource

PC_BASE_HEIGHT

PC_BASE_HEIGHT: unknownsource

PC_BASE_WIDTH

PC_BASE_WIDTH: unknownsource

PC_CHEAT_MAX

PC_CHEAT_MAX: unknownsource

PC_KERNEL_INVALID_VERSION

PC_KERNEL_INVALID_VERSION: unknownsource

PC_KERNEL_VER_BUILD

PC_KERNEL_VER_BUILD: unknownsource

PC_KERNEL_VER_MAJOR

PC_KERNEL_VER_MAJOR: unknownsource

PC_KERNEL_VER_MINOR

PC_KERNEL_VER_MINOR: unknownsource

PC_KERNEL_VER_REVISION

PC_KERNEL_VER_REVISION: unknownsource

PC_KERNEL_VERSION

PC_KERNEL_VERSION: unknownsource

PC_MIN_HEIGHT

PC_MIN_HEIGHT: unknownsource

PC_MIN_WIDTH

PC_MIN_WIDTH: unknownsource

PC_MUSIC_LOG_LENGTH

PC_MUSIC_LOG_LENGTH: unknownsource

PC_SPOOL_LOG_LENGTH

PC_SPOOL_LOG_LENGTH: unknownsource

PC_TEMP_STRING_LEN

PC_TEMP_STRING_LEN: unknownsource

PC_VOICE_AMOUNT

PC_VOICE_AMOUNT: unknownsource

PS2_VOICE_AMOUNT

PS2_VOICE_AMOUNT: unknownsource