2323
2424import java .awt .Color ;
2525import java .awt .Graphics2D ;
26- import java .awt .GraphicsEnvironment ;
2726import java .awt .RenderingHints ;
28- import java .awt .Toolkit ;
2927import java .awt .font .FontRenderContext ;
3028import java .awt .font .GlyphVector ;
3129import java .awt .geom .Point2D ;
4947import java .util .zip .DeflaterOutputStream ;
5048
5149import javax .swing .JOptionPane ;
50+
5251import org .enigma .backend .EnigmaStruct ;
5352import org .enigma .backend .other .Constant ;
5453import org .enigma .backend .other .Extension ;
54+ import org .enigma .backend .other .Include ;
5555import org .enigma .backend .resources .Background ;
5656import org .enigma .backend .resources .Font ;
5757import org .enigma .backend .resources .GameInformation ;
8181import org .enigma .utility .Masker .Mask ;
8282import org .lateralgm .components .impl .ResNode ;
8383import org .lateralgm .file .ProjectFile ;
84+ import org .lateralgm .file .ResourceList ;
8485import org .lateralgm .file .iconio .ICOFile ;
8586import org .lateralgm .main .LGM ;
8687import org .lateralgm .resources .Background .PBackground ;
8788import org .lateralgm .resources .Font .PFont ;
8889import org .lateralgm .resources .GameInformation .PGameInformation ;
8990import org .lateralgm .resources .GameSettings .PGameSettings ;
9091import org .lateralgm .resources .GmObject .PGmObject ;
92+ import org .lateralgm .resources .Include .PInclude ;
9193import org .lateralgm .resources .InstantiableResource ;
9294import org .lateralgm .resources .Path .PPath ;
9395import org .lateralgm .resources .Resource ;
@@ -169,14 +171,20 @@ protected void populateStruct() {
169171 // TODO: Populate constants from chosen configuration on the main
170172 // toolbar.
171173
172- // TODO: Fixme
173- o .includeCount = 0 ;// i.includes.size();
174- /*
175- * if (o.includeCount != 0) { o.includes = new Include.ByReference();
176- * Include[] oil = (Include[]) o.includes.toArray(o.includeCount); for
177- * (int inc = 0; inc < o.includeCount; inc++) { oil[inc].filepath =
178- * i.includes.get(inc).filepath; } }
179- */
174+ ResourceList <org .lateralgm .resources .Include > includeList = i .resMap .getList (org .lateralgm .resources .Include .class );
175+ org .lateralgm .resources .Include iil [] = includeList .toArray (new org .lateralgm .resources .Include [0 ]);
176+ o .includeCount = includeList .size ();
177+ if (o .includeCount != 0 )
178+ {
179+ o .includes = new Include .ByReference ();
180+ Include [] oil = (Include []) o .includes .toArray (o .includeCount );
181+ for (int inc = 0 ; inc < o .includeCount ; inc ++)
182+ {
183+ org .lateralgm .resources .Include ii = iil [inc ];
184+ oil [inc ].filepath = ii .get (PInclude .FILEPATH );
185+ }
186+ }
187+
180188 // packages not implemented
181189 o .packageCount = 0 ;
182190 // o.packageCount = packages.length;
@@ -201,7 +209,7 @@ protected void populateStruct() {
201209 {
202210 0x1F , 0x74 , 0x2F , 0x5C , 0x69 , 0x2B , (byte ) 0x84 ,
203211 (byte ) 0xBB , (byte ) 0xE6 , (byte ) 0xE5 , 0x22 , 0x23 ,
204- 0x35 , 0x55 , (byte ) 0xE2 , (byte ) 0x91
212+ 0x35 , 0x55 , (byte ) 0xE2 , (byte ) 0x91
205213 },
206214 {
207215 0x08 , (byte ) 0xAA , 0x73 , (byte ) 0xA3 , 0x5D , 0x0C ,
0 commit comments