Valhalla Legends Archive

Programming => General Programming => Topic started by: Noodlez on December 23, 2002, 08:49 AM

Title: converting some c++ to vb. need help
Post by: Noodlez on December 23, 2002, 08:49 AM
ok, i have this structure

typedef struct {
      DWORD      compactsave:1,
                  nodurability:1,
                  useable:1,
                  stackable:1,
                  quest:1,
                  questitem:1,
                  itemclass:2,
                  file:2,
                  range:3,
                  invwidth:2,
                  invheight:3,
                  maxsockets:3,
                  bitfield1:3;
} iteminfoflags_t;

in vb, how would i make an entire Type a long?
i was thinking Dim iteminfoflags_t(1 to 24) as byte, and treating each index as a bit (like for compactsave i would modify iteinfoflags_t(1)) what do you guys think
Title: Re: converting some c++ to vb. need help
Post by: n00blar on December 23, 2002, 08:58 AM
Noodlez I thought you were an elite programmer that wants in valhalla legends =P after all that war3 maphack you made; surely if you can disassemble and find all the offsets you can do this? However, If you want me to help you with my never-ending knowledge then message me on aim and ask-- n00bIar is my screen name!
Title: Re: converting some c++ to vb. need help
Post by: n00blar on December 23, 2002, 10:59 AM
hey you can use the way you want but if you want optimize for memory your gonna have to pack the bits into a byte using a method like the one i described
Title: Re: converting some c++ to vb. need help
Post by: Grok on December 23, 2002, 11:05 AM
Private iteminfoflags_t As Long

Hope this helps.
Grok