JSwiff
flash movies the java way
JSwiff Forum
  Search   Recent Topics     Member Listing    Back to home page 
Register / 
Login 
Branch(Jump and If) offsets  
Forum Index -> Development
Author Message
LemChops


Joined: Oct 27, 2007
Messages: 1
Offline

Hi Ralf,

I think it would be good to let developers set the branch offsets directly, instead of relying on labels.
I'm currently working on an open source project, Ruby On Flash, a compiler written in Java that compiles Ruby source code directly into Flash applications(.swf files), http://sourceforge.net/projects/rubyonflash (give me a few days to set up the sourceforge website , haha)

I've made a few additions to the following code, and I hope you can add these officially to JSwiff.

Jump.java:
public Jump(short branchOffset) {
code = ActionConstants.JUMP;
this.branchOffset = branchOffset;
}

If.java:
public If(short branchOffset) {
code = ActionConstants.IF;
this.branchOffset = branchOffset;
}

ActionBlock.java
//in the write method

//replace branch label only if label is not null
if(((Branch)action).getBranchLabel()!=null){
replaceBranchLabelWithRelOffset((Branch) action);
}

Thanks!

Lem
 
  Forum Index -> Development
Go to:   
Legal notes
Powered by JForum 2.1.4 © 2005 - Rafael Steil