scavenge pre-existing movie

This commit is contained in:
2023-08-30 18:45:12 -06:00
parent adadc35c4c
commit 1868c9826c
3 changed files with 12 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
# @install: lix --silent download "gh://github.com/kiss-lang/hollywoo#f3722910e4ca7dadfab7dccdd5c8184607468d1c" into hollywoo/0.0.0/github/f3722910e4ca7dadfab7dccdd5c8184607468d1c
# @run: haxelib run-dir hollywoo "${HAXE_LIBCACHE}/hollywoo/0.0.0/github/f3722910e4ca7dadfab7dccdd5c8184607468d1c"
# @install: lix --silent download "gh://github.com/kiss-lang/hollywoo#8db346e0c5723fa32631f2a9a0159346d8175b25" into hollywoo/0.0.0/github/8db346e0c5723fa32631f2a9a0159346d8175b25
# @run: haxelib run-dir hollywoo "${HAXE_LIBCACHE}/hollywoo/0.0.0/github/8db346e0c5723fa32631f2a9a0159346d8175b25"
-lib kiss
-lib kiss-tools
-cp ${HAXE_LIBCACHE}/hollywoo/0.0.0/github/f3722910e4ca7dadfab7dccdd5c8184607468d1c/src/
-cp ${HAXE_LIBCACHE}/hollywoo/0.0.0/github/8db346e0c5723fa32631f2a9a0159346d8175b25/src/
-D hollywoo=0.0.0

View File

@@ -496,11 +496,13 @@
(defMacro addSkips [flxMovieClass]
`{
(method &override :Void prepareForSkip []
// TODO these things could/should all be in HollywooDSL:
(kiss_tools.TimerWithPause.stopAll)
(flxDirector.pause)
(.clear (director.shortcutHandler))
(doCleanup)
(set skipMovie (new ,flxMovieClass flxDirector)))
(set skipMovie (new ,flxMovieClass flxDirector))
(skipMovie.scavengeObjects this)
(doCleanup))
(preload
(unless (FlxG.inputs.list.contains flxDirector.actionManager)
@@ -524,7 +526,9 @@
(destroyAndClear songs)
// I hope this disposes of references to actors, props, sets, etc.:
(scenes.clear))
(scenes.clear)
(#when cpp
(cpp.vm.Gc.run true)))
(#when debug
(preload

View File

@@ -13,6 +13,8 @@
}#)
(method &override :Void create []
(openfl.utils.Assets.cache.clear)
(set openfl.utils.Assets.cache.enabled false)
(set destroySubStates false)
(super.create)
(set director (new FlxDirector))