Browse Source

add -D swf_use_doabc

Simon Krajewski 11 năm trước cách đây
mục cha
commit
0a745131d1
2 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 2 0
      common.ml
  2. 1 1
      genswf.ml

+ 2 - 0
common.ml

@@ -220,6 +220,7 @@ module Define = struct
 		| SwfPreloaderFrame
 		| SwfProtected
 		| SwfScriptTimeout
+		| SwfUseDoAbc
 		| Sys
 		| Unsafe
 		| UseNekoc
@@ -289,6 +290,7 @@ module Define = struct
 		| SwfPreloaderFrame -> ("swf_preloader_frame", "Insert empty first frame in swf")
 		| SwfProtected -> ("swf_protected","Compile Haxe private as protected in the SWF instead of public")
 		| SwfScriptTimeout -> ("swf_script_timeout", "Maximum ActionScript processing time before script stuck dialog box displays (in seconds)")
+		| SwfUseDoAbc -> ("swf_use_doabc", "Use DoAbc swf-tag instead of DoAbcDefine")
 		| Sys -> ("sys","Defined for all system platforms")
 		| Unsafe -> ("unsafe","Allow unsafe code when targeting C#")
 		| UseNekoc -> ("use_nekoc","Use nekoc compiler instead of internal one")

+ 1 - 1
genswf.ml

@@ -803,7 +803,7 @@ let build_swf9 com file swc =
 				hls_fields = [|f|];
 			}
 		) code in
-		[tag (TActionScript3 (None,As3hlparse.flatten inits))]
+		[tag (TActionScript3 ((if Common.defined com Define.SwfUseDoAbc then Some(1,boot_name) else None), As3hlparse.flatten inits))]
 	) in
 	let cid = ref 0 in
 	let classes = ref [{ f9_cid = None; f9_classname = boot_name }] in