Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
bfdbf3c
Add object/function opcode support and heap refactoring
PeerInfinity Dec 20, 2025
18c9d23
Fix whitespace to match upstream style
PeerInfinity Dec 20, 2025
bef10a9
Revert unnecessary changes to match upstream API
PeerInfinity Dec 20, 2025
aedff51
Revert flashbang.c to upstream
PeerInfinity Dec 20, 2025
4741b4c
Fix whitespace to match upstream style
PeerInfinity Dec 20, 2025
85a12a4
Remove unused MovieClip stub functions
PeerInfinity Dec 20, 2025
866cf10
Revert whitespace-only changes to match upstream
PeerInfinity Dec 20, 2025
cfef259
Remove unnecessary comments from action.h
PeerInfinity Dec 20, 2025
378a3c6
Match upstream style in heap.h
PeerInfinity Dec 20, 2025
e7c4d57
Minimize opcodes to object/function operations only
PeerInfinity Jan 13, 2026
164bba9
Add back arithmetic, comparison, string, and variable opcodes
PeerInfinity Jan 13, 2026
f409c12
major prune/rework, ignore parameters of functions for now
LittleCube-hax Feb 23, 2026
f3b14be
that's not how strlen works LOL
LittleCube-hax Feb 23, 2026
96f3ac8
implement the bulk of objects and functions
LittleCube-hax Mar 9, 2026
f02311c
first attempt at garbage collection
LittleCube-hax Mar 26, 2026
f1d2da9
move free thread functions to separate file
LittleCube-hax Mar 29, 2026
e2db29b
cleanup
LittleCube-hax Mar 31, 2026
6f256b2
cleanup, fix free mechanism bug
LittleCube-hax Mar 31, 2026
aa3fa7f
cleanup
LittleCube-hax Mar 31, 2026
18589c8
cleanup, manage scope objects, fix Math.abs
LittleCube-hax Apr 2, 2026
21439f1
implement prototype support
LittleCube-hax Apr 4, 2026
c8aec0d
cleanup, implement lazy prototype instantiation
LittleCube-hax Apr 6, 2026
a3023dd
fix tag.c indentation
LittleCube-hax Apr 9, 2026
d7e8c39
remove bad_poll check in swf.c
LittleCube-hax Apr 9, 2026
dafe7dc
implement DefineFunction2
LittleCube-hax Apr 9, 2026
9a05b00
fix function types, registers, and refcounts
LittleCube-hax Apr 9, 2026
c559193
implement everything needed for the prelude runtime SWF
LittleCube-hax Apr 12, 2026
29564ef
add unimplemented and unreachable macros
LittleCube-hax Apr 12, 2026
420c627
refactor prototypes and getProperty
LittleCube-hax Apr 13, 2026
7af14f6
fix anonymous function types
LittleCube-hax Apr 13, 2026
ba336f9
cleanup, fix refcount bug with registers, add ECMA-262's ToNumber, im…
LittleCube-hax Apr 16, 2026
cac87a9
add Add2 and Equals2, fix Not and evaluateCondition
LittleCube-hax Apr 16, 2026
8482c49
cleanup, implement strings stored on the stack, implement Add2 string…
LittleCube-hax Apr 16, 2026
bc1f9aa
implement Modulo
LittleCube-hax Apr 16, 2026
18d2a3e
fix registers, implement Increment, Decrement, and bitwise ops
LittleCube-hax Apr 17, 2026
d66d0de
make custom ABI for runtime funcs
LittleCube-hax Apr 17, 2026
4421d6a
fix string conversion, add static initializers, initialize Number
LittleCube-hax Apr 17, 2026
ed9d4b6
cleanup, lots of work on native primitive objects
LittleCube-hax Apr 18, 2026
31c0d49
fix PUSH_FUNC_UNKNOWN, fix refcounts for pushing functions
LittleCube-hax Apr 18, 2026
4e9535e
cleanup, add actions ToNumber, ToString, and TypeOf, fix refcount issues
LittleCube-hax Apr 19, 2026
5fec6fa
fix constructor property, refactor functions to use the native Functi…
LittleCube-hax Apr 21, 2026
d782591
fix Array constructor, register Array.push and Array.pop, fix various…
LittleCube-hax Apr 22, 2026
991294c
cleanup action.h, declare peekVar
LittleCube-hax Apr 26, 2026
7bc135d
implement part of Array refcounting
LittleCube-hax Apr 26, 2026
9787c8b
update linux implementation
LittleCube-hax Apr 28, 2026
cc12c44
more linux maintenance
LittleCube-hax Apr 28, 2026
816dfb7
cleanup, refactor releasing ActionVars, add object ids, begin native …
LittleCube-hax Apr 29, 2026
70aab71
refactor context, fix various refcount issues and memleaks
LittleCube-hax May 2, 2026
3be7cae
refactor object struct, extend actionTypeOf, do some more work on Mov…
LittleCube-hax May 12, 2026
6bc6bab
cleanup, work on MovieClip and BitmapData
LittleCube-hax May 15, 2026
134b536
remove tesselator.c
LittleCube-hax May 15, 2026
f6af4ea
lots of work on rendering BitmapData
LittleCube-hax May 19, 2026
11fb2c2
implement bitmap position and scaling
LittleCube-hax May 19, 2026
0d2506e
cleanup, remove msaa (for now at least), fix bitmap sizes
LittleCube-hax May 20, 2026
0cf6d78
implement using bitmap ids and uninv ids
LittleCube-hax May 20, 2026
8587994
implement draw tasks
LittleCube-hax May 20, 2026
f95927e
ensure size of MovieClip children array, fix multiple bitmaps on stage
LittleCube-hax May 20, 2026
c23994a
implement MovieClip rotation
LittleCube-hax May 20, 2026
4d63122
implement parenting
LittleCube-hax May 20, 2026
8027ca5
implement parenting (parenting is just that easy)
LittleCube-hax May 22, 2026
18f25c9
start work on Sound class
LittleCube-hax May 24, 2026
9470f86
more sound work
LittleCube-hax May 24, 2026
aea1b18
remove lzma and zlib for now
LittleCube-hax May 24, 2026
24c8f99
cleanup, fix registers as params, handle MovieClip onEnterFrame events
LittleCube-hax May 24, 2026
dacb7a9
fix getting BitmapData width and height, fix getAndCallMethodIfExists
LittleCube-hax May 24, 2026
18534fd
fix bug with preloading registers, implement Extends
LittleCube-hax May 25, 2026
319ef16
turns out i didn't understand super LOL
LittleCube-hax May 25, 2026
d928a23
begin input implementation
LittleCube-hax May 25, 2026
288aa44
more input work
LittleCube-hax May 25, 2026
45a4343
implement window scaling
LittleCube-hax May 25, 2026
802e480
improve display scaling
LittleCube-hax May 26, 2026
0e4af24
fix passing args to a function that has no args
LittleCube-hax May 26, 2026
ff4c9bc
fix deadlock in GetMember
LittleCube-hax May 26, 2026
c3cb864
repeat input events
LittleCube-hax May 26, 2026
64c78e5
implement setting Array.length
LittleCube-hax May 26, 2026
d30e783
work on dynamic string ids
LittleCube-hax May 27, 2026
eab2646
fix MovieClip memory leak, fix stack race condition with free thread
LittleCube-hax May 27, 2026
de1202a
fix memleak in MovieClip_attachBitmap, fix ENSURE_SIZE calls
LittleCube-hax May 27, 2026
430682b
initialize MovieClip children to NULL when expanding
LittleCube-hax May 27, 2026
d8468e5
implement ToInteger
LittleCube-hax May 27, 2026
8e82573
add primitive frame pacing, implement removeMovieClip
LittleCube-hax May 29, 2026
c6a9e71
improve frame pacing, fix memleak in Array, implement dynamic string ids
LittleCube-hax May 31, 2026
3188a09
improve getTimer() (FINALLY)
LittleCube-hax May 31, 2026
7499490
implement using Numbers as indices on an Object
LittleCube-hax Jun 2, 2026
7422074
implement recompSin and recompCos
LittleCube-hax Jun 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
[submodule "lib/zlib"]
path = lib/zlib
url = https://github.com/madler/zlib.git
[submodule "lib/lzma"]
path = lib/lzma
url = https://github.com/SWFRecomp/lzma.git
[submodule "lib/c-hashmap"]
path = lib/c-hashmap
url = https://github.com/Mashpoe/c-hashmap.git
Expand All @@ -13,3 +7,12 @@
[submodule "lib/o1heap"]
path = lib/o1heap
url = https://github.com/pavel-kirienko/o1heap.git
[submodule "lib/rbtree"]
path = lib/rbtree
url = https://github.com/SWFRecomp/rb-tree.git
[submodule "lib/libtess2"]
path = lib/libtess2
url = https://github.com/SWFRecomp/libtess2.git
[submodule "lib/minimp3"]
path = lib/minimp3
url = https://github.com/lieff/minimp3.git
45 changes: 27 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,24 @@ option(NO_GRAPHICS "Build without graphics support (console-only)" OFF)
# Core sources (always included)
set(CORE_SOURCES
${PROJECT_SOURCE_DIR}/src/actionmodern/action.c
${PROJECT_SOURCE_DIR}/src/actionmodern/objects.c
${PROJECT_SOURCE_DIR}/src/actionmodern/free_thread.c
${PROJECT_SOURCE_DIR}/src/actionmodern/variables.c
${PROJECT_SOURCE_DIR}/src/memory/heap.c
${PROJECT_SOURCE_DIR}/src/apis/rbtree/rbtree.c
${PROJECT_SOURCE_DIR}/src/apis/swap-vector/swap_vector.c
${PROJECT_SOURCE_DIR}/src/utils.c

${PROJECT_SOURCE_DIR}/lib/o1heap/o1heap/o1heap.c

# Compile hashmap file directly to avoid undefined symbols on Linux
# Compile libs directly to avoid undefined symbols on Linux
${PROJECT_SOURCE_DIR}/lib/c-hashmap/map.c
${PROJECT_SOURCE_DIR}/lib/rbtree/rb_tree.c
${PROJECT_SOURCE_DIR}/lib/o1heap/o1heap/o1heap.c
)

file(GLOB_RECURSE RUNTIME_API_SOURCES ${PROJECT_SOURCE_DIR}/src/actionmodern/runtime_api/*.c)



if(NO_GRAPHICS)
# Console-only mode
message(STATUS "Building in NO_GRAPHICS mode (console-only)")
Expand All @@ -33,8 +41,6 @@ if(NO_GRAPHICS)
${PROJECT_SOURCE_DIR}/src/libswf/swf_core.c
${PROJECT_SOURCE_DIR}/src/libswf/tag_stubs.c
)

set(SOURCES ${CORE_SOURCES} ${SWF_SOURCES})
else()
# Full graphics mode
message(STATUS "Building in full graphics mode")
Expand All @@ -43,36 +49,36 @@ else()
${PROJECT_SOURCE_DIR}/src/libswf/swf.c
${PROJECT_SOURCE_DIR}/src/libswf/tag.c
${PROJECT_SOURCE_DIR}/src/flashbang/flashbang.c
${PROJECT_SOURCE_DIR}/src/flashbang/triangulation.c
)

set(SOURCES ${CORE_SOURCES} ${SWF_SOURCES})
endif()

set(SOURCES ${CORE_SOURCES} ${SWF_SOURCES} ${RUNTIME_API_SOURCES})

add_library(${PROJECT_NAME} STATIC ${SOURCES})

if (WIN32)
target_compile_options(${PROJECT_NAME} PRIVATE)
target_compile_options(${PROJECT_NAME} PRIVATE)
else()
target_compile_options(${PROJECT_NAME} PRIVATE -Wno-format-truncation)
target_compile_options(${PROJECT_NAME} PRIVATE -Wno-format-truncation)
endif()

set(RENAME_ZCONF OFF)

add_subdirectory(${PROJECT_SOURCE_DIR}/lib/zlib)
add_subdirectory(${PROJECT_SOURCE_DIR}/lib/lzma)
add_subdirectory(${PROJECT_SOURCE_DIR}/lib/libtess2)

if(NOT NO_GRAPHICS)
add_subdirectory(${PROJECT_SOURCE_DIR}/lib/SDL3)

target_link_libraries(${PROJECT_NAME} PUBLIC
zlibstatic
lzma
libtess2
SDL3::SDL3
$<$<PLATFORM_ID:Linux>:m>
)
else()
target_link_libraries(${PROJECT_NAME} PUBLIC
zlibstatic
lzma
libtess2
$<$<PLATFORM_ID:Linux>:m>
)
endif()

Expand All @@ -85,15 +91,18 @@ endif()

target_include_directories(${PROJECT_NAME} PRIVATE
${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/include/apis
${PROJECT_SOURCE_DIR}/include/actionmodern
${PROJECT_SOURCE_DIR}/include/actionmodern/runtime_api
${PROJECT_SOURCE_DIR}/include/libswf
${PROJECT_SOURCE_DIR}/include/flashbang
${PROJECT_SOURCE_DIR}/include/memory
${PROJECT_SOURCE_DIR}/lib/libtess2/Include
${PROJECT_SOURCE_DIR}/lib/minimp3
${PROJECT_SOURCE_DIR}/lib/c-hashmap
${PROJECT_SOURCE_DIR}/lib/SDL3/include
${PROJECT_SOURCE_DIR}/lib/rbtree
${PROJECT_SOURCE_DIR}/lib/o1heap/o1heap
zlib
lzma/liblzma/api
${PROJECT_SOURCE_DIR}/lib/SDL3/include
)

if(NOT NO_GRAPHICS)
Expand Down
173 changes: 162 additions & 11 deletions include/actionmodern/action.h
Original file line number Diff line number Diff line change
@@ -1,30 +1,45 @@
#pragma once

#include <swf.h>
#include <objects.h>
#include <variables.h>
#include <stackvalue.h>

#define STACK_VAR_SIZE (4 + 4 + 8 + 8)

#define PUSH(t, v) \
OLDSP = SP; \
SP -= 4 + 4 + 8 + 8; \
SP -= STACK_VAR_SIZE; \
SP &= ~7; \
STACK[SP] = t; \
VAL(u32, &STACK[SP + 4]) = OLDSP; \
VAL(u64, &STACK[SP + 16]) = v; \
VAL(u64, &STACK[SP + 16]) = v;

// Push string with ID (for constant strings from compiler)
#define PUSH_STR_ID(v, n, id) \
#define PUSH_STR_ID(v, id, n) \
OLDSP = SP; \
SP -= 4 + 4 + 8 + 8; \
SP -= STACK_VAR_SIZE; \
SP &= ~7; \
STACK[SP] = ACTION_STACK_VALUE_STRING; \
STACK[SP + 1] = false; \
VAL(u32, &STACK[SP + 4]) = OLDSP; \
VAL(u32, &STACK[SP + 8]) = n; \
VAL(u32, &STACK[SP + 12]) = id; \
VAL(char*, &STACK[SP + 16]) = v; \
VAL(char*, &STACK[SP + 16]) = v;

// Push dynamic string onto the stack
#define PUSH_STR_STACK(n) \
OLDSP = SP; \
SP -= (u32) (4 + 4 + 8 + (n + 1)); \
SP &= ~7; \
STACK[SP] = ACTION_STACK_VALUE_STRING; \
STACK[SP + 1] = true; \
VAL(u32, &STACK[SP + 4]) = OLDSP; \
VAL(u32, &STACK[SP + 8]) = n; \
VAL(u32, &STACK[SP + 12]) = 0;

// Push string without ID (for dynamic strings, ID = 0)
#define PUSH_STR(v, n) PUSH_STR_ID(v, n, 0)
#define PUSH_STR(v, n) PUSH_STR_ID(v, 0, n)

#define PUSH_STR_LIST(n, size) \
OLDSP = VAL(u32, &STACK[SP_SECOND_TOP + 4]); \
Expand All @@ -33,54 +48,190 @@
STACK[SP] = ACTION_STACK_VALUE_STR_LIST; \
VAL(u32, &STACK[SP + 4]) = OLDSP; \
VAL(u32, &STACK[SP + 8]) = n; \
VAL(u32, &STACK[SP + 12]) = 0;

#define PUSH_VAR(p) pushVar(app_context, p);
#define PUSH_NULL() PUSH(ACTION_STACK_VALUE_NULL, 0)
#define PUSH_UNDEFINED() PUSH(ACTION_STACK_VALUE_UNDEFINED, 0)

#define PUSH_F32(f) PUSH(ACTION_STACK_VALUE_F32, VAL(u32, &(f)));
#define PUSH_F64(f) PUSH(ACTION_STACK_VALUE_F64, VAL(u64, &(f)));
#define PUSH_INT(i) PUSH(ACTION_STACK_VALUE_INT, (i));
#define PUSH_BOOL(b) PUSH(ACTION_STACK_VALUE_BOOLEAN, (b));

#define PUSH_OBJ(o) \
PUSH(ACTION_STACK_VALUE_OBJECT, (u64) o) \
OBJ_LOCK_WRITE(o, \
{ \
retainObject(o); \
});

#define PUSH_VAR(p) pushVar(app_context, p)

#define POP() \
SP = VAL(u32, &STACK[SP + 4]); \
if (STACK_TOP_TYPE == ACTION_STACK_VALUE_OBJECT) \
{ \
ASObject* o = (ASObject*) STACK_TOP_VALUE; \
OBJ_LOCK_WRITE(o, \
{ \
releaseObject(app_context, o); \
}); \
} \
SP = VAL(u32, &STACK[SP + 4]);

#define POP_2() \
POP(); \
POP(); \
POP();

#define DISCARD_ARGS(n) discardArgs(app_context, n)

#define STACK_TOP_TYPE STACK[SP]
#define STACK_TOP_OWNS_MEM STACK[SP + 1]
#define STACK_TOP_N VAL(u32, &STACK[SP + 8])
#define STACK_TOP_ID VAL(u32, &STACK[SP + 12])
#define STACK_TOP_VALUE VAL(u64, &STACK[SP + 16])

#define SP_SECOND_TOP VAL(u32, &STACK[SP + 4])
#define STACK_SECOND_TOP_TYPE STACK[SP_SECOND_TOP]
#define STACK_SECOND_TOP_OWNS_MEM STACK[SP_SECOND_TOP + 1]
#define STACK_SECOND_TOP_N VAL(u32, &STACK[SP_SECOND_TOP + 8])
#define STACK_SECOND_TOP_ID VAL(u32, &STACK[SP_SECOND_TOP + 12])
#define STACK_SECOND_TOP_VALUE VAL(u64, &STACK[SP_SECOND_TOP + 16])

#define FUNC_FLAG_PRELOAD_PARENT 0b0000000010000000
#define FUNC_FLAG_PRELOAD_ROOT 0b0000000001000000
#define FUNC_FLAG_SUPPRESS_SUPER 0b0000000000100000
#define FUNC_FLAG_PRELOAD_SUPER 0b0000000000010000
#define FUNC_FLAG_SUPPRESS_ARGUMENTS 0b0000000000001000
#define FUNC_FLAG_PRELOAD_ARGUMENTS 0b0000000000000100
#define FUNC_FLAG_SUPPRESS_THIS 0b0000000000000010
#define FUNC_FLAG_PRELOAD_THIS 0b0000000000000001
#define FUNC_FLAG_PRELOAD_GLOBAL 0b0000000100000000

#define IS_NULL(v) (v.type == ACTION_STACK_VALUE_NULL)
#define IS_UNDEFINED(v) (v.type == ACTION_STACK_VALUE_UNDEFINED)
#define IS_NULL_UNDEFINED(v) (IS_NULL(v) || IS_UNDEFINED(v))

#define IS_STR_T(t) (t == ACTION_STACK_VALUE_STRING || t == ACTION_STACK_VALUE_STR_LIST)
#define IS_NUM_T(t) (t == ACTION_STACK_VALUE_F32 || t == ACTION_STACK_VALUE_F64 || t == ACTION_STACK_VALUE_INT)

#define RETURN_VOID() PUSH_UNDEFINED()

#define VAL(type, x) *((type*) x)

#define INITIAL_STACK_SIZE 8388608 // 8 MB
#define INITIAL_SP INITIAL_STACK_SIZE

extern ActionVar* temp_val;

void initTime();
extern ASObject* _global;

typedef struct
{
u8 reg;
u32 string_id;
} Function2Param;

void initActions(SWFAppContext* app_context);
void freeActions(SWFAppContext* app_context);

void discardArgs(SWFAppContext* app_context, u32 num_args);

void pushVar(SWFAppContext* app_context, ActionVar* p);
void pushReg(SWFAppContext* app_context, u8 reg);

void releaseObjectVar(SWFAppContext* app_context, ActionVar* var);

void peekVar(SWFAppContext* app_context, ActionVar* var);
void popVar(SWFAppContext* app_context, ActionVar* var);

void convertNumericToNumber(SWFAppContext* app_context, ActionVar* v);
void convertNumericToInteger(SWFAppContext* app_context, ActionVar* v);

void toNumber(SWFAppContext* app_context, ActionVar* v);
void toPrimitive(SWFAppContext* app_context, ASObject* this);
void toString(SWFAppContext* app_context, ActionVar* v);

ActionStackValueType convertString(SWFAppContext* app_context);
ActionStackValueType convertDouble(SWFAppContext* app_context);
ActionStackValueType convertIntECMA(SWFAppContext* app_context);

ASProperty* getPropertyInThisScope(SWFAppContext* app_context, u32 string_id, const char* name, u32 name_len);
void setPropertyInThisScope(SWFAppContext* app_context, u32 string_id, const char* name, u32 name_len, ActionVar* value);

void callFunction(SWFAppContext* app_context, ASObject* this, ActionVar* func_v, u32 num_args);
void getAndCallMethod(SWFAppContext* app_context, ASObject* this, u32 method_name, u32 num_args);
bool getAndCallMethodIfExists(SWFAppContext* app_context, ASObject* this, u32 method_name, u32 num_args);

bool evaluateCondition(SWFAppContext* app_context);

// Arithmetic Operations
void actionAdd(SWFAppContext* app_context);
void actionAdd2(SWFAppContext* app_context);
void actionSubtract(SWFAppContext* app_context);
void actionMultiply(SWFAppContext* app_context);
void actionDivide(SWFAppContext* app_context);
void actionModulo(SWFAppContext* app_context);
void actionIncrement(SWFAppContext* app_context);
void actionDecrement(SWFAppContext* app_context);

// Bitwise Operations
void actionBitAnd(SWFAppContext* app_context);
void actionBitOr(SWFAppContext* app_context);
void actionBitLShift(SWFAppContext* app_context);
void actionBitRShift(SWFAppContext* app_context);
void actionBitURShift(SWFAppContext* app_context);
void actionBitXor(SWFAppContext* app_context);

// Comparison Operations
void actionEquals(SWFAppContext* app_context);
void actionEquals2(SWFAppContext* app_context);
void actionLess(SWFAppContext* app_context);
void actionLess2(SWFAppContext* app_context);
void actionGreater(SWFAppContext* app_context);
void actionAnd(SWFAppContext* app_context);
void actionOr(SWFAppContext* app_context);
void actionNot(SWFAppContext* app_context);

// String Operations
void actionStringEquals(SWFAppContext* app_context, char* a_str, char* b_str);
void actionStringLength(SWFAppContext* app_context, char* v_str);
void actionStringAdd(SWFAppContext* app_context, char* a_str, char* b_str);

// Variable Operations
void actionGetVariable(SWFAppContext* app_context);
void actionSetVariable(SWFAppContext* app_context);
void actionToInteger(SWFAppContext* app_context);
void actionToNumber(SWFAppContext* app_context);
void actionToString(SWFAppContext* app_context);
void actionTypeOf(SWFAppContext* app_context);

// Utility Operations
void actionTrace(SWFAppContext* app_context);
void actionGetTime(SWFAppContext* app_context);
void actionGetTime(SWFAppContext* app_context);

// Object Operations
void actionGetMember(SWFAppContext* app_context);
void actionSetMember(SWFAppContext* app_context);
void actionEnumerate(SWFAppContext* app_context, char* str_buffer);
void actionDelete(SWFAppContext* app_context);
void actionDelete2(SWFAppContext* app_context, char* str_buffer);
void actionNewObject(SWFAppContext* app_context);
void actionNewMethod(SWFAppContext* app_context);
void actionExtends(SWFAppContext* app_context);
void actionInitObject(SWFAppContext* app_context);

// Array Operations
void actionInitArray(SWFAppContext* app_context);

// Function Operations
void actionDefineLocal(SWFAppContext* app_context);
void actionDefineLocal2(SWFAppContext* app_context);
void actionCallFunction(SWFAppContext* app_context);
void actionCallMethod(SWFAppContext* app_context);

// Stack/Register Operations
void actionStoreRegister(SWFAppContext* app_context, u8 register_num);

// Function Definitions
void actionDefineFunction(SWFAppContext* app_context, u32 string_id, action_func func, u32* args, bool anonymous);
void actionDefineFunction2(SWFAppContext* app_context, u32 string_id, action_func func, Function2Param* args, u8 reg_count, u16 flags, bool anonymous);
11 changes: 11 additions & 0 deletions include/actionmodern/free_thread.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#pragma once

#include <rbtree.h>
#include <utils.h>

extern recomp_rwlock_t object_queue_lock;
extern rbtree object_free_queue;

extern recomp_thread_t free_thread_handle;

DECLARE_RUNTIME_THREAD_FUNC(freeThread);
Loading