Valhalla Legends Forums Archive | General Programming | converting some c++ to vb. need help

AuthorMessageTime
Noodlez
ok, i have this structure

[code]
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;
[/code]

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
December 23, 2002, 2:49 PM
n00blar
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!
December 23, 2002, 2:58 PM
n00blar
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
December 23, 2002, 4:59 PM
Grok
Private iteminfoflags_t As Long

Hope this helps.
Grok
December 23, 2002, 5:05 PM

Search