Free Hero Mesh

Artifact [ff5a0f1f93]
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.

Artifact ff5a0f1f93f902f1b2315173c590704f95a59983:


; File with list of instruction opcodes
; Also other words used in the .class files

; This file is part of Free Hero Mesh and is public domain.

; Directions
(0000)
#+E
#+NE
#+N
#+NW
#+W
#+SW
#+S
#+SE
#+F
#+LF
#+L
#+LB
#+B
#+RB
#+R
#+RF

; Bit constants
#bit0 (0001)
#bit1 (0002)
#bit2 (0004)
#bit3 (0008)
#bit4 (0010)
#bit5 (0020)
#bit6 (0040)
#bit7 (0080)
(87E8)
bitconstant "bit8"
#bit9
#bit10
#bit11
#bit12
#bit13
#bit14
#bit15
#bit16
#bit17
#bit18
#bit19
#bit20
#bit21
#bit22
#bit23
#bit24
#bit25
#bit26
#bit27
#bit28
#bit29
#bit30
bitconstant_last "bit31"

; Animation constants
STOP (0000)
ONCE (0001)
LOOP (0002)
OSC (0008)
OSCLOOP (000A)

(8000)

; Stack ops
.drop "."
dup
swap
nip
tuck
rot
rotback "-rot"
pick
over

; Flow controls
-if
-else
-then
-begin
-again
-until
-while
-repeat
-for
-next
*goto
*CallSub
ret
retnz
retz
-case
-or
-and
-fork
-rtn
-link
,exec

; Arithmetic
add "+"
sub "-"
,mul "*"
,div "/"
,mod
,divmod "/mod"
neg
,min
,max

; Bitwise
lsh
,rsh
band
bor
bxor
bnot
-bit

; Logical
land
lor
lxor
lnot

; Comparison
eq
eq2
ne
,gt
,lt
,ge
,le
is

; Type checks
qn "n?"
qc "c?"
qcz "cz?"
qm "m?"
qs "s?"
qo "o?"
qoz "oz?"
qa "a?"

; Standard variables
,Class
,=!Temperature
,=Shape
,Xloc
,Yloc
,=Dir
,=Image
,=!Inertia
,=!Distance
,=!Density
,=!Volume
,=!Weight
,=!Height
,=!Climb
,=!Strength
,=Hard
,=Sharp
,=ShapeDir
,=Shovable
,=!Misc1
,=!Misc2
,=!Misc3
,=!Misc4
,=!Misc5
,=!Misc6
,=!Misc7
,=Arrived
,=Departed
,=Arrivals
,=Departures
,=Busy
,=Invisible
,=KeyCleared
,=UserSignal
,=UserState
,=VisualOnly
,=Stealthy
,=Moved
,=Moving
,=Done
,=Connection
,Destroyed
,Player
,Compatible
,CollisionLayers
,=Crush
Self
Msg
From
=Arg1
=Arg2
=Arg3
=MoveNumber
Level
,Key
=Finished

; Standard variables related to object replacements
,=ThisR
,=NextR
,LastR

; Top level definitions
-Background
-CodePage
-Order
Control
-LevelTable
-InputXY

; Class definitions
-Input
,Quiz
-InPlace
-DefaultImage
-Help
-EditorHelp
-Others
-SUBS

; Main operations / miscellaneous
=Animate
=AnimateDead
,Assassinate ; destroy without sending any messages
.Broadcast
BroadcastAnd ; Broadcast, but result is AND of return values
BroadcastAndEx
*BroadcastClass ; for (Broadcast [class])
.BroadcastEx ; broadcast with three arguments
BroadcastList ; Broadcast, pushing results to stack
BroadcastListEx
BroadcastSum ; Broadcast, but result is sum of return values
BroadcastSumEx
chain
,Chebyshev
,Coloc
,Connect
.Create
Data
DelInventory
Delta
.,Destroy
,FakeMove
,FindConnection
FlushClass
,FlushObj
GetInventory
HeightAt
HitMe
IgnoreKey
.,IntMove ; move without initializing Inertia
.,JumpTo
,Loc ; same as: Xloc Yloc
,LocateMe
LoseLevel
,Manhattan
MaxInventory ; error if more than that many slots in inventory
,Morton
.,Move
.,MovePlus "Move+" ; obj.Inertia+=Strength instead of obj.Inertia=Strength
.,MoveTo ; the internal MoveTo() function
.,PlusMove "+Move"
.,MinusMove "-Move"
NewX
NewXY
NewY
,ObjAbove
,ObjBelow
ObjBottomAt
ObjClassAt
,ObjDir
ObjLayerAt
ObjMovingTo
ObjTopAt
PopUp
*PopUpArgs ; for (PopUp [number])
,Rel
.Replace
,Seek
.,Send
.,SendEx ; send with three arguments
SetInventory
Sound
Sweep
SweepEx
Synchronize
,Target
Trace
,TraceStack
Trigger
TriggerAt
VolumeAt
,Walkable
,WinLevel
,XDir
,XStep
XYDir
,YDir
,YStep

; Operations with marks
mark "_"
tmark
in
nin
-mbegin
flip
count
clear
uniq

; Arrays
-Array
,GetArray
InitArray
,SetArray
,ArrayCell
ArraySlice
CopyArray
DotProduct

; Pattern matching
-,=Pattern "P"
-,=PatternS "P*"
-Rook
-Bishop
-Queen
-cut

; Bizarro world
,=Bizarro
.BizarroSwap
SwapWorld

; Inheritance
-Abstract
,Super

; Specials
*Function
*Local
*Label
*String
*Int16
*Int32
*Dispatch
*UserFlag