Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

BeanDog

ASM proc to C++ declaration

This topic is 6669 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a really small .obj file (thanks, CyberBen) that has the compiled MASM code for some blitting routines. It has this proc: DDSysBlit proc destsurface :DWORD sourcesurface : DWORD DestX :DWORD DestY :DWORD SourceRect :RECT DestPitch :DWORD SourcePitch :DWORD bpp :WORD I changed this into this prototype: void DDSysBlit(DWORD destsurface, DWORD sourcesurface, DWORD DestX, DWORD DestY, RECT SourceRect, DWORD DestPitch, DWORD SourcePitch, WORD bpp); This is correct, right? I need this for some .h files... ~BenDilts( void );

Share this post


Link to post
Share on other sites
Advertisement
I haven''t done many asm declarations so I''m not sure. Did you take into acount packing and calling convention? I think cdecl puts the parameters on the stack in reverse order, but stdcall does it the other way around.

Share this post


Link to post
Share on other sites
Wouldn''t it put it in reverse order for me if I put it in as an extern "C" function? I thought that was what that was for. I tried it with and without, but what the heck I''ll try reversing all the params.

Surely someone has done this before?



~BenDilts( void );

President, BDAA.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!