i have the following code:
vertex struct

x dword ?
y dword ?
z dword ?
sc_x dword ?
sc_y dword ?
vertex ends

triangle struct
v vertex 3 dup (<>)
visible byte 1
nx byte ?
ny byte ?
nz byte ?
triangle ends

cube triangle 12 dup (?)


when compiling i get an initialization error on the last line, the cube (declaration of the cube) it should be an array with 12 items of type 'triangle' how should i declare this array? (also tryd using <> and {} and (<>) but no succes with them either :( )

edit: the problem is what must go behind the 'dup' i think

Scorpie
Posted on 2004-11-28 10:36:53 by Scorpie
strange - I also tried all I could come up with reading the documentation, (even dup-s), but no other solution than just making:


triangle struct
v vertex <>
v2 vertex <>
v3 vertex <>
visible byte 1
nx byte ?
ny byte ?
nz byte ?
triangle ends
Posted on 2004-11-28 11:33:44 by Ultrano
well i also posted it on masmforum.com and there someone came up with this solution (and it works)
vertex struct

x dword ?
y dword ?
z dword ?
sc_x dword ?
sc_y dword ?
vertex ends

vX struct
vertex 3 dup (<>)
vX ends

triangle struct
v vX <>
visible byte 1
nx byte ?
ny byte ?
nz byte ?
triangle ends

cube triangle 12 dup (<>)
Posted on 2004-11-28 11:50:31 by Scorpie