Example #1
0
        public void LoadFromStream(AGSAlignedStream ar)
        {
            name = ar.ReadFixedString(25);
            //Debug.Assert(r.BaseStream.Position == 0x851E);

            picture = ar.ReadInt32();
            //Debug.Assert(r.BaseStream.Position == 0x8525);

            cursor_picture = ar.ReadInt32();
            //Debug.Assert(r.BaseStream.Position == 0x8529);

            hotspot_x = ar.ReadInt32();
            //Debug.Assert(r.BaseStream.Position == 0x852D);

            hotspot_y = ar.ReadInt32();
            //Debug.Assert(r.BaseStream.Position == 0x8531);

            reserved = ar.ReadArrayInt32(5);
            //Debug.Assert(r.BaseStream.Position == 0x8545);

            //NOTE(adm244): structure is aligned at 4-byte boundary,
            // read with a padding and discard it
            flag = (byte)ar.ReadInt32();
            //Debug.Assert(r.BaseStream.Position == 0x8549);
        }
Example #2
0
 public void LoadFromStream(AGSAlignedStream ar)
 {
     picture   = ar.ReadInt32();
     offset_x  = ar.ReadInt16();
     offset_y  = ar.ReadInt16();
     speed     = ar.ReadInt16();
     flags     = ar.ReadInt32();
     sound     = ar.ReadInt32();
     reserved1 = ar.ReadInt32();
     reserved2 = ar.ReadInt32();
 }
Example #3
0
        public void LoadFromStream(AGSAlignedStream ar)
        {
            picture   = ar.ReadInt32();
            hotspot_x = ar.ReadInt16();
            hotspot_y = ar.ReadInt16();
            view      = ar.ReadInt16();
            name      = ar.ReadFixedString(10);

            //NOTE(adm244): structure is aligned at 4-byte boundary,
            // read with a padding and discard it
            flags = (byte)ar.ReadInt32();
        }
Example #4
0
        public void LoadFromStream(BinaryReader r)
        {
            Int16 frames_count = r.ReadInt16();

            Frames = new AGSViewLoopFrame[frames_count];
            Flags  = r.ReadInt32();

            AGSAlignedStream ar = new AGSAlignedStream(r);

            for (int i = 0; i < Frames.Length; ++i)
            {
                Frames[i] = new AGSViewLoopFrame();
                Frames[i].LoadFromStream(ar);
                ar.Reset();
            }
        }
Example #5
0
        public void LoadFromStream(AGSAlignedStream ar, Int32 dta_version)
        {
            name    = ar.ReadFixedString(50);
            options = ar.ReadArrayInt32(100);
            paluses = ar.ReadBytes(256);

            //NOTE(adm244): reg: ABGR; mem: RGBA
            defaultPallete = ar.ReadArrayInt32(256);

            views_count           = ar.ReadInt32();
            characters_count      = ar.ReadInt32();
            player_character_id   = ar.ReadInt32();
            total_score           = ar.ReadInt32();
            inventory_items_count = ar.ReadInt16();
            dialogs_count         = ar.ReadInt32();
            dialog_messages_count = ar.ReadInt32();
            fonts_count           = ar.ReadInt32();
            color_depth           = ar.ReadInt32(); // bytes per pixel
            target_win            = ar.ReadInt32();
            dialog_bullet         = ar.ReadInt32();
            hotdot        = ar.ReadInt16(); // inventory item hotdot
            hotdot_outter = ar.ReadInt16();
            unique_id     = ar.ReadInt32();
            guis_count    = ar.ReadInt32();
            cursors_count = ar.ReadInt32();

            default_resolution = ar.ReadInt32();
            if ((dta_version >= 44) && (default_resolution == 8)) // 3.3.1, 8 - custom resolution
            {
                window_width  = ar.ReadInt32();
                window_height = ar.ReadInt32();
            }

            default_lipsync_frame   = ar.ReadInt32();
            inventory_hotdot_sprite = ar.ReadInt32();
            reserved        = ar.ReadArrayInt32(17);
            global_messages = ar.ReadArrayInt32(500);

            load_dictionary         = ar.ReadInt32();
            some_globalscript_value = ar.ReadInt32();
            some_chars_value        = ar.ReadInt32();
            is_scriptcompiled       = ar.ReadInt32();
        }