protected override void ReadMembers(SR1_Reader reader, SR1_Structure parent)
        {
            type.Read(reader, this, "type");
            numSounds.Read(reader, this, "numSounds");

            // A sound was ommitted from flameh and sgwindw in one version of the game, but the array length is still 2.
            // Hack to make it export correctly.
            if (reader.Object != null &&
                reader.Object.Name == "flameh__" &&
                reader.Model.Start == Start + 0x18)
            {
                sounds = new SR1_StructureArray <ObjectSound>(1);
            }
            else if (reader.Object != null &&
                     reader.Object.Name == "sgwindw_" &&
                     reader.Model.Start == Start + 0x24)
            {
                sounds = new SR1_StructureArray <ObjectSound>(2);
            }
            else
            {
                sounds = new SR1_StructureArray <ObjectSound>(numSounds.Value);
            }

            sounds.Read(reader, this, "entries");
        }
示例#2
0
        protected override void ReadMembers(SR1_Reader reader, SR1_Structure parent)
        {
            numVMOffsets.Read(reader, this, "numVMOffsets");

            offsets = (SR1_StructureArray <VMMoveOffset>)(new SR1_StructureArray <VMMoveOffset>(numVMOffsets.Value)).SetPadding(4);
            offsets.Read(reader, this, "offsets");
        }
示例#3
0
 protected override void ReadMembers(SR1_Reader reader, SR1_Structure parent)
 {
     wave.Read(reader, this, "wave", SR1_File.Version.First, SR1_File.Version.May12);
     waveRate.Read(reader, this, "waveRate", SR1_File.Version.First, SR1_File.Version.May12);
     glowStartSegment.Read(reader, this, "glowStartSegment", SR1_File.Version.First, SR1_File.Version.May12);
     glowNumberOfSegments.Read(reader, this, "glowNumberOfSegments", SR1_File.Version.First, SR1_File.Version.May12);
     glowWidth.Read(reader, this, "glowWidth", SR1_File.Version.First, SR1_File.Version.May12);
     spectralGlowColor.Read(reader, this, "spectralGlowColor");
     materialGlowColor.Read(reader, this, "materialGlowColor");
     sunlightGlowColor.Read(reader, this, "sunlightGlowColor");
     waterGlowColor.Read(reader, this, "waterGlowColor");
     stoneGlowColor.Read(reader, this, "stoneGlowColor");
     fireGlowColor.Read(reader, this, "fireGlowColor");
     spiritGlowColor.Read(reader, this, "spiritGlowColor");
     soundGlowColor.Read(reader, this, "soundGlowColor");
     spectralInnerColor.Read(reader, this, "spectralInnerColor", SR1_File.Version.May12, SR1_File.Version.Next);
     materialInnerColor.Read(reader, this, "materialInnerColor", SR1_File.Version.May12, SR1_File.Version.Next);
     sunlightInnerColor.Read(reader, this, "sunlightInnerColor", SR1_File.Version.May12, SR1_File.Version.Next);
     waterInnerColor.Read(reader, this, "waterInnerColor", SR1_File.Version.May12, SR1_File.Version.Next);
     stoneInnerColor.Read(reader, this, "stoneInnerColor", SR1_File.Version.May12, SR1_File.Version.Next);
     fireInnerColor.Read(reader, this, "fireInnerColor", SR1_File.Version.May12, SR1_File.Version.Next);
     spiritInnerColor.Read(reader, this, "spiritInnerColor", SR1_File.Version.May12, SR1_File.Version.Next);
     soundInnerColor.Read(reader, this, "soundInnerColor", SR1_File.Version.May12, SR1_File.Version.Next);
     spectralInnerGlowColor.Read(reader, this, "spectralInnerGlowColor", SR1_File.Version.May12, SR1_File.Version.Next);
     materialInnerGlowColor.Read(reader, this, "materialInnerGlowColor", SR1_File.Version.May12, SR1_File.Version.Next);
     sunlightInnerGlowColor.Read(reader, this, "sunlightInnerGlowColor", SR1_File.Version.May12, SR1_File.Version.Next);
     waterInnerGlowColor.Read(reader, this, "waterInnerGlowColor", SR1_File.Version.May12, SR1_File.Version.Next);
     stoneInnerGlowColor.Read(reader, this, "stoneInnerGlowColor", SR1_File.Version.May12, SR1_File.Version.Next);
     fireInnerGlowColor.Read(reader, this, "fireInnerGlowColor", SR1_File.Version.May12, SR1_File.Version.Next);
     spiritInnerGlowColor.Read(reader, this, "spiritInnerGlowColor", SR1_File.Version.May12, SR1_File.Version.Next);
     soundInnerGlowColor.Read(reader, this, "soundInnerGlowColor", SR1_File.Version.May12, SR1_File.Version.Next);
     // Icon colors aren't used.
     // icon_colors.Read(reader, this, "icon_colors");
 }
示例#4
0
 protected override void ReadMembers(SR1_Reader reader, SR1_Structure parent)
 {
     glyph_size.Read(reader, this, "glyph_size");
     glyph_darkness.Read(reader, this, "glyph_darkness");
     glyph_costs.Read(reader, this, "glyph_costs");
     glyph_range.Read(reader, this, "glyph_range");
     color_array.Read(reader, this, "color_array");
 }
        protected override void ReadMembers(SR1_Reader reader, SR1_Structure parent)
        {
            key.Read(reader, this, "key");
            numkeys.Read(reader, this, "numkeys");
            type.Read(reader, this, "type");
            flags.Read(reader, this, "flags");

            keyList = new SR1_StructureArray <SplineKey>(numkeys.Value);
            keyList.Read(reader, this, "keyList");
        }
 protected override void ReadMembers(SR1_Reader reader, SR1_Structure parent)
 {
     soundData.Read(reader, this, "soundData");
     uniqueID.Read(reader, this, "uniqueID");
     sfxTbl.Read(reader, this, "sfxTbl");
     pos.Read(reader, this, "pos");
     pad.Read(reader, this, "pad");
     livesInOnePlace.Read(reader, this, "livesInOnePlace");
     inSpectral.Read(reader, this, "inSpectral");
 }
        protected override void ReadMembers(SR1_Reader reader, SR1_Structure parent)
        {
            if (!skipAmbient)
            {
                ambient.Read(reader, this, "ambient");
            }

            numLightGroups.Read(reader, this, "numLightGroups");
            lightGroupList.Read(reader, this, "lightGroupList");

            lightGroupListBuf = new SR1_StructureArray <LightGroup>(numLightGroups.Value);
            lightGroupListBuf.Read(reader, this, "lightGroupListBuf");
        }
 protected override void ReadMembers(SR1_Reader reader, SR1_Structure parent)
 {
     tolevelname.SetReadMax(true).Read(reader, this, "tolevelname");
     MSignalID.Read(reader, this, "MSignalID");
     streamID.Read(reader, this, "streamID");
     minx.Read(reader, this, "minx");
     miny.Read(reader, this, "miny");
     minz.Read(reader, this, "minz");
     flags.Read(reader, this, "flags");
     maxx.Read(reader, this, "maxx");
     maxy.Read(reader, this, "maxy");
     maxz.Read(reader, this, "maxz");
     pad2.Read(reader, this, "pad2");
     toStreamUnit.Read(reader, this, "toStreamUnit");
     t1.Read(reader, this, "t1");
     t2.Read(reader, this, "t2");
 }
示例#9
0
        protected override void ReadMembers(SR1_Reader reader, SR1_Structure parent)
        {
            pixDstX.Read(reader, this, "pixDstX");
            pixDstY.Read(reader, this, "pixDstY");
            pixW.Read(reader, this, "pixW");
            pixH.Read(reader, this, "pixH");
            clutDstX.Read(reader, this, "clutDstX");
            clutDstY.Read(reader, this, "clutDstY");
            clutW.Read(reader, this, "clutW");
            clutH.Read(reader, this, "clutH");
            pixCurrentX.Read(reader, this, "pixCurrentX");
            pixCurrentY.Read(reader, this, "pixCurrentY");
            clutCurrentX.Read(reader, this, "clutCurrentX");
            clutCurrentY.Read(reader, this, "clutCurrentY");
            numFrames.Read(reader, this, "numFrames");
            speed.Read(reader, this, "speed");

            frame = new SR1_StructureArray <DrMoveAniTexSrcInfo>(numFrames.Value);
            frame.Read(reader, this, "frame");
        }
        protected override void ReadMembers(SR1_Reader reader, SR1_Structure parent)
        {
            initFunc.Read(reader, this, "initFunc");
            cleanUpFunc.Read(reader, this, "cleanUpFunc");
            damageEffectFunc.Read(reader, this, "damageEffectFunc");
            queryFunc.Read(reader, this, "queryFunc");
            messageFunc.Read(reader, this, "messageFunc");
            stateFuncs.Read(reader, this, "stateFuncs");
            versionID.Read(reader, this, "versionID");
            localVersionID.Read(reader, this, "localVersionID");

            int codeLength = (int)((long)(Start + stateFuncs.Value) - localVersionID.End);

            asmCode = new SR1_PrimativeArray <byte>(codeLength);
            asmCode.Read(reader, this, "asmCode");

            int numChoices             = 0;
            MonsterStateChoice tempMSC = new MonsterStateChoice();

            do
            {
                numChoices++;
                tempMSC.ReadTemp(reader);
            }while (tempMSC.state.Value != -1);

            reader.BaseStream.Position = asmCode.End;

            stateChoices = new SR1_StructureArray <MonsterStateChoice>(numChoices);
            stateChoices.Read(reader, this, "stateChoices");

            // Padding is used by the asmCode maybe?
            if (reader.File._Version >= SR1_File.Version.May12 &&
                (reader.Object.Name == "alukabss" || reader.Object.Name == "roninbss"))
            {
                pad = new SR1_PrimativeArray <byte>(8);
            }
            pad.Read(reader, this, "pad");
        }
 protected override void ReadMembers(SR1_Reader reader, SR1_Structure parent)
 {
     numAniTextures.Read(reader, this, "numAniTextures");
     aniTexInfo = new SR1_StructureArray <AniTexInfo>(numAniTextures.Value);
     aniTexInfo.Read(reader, this, "aniTexInfo");
 }
示例#12
0
 protected override void ReadMembers(SR1_Reader reader, SR1_Structure parent)
 {
     genericBubbleParams.Read(reader, this, "genericBubbleParams");
 }
示例#13
0
        protected override void ReadMembers(SR1_Reader reader, SR1_Structure parent)
        {
            eventNumber.Read(reader, this, "eventNumber");
            numInstances.Read(reader, this, "numInstances");
            numActions.Read(reader, this, "numActions");
            processingPuppetShow.Read(reader, this, "processingPuppetShow");
            eventVariables.Read(reader, this, "eventVariables");
            instanceList.Read(reader, this, "instanceList");
            conditionalList.Read(reader, this, "conditionalList");
            actionList.Read(reader, this, "actionList");

            if (instanceList.Offset != 0 && numInstances.Value > 0)
            {
                instancePointers = new SR1_PointerArray <EventBasicObject>(numInstances.Value, false);
                instancePointers.Read(reader, this, "instancePonters");
            }

            int tempNumConditions = 0;
            int tempNumActions    = 0;

            if (numActions.Value > 0)
            {
                if (conditionalList.Offset != 0)
                {
                    conditionalPointers = new SR1_PointerArray <ScriptPCode>(numActions.Value, false);
                    conditionalPointers.Read(reader, this, "conditionalPointers");
                    foreach (SR1_PointerBase pointer in conditionalPointers)
                    {
                        if (pointer.Offset != 0)
                        {
                            tempNumConditions++;
                        }
                    }
                }

                if (actionList.Offset != 0)
                {
                    actionPointers = new SR1_PointerArray <ScriptPCode>(numActions.Value, false);
                    actionPointers.Read(reader, this, "actionPointers");
                    foreach (SR1_PointerBase pointer in actionPointers)
                    {
                        if (pointer.Offset != 0)
                        {
                            tempNumActions++;
                        }
                    }
                }
            }

            if (instanceList.Offset != 0 && numInstances.Value > 0)
            {
                instances = new SR1_StructureArray <EventBasicObject>(numInstances.Value);
                instances.Read(reader, this, "instances");
            }

            if (tempNumConditions > 0)
            {
                conditionals = new SR1_StructureArray <ScriptPCode>(tempNumConditions);
                conditionals.Read(reader, this, "conditionals");
            }

            if (tempNumActions > 0)
            {
                actions = new SR1_StructureArray <ScriptPCode>(tempNumActions);
                actions.Read(reader, this, "actions");
            }
        }
示例#14
0
        protected override void ReadMembers(SR1_Reader reader, SR1_Structure parent)
        {
            reader.Level = this;

            terrain.Read(reader, this, "terrain");
            lightList.Read(reader, this, "lightList");
            numVMObjects.Read(reader, this, "numVMObjects");
            vmobjectList.Read(reader, this, "vmobjectList");
            numSpotLights.Read(reader, this, "numSpotLights");
            spotLightList.Read(reader, this, "spotLightList");
            numPointLights.Read(reader, this, "numPointLights");
            pointLightList.Read(reader, this, "pointLightList");
            numSpotSpecturalLights.Read(reader, this, "numSpotSpecturalLights");
            spotSpecturalLightList.Read(reader, this, "spotSpecturalLightList");
            numPointSpecturalLights.Read(reader, this, "numPointSpecturalLights");
            pointSpecturalLightList.Read(reader, this, "pointSpecturalLightList");
            numBGObjects.Read(reader, this, "numBGObjects");
            bgObjectList.Read(reader, this, "bgObjectList");
            waterZLevel.Read(reader, this, "waterZLevel");
            backColorR.Read(reader, this, "backColorR");
            backColorG.Read(reader, this, "backColorG");
            backColorB.Read(reader, this, "backColorB");
            cpad1.Read(reader, this, "cpad1");
            specturalColorR.Read(reader, this, "specturalColorR");
            specturalColorG.Read(reader, this, "specturalColorG");
            specturalColorB.Read(reader, this, "specturalColorB");
            cpad2.Read(reader, this, "cpad2");
            fogFar.Read(reader, this, "fogFar");
            fogNear.Read(reader, this, "fogNear");
            spectralFogFar.Read(reader, this, "spectralFogFar", SR1_File.Version.Feb16, SR1_File.Version.Next);
            spectralFogNear.Read(reader, this, "spectralFogNear", SR1_File.Version.Feb16, SR1_File.Version.Next);
            waterFogFar.Read(reader, this, "waterFogFar", SR1_File.Version.May12, SR1_File.Version.Next);
            waterFogNear.Read(reader, this, "waterFogNear", SR1_File.Version.May12, SR1_File.Version.Next);
            depthQBlendStart.Read(reader, this, "depthQBlendStart");
            spectrallightList.Read(reader, this, "spectrallightList", SR1_File.Version.May12, SR1_File.Version.Next);
            depthQPTable.Read(reader, this, "depthQPTable", SR1_File.Version.Feb04, SR1_File.Version.May12);
            numCameras.Read(reader, this, "numCameras");
            cameraList.Read(reader, this, "cameraList");
            bspPlaneError.Read(reader, this, "bspPlaneError");
            numVGroups.Read(reader, this, "numVGroups");
            vGroupList.Read(reader, this, "vGroupList");
            deathZ.Read(reader, this, "deathZ");
            flags.Read(reader, this, "flags");
            startSignal.Read(reader, this, "startSignal");
            numIntros.Read(reader, this, "numIntros");
            introList.Read(reader, this, "introList");
            bgAniList.Read(reader, this, "bgAniList");
            numHotSpots.Read(reader, this, "numHotSpots");
            hotSpotList.Read(reader, this, "hotSpotList");
            objectNameList.Read(reader, this, "objectNameList");
            depthQFogStart.Read(reader, this, "depthQFogStart");
            morphLastStep.Read(reader, this, "morphLastStep");
            worldName.Read(reader, this, "worldName");
            vramSize.Read(reader, this, "vramSize", SR1_File.Version.May12, SR1_File.Version.Next);
            numberBrotherUnits.Read(reader, this, "numberBrotherUnits", SR1_File.Version.Feb04, SR1_File.Version.May12);
            brotherUnitsNames.Read(reader, this, "brotherUnitsNames", SR1_File.Version.Feb04, SR1_File.Version.May12);
            holdFogFar.Read(reader, this, "holdFogFar");
            holdFogNear.Read(reader, this, "holdFogNear");
            numberEnemyUnits.Read(reader, this, "numberEnemyUnits");
            enemyUnitsNames.Read(reader, this, "enemyUnitsNames");
            timesSignalList.Read(reader, this, "timesSignalList");
            spectralSignal.Read(reader, this, "spectralSignal");
            materialSignal.Read(reader, this, "materialSignal");
            startUnitLoadedSignal.Read(reader, this, "startUnitLoadedSignal");
            startUnitMainSignal.Read(reader, this, "startUnitMainSignal");
            startGoingIntoWaterSignal.Read(reader, this, "startGoingIntoWaterSignal");
            startGoingOutOfWaterSignal.Read(reader, this, "startGoingOutOfWaterSignal");
            unitFlags.Read(reader, this, "unitFlags");
            SignalListStart.Read(reader, this, "SignalListStart");
            SignalListEnd.Read(reader, this, "SignalListEnd");
            numBSPLeaves.Read(reader, this, "numBSPLeaves");
            PuzzleInstances.Read(reader, this, "PuzzleInstances");
            NumberOfPlanMarkers.Read(reader, this, "NumberOfPlanMarkers");
            PlanMarkerList.Read(reader, this, "PlanMarkerList");
            NumberOfSFXMarkers.Read(reader, this, "NumberOfSFXMarkers", SR1_File.Version.May12, SR1_File.Version.Next);
            SFXMarkerList.Read(reader, this, "SFXMarkerList", SR1_File.Version.May12, SR1_File.Version.Next);
            versionNumber.Read(reader, this, "versionNumber");
            dynamicMusicName.Read(reader, this, "dynamicMusicName");
            streamUnitID.Read(reader, this, "streamUnitID");
            tClassAttr.Read(reader, this, "tClassAttr");
            TODLighting.Read(reader, this, "TODLighting");
            TODbackColor.Read(reader, this, "TODbackColor");
            TODfogNearFar.Read(reader, this, "TODfogNearFar");
            TODRedScale.Read(reader, this, "TODRedScale");
            TODGrnScale.Read(reader, this, "TODGrnScale");
            TODBluScale.Read(reader, this, "TODBluScale");
            TODfogNear.Read(reader, this, "TODfogNear");
            TODfogFar.Read(reader, this, "TODfogFar");
            short_pad.Read(reader, this, "short_pad");
            TODbackColorR.Read(reader, this, "TODbackColorR");
            TODbackColorG.Read(reader, this, "TODbackColorG");
            TODbackColorB.Read(reader, this, "TODbackColorB");
            cpad3.Read(reader, this, "cpad3");
            razielLightGroup.Read(reader, this, "razielLightGroup", SR1_File.Version.May12, SR1_File.Version.Next);
            razielSpectralLightGroup.Read(reader, this, "razielSpectralLightGroup", SR1_File.Version.May12, SR1_File.Version.Next);

            reader.PlanMarkerList = PlanMarkerList;
        }