Re: [AD] 3.9.31 breaks MSVC 4 |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Sat, Feb 05, 2000 at 06:09:33PM -0000, Isaac Cruz wrote:
> OK, I have started moving my code to a -s file. I have a little question
> about accessing members of a structure. Example: to access lpSurface member
> of DDSURFACEDESC, I have done this:
>
> movl ARG1, %eax /* eax = &src_desc (ARG1) */
> movl 36(%eax), %eax /* eax = src_desc.lpSurface */
>
> is it right?
It looks right to me, but maybe you'd be better off using the
asmdefs syntax to get your byte offset (36). The whole point of
that is that asmdef ensures that you get the right offset for
the data in your struct, even if the struct itself changes
layout. OK, so this is a Windows-defined struct and Windows
tends to be binary compatible, so maybe it's not needed here.
George
--
Random project update:
06/02/2000: AllegroGL alpha 3: use OpenGL with Allegro in Unix or Windows
http://www.canvaslink.com/gfoot/allegrogl/