-
Notifications
You must be signed in to change notification settings - Fork 1
Feature/objects and functions #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
PeerInfinity
wants to merge
11
commits into
SWFRecomp:master
Choose a base branch
from
PeerInfinity:feature/objects-and-functions
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature/objects and functions #3
PeerInfinity
wants to merge
11
commits into
SWFRecomp:master
from
PeerInfinity:feature/objects-and-functions
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit adds comprehensive ActionScript 2.0 object and function support: Object System (new files): - object.h/object.c: ASObject and ASArray with reference counting - Property management with ECMA-262 compliant attribute flags - Interface support for ActionScript 2.0 implements keyword ActionScript Opcodes (action.c): - Object opcodes: NewObject, InitObject, TypeOf, InstanceOf, Enumerate, Enumerate2 - Array opcodes: InitArray - Function opcodes: DefineFunction, DefineFunction2, CallFunction, CallMethod - Member access: GetMember, SetMember, DeleteMember - Stack operations: StackSwap, PushDuplicate - Comparison: Equals2, StrictEquals, Greater, Less2 - String operations: StringAdd, StringLength, StringExtract, MBStringLength - Type conversion: ToNumber, ToString, ToInteger - Built-in functions: trace(), getTimer(), random(), etc. Heap Refactoring: - All heap functions now require app_context parameter - HALLOC/FREE/HCALLOC macros for convenient allocation - Virtual memory-based allocation with lazy physical commit - Proper initialization order: heap_init before flashbang_init SWFAppContext Enhancements: - Added heap_inited, heap_full_size, heap_current_size fields - Added frame_count, is_playing, is_dragging, dragged_target - NO_GRAPHICS guards for graphics-specific fields 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Restore tabs on blank lines and remove trailing whitespace to match upstream's code style conventions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Revert ActionVar struct to upstream anonymous union API - Revert variables.c to use HALLOC and app_context parameters - Revert heap.h/heap.c to simpler upstream implementation - Add heap_calloc for zeroed memory allocation - Stub MovieClip-related functions not in SWFRecomp's minimal opcode set: actionTargetPath, actionPlay, actionEndDrag, actionSetTarget2, actionGetProperty, actionSetProperty, actionSetTarget, actionStartDrag, actionWaitForFrame, actionWaitForFrame2 - Fix function signatures to match reverted API: getVariable, setVariableWithValue, materializeStringList - Keep object/function opcode implementations needed by SWFRecomp 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Restores bitmap_count guards and original shader configuration. These changes were not related to object/function support. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove actionCloneSprite and actionRemoveSprite which were defined but never called. These functions are not needed by SWFRecomp. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Reverted swf.h to upstream (whitespace-only diff) - Fixed remaining whitespace issues in action.c 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Removed section comments that were added to existing upstream code. Simplifies the diff while keeping only the new function declarations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Keep semicolons in macros to match upstream style. Restore trailing whitespace to match upstream exactly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Remove implementations for arithmetic, comparison, string, bitwise, exception handling, and other non-essential opcodes. Keep only: - Object: GetMember, SetMember, NewObject, InitObject, Delete, etc. - Array: InitArray - Function: DefineFunction, DefineFunction2, CallFunction, CallMethod - Stack/Register: StoreRegister, PushRegister Reduces action.c from ~6000 to ~3000 lines. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Re-adds the following action functions from upstream: - Arithmetic: actionAdd, actionSubtract, actionMultiply, actionDivide - Comparison: actionEquals, actionLess, actionAnd, actionOr, actionNot - String: actionStringEquals, actionStringLength, actionStringAdd - Variables: actionGetVariable, actionSetVariable - Utility: actionTrace, actionGetTime Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.