git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
small bugfix in ttf generator
[swftools.git]
/
lib
/
as3
/
registry.c
diff --git
a/lib/as3/registry.c
b/lib/as3/registry.c
index
05d275e
..
5c947e5
100644
(file)
--- a/
lib/as3/registry.c
+++ b/
lib/as3/registry.c
@@
-73,6
+73,17
@@
type_t memberinfo_type = {
};
// ----------------------- assets -------------------------------------
};
// ----------------------- assets -------------------------------------
+static void use_asset(asset_bundle_t*a)
+{
+ a->used = 1;
+ asset_bundle_list_t*l = a->dependencies;
+ while(l) {
+ if(!l->asset_bundle->used) {
+ use_asset(l->asset_bundle);
+ }
+ l = l->next;
+ }
+}
void registry_use(slotinfo_t*s)
{
if(!s) return;
void registry_use(slotinfo_t*s)
{
if(!s) return;
@@
-80,7
+91,9
@@
void registry_use(slotinfo_t*s)
s->flags |= FLAG_USED;
if(s->kind == INFOTYPE_CLASS) {
classinfo_t*c=(classinfo_t*)s;
s->flags |= FLAG_USED;
if(s->kind == INFOTYPE_CLASS) {
classinfo_t*c=(classinfo_t*)s;
- if(c->assets) c->assets->used = 1;
+ if(c->assets) {
+ use_asset(c->assets);
+ }
int t=0;
while(c->interfaces[t]) {
registry_use((slotinfo_t*)c->interfaces[t]);
int t=0;
while(c->interfaces[t]) {
registry_use((slotinfo_t*)c->interfaces[t]);