Versions in this module Expand all Collapse all v0 v0.1.0 Jun 14, 2026 Changes in this version + const OP_ADD + const OP_ATTACH_UNIT + const OP_BITWISE_AND + const OP_BITWISE_NOT + const OP_BITWISE_OR + const OP_BITWISE_XOR + const OP_CACHE + const OP_CALL_SCRIPT + const OP_CREATE_LOCAL + const OP_DIV + const OP_DONT_CACHE + const OP_DONT_SHADE + const OP_DONT_SHADOW + const OP_DROP_UNIT + const OP_EMIT_SFX + const OP_EQUAL + const OP_EXPLODE + const OP_GET + const OP_GET_UNIT_VALUE + const OP_GREATER_EQUAL + const OP_GREATER_THAN + const OP_HIDE + const OP_JUMP + const OP_JUMP_IF_FALSE + const OP_LESS_OR_EQUAL + const OP_LESS_THAN + const OP_LOGICAL_AND + const OP_LOGICAL_NOT + const OP_LOGICAL_OR + const OP_LOGICAL_XOR + const OP_MISSION_COMMAND + const OP_MOD + const OP_MOVE + const OP_MOVE_NOW + const OP_MUL + const OP_NOT_EQUAL + const OP_PLAY_SOUND + const OP_POP_LOCAL_VAR + const OP_POP_STACK + const OP_POP_STATIC + const OP_PUSH_CONSTANT + const OP_PUSH_IMMEDIATE + const OP_PUSH_LOCAL_VAR + const OP_PUSH_STATIC + const OP_RAND + const OP_RETURN + const OP_SET_SIGNAL_MASK + const OP_SET_VALUE + const OP_SHADE + const OP_SHOW + const OP_SIGNAL + const OP_SLEEP + const OP_SPIN + const OP_STACK_ALLOC + const OP_START_SCRIPT + const OP_STOP_SPIN + const OP_SUB + const OP_TAK_MATH_09 + const OP_TAK_MATH_0B + const OP_TURN + const OP_TURN_NOW + const OP_WAIT_FOR_MOVE + const OP_WAIT_FOR_TURN + func AxisName(axis uint8) string + func DecodePackedOperand(operand uint32) (pieceID, axis, value, flags uint8) + func EncodePackedOperand(pieceID, axis, value, flags uint8) uint32 + func OpcodeByName(name string) (uint32, bool) + func OpcodeHasInlineParam(opcode uint32) bool + func OpcodeName(opcode uint32) string + func OpcodeParamCount(opcode uint32) int + type COB struct + Code []byte + LengthOfScripts uint32 + NumPieces uint32 + NumScripts uint32 + NumberOfStaticVars uint32 + OffsetToNameArray uint32 + OffsetToPieceNameOffsetArray uint32 + OffsetToScriptCode uint32 + OffsetToScriptCodeIndexArray uint32 + OffsetToScriptNameOffsetArray uint32 + PieceNames []string + ScriptCodeIndices []uint32 + ScriptNames []string + SoundNames []string + UKZero uint32 + VersionSignature uint32 + func LoadFromFile(path string) (*COB, error) + func LoadFromFilesystem(fs filesystem.FileSystem, path string) (*COB, error) + func LoadFromReader(r io.Reader) (*COB, error) + func (c *COB) Disassemble(scriptIndex int) ([]Instruction, error) + func (c *COB) SaveToFile(filename string) error + func (c *COB) WriteToWriter(w io.Writer) error + type Instruction struct + Offset uint32 + Opcode uint32 + Operand int32 + Operand2 int32 + func (i Instruction) String() string