flat assembler
Message board for the users of flat assembler.

Index > Windows > Q. about win32 structures

Author
Thread Post new topic Reply to topic
rohagymeg



Joined: 19 Aug 2011
Posts: 77
rohagymeg 29 Aug 2011, 15:28
How do I fill in a windows structure needed in a function I call? Memory placement vise how does this look like? Can I do it easier with fasm structure macro?
Post 29 Aug 2011, 15:28
View user's profile Send private message Reply with quote
Enko



Joined: 03 Apr 2007
Posts: 676
Location: Mar del Plata
Enko 29 Aug 2011, 17:19
Code:
struct PARTICLE                      
  x         dd ?            
  y         dd ?
  dirx  dd ?               
  diry   dd ?
ends

section '.data' redeable writeable
    Sprite      PARTICLE

section '.code' redeable executable

       mov     [Sprite.x], eax
     mov     [Sprite.y], ebx
     ;etc...
     stdcall DrawMySprite, Sprite

proc   DrawMySprite, sprite
     mov     ebx, [sprite]
       mov     eax, [ebx + PARTICLE.x]
    
Post 29 Aug 2011, 17:19
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.