Skip to main content
source

Types


actor-link-info: basicsource
Fields
type: type
process: process
next: entity-actor
prev: entity-actor
Methods
get-matching-actor-type-mask(obj: actor-link-info, matching-type: type) => intsource
Iterate through _all_ actors that are part of this actor list.
If the nth actor is type matching-type, then set the nth bit of the result.
actor-count-before(obj: actor-link-info) => intsource
Get the number of actors _before_ this actor in the list.
link-to-next-and-prev-actor(obj: actor-link-info) => entity-actorsource
Redo the linking in the constructor by looking up the next/prev actor.
get-next(obj: actor-link-info) => entity-actorsource
get-prev(obj: actor-link-info) => entity-actorsource
get-next-process(obj: actor-link-info) => processsource
Get the process for the next, if it exists.
get-prev-process(obj: actor-link-info) => processsource
Get the process for the prev, if it exists
apply-function-forward(obj: actor-link-info, arg0: function, arg1: object) => intsource
Iterate forward through actors, and apply this function. Starts at (-> obj next)
If the function returns truthy, stop iterating.
apply-function-reverse(obj: actor-link-info, arg0: function, arg1: object) => intsource
Iterate backward through actors and apply function.
If the function returns truth, stop iterating.
apply-all(obj: actor-link-info, arg0: function, arg1: object) => intsource
Apply to all entities. Starts at the back and hits everyone, including this object.
send-to-all(obj: actor-link-info, msg: symbol) => nonesource
send-to-all-after(obj: actor-link-info, message: symbol) => objectsource
Send an event to all processes after this link with no parameters.
send-to-all-before(obj: actor-link-info, message: symbol) => objectsource
Send an event to all processes before this link with no parameters.
send-to-next-and-prev(obj: actor-link-info, msg: symbol) => nonesource
Send an event to both next and prev with no params.
send-to-next(obj: actor-link-info, message: symbol) => nonesource
Send event arg0 to the next actor's process
send-to-prev(obj: actor-link-info, message: symbol) => nonesource
Send event arg1 to the next actor's process.
actor-count(obj: actor-link-info) => intsource
Count the number of actors in the entire list

Functions


actor-link-dead-hook(arg0: entity-actor, arg1: pointer) => symbolsource
Sets arg1 is the thing is dead. Does not continue the apply if the dead perm is set.
actor-link-subtask-complete-hook(arg0: entity-actor, arg1: pointer) => symbolsource
Sets arg1 if the thing is complete. Does not continue the apply if the complete perm is set.

alt-actor-list-subtask-incomplete-count

alt-actor-list-subtask-incomplete-count(arg0: process-drawable) => intsource
Get the number of alt-actors which do not have the complete bit set in their perm.

entity-actor-count

entity-actor-count(res: res-lump, name: symbol) => intsource
Get the number of entities that this res references under the name.
This works on more than just next/prev.

entity-actor-lookup

entity-actor-lookup(lump: res-lump, name: symbol, idx: int) => entity-actorsource
Given an entity (the res-lump), look up a reference to another entity and return that entity.

ambient

source

Functions


ambient-hint-init-by-other

ambient-hint-init-by-other(arg0: string, arg1: vector, arg2: symbol) => nonesource

ambient-hint-spawn

ambient-hint-spawn(arg0: string, arg1: vector, arg2: process-tree, arg3: symbol) => objectsource

ambient-type-dark

ambient-type-dark(arg0: drawable-ambient, arg1: vector) => nonesource

ambient-type-error

ambient-type-error(arg0: drawable-ambient, arg1: vector) => nonesource

ambient-type-hint

ambient-type-hint(arg0: drawable-ambient, arg1: vector) => nonesource

ambient-type-light

ambient-type-light(arg0: drawable-ambient, arg1: vector) => nonesource

ambient-type-music

ambient-type-music(arg0: drawable-ambient, arg1: vector) => nonesource

ambient-type-ocean-near-off

ambient-type-ocean-near-off(arg0: drawable-ambient, arg1: vector) => nonesource

ambient-type-ocean-off

ambient-type-ocean-off(arg0: drawable-ambient, arg1: vector) => nonesource

ambient-type-poi

ambient-type-poi(arg0: drawable-ambient, arg1: vector) => nonesource

ambient-type-sound

ambient-type-sound(arg0: drawable-ambient, arg1: vector) => nonesource

ambient-type-sound-loop

ambient-type-sound-loop(arg0: drawable-ambient, arg1: vector) => nonesource

ambient-type-weather-off

ambient-type-weather-off(arg0: drawable-ambient, arg1: vector) => nonesource

can-grab-display?

can-grab-display?(arg0: process) => symbolsource

kill-current-level-hint

kill-current-level-hint(arg0: pair, arg1: pair, arg2: symbol) => nonesource

level-hint-displayed?

level-hint-displayed?() => symbolsource

level-hint-init-by-other

level-hint-init-by-other(arg0: text-id, arg1: string, arg2: entity) => nonesource

level-hint-process-cmd

level-hint-process-cmd(arg0: pointer, arg1: int, arg2: int) => intsource

level-hint-spawn

level-hint-spawn(arg0: text-id, arg1: string, arg2: entity, arg3: process-tree, arg4: game-task) => nonesource

level-hint-surpress!

level-hint-surpress!() => nonesource

level-hint-task-process

level-hint-task-process(arg0: entity, arg1: uint128, arg2: string) => intsource

Variables


*execute-ambients*

*execute-ambients*: symbolsource

*hint-semaphore*

*hint-semaphore*: pointersource

*level-hint-spool-name*

*level-hint-spool-name*: stringsource

entity-h

source

Types


actor-bank

actor-bank: basicsource
Fields
type: type
pause-dist: float
birth-dist: float
birth-max: int32

entity

entity: res-lumpsource
Fields
type: type
length: int32
allocated-length: int32
data-base: pointer
data-top: pointer
data-size: int32
extra: entity-links
tag: pointer
trans: vector
aid: uint32
Methods
birth!(obj: entity) => _type_source
children of entity should override this.
kill!(obj: entity) => _type_source
children of entity should override this.
add-to-level!(obj: entity, lev-group: level-group, lev: level, aid: actor-id) => nonesource
Add us to a level.
remove-from-level!(obj: entity, arg0: level-group) => _type_source
Remove us from the level.
get-level(obj: entity) => levelsource
Get the level that the entity belongs to.

entity-actor

entity-actor: entitysource
Fields
type: type
length: int32
allocated-length: int32
data-base: pointer
data-top: pointer
data-size: int32
extra: entity-links
tag: pointer
trans: vector
aid: uint32
nav-mesh: nav-mesh
etype: type
task: game-task
vis-id: uint16
vis-id-signed: int16
quat: quaternion
Methods
next-actor(obj: entity-actor) => entity-actorsource
Utility function to look up the next actor in the list, assuming we don't have actor-link-info yet.
prev-actor(obj: entity-actor) => entity-actorsource
Look up previous actor in the list
debug-print(obj: entity-actor, mode: symbol, expected-type: type) => nonesource
Debug print info about an entity-actor. This is designed to generate rows for the table
printed by method debug-print-entities of level-group.
set-or-clear-status!(obj: entity-actor, arg0: entity-perm-status, arg1: symbol) => nonesource

entity-ambient

entity-ambient: entitysource
Fields
type: type
length: int32
allocated-length: int32
data-base: pointer
data-top: pointer
data-size: int32
extra: entity-links
tag: pointer
trans: vector
aid: uint32
ambient-data: entity-ambient-data
Methods
draw-debug(obj: entity-ambient) => nonesource
birth-ambient!(obj: entity-ambient) => nonesource

entity-ambient-data

entity-ambient-data: structuresource
Fields
user-object: object
function: function
quad: uint128
user-uint64: uint64
user-float: float
user-int32: int32
user-uint32: uint32
user-int16: int16
user-uint16: uint16
user-int8: int8
user-uint8: uint8

entity-ambient-data-array

entity-ambient-data-array: inline-array-classsource
Fields
type: type
length: int32
allocated-length: int32
_data: uint8
data: entity-ambient-data

entity-camera

entity-camera: entitysource
Fields
type: type
length: int32
allocated-length: int32
data-base: pointer
data-top: pointer
data-size: int32
extra: entity-links
tag: pointer
trans: vector
aid: uint32
connect: connectable

entity-info

entity-info: basicsource
Fields
type: type
ptype: type
package: basic
art-group: pair
pool: basic
heap-size: int32
entity-links: structuresource
Fields
prev-link: entity-links
next-link: entity-links
entity: entity
process: process
level: level
vis-id: int32
trans: vector
perm: entity-perm
status: uint16
aid: actor-id
task: game-task
Methods
birth?(obj: entity-links, arg0: vector) => symbolsource
entity-links-array: inline-array-classsource
Fields
type: type
length: int32
allocated-length: int32
_data: uint8
data: entity-links

entity-perm

entity-perm: structuresource
Fields
user-object: object
user-uint64: uint64
user-float: float
user-int32: int32
user-uint32: uint32
user-int16: int16
user-uint16: uint16
user-int8: int8
user-uint8: uint8
status: entity-perm-status
dummy: uint8
task: game-task
aid: actor-id
quad: uint128
Methods
update-perm!(obj: entity-perm, arg0: symbol, arg1: entity-perm-status) => _type_source

entity-perm-array

entity-perm-array: inline-array-classsource
Fields
type: type
length: int32
allocated-length: int32
_data: uint8
data: entity-perm

Variables


*ACTOR-bank*

*ACTOR-bank*: actor-banksource

*generate-actor-vis-output*

*generate-actor-vis-output*: symbolsource

*generate-actor-vis-start*

*generate-actor-vis-start*: symbolsource

*generate-actor-vis*

*generate-actor-vis*: symbolsource

entity-table

source

Functions


entity-info-lookup

entity-info-lookup(arg0: type) => entity-infosource
Look up the entity-info for a given type.
to speed-up the lookup in the future,
this caches the result in the method table...

Variables


*entity-info*

*entity-info*: arraysource

entity

source

Functions


entity-birth-no-kill

entity-birth-no-kill(arg0: entity) => nonesource

entity-by-aid

entity-by-aid(arg0: uint) => entitysource
Get an entity by actor-id. This looks through the entity-links-array, so it
will require that the level is somewhat loaded.

entity-by-meters

entity-by-meters(arg0: float, arg1: float, arg2: float) => entity-actorsource
Get an entity by position. The coordinate are rounded to the nearest 1/4096th of a meter.

entity-by-name

entity-by-name(arg0: string) => entitysource
Get an entity with the given name. Will search in
-actors, for each level
-ambients, for each level
-cameras, for each level.
All the searching is in the bsp.

entity-by-type

entity-by-type(arg0: type) => entity-actorsource
Get an entity-actor with the _exactly_ the given type.
Searches over all entity-actors in all levels, looking in the bsp

entity-count

entity-count() => intsource
Count the number of entities. Uses the entity-links

entity-deactivate-handler

entity-deactivate-handler(arg0: process, arg1: entity-actor) => nonesource
Handle a deactivation in the entity.
The entity directly stores a process so it should remove that after deactivating.

entity-process-count

entity-process-count(arg0: symbol) => intsource
Count the number of entities with a process. If arg0 is 'vis, will count visible entities.

entity-remap-names

entity-remap-names(arg0: pair) => nonesource
Rename entities by location. Changes their res.

entity-task-complete-off

entity-task-complete-off(arg0: entity) => nonesource

entity-task-complete-on

entity-task-complete-on(arg0: entity) => nonesource

expand-vis-box-with-point

expand-vis-box-with-point(arg0: entity, arg1: vector) => nonesource
Expand the visibility box of the given entity to include the given point.

init-entity

init-entity(proc: process, ent: entity-actor) => nonesource
This function starts up an entity!
The process should not be activated yet.

process-by-ename

process-by-ename(arg0: string) => processsource
Get the process for the entity with the given name. If there is no entity or process, #f.

process-drawable-from-entity!

process-drawable-from-entity!(arg0: process-drawable, arg1: entity-actor) => nonesource

process-entity-status!

process-entity-status!(arg0: process, arg1: entity-perm-status, arg2: symbol) => intsource

process-status-bits

process-status-bits(arg0: process, arg1: symbol) => nonesource

reset-actors

reset-actors(arg0: symbol) => nonesource

reset-cameras

reset-cameras() => nonesource

update-actor-vis-box

update-actor-vis-box(proc: process-drawable, min-pt: vector, max-pt: vector) => nonesource
Update the min-pt and max-pt vector so that the box encloses the bounding box around the bounds sphere
in the process-drawable.

Variables


*compact-actors*

*compact-actors*: symbolsource

*spawn-actors*

*spawn-actors*: symbolsource

*vis-actors*

*vis-actors*: symbolsource

Types


res-lump

res-lump: basicsource
Fields
type: type
length: int32
allocated-length: int32
data-base: pointer
data-top: pointer
data-size: int32
extra: entity-links
tag: pointer
Methods
get-property-data(obj: res-lump, name: symbol, mode: symbol, time: float, default: pointer, tag-addr: pointer, buf-addr: pointer) => pointersource
Returns an address to a given property's data at a specific time stamp, or default on error.
name is the name of the property you want, mode is its lookup mode ('interp 'base 'exact), time is the timestamp.
default is the default result returned in the case of an error.
tag-addr is an address to a res-tag. The current base tag is written to this. Ignored if tag-addr is #f
buf-addr is an address to the data buffer used to write interpolated data to. It must have enough space! Only necessary for 'interp mode.
get-property-struct(obj: res-lump, name: symbol, mode: symbol, time: float, default: structure, tag-addr: pointer, buf-addr: pointer) => structuresource
Returns a given struct property's value at a specific time stamp, or default on error.
name is the name of the property you want, mode is its lookup mode ('interp 'base 'exact), time is the timestamp.
default is the default result returned in the case of an error.
tag-addr is an address to a res-tag. The current base tag is written to this. Ignored if tag-addr is #f
buf-addr is an address to the data buffer used to write interpolated data to. It must have enough space! Only necessary for 'interp mode.
get-property-value(obj: res-lump, name: symbol, mode: symbol, time: float, default: uint128, tag-addr: pointer, buf-addr: pointer) => uint128source
Returns a given value property's value at a specific time stamp, or default on error.
name is the name of the property you want, mode is its lookup mode ('interp 'base 'exact), time is the timestamp.
default is the default result returned in the case of an error.
tag-addr is an address to a res-tag. The current base tag is written to this. Ignored if tag-addr is #f
buf-addr is an address to the data buffer used to write interpolated data to. It must have enough space! Only necessary for 'interp mode.
get-property-value-float(obj: res-lump, name: symbol, mode: symbol, time: float, default: float, tag-addr: pointer, buf-addr: pointer) => floatsource
same as get-property-value but float type is checked first?
get-tag-index-data(obj: res-lump, n: int) => pointersource
get the data address of the n'th tag.
get-tag-data(obj: res-lump, tag: res-tag) => pointersource
get the data address of the specified tag.
allocate-data-memory-for-tag!(obj: res-lump, arg0: res-tag) => res-tagsource
Find space for the data described by arg0 in obj.
Returns a tag with data-offset set correctly for this res-lump.
If the lump already contains memory for the given tag, and it is big enough,
it will be reused. Alignment will be at least 8 bytes.
If the input tag has elt-count = 0, it will return a tag for elt-count = 1.
sort!(obj: res-lump) => _type_source
Sort all tags based on name, then key-frame.
add-data!(obj: res-lump, arg0: res-tag, arg1: pointer) => res-lumpsource
Given a tag and a pointer to its data, copy it to this res-lump.
This doesn't seem to do the right thing if the given tag is a non-inline tag
with > 1 element.
add-32bit-data!(obj: res-lump, arg0: res-tag, arg1: object) => res-lumpsource
Add a single 32-bit value using add-data.
lookup-tag-idx(obj: res-lump, name-sym: symbol, mode: symbol, time: float) => res-tag-pairsource
Look up the index of the tag containing with the given name and timestamp.
Correct lookups return a res-tag-pair, which contains one tag index in the lower 32 bits and one in the upper 32 bits.
Depending on the mode, they may be the same, or they may be two tags that you should interpolate
between, if the exact time was not found.

name-sym should be the name of the thing you want.
time is for the timestamp you want.
If mode = 'base, then both the indices are the same and the timestamp is ignored.
If mode = 'interp, then it tries to get closest below/closest above (or both the same, if exact match found)
If mode = 'exact, then it requires an exact timestamp match and both indices are the same.
If things go wrong, returns a negative number
make-property-data(obj: res-lump, time: float, tag-pair: res-tag-pair, buf: pointer) => pointersource
Returns (a pointer to) the value data of a property with the tag-pair.
If tag-pair does not represent an exact point in the timeline, then the data is interpolated based on time
with the result written into buf. buf must have enough space to copy all of the data.
Otherwise, simply returns an address to the resource binary.
get-curve-data!(obj: res-lump, curve-target: curve, points-name: symbol, knots-name: symbol, time: float) => symbolsource
Read curve data and write it to curve-target. Return #t if both control points and knots data was succesfully read, #f otherwise.

res-tag

res-tag: uint128source

res-tag-pair

res-tag-pair: uint64source

Variables


*res-key-string*

*res-key-string*: stringsource

Variables


*res-static-buf*

*res-static-buf*: pointersource