Skip to content
Browse files

Implement lazy loading of PIE files. There is no longer any need to a…

…dd them in WRF files

before referencing them from stats or other files.
  • Loading branch information...
1 parent 7007cc8 commit 6a9ca8c0e8bdfb21c25cf1f45ede28a12c6a1e59 @perim perim committed
View
5 data/base/gamedesc.lev
@@ -13,7 +13,6 @@ data "wrf/vidmem.wrf"
data "wrf/basic.wrf"
data "wrf/cam1.wrf"
data "wrf/audio.wrf"
-data "wrf/piestats.wrf"
data "wrf/stats.wrf"
game "multiplay/maps/4c-rush.gam"
data "wrf/prog.wrf"
@@ -27,7 +26,6 @@ data "wrf/basic.wrf"
data "wrf/tut.wrf"
data "wrf/audio.wrf"
data "wrf/tutorial/tutaudio.wrf"
-data "wrf/piestats.wrf"
data "wrf/stats.wrf"
data "wrf/cam1res.wrf"
@@ -46,7 +44,6 @@ data "wrf/vidmem.wrf"
data "wrf/basic.wrf"
data "wrf/cam1.wrf"
data "wrf/audio.wrf"
-data "wrf/piestats.wrf"
data "wrf/stats.wrf"
data "wrf/cam1res.wrf"
@@ -164,7 +161,6 @@ data "wrf/vidmem2.wrf"
data "wrf/basic.wrf"
data "wrf/cam2.wrf"
data "wrf/audio.wrf"
-data "wrf/piestats.wrf"
data "wrf/stats.wrf"
data "wrf/cam2res.wrf"
@@ -272,7 +268,6 @@ data "wrf/vidmem3.wrf"
data "wrf/basic.wrf"
data "wrf/cam3.wrf"
data "wrf/audio.wrf"
-data "wrf/piestats.wrf"
data "wrf/stats.wrf"
data "wrf/cam3res.wrf"
View
3 data/base/wrf/limiter_data.wrf
@@ -3,9 +3,6 @@
/* Load structures and weapons/ecm/sensors */
/********** WRF\limiter_data.wrf ***************/
-directory "structs"
-file IMD "blderik.pie"
-
directory "stats"
file SWEAPON "weapons.ini"
file SSENSOR "sensor.ini"
View
485 data/base/wrf/piestats.wrf
@@ -1,485 +0,0 @@
-/***********************************************************/
-/* You may have to modify this file for it to be correct! */
-/******************* wrf\piestats.wrf *******************/
-
-
-directory "structs"
-file IMD "blpower0.pie"
-file IMD "blpower4.pie"
-file IMD "power_module4.pie"
-file IMD "blhq.pie"
-file IMD "blhq2.pie"
-file IMD "blbfact.pie"
-file IMD "blfact0.pie"
-file IMD "blfact1.pie"
-file IMD "blfact2.pie"
-file IMD "factory_module1.pie"
-file IMD "factory_module2.pie"
-file IMD "blwallh.pie"
-file IMD "blwallc1.pie"
-file IMD "blwallh_t.pie"
-file IMD "blwallh_l.pie"
-file IMD "blwallc2.pie"
-file IMD "blwall2.pie"
-file IMD "blwallc3.pie"
-file IMD "blwall3.pie"
-file IMD "blbrbfac.pie"
-file IMD "blbrbwlh.pie"
-file IMD "exrocket.pie"
-file IMD "blbrbcr1.pie"
-file IMD "blbrbtw1.pie"
-file IMD "blbpower.pie"
-file IMD "blbresch.pie"
-file IMD "blresch0.pie"
-file IMD "blresch4.pie"
-file IMD "research_module4.pie"
-file IMD "blbrbgen.pie"
-file IMD "blbgen.pie"
-file IMD "blbhq.pie"
-file IMD "blbrbbnk.pie"
-file IMD "blbrtowr.pie"
-file IMD "blbrlook.pie"
-file IMD "icdozer.pie"
-file IMD "blrpair3.pie"
-file IMD "blguard1.pie"
-file IMD "blguard2.pie"
-file IMD "blguard3.pie"
-file IMD "bldrdcm0.pie"
-file IMD "blbdrdcm.pie"
-file IMD "blguardm.pie"
-file IMD "blpilbox.pie"
-file IMD "blguardr.pie"
-file IMD "blcfact1.pie"
-file IMD "blbcfact.pie"
-file IMD "mitrapst.pie"
-file IMD "blcanpil.pie"
-file IMD "blbrbtw2.pie"
-file IMD "blhq3.pie"
-file IMD "mitrap2.pie"
-file IMD "blhowmnt.pie"
-file IMD "blvtolpd.pie"
-file IMD "mibar.pie"
-file IMD "blbrmrtp.pie"
-file IMD "blmrtpit.pie"
-file IMD "blbunkms.pie"
-file IMD "blmssilo.pie"
-file IMD "blvfact0.pie"
-file IMD "blvfact1.pie"
-file IMD "blvfact2.pie"
-file IMD "vtolfactory_module1.pie"
-file IMD "vtolfactory_module2.pie"
-file IMD "miupdish.pie"
-file IMD "micool.pie"
-file IMD "mibcool.pie"
-file IMD "minuke.pie"
-file IMD "miupbase.pie"
-file IMD "blnavbnk.pie"
-file IMD "blnavbak.pie"
-file IMD "blhq4.pie"
-file IMD "blbrtowf.pie"
-file IMD "blguardn.pie"
-file IMD "blaamnt1.pie"
-file IMD "blaamnt2.pie"
-file IMD "blhardpt.pie"
-file IMD "blbrepr2.pie"
-file IMD "blgrdnex.pie"
-file IMD "dummy.pie"
-directory "features"
-file IMD "micapsul.pie"
-file IMD "miarthov.pie"
-file IMD "mislick.pie"
-file IMD "mibould1.pie"
-file IMD "mibould2.pie"
-file IMD "mibould3.pie"
-file IMD "drwreck.pie"
-file IMD "miwreck.pie"
-file IMD "miwrek1.pie"
-file IMD "miwrek2.pie"
-file IMD "miwrek3.pie"
-file IMD "miwrek4.pie"
-file IMD "miwrek5.pie"
-file IMD "micamper.pie"
-file IMD "mijeep.pie"
-file IMD "mitanker.pie"
-file IMD "mitankerh.pie"
-file IMD "mibuild1.pie"
-file IMD "mibuild2.pie"
-file IMD "mibuild3.pie"
-file IMD "mibuild7.pie"
-file IMD "mibuild8.pie"
-file IMD "mibuil10.pie"
-file IMD "mibuil11.pie"
-file IMD "mibuil12.pie"
-file IMD "miruin5.pie"
-file IMD "miruin4.pie"
-file IMD "miruin3.pie"
-file IMD "miruin2.pie"
-file IMD "miruin1.pie"
-file IMD "blfactrd.pie"
-file IMD "blware1.pie"
-file IMD "blbrhut1.pie"
-file IMD "blware2.pie"
-file IMD "blware3.pie"
-file IMD "mibldwat.pie"
-file IMD "mipipe.pie"
-file IMD "mipipe1.pie"
-file IMD "mibldwa2.pie"
-file IMD "mibldwa3.pie"
-file IMD "mioil.pie"
-file IMD "mipipe1a.pie"
-file IMD "mipipe2a.pie"
-file IMD "mipipe3a.pie"
-file IMD "mibuil16.pie"
-file IMD "mibuil17.pie"
-file IMD "mibuild9.pie"
-file IMD "mibrdfuk.pie"
-file IMD "michevy.pie"
-file IMD "micrane.pie"
-file IMD "mioiltow.pie"
-file IMD "miwatow.pie"
-file IMD "miblucar.pie"
-file IMD "mipickup.pie"
-file IMD "mipylon.pie"
-file IMD "mitrees.pie"
-file IMD "mitrees2.pie"
-file IMD "mitrees3.pie"
-file IMD "mistree1.pie"
-file IMD "mistree2.pie"
-file IMD "mistree3.pie"
-file IMD "micabin1.pie"
-file IMD "micabin2.pie"
-file IMD "micabin3.pie"
-file IMD "micabin4.pie"
-file IMD "micabin5.pie"
-file IMD "mifactry.pie"
-file IMD "miairtrf.pie"
-directory "components/weapons"
-file IMD "gnmecm1.pie"
-file IMD "trmecm1.pie"
-file IMD "trlcon.pie"
-file IMD "trhcon.pie"
-file IMD "trmcon.pie"
-file IMD "gnlgss.pie"
-file IMD "gnmgss.pie"
-file IMD "gnhgss.pie"
-file IMD "trlsnsr1.pie"
-file IMD "trhsnsr3.pie"
-file IMD "gnlsnsr1.pie"
-file IMD "trlcan.pie"
-file IMD "trlmg1.pie"
-file IMD "trlmg2.pie"
-file IMD "trmmg.pie"
-file IMD "trmcan.pie"
-file IMD "trhcan.pie"
-file IMD "trlacan.pie"
-file IMD "trmvcan.pie"
-file IMD "trlflmr.pie"
-file IMD "trmflmr.pie"
-file IMD "trmhowt.pie"
-file IMD "trhhowt.pie"
-file IMD "trhhow2.pie"
-file IMD "trmmort.pie"
-file IMD "trhrmort.pie"
-file IMD "trmlas.pie"
-file IMD "trhlas.pie"
-file IMD "trlrckt.pie"
-file IMD "trlrcktp.pie"
-file IMD "trmrckt.pie"
-file IMD "trmrckta.pie"
-file IMD "trhrckt.pie"
-file IMD "trlmsl.pie"
-file IMD "trmmsl.pie"
-file IMD "trmmsla.pie"
-file IMD "trhmsl.pie"
-file IMD "trhmsli.pie"
-file IMD "trlgss.pie"
-file IMD "trmgss.pie"
-file IMD "trhgss.pie"
-file IMD "gnlcan.pie"
-file IMD "gnlacan.pie"
-file IMD "gnmcan.pie"
-file IMD "gnhcan.pie"
-file IMD "gnmvcan.pie"
-file IMD "gnlmg1.pie"
-file IMD "gnlmg2.pie"
-file IMD "gnmmg1.pie"
-file IMD "gnmmg2.pie"
-file IMD "gnlflmr.pie"
-file IMD "gnmflmr.pie"
-file IMD "gnmhowt.pie"
-file IMD "gnhhowt.pie"
-file IMD "gnhhowt2.pie"
-file IMD "gnmmort.pie"
-file IMD "gnhmort.pie"
-file IMD "gnmlas.pie"
-file IMD "gnmrlas.pie"
-file IMD "gnhblas.pie"
-file IMD "gnlrckt.pie"
-file IMD "gnlrcktp.pie"
-file IMD "gnmrckt.pie"
-file IMD "gnmrckta.pie"
-file IMD "gnhrckt.pie"
-file IMD "gnlmsl.pie"
-file IMD "gnmmsl.pie"
-file IMD "gnmmsla.pie"
-file IMD "gnhmsl.pie"
-file IMD "gnhmsli.pie"
-file IMD "misensor.pie"
-file IMD "gnlcmd1.pie"
-file IMD "trlcmd1.pie"
-file IMD "exturret.pie"
-file IMD "mibnktur.pie"
-file IMD "mibnkgun.pie"
-file IMD "cy_flame.pie"
-file IMD "cy_gun.pie"
-file IMD "cy_rkt.pie"
-file IMD "cybody.pie"
-file IMD "cybodyjp.pie"
-file IMD "gnhmort2.pie"
-file IMD "gnmair.pie"
-file IMD "gnhair.pie"
-file IMD "trmair.pie"
-file IMD "trhair.pie"
-file IMD "gnhsuper.pie"
-file IMD "trhsuper.pie"
-file IMD "trhplasm.pie"
-file IMD "gnhplasm.pie"
-file IMD "gnmsnsr2.pie"
-file IMD "trmsnsr2.pie"
-file IMD "gnmecm2.pie"
-file IMD "trmecm2.pie"
-file IMD "gnmrepar.pie"
-file IMD "gnhsnsr3.pie"
-file IMD "gnhecm3.pie"
-file IMD "trhecm3.pie"
-file IMD "cy_can.pie"
-file IMD "gnlair.pie"
-file IMD "gnhair2.pie"
-file IMD "gnnavbig.pie"
-file IMD "gnmrcktb.pie"
-file IMD "trmrcktb.pie"
-file IMD "gnmrktbb.pie"
-file IMD "gnmmslsa.pie"
-file IMD "trmmslsa.pie"
-file IMD "gnhmslsa.pie"
-file IMD "trhmslsa.pie"
-file IMD "gnmmslat.pie"
-file IMD "trmmslat.pie"
-file IMD "gnmmslbb.pie"
-file IMD "trmmslbb.pie"
-file IMD "gnmmslaa.pie"
-file IMD "trmmslaa.pie"
-file IMD "gnhmslab.pie"
-file IMD "trhmslab.pie"
-file IMD "trmrktbb.pie"
-file IMD "trlvtlhe.pie"
-file IMD "trmvtlhe.pie"
-file IMD "trmvtlin.pie"
-file IMD "trlvtlin.pie"
-file IMD "gnhrepar.pie"
-file IMD "cy_las.pie"
-file IMD "cy_rail.pie"
-file IMD "cy_miss.pie"
-file IMD "gnmair2.pie"
-file IMD "gnmair3.pie"
-file IMD "trmair2.pie"
-file IMD "trmair3.pie"
-file IMD "scavmra.pie"
-directory "components/bodies"
-file IMD "drhbod09.pie"
-file IMD "drhbod10.pie"
-file IMD "drhbod11.pie"
-file IMD "drhbod12.pie"
-file IMD "drlbod01.pie"
-file IMD "drlbod02.pie"
-file IMD "drlbod03.pie"
-file IMD "drlbod04.pie"
-file IMD "drmbod05.pie"
-file IMD "drmbod06.pie"
-file IMD "drmbod07.pie"
-file IMD "drmbod08.pie"
-file IMD "drtrans.pie"
-file IMD "extrike.pie"
-file IMD "exbuggy.pie"
-file IMD "exbloke.pie"
-file IMD "exjeep.pie"
-file IMD "exjeeprk.pie"
-file IMD "exbugrk.pie"
-file IMD "exschool.pie"
-file IMD "exfire.pie"
-file IMD "mibnkbod.pie"
-directory "components/prop"
-file IMD "prllwhl1.pie"
-file IMD "prlrwhl1.pie"
-file IMD "prmrwhl1.pie"
-file IMD "prmlwhl1.pie"
-file IMD "prhlwhl1.pie"
-file IMD "prhrwhl1.pie"
-file IMD "prlrtrk1.pie"
-file IMD "prlltrk1.pie"
-file IMD "prmrtrk2.pie"
-file IMD "prmltrk2.pie"
-file IMD "prhrtrk3.pie"
-file IMD "prhltrk3.pie"
-file IMD "prlrvtl1.pie"
-file IMD "prllvtl1.pie"
-file IMD "prmrvtl1.pie"
-file IMD "prmlvtl1.pie"
-file IMD "prhrvtl1.pie"
-file IMD "prhlvtl1.pie"
-file IMD "prhrvtl2.pie"
-file IMD "prhlvtl2.pie"
-file IMD "prhrvtl3.pie"
-file IMD "prhlvtl3.pie"
-file IMD "prhrvtl4.pie"
-file IMD "prhlvtl4.pie"
-file IMD "prllvtl2.pie"
-file IMD "prlrvtl2.pie"
-file IMD "prllvtl3.pie"
-file IMD "prlrvtl3.pie"
-file IMD "prlrhtr1.pie"
-file IMD "prllhtr1.pie"
-file IMD "prmrhtr2.pie"
-file IMD "prmlhtr2.pie"
-file IMD "prhrhtr3.pie"
-file IMD "prhlhtr3.pie"
-file IMD "prlhov1.pie"
-file IMD "prmhov1.pie"
-file IMD "prhhov1.pie"
-file IMD "mibnkdrl.pie"
-file IMD "mibnkdrr.pie"
-directory "effects"
-file IMD "fxlmgun2.pie"
-file IMD "fxcan20a.pie"
-file IMD "fxcan20m.pie"
-file IMD "fxcan40m.pie"
-file IMD "fxcan75m.pie"
-file IMD "fxlflmr.pie"
-file IMD "fxmflmr.pie"
-file IMD "fxlgauss.pie"
-file IMD "fxmgauss.pie"
-file IMD "fxhgauss.pie"
-file IMD "fxmhowt.pie"
-file IMD "fxhhowt.pie"
-file IMD "fxhhowt2.pie"
-file IMD "fxmgunx2.pie"
-file IMD "fxlmgun.pie"
-file IMD "fxmgnvic.pie"
-file IMD "fxmgnvul.pie"
-file IMD "fxicbm.pie"
-file IMD "fxlmiss.pie"
-file IMD "fxatmiss.pie"
-file IMD "fxmmort.pie"
-file IMD "fxlasrot.pie"
-file IMD "fxhblas.pie"
-file IMD "fxlrocpd.pie"
-file IMD "fxmrocat.pie"
-file IMD "fxmroc.pie"
-file IMD "fxvulcan.pie"
-file IMD "fxtracer.pie"
-file IMD "fxtracer_twin.pie"
-file IMD "fxtracerh.pie"
-file IMD "fxtracr2.pie"
-file IMD "fxbeam.pie"
-file IMD "fxcammo.pie"
-file IMD "fxlproj.pie"
-file IMD "fxgammo.pie"
-file IMD "fxplammo.pie"
-file IMD "fxsroc.pie"
-file IMD "fxscudm.pie"
-file IMD "fxflecht.pie"
-file IMD "fxvlexp.pie"
-file IMD "fxvlswav.pie"
-file IMD "fxlswave.pie"
-file IMD "fxmexp.pie"
-file IMD "fxmswave.pie"
-file IMD "fxsflms.pie"
-file IMD "fxmnexp.pie"
-file IMD "fxsnexp.pie"
-file IMD "fxlsplsh.pie"
-file IMD "fxmsplsh.pie"
-file IMD "fxssplsh.pie"
-file IMD "fxmelt.pie"
-file IMD "fxmpexp.pie"
-file IMD "fxdirtsp.pie"
-file IMD "fxmethit.pie"
-file IMD "fxdirt.pie"
-file IMD "fxtracrd.pie"
-file IMD "fxcam20.pie"
-file IMD "fxlthrow.pie"
-file IMD "fxgrdexp.pie"
-file IMD "fxgrdexl.pie"
-file IMD "fxairexp.pie"
-file IMD "fxlbmbi1.pie"
-file IMD "fxlbmbx1.pie"
-file IMD "fxmbmbi2.pie"
-file IMD "fxmbmbx2.pie"
-file IMD "fxaalsht.pie"
-file IMD "fxaalsh2.pie"
-file IMD "fxflech2.pie"
-file IMD "fxgammom.pie"
-file IMD "fxgammoh.pie"
-file IMD "fxflshl.pie"
-file IMD "fxlflsh.pie"
-file IMD "fxlenfl.pie"
-file IMD "fxsplme.pie"
-file IMD "fxmplme.pie"
-file IMD "fxhplme.pie"
-directory "misc/researchimds"
-file IMD "icmslcd.pie"
-file IMD "icmolql.pie"
-file IMD "icspaner.pie"
-file IMD "iccccons.pie"
-file IMD "icamrhot.pie"
-file IMD "icamrknt.pie"
-file IMD "iceng.pie"
-file IMD "dpvtol.pie"
-directory "misc"
-file IMD "icsynapt.pie"
-directory "features"
-file IMD "arizonabush1.pie"
-file IMD "arizonabush2.pie"
-file IMD "arizonabush3.pie"
-file IMD "arizonabush4.pie"
-file IMD "arizonatree1.pie"
-file IMD "arizonatree2.pie"
-file IMD "arizonatree3.pie"
-file IMD "arizonatree4.pie"
-file IMD "arizonatree5.pie"
-file IMD "arizonatree6.pie"
-file IMD "arizonatrees1.pie"
-file IMD "miarthov.pie"
-file IMD "mibar.pie"
-file IMD "mibridg1.pie"
-file IMD "mibridge.pie"
-file IMD "mibridgx.pie"
-file IMD "micoolbig.pie"
-file IMD "minuke.pie"
-file IMD "mipipe1A.pie"
-file IMD "mipipe2A.pie"
-file IMD "mipipe3A.pie"
-file IMD "miruin10.pie"
-file IMD "miruin6.pie"
-file IMD "miruin7.pie"
-file IMD "miruin8.pie"
-file IMD "miruin9.pie"
-file IMD "mitrapcr.pie"
-file IMD "mitrapstr.pie"
-file IMD "miwreck.pie"
-file IMD "miwrek1.pie"
-file IMD "miwrek2.pie"
-file IMD "miwrek3.pie"
-file IMD "miwrek4.pie"
-file IMD "miwrek5.pie"
-file IMD "powlab.pie"
-file IMD "indlab.pie"
-file IMD "nanolab.pie"
-file IMD "aerolab.pie"
-file IMD "advmatlab.pie"
-file IMD "hvyweplab.pie"
-file IMD "rotweplab.pie"
-file IMD "lasoptlab.pie"
-file IMD "blwall4.pie"
-file IMD "blwallc4.pie"
-file IMD "blwall4smash.pie"
-file IMD "blwallc4smash.pie"
View
9 data/mp/addon.lev
@@ -33,7 +33,6 @@ data "wrf/vidmem.wrf"
data "wrf/basic.wrf"
data "wrf/cam1.wrf"
data "wrf/audio.wrf"
-data "wrf/piestats.wrf"
data "wrf/stats.wrf"
data "wrf/multires.wrf"
@@ -42,7 +41,6 @@ data "wrf/vidmem2.wrf"
data "wrf/basic.wrf"
data "wrf/cam2.wrf"
data "wrf/audio.wrf"
-data "wrf/piestats.wrf"
data "wrf/stats.wrf"
data "wrf/multires.wrf"
@@ -51,7 +49,6 @@ data "wrf/vidmem3.wrf"
data "wrf/basic.wrf"
data "wrf/cam3.wrf"
data "wrf/audio.wrf"
-data "wrf/piestats.wrf"
data "wrf/stats.wrf"
data "wrf/multires.wrf"
@@ -131,7 +128,6 @@ data "wrf/vidmem.wrf"
data "wrf/basic.wrf"
data "wrf/cam1.wrf"
data "wrf/audio.wrf"
-data "wrf/piestats.wrf"
data "wrf/stats.wrf"
data "wrf/multires2.wrf"
@@ -140,7 +136,6 @@ data "wrf/vidmem2.wrf"
data "wrf/basic.wrf"
data "wrf/cam2.wrf"
data "wrf/audio.wrf"
-data "wrf/piestats.wrf"
data "wrf/stats.wrf"
data "wrf/multires2.wrf"
@@ -149,7 +144,6 @@ data "wrf/vidmem3.wrf"
data "wrf/basic.wrf"
data "wrf/cam3.wrf"
data "wrf/audio.wrf"
-data "wrf/piestats.wrf"
data "wrf/stats.wrf"
data "wrf/multires2.wrf"
@@ -202,7 +196,6 @@ data "wrf/vidmem.wrf"
data "wrf/basic.wrf"
data "wrf/cam1.wrf"
data "wrf/audio.wrf"
-data "wrf/piestats.wrf"
data "wrf/stats.wrf"
data "wrf/multires3.wrf"
@@ -211,7 +204,6 @@ data "wrf/vidmem2.wrf"
data "wrf/basic.wrf"
data "wrf/cam2.wrf"
data "wrf/audio.wrf"
-data "wrf/piestats.wrf"
data "wrf/stats.wrf"
data "wrf/multires3.wrf"
@@ -220,7 +212,6 @@ data "wrf/vidmem3.wrf"
data "wrf/basic.wrf"
data "wrf/cam3.wrf"
data "wrf/audio.wrf"
-data "wrf/piestats.wrf"
data "wrf/stats.wrf"
data "wrf/multires3.wrf"
View
570 data/mp/wrf/piestats.wrf
@@ -1,570 +0,0 @@
-directory "structs"
-file IMD "blpower0.pie"
-file IMD "blpower4.pie"
-file IMD "power_module4.pie"
-file IMD "blhq.pie"
-file IMD "blhq2.pie"
-file IMD "blbfact.pie"
-file IMD "blfact0.pie"
-file IMD "blfact1.pie"
-file IMD "blfact2.pie"
-file IMD "factory_module1.pie"
-file IMD "factory_module2.pie"
-file IMD "blwallh.pie"
-file IMD "blwallc1.pie"
-file IMD "blwallh_t.pie"
-file IMD "blwallh_l.pie"
-file IMD "blgateh.pie"
-file IMD "blgateh_x.pie"
-file IMD "blgateh_t.pie"
-file IMD "blgateh_l.pie"
-file IMD "blwallc2.pie"
-file IMD "blwall2.pie"
-file IMD "blwallc3.pie"
-file IMD "blwall3.pie"
-file IMD "blbrbfac.pie"
-file IMD "blbrbwlh.pie"
-file IMD "exrocket.pie"
-file IMD "blbrbcr1.pie"
-file IMD "blbrbtw1.pie"
-file IMD "blbpower.pie"
-file IMD "blbresch.pie"
-file IMD "blresch0.pie"
-file IMD "blresch4.pie"
-file IMD "research_module4.pie"
-file IMD "blbrbgen.pie"
-file IMD "blbgen.pie"
-file IMD "blbhq.pie"
-file IMD "blbrbbnk.pie"
-file IMD "blbrtowr.pie"
-file IMD "blbrlook.pie"
-file IMD "icdozer.pie"
-file IMD "blrpair3.pie"
-file IMD "blguard1.pie"
-file IMD "blguard2.pie"
-file IMD "blguard3.pie"
-file IMD "bldrdcm0.pie"
-file IMD "blbdrdcm.pie"
-file IMD "blguardm.pie"
-file IMD "blpilbox.pie"
-file IMD "blguardr.pie"
-file IMD "blcfact1.pie"
-file IMD "blbcfact.pie"
-file IMD "mitrapst.pie"
-file IMD "blcanpil.pie"
-file IMD "blbrbtw2.pie"
-file IMD "blhq3.pie"
-file IMD "mitrap2.pie"
-file IMD "blhowmnt.pie"
-file IMD "blvtolpd.pie"
-file IMD "mibar.pie"
-file IMD "blbrmrtp.pie"
-file IMD "blmrtpit.pie"
-file IMD "blbunkms.pie"
-file IMD "blmssilo.pie"
-file IMD "blvfact0.pie"
-file IMD "blvfact1.pie"
-file IMD "blvfact2.pie"
-file IMD "vtolfactory_module1.pie"
-file IMD "vtolfactory_module2.pie"
-file IMD "miupdish.pie"
-file IMD "micool.pie"
-file IMD "mibcool.pie"
-file IMD "minuke.pie"
-file IMD "miupbase.pie"
-file IMD "blnavbnk.pie"
-file IMD "blnavbak.pie"
-file IMD "blhq4.pie"
-file IMD "blbrtowf.pie"
-file IMD "blguardn.pie"
-file IMD "blaamnt1.pie"
-file IMD "blaamnt2.pie"
-file IMD "blhardpt.pie"
-file IMD "blbrepr2.pie"
-file IMD "blgrdnex.pie"
-file IMD "stwpfcan.pie"
-file IMD "radarsensor.pie"
-file IMD "dummy.pie"
-directory "features"
-file IMD "micapsul.pie"
-file IMD "miarthov.pie"
-file IMD "mislick.pie"
-file IMD "mibould1.pie"
-file IMD "mibould2.pie"
-file IMD "mibould3.pie"
-file IMD "drwreck.pie"
-file IMD "miwreck.pie"
-file IMD "miwrek1.pie"
-file IMD "miwrek2.pie"
-file IMD "miwrek3.pie"
-file IMD "miwrek4.pie"
-file IMD "miwrek5.pie"
-file IMD "micamper.pie"
-file IMD "mijeep.pie"
-file IMD "mitanker.pie"
-file IMD "mitankerh.pie"
-file IMD "mibuild1.pie"
-file IMD "mibuild2.pie"
-file IMD "mibuild3.pie"
-file IMD "mibuild7.pie"
-file IMD "mibuild8.pie"
-file IMD "mibuil10.pie"
-file IMD "mibuil11.pie"
-file IMD "mibuil12.pie"
-file IMD "miruin5.pie"
-file IMD "miruin4.pie"
-file IMD "miruin3.pie"
-file IMD "miruin2.pie"
-file IMD "miruin1.pie"
-file IMD "blfactrd.pie"
-file IMD "blware1.pie"
-file IMD "blbrhut1.pie"
-file IMD "blware2.pie"
-file IMD "blware3.pie"
-file IMD "mibldwat.pie"
-file IMD "mipipe.pie"
-file IMD "mipipe1.pie"
-file IMD "mibldwa2.pie"
-file IMD "mibldwa3.pie"
-file IMD "mioil.pie"
-file IMD "mipipe1a.pie"
-file IMD "mipipe2a.pie"
-file IMD "mipipe3a.pie"
-file IMD "mibuil16.pie"
-file IMD "mibuil17.pie"
-file IMD "mibuild9.pie"
-file IMD "mibrdfuk.pie"
-file IMD "michevy.pie"
-file IMD "micrane.pie"
-file IMD "mioiltow.pie"
-file IMD "miwatow.pie"
-file IMD "miblucar.pie"
-file IMD "mipickup.pie"
-file IMD "mipylon.pie"
-file IMD "mitrees.pie"
-file IMD "mitrees2.pie"
-file IMD "mitrees3.pie"
-file IMD "mistree1.pie"
-file IMD "mistree2.pie"
-file IMD "mistree3.pie"
-file IMD "micabin1.pie"
-file IMD "micabin2.pie"
-file IMD "micabin3.pie"
-file IMD "micabin4.pie"
-file IMD "micabin5.pie"
-file IMD "mifactry.pie"
-file IMD "miairtrf.pie"
-directory "components/weapons"
-file IMD "gnmecm1.pie"
-file IMD "trmecm1.pie"
-file IMD "trlcon.pie"
-file IMD "trhcon.pie"
-file IMD "trmcon.pie"
-file IMD "gnlgss.pie"
-file IMD "gnmgss.pie"
-file IMD "gnhgss.pie"
-file IMD "trlsnsr1.pie"
-file IMD "trhsnsr3.pie"
-file IMD "gnlsnsr1.pie"
-file IMD "trlcan.pie"
-file IMD "trlmg1.pie"
-file IMD "trlmg2.pie"
-file IMD "trmmg.pie"
-file IMD "trmcan.pie"
-file IMD "trhcan.pie"
-file IMD "trlacan.pie"
-file IMD "trmvcan.pie"
-file IMD "trlflmr.pie"
-file IMD "trmflmr.pie"
-file IMD "trmhowt.pie"
-file IMD "trhhowt.pie"
-file IMD "trhhow2.pie"
-file IMD "trmmort.pie"
-file IMD "trhrmort.pie"
-file IMD "trmlas.pie"
-file IMD "trhlas.pie"
-file IMD "trlrckt.pie"
-file IMD "trlrcktp.pie"
-file IMD "trmrckt.pie"
-file IMD "trmrckta.pie"
-file IMD "trhrckt.pie"
-file IMD "trlmsl.pie"
-file IMD "trmmsl.pie"
-file IMD "trmmsla.pie"
-file IMD "trhmsl.pie"
-file IMD "trhmsli.pie"
-file IMD "trlgss.pie"
-file IMD "trmgss.pie"
-file IMD "trhgss.pie"
-file IMD "gnlcan.pie"
-file IMD "gnlacan.pie"
-file IMD "gnmcan.pie"
-file IMD "gnhcan.pie"
-file IMD "gnmvcan.pie"
-file IMD "gnlmg1.pie"
-file IMD "gnlmg2.pie"
-file IMD "gnmmg1.pie"
-file IMD "gnmmg2.pie"
-file IMD "gnlflmr.pie"
-file IMD "gnmflmr.pie"
-file IMD "gnmhowt.pie"
-file IMD "gnhhowt.pie"
-file IMD "gnhhowt2.pie"
-file IMD "gnmmort.pie"
-file IMD "gnhmort.pie"
-file IMD "gnmlas.pie"
-file IMD "gnmrlas.pie"
-file IMD "gnhblas.pie"
-file IMD "gnlrckt.pie"
-file IMD "gnlrcktp.pie"
-file IMD "gnmrckt.pie"
-file IMD "gnmrckta.pie"
-file IMD "gnhrckt.pie"
-file IMD "gnlmsl.pie"
-file IMD "gnmmsl.pie"
-file IMD "gnmmsla.pie"
-file IMD "gnhmsl.pie"
-file IMD "gnhmsli.pie"
-file IMD "misensor.pie"
-file IMD "gnlcmd1.pie"
-file IMD "trlcmd1.pie"
-file IMD "exturret.pie"
-file IMD "mibnktur.pie"
-file IMD "mibnkgun.pie"
-file IMD "cy_flame.pie"
-file IMD "cy_gun.pie"
-file IMD "cy_rkt.pie"
-file IMD "cybody.pie"
-file IMD "cybodyjp.pie"
-file IMD "gnhmort2.pie"
-file IMD "gnmair.pie"
-file IMD "gnhair.pie"
-file IMD "trmair.pie"
-file IMD "trhair.pie"
-file IMD "gnhsuper.pie"
-file IMD "trhsuper.pie"
-file IMD "trhplasm.pie"
-file IMD "gnhplasm.pie"
-file IMD "gnmsnsr2.pie"
-file IMD "trmsnsr2.pie"
-file IMD "gnmecm2.pie"
-file IMD "trmecm2.pie"
-file IMD "gnmrepar.pie"
-file IMD "gnhsnsr3.pie"
-file IMD "gnhecm3.pie"
-file IMD "trhecm3.pie"
-file IMD "cy_can.pie"
-file IMD "gnlair.pie"
-file IMD "gnhair2.pie"
-file IMD "gnnavbig.pie"
-file IMD "gnmrcktb.pie"
-file IMD "trmrcktb.pie"
-file IMD "gnmrktbb.pie"
-file IMD "gnmmslsa.pie"
-file IMD "trmmslsa.pie"
-file IMD "gnhmslsa.pie"
-file IMD "trhmslsa.pie"
-file IMD "gnmmslat.pie"
-file IMD "trmmslat.pie"
-file IMD "gnmmslbb.pie"
-file IMD "trmmslbb.pie"
-file IMD "gnmmslaa.pie"
-file IMD "trmmslaa.pie"
-file IMD "gnhmslab.pie"
-file IMD "trhmslab.pie"
-file IMD "trmrktbb.pie"
-file IMD "trlvtlhe.pie"
-file IMD "trmvtlhe.pie"
-file IMD "trmvtlin.pie"
-file IMD "trlvtlin.pie"
-file IMD "gnhrepar.pie"
-file IMD "cy_las.pie"
-file IMD "cy_rail.pie"
-file IMD "cy_miss.pie"
-file IMD "gnmair2.pie"
-file IMD "gnmair3.pie"
-file IMD "trmair2.pie"
-file IMD "trmair3.pie"
-file IMD "scavmra.pie"
-directory "components/bodies"
-file IMD "drhbod09.pie"
-file IMD "drhbod10.pie"
-file IMD "drhbod11.pie"
-file IMD "drhbod12.pie"
-file IMD "drlbod01.pie"
-file IMD "drlbod02.pie"
-file IMD "drlbod03.pie"
-file IMD "drlbod04.pie"
-file IMD "drmbod05.pie"
-file IMD "drmbod06.pie"
-file IMD "drmbod07.pie"
-file IMD "drmbod08.pie"
-file IMD "drtrans.pie"
-file IMD "drcytran.pie"
-file IMD "extrike.pie"
-file IMD "exbuggy.pie"
-file IMD "exbloke.pie"
-file IMD "exjeep.pie"
-file IMD "exjeeprk.pie"
-file IMD "exbugrk.pie"
-file IMD "exschool.pie"
-file IMD "exfire.pie"
-file IMD "mibnkbod.pie"
-directory "components/prop"
-file IMD "prllwhl1.pie"
-file IMD "prlrwhl1.pie"
-file IMD "prmrwhl1.pie"
-file IMD "prmlwhl1.pie"
-file IMD "prhlwhl1.pie"
-file IMD "prhrwhl1.pie"
-file IMD "prhnaval1.pie"
-file IMD "prlrtrk1.pie"
-file IMD "prlltrk1.pie"
-file IMD "prmrtrk2.pie"
-file IMD "prmltrk2.pie"
-file IMD "prhrtrk3.pie"
-file IMD "prhltrk3.pie"
-file IMD "prlrvtl1.pie"
-file IMD "prllvtl1.pie"
-file IMD "prmrvtl1.pie"
-file IMD "prmlvtl1.pie"
-file IMD "prhrvtl1.pie"
-file IMD "prhlvtl1.pie"
-file IMD "prhrvtl2.pie"
-file IMD "prhlvtl2.pie"
-file IMD "prhrvtl3.pie"
-file IMD "prhlvtl3.pie"
-file IMD "prhrvtl4.pie"
-file IMD "prhlvtl4.pie"
-file IMD "prllvtl2.pie"
-file IMD "prlrvtl2.pie"
-file IMD "prllvtl3.pie"
-file IMD "prlrvtl3.pie"
-file IMD "prlrhtr1.pie"
-file IMD "prllhtr1.pie"
-file IMD "prmrhtr2.pie"
-file IMD "prmlhtr2.pie"
-file IMD "prhrhtr3.pie"
-file IMD "prhlhtr3.pie"
-file IMD "prlhov1.pie"
-file IMD "prmhov1.pie"
-file IMD "prhhov1.pie"
-file IMD "mibnkdrl.pie"
-file IMD "mibnkdrr.pie"
-directory "effects"
-file IMD "fxlmgun2.pie"
-file IMD "fxcan20a.pie"
-file IMD "fxcan20m.pie"
-file IMD "fxcan40m.pie"
-file IMD "fxcan75m.pie"
-file IMD "fxlflmr.pie"
-file IMD "fxmflmr.pie"
-file IMD "fxlgauss.pie"
-file IMD "fxmgauss.pie"
-file IMD "fxhgauss.pie"
-file IMD "fxmhowt.pie"
-file IMD "fxhhowt.pie"
-file IMD "fxhhowt2.pie"
-file IMD "fxmgunx2.pie"
-file IMD "fxlmgun.pie"
-file IMD "fxmgnvic.pie"
-file IMD "fxmgnvul.pie"
-file IMD "fxicbm.pie"
-file IMD "fxlmiss.pie"
-file IMD "fxatmiss.pie"
-file IMD "fxmmort.pie"
-file IMD "fxlasrot.pie"
-file IMD "fxhblas.pie"
-file IMD "fxlrocpd.pie"
-file IMD "fxmrocat.pie"
-file IMD "fxmroc.pie"
-file IMD "fxvulcan.pie"
-file IMD "fxtracer.pie"
-file IMD "fxtracer_twin.pie"
-file IMD "fxtracerh.pie"
-file IMD "fxtracr2.pie"
-file IMD "fxbeam.pie"
-file IMD "fxcammo.pie"
-file IMD "fxlproj.pie"
-file IMD "fxgammo.pie"
-file IMD "fxplammo.pie"
-file IMD "fxsroc.pie"
-file IMD "fxscudm.pie"
-file IMD "fxflecht.pie"
-file IMD "fxvlexp.pie"
-file IMD "fxvlswav.pie"
-file IMD "fxlswave.pie"
-file IMD "fxmexp.pie"
-file IMD "fxmswave.pie"
-file IMD "fxsflms.pie"
-file IMD "fxmnexp.pie"
-file IMD "fxsnexp.pie"
-file IMD "fxlsplsh.pie"
-file IMD "fxmsplsh.pie"
-file IMD "fxssplsh.pie"
-file IMD "fxmelt.pie"
-file IMD "fxmpexp.pie"
-file IMD "fxdirtsp.pie"
-file IMD "fxmethit.pie"
-file IMD "fxdirt.pie"
-file IMD "fxtracrd.pie"
-file IMD "fxcam20.pie"
-file IMD "fxlthrow.pie"
-file IMD "fxgrdexp.pie"
-file IMD "fxgrdexl.pie"
-file IMD "fxairexp.pie"
-file IMD "fxlbmbi1.pie"
-file IMD "fxlbmbx1.pie"
-file IMD "fxmbmbi2.pie"
-file IMD "fxmbmbx2.pie"
-file IMD "fxaalsht.pie"
-file IMD "fxaalsh2.pie"
-file IMD "fxflech2.pie"
-file IMD "fxgammom.pie"
-file IMD "fxgammoh.pie"
-file IMD "fxflshl.pie"
-file IMD "fxlflsh.pie"
-file IMD "fxlenfl.pie"
-file IMD "fxsplme.pie"
-file IMD "fxmplme.pie"
-file IMD "fxhplme.pie"
-directory "misc/researchimds"
-file IMD "icmslcd.pie"
-file IMD "icmolql.pie"
-file IMD "icspaner.pie"
-file IMD "iccccons.pie"
-file IMD "icamrhot.pie"
-file IMD "icamrknt.pie"
-file IMD "iceng.pie"
-file IMD "dpvtol.pie"
-directory "misc"
-file IMD "icsynapt.pie"
-directory "components/weapons"
-file IMD "cy_gren.pie"
-file IMD "cy_therm.pie"
-file IMD "cy_con.pie"
-file IMD "cy_rep.pie"
-file IMD "gnmhowti.pie"
-file IMD "gnmflmrp.pie"
-file IMD "gnmmorti.pie"
-file IMD "gnmrepr2.pie"
-file IMD "sc_can.pie"
-file IMD "scbody.pie"
-file IMD "sc_hpvcn.pie"
-file IMD "sc_asscn.pie"
-file IMD "sc_tk.pie"
-file IMD "gnhvcan2.pie"
-file IMD "trhvcan2.pie"
-file IMD "gnhlas.pie"
-file IMD "gnhsnsr4.pie"
-file IMD "sc_pulse.pie"
-file IMD "sc_rail2.pie"
-file IMD "sc_atm.pie"
-file IMD "gnhemp.pie"
-file IMD "trhemp.pie"
-file IMD "gnhplsma.pie"
-file IMD "trlassat.pie"
-file IMD "gnlassat.pie"
-file IMD "trwpfcan.pie"
-file IMD "trwpfgss.pie"
-file IMD "trwpfrkt.pie"
-file IMD "trwpfmsl.pie"
-file IMD "gnwpfcan.pie"
-file IMD "gnwpfgss.pie"
-file IMD "gnwpfrkt.pie"
-file IMD "gnwpfmsl.pie"
-directory "structs"
-file IMD "trmflmrp.pie"
-file IMD "milasbas.pie"
-directory "components/bodies"
-file IMD "drmbod13.pie"
-file IMD "drhbod14.pie"
-directory "effects"
-file IMD "fxflech4.pie"
-file IMD "fxgrdexs.pie"
-file IMD "fxshcana.pie"
-file IMD "fxshcanm.pie"
-file IMD "fxshgssa.pie"
-file IMD "fxshgssm.pie"
-file IMD "fxvtl14.pie"
-directory "components/prop"
-file IMD "prshov1.pie"
-file IMD "prsrwhl1.pie"
-file IMD "prslwhl1.pie"
-file IMD "prsrtrk4.pie"
-file IMD "prsltrk4.pie"
-file IMD "prsrhtr4.pie"
-file IMD "prslhtr4.pie"
-file IMD "prsrvtl1.pie"
-file IMD "prslvtl1.pie"
-file IMD "prhheli1.pie"
-file IMD "prhheli2.pie"
-file IMD "prhheli3.pie"
-file IMD "prhheli4.pie"
-file IMD "prlheli1.pie"
-file IMD "prlheli2.pie"
-file IMD "prlheli3.pie"
-file IMD "prmheli1.pie"
-file IMD "prsheli1.pie"
-directory "components/weapons"
-file IMD "gnhaalas.pie"
-file IMD "gnhmorte.pie"
-file IMD "gnhmg1.pie"
-file IMD "trhmg.pie"
-file IMD "trlvtlem.pie"
-file IMD "trlvtlpl.pie"
-file IMD "trmvtlem.pie"
-file IMD "trmvtlpl.pie"
-directory "effects"
-file IMD "fxlbmbe1.pie"
-file IMD "fxlbmbe2.pie"
-file IMD "fxlbmbp1.pie"
-file IMD "fxlbmbp2.pie"
-directory "features"
-file IMD "arizonabush1.pie"
-file IMD "arizonabush2.pie"
-file IMD "arizonabush3.pie"
-file IMD "arizonabush4.pie"
-file IMD "arizonatree1.pie"
-file IMD "arizonatree2.pie"
-file IMD "arizonatree3.pie"
-file IMD "arizonatree4.pie"
-file IMD "arizonatree5.pie"
-file IMD "arizonatree6.pie"
-file IMD "arizonatrees1.pie"
-file IMD "miarthov.pie"
-file IMD "mibar.pie"
-file IMD "mibridg1.pie"
-file IMD "mibridge.pie"
-file IMD "mibridgx.pie"
-file IMD "micoolbig.pie"
-file IMD "minuke.pie"
-file IMD "mipipe1A.pie"
-file IMD "mipipe2A.pie"
-file IMD "mipipe3A.pie"
-file IMD "miruin10.pie"
-file IMD "miruin6.pie"
-file IMD "miruin7.pie"
-file IMD "miruin8.pie"
-file IMD "miruin9.pie"
-file IMD "mitrapcr.pie"
-file IMD "mitrapstr.pie"
-file IMD "miwreck.pie"
-file IMD "miwrek1.pie"
-file IMD "miwrek2.pie"
-file IMD "miwrek3.pie"
-file IMD "miwrek4.pie"
-file IMD "miwrek5.pie"
-file IMD "powlab.pie"
-file IMD "indlab.pie"
-file IMD "nanolab.pie"
-file IMD "aerolab.pie"
-file IMD "advmatlab.pie"
-file IMD "hvyweplab.pie"
-file IMD "rotweplab.pie"
-file IMD "lasoptlab.pie"
-file IMD "blwall4.pie"
-file IMD "blwallc4.pie"
-file IMD "blwall4smash.pie"
-file IMD "blwallc4smash.pie"
-
View
1 lib/ivis_opengl/Makefile.am
@@ -38,7 +38,6 @@ libivis_opengl_a_SOURCES = \
tex.cpp \
textdraw.cpp \
bitimage.cpp \
- imd.cpp \
imdload.cpp \
jpeg_encoder.cpp \
pieclip.cpp \
View
90 lib/ivis_opengl/imd.cpp
@@ -1,90 +0,0 @@
-/*
- This file is part of Warzone 2100.
- Copyright (C) 1999-2004 Eidos Interactive
- Copyright (C) 2005-2013 Warzone 2100 Project
-
- Warzone 2100 is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- Warzone 2100 is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Warzone 2100; if not, write to the Free Software
- Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-#include "imd.h"
-#include "ivisdef.h"
-#include "tex.h"
-#include "pietypes.h"
-
-iIMDShape::iIMDShape()
-{
- flags = 0;
- nconnectors = 0; // Default number of connectors must be 0
- npoints = 0;
- npolys = 0;
- points = NULL;
- polys = NULL;
- connectors = NULL;
- next = NULL;
- shadowEdgeList = NULL;
- nShadowEdges = 0;
- texpage = iV_TEX_INVALID;
- tcmaskpage = iV_TEX_INVALID;
- normalpage = iV_TEX_INVALID;
- specularpage = iV_TEX_INVALID;
- numFrames = 0;
- shaderProgram = 0;
-}
-
-//*************************************************************************
-//*** free IMD shape memory
-//*
-//* pre shape successfully allocated
-//*
-//* params shape = pointer to IMD shape
-//*
-//******
-void iV_IMDRelease(iIMDShape *s)
-{
- unsigned int i;
- iIMDShape *d;
-
- if (s)
- {
- if (s->points)
- {
- free(s->points);
- }
- if (s->connectors)
- {
- free(s->connectors);
- }
- if (s->polys)
- {
- for (i = 0; i < s->npolys; i++)
- {
- if (s->polys[i].texCoord)
- {
- free(s->polys[i].texCoord);
- }
- }
- free(s->polys);
- }
- if (s->shadowEdgeList)
- {
- free(s->shadowEdgeList);
- s->shadowEdgeList = NULL;
- }
- glDeleteBuffers(VBO_COUNT, s->buffers);
- // shader deleted later, if any
- d = s->next;
- delete s;
- iV_IMDRelease(d);
- }
-}
View
15 lib/ivis_opengl/imd.h
@@ -20,15 +20,7 @@
#ifndef _imd_
#define _imd_
-#include <QtCore/QString>
-
#include "ivisdef.h"
-#include "lib/framework/frameresource.h"
-
-static inline iIMDShape *modelGet(const QString &filename)
-{
- return (iIMDShape *) resGetData("IMD", filename.toUtf8().constData());
-}
#define PIE_NAME "PIE" // Pumpkin image export data file
#define PIE_VER 2
@@ -49,15 +41,12 @@ static inline iIMDShape *modelGet(const QString &filename)
// polygon flags b0..b7: col, b24..b31: anim index
-
#define iV_IMD_TEX 0x00000200 // this is both a polygon and pie flag
#define iV_IMD_TEXANIM 0x00004000 // iV_IMD_TEX must be set also
//*************************************************************************
-extern iIMDShape *iV_ProcessIMD(const char **ppFileData, const char *FileDataEnd );
-
-extern bool iV_IMDSave(char *filename, iIMDShape *s, bool PieIMD);
-extern void iV_IMDRelease(iIMDShape *s);
+void modelShutdown();
+iIMDShape *modelGet(const QString &filename);
#endif
View
126 lib/ivis_opengl/imdload.cpp
@@ -24,10 +24,15 @@
* Load IMD (.pie) files
*/
+#include <QtCore/QMap>
+#include <QtCore/QString>
+
#include "lib/framework/frame.h"
#include "lib/framework/string_ext.h"
#include "lib/framework/frameresource.h"
#include "lib/framework/fixedpoint.h"
+#include "lib/framework/file.h"
+#include "lib/framework/physfs_ext.h"
#include "lib/ivis_opengl/piematrix.h"
#include "lib/ivis_opengl/piestate.h"
@@ -35,6 +40,118 @@
#include "imd.h" // for imd structures
#include "tex.h" // texture page loading
+typedef QMap<QString, iIMDShape *> MODELMAP;
+static MODELMAP models;
+
+iIMDShape *iV_ProcessIMD(const char **ppFileData, const char *FileDataEnd);
+
+iIMDShape::iIMDShape()
+{
+ flags = 0;
+ nconnectors = 0; // Default number of connectors must be 0
+ npoints = 0;
+ npolys = 0;
+ points = NULL;
+ polys = NULL;
+ connectors = NULL;
+ next = NULL;
+ shadowEdgeList = NULL;
+ nShadowEdges = 0;
+ texpage = iV_TEX_INVALID;
+ tcmaskpage = iV_TEX_INVALID;
+ normalpage = iV_TEX_INVALID;
+ specularpage = iV_TEX_INVALID;
+ numFrames = 0;
+ shaderProgram = 0;
+}
+
+static void iV_IMDRelease(iIMDShape *s)
+{
+ unsigned int i;
+ iIMDShape *d;
+
+ if (s)
+ {
+ if (s->points)
+ {
+ free(s->points);
+ }
+ if (s->connectors)
+ {
+ free(s->connectors);
+ }
+ if (s->polys)
+ {
+ for (i = 0; i < s->npolys; i++)
+ {
+ if (s->polys[i].texCoord)
+ {
+ free(s->polys[i].texCoord);
+ }
+ }
+ free(s->polys);
+ }
+ if (s->shadowEdgeList)
+ {
+ free(s->shadowEdgeList);
+ s->shadowEdgeList = NULL;
+ }
+ glDeleteBuffers(VBO_COUNT, s->buffers);
+ // shader deleted later, if any
+ d = s->next;
+ delete s;
+ iV_IMDRelease(d);
+ }
+}
+
+void modelShutdown()
+{
+ for (MODELMAP::iterator i = models.begin(); i != models.end(); i = models.erase(i))
+ {
+ iV_IMDRelease(i.value());
+ }
+}
+
+static bool tryLoad(const QString &path, const QString &filename)
+{
+ if (PHYSFS_exists(path + filename))
+ {
+ char *pFileData = NULL, *fileEnd;
+ UDWORD size = 0;
+ if (!loadFile(QString(path + filename).toUtf8().constData(), &pFileData, &size))
+ {
+ debug(LOG_ERROR, "Failed to load model file: %s", QString(path + filename).toUtf8().constData());
+ return false;
+ }
+ fileEnd = pFileData + size;
+ iIMDShape *s = iV_ProcessIMD((const char **)&pFileData, fileEnd);
+ if (s)
+ {
+ models.insert(filename, s);
+ }
+ return true;
+ }
+ return false;
+}
+
+iIMDShape *modelGet(const QString &filename)
+{
+ QString name(filename.toLower());
+ if (models.contains(name))
+ {
+ return models[name]; // cached
+ }
+ else if (tryLoad("structs/", name) || tryLoad("misc/", name) || tryLoad("effects/", name)
+ || tryLoad("components/prop/", name) || tryLoad("components/weapons/", name)
+ || tryLoad("components/bodies/", name) || tryLoad("features/", name)
+ || tryLoad("misc/micnum/", name) || tryLoad("misc/minum/", name) || tryLoad("misc/mivnum/", name) || tryLoad("misc/researchimds/", name))
+ {
+ return models[name];
+ }
+ debug(LOG_ERROR, "Could not find: %s", name.toUtf8().constData());
+ return NULL;
+}
+
static bool AtEndOfFile(const char *CurPos, const char *EndOfFile)
{
while ( *CurPos == 0x00 || *CurPos == 0x09 || *CurPos == 0x0a || *CurPos == 0x0d || *CurPos == 0x20 )
@@ -65,7 +182,7 @@ static bool AtEndOfFile(const char *CurPos, const char *EndOfFile)
* \post s->polys allocated (iFSDPoly * s->npolys)
* \post s->pindex allocated for each poly
*/
-static bool _imd_load_polys( const char **ppFileData, iIMDShape *s, int pieVersion)
+static bool _imd_load_polys(const char **ppFileData, iIMDShape *s, int pieVersion)
{
const char *pFileData = *ppFileData;
unsigned int i, j;
@@ -221,7 +338,7 @@ static bool _imd_load_polys( const char **ppFileData, iIMDShape *s, int pieVersi
}
-static bool ReadPoints( const char **ppFileData, iIMDShape *s )
+static bool ReadPoints(const char **ppFileData, iIMDShape *s)
{
const char *pFileData = *ppFileData;
unsigned int i;
@@ -421,7 +538,7 @@ void _imd_calc_bounds(iIMDShape *s, Vector3f *p, int size)
// END: tight bounding sphere
}
-static bool _imd_load_points( const char **ppFileData, iIMDShape *s )
+static bool _imd_load_points(const char **ppFileData, iIMDShape *s)
{
//load the points then pass through a second time to setup bounding datavalues
s->points = (Vector3f*)malloc(sizeof(Vector3f) * s->npoints);
@@ -652,7 +769,6 @@ static iIMDShape *_imd_load_level(const char **ppFileData, const char *FileDataE
return s;
}
-
/*!
* Load ppFileData into a shape
* \param ppFileData Data from the IMD file
@@ -660,7 +776,7 @@ static iIMDShape *_imd_load_level(const char **ppFileData, const char *FileDataE
* \return The shape, constructed from the data read
*/
// ppFileData is incremented to the end of the file on exit!
-iIMDShape *iV_ProcessIMD( const char **ppFileData, const char *FileDataEnd )
+iIMDShape *iV_ProcessIMD(const char **ppFileData, const char *FileDataEnd)
{
const char *pFileName = GetLastResourceFilename(); // Last loaded filename
const char *pFileData = *ppFileData;
View
4 lib/ivis_opengl/ivi.cpp
@@ -23,10 +23,6 @@
#include "lib/ivis_opengl/tex.h"
#include "lib/ivis_opengl/textdraw.h"
-void iV_Reset()
-{
-}
-
void iV_ShutDown(void)
{
pie_ShutDown();
View
1 lib/ivis_opengl/ivi.h
@@ -25,7 +25,6 @@
#include "piedef.h"
-extern void iV_Reset(void);
extern void iV_ShutDown(void);
#endif
View
3 lib/ivis_opengl/ivis_opengl.vcxproj
@@ -189,7 +189,6 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="bitimage.cpp" />
- <ClCompile Include="imd.cpp" />
<ClCompile Include="imdload.cpp" />
<ClCompile Include="ivi.cpp" />
<ClCompile Include="jpeg_encoder.cpp" />
@@ -230,4 +229,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
+</Project>
View
5 lib/ivis_opengl/ivis_opengl.vcxproj.filters
@@ -14,9 +14,6 @@
<ClCompile Include="bitimage.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="imd.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="imdload.cpp">
<Filter>Source Files</Filter>
</ClCompile>
@@ -122,4 +119,4 @@
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
-</Project>
+</Project>
View
1 po/POTFILES.in
@@ -160,7 +160,6 @@ lib/gamelib/animobj.cpp
lib/gamelib/gtime.cpp
lib/gamelib/hashtable.cpp
lib/ivis_opengl/bitimage.cpp
-lib/ivis_opengl/imd.cpp
lib/ivis_opengl/imdload.cpp
lib/ivis_opengl/ivi.cpp
lib/ivis_opengl/jpeg_encoder.cpp
View
19 src/data.cpp
@@ -455,23 +455,6 @@ static void dataSMSGRelease(void *pData)
viewDataShutDown((const char *)pData);
}
-/* Load an imd */
-static bool dataIMDBufferLoad(const char *pBuffer, UDWORD size, void **ppData)
-{
- iIMDShape *psIMD;
- const char *pBufferPosition = pBuffer;
-
- psIMD = iV_ProcessIMD( &pBufferPosition, pBufferPosition + size );
- if (psIMD == NULL) {
- debug( LOG_ERROR, "IMD load failed - %s", GetLastResourceFilename() );
- return false;
- }
-
- *ppData = psIMD;
- return true;
-}
-
-
/*!
* Load an image from file
*/
@@ -785,7 +768,7 @@ struct RES_TYPE_MIN_BUF
static const RES_TYPE_MIN_BUF BufferResourceTypes[] =
{
{"SMSG", bufferSMSGLoad, dataSMSGRelease},
- {"IMD", dataIMDBufferLoad, (RES_FREE)iV_IMDRelease},
+ {"IMD", NULL, NULL}, // ignored
};
struct RES_TYPE_MIN_FILE
View
7 src/init.cpp
@@ -599,7 +599,6 @@ bool systemInitialise(void)
screen_EnableMissingFunctions();
pie_InitRadar();
- iV_Reset(); // Reset the IV library.
readAIs();
@@ -706,8 +705,6 @@ bool frontendInitialise(const char *ResourceFile)
return false;
}
- iV_Reset(); // Reset the IV library.
-
if (!scrTabInitialise()) // Initialise the script system
{
return false;
@@ -815,6 +812,7 @@ bool frontendShutdown(void)
}
debug(LOG_TEXTURE, "=== frontendShutdown ===");
+ modelShutdown();
pie_TexShutDown();
pie_TexInit(); // ready for restart
freeComponentLists();
@@ -839,8 +837,6 @@ bool stageOneInitialise(void)
return false;
}
- iV_Reset(); // Reset the IV library
-
if (!stringsInitialise()) /* Initialise the string system */
{
return false;
@@ -983,6 +979,7 @@ bool stageOneShutDown(void)
}
debug(LOG_TEXTURE, "=== stageOneShutDown ===");
+ modelShutdown();
pie_TexShutDown();
// Use mod_multiplay as the default (campaign might have set it to mod_singleplayer)
View
7 src/multiint.cpp
@@ -3225,12 +3225,7 @@ void startMultiplayerGame(void)
{
debug(LOG_NET, "limiter was NOT activated, setting defaults");
- // NOTE: master <-> 2.3 difference, we don't load limiter_tex!
- if (!resLoad("wrf/piestats.wrf", 502))
- {
- debug(LOG_INFO, "Unable to load piestats. Defaults not set.");
- }
- else if (!resLoad("wrf/limiter_data.wrf", 503))
+ if (!resLoad("wrf/limiter_data.wrf", 503))
{
debug(LOG_INFO, "Unable to load limiter_data.");
}
View
5 src/multilimit.cpp
@@ -99,11 +99,6 @@ bool startLimitScreen(void)
{
initLoadingScreen(true);
- if (!resLoad("wrf/piestats.wrf", 502))
- {
- return false;
- }
-
if (!resLoad("wrf/limiter_data.wrf", 503))
{
return false;
View
2 src/stats.cpp
@@ -266,7 +266,7 @@ static iIMDShape *statsGetIMD(WzConfig &ini, BASE_STATS *psStats, QString key, i
if (ini.contains(key))
{
QStringList values = ini.value(key).toStringList();
- if (values[index].compare("0") != 0)
+ if (values.size() > index && values[index].compare("0") != 0)
{
retval = modelGet(values[index]);
ASSERT(retval != NULL, "Cannot find the PIE model %s for stat %s in %s",

0 comments on commit 6a9ca8c

Please sign in to comment.
Something went wrong with that request. Please try again.