Inline ASM with SDL Graphics (Not same as C/C++ coding result) ... :(
Hello, thanks for reading my post. I hope you will be able to offer me some help for my problem. I am programming a 2D engine using SDL, and I am having a small amount of trouble getting ASM to work correctly. Here's the code:
That code will fill the ENTIRE screen white, while:
// ... A bit of code here
push 0xffffff // In SDL this is 'white'
mov edx, DWORD PTR dest1 // 'SDL_Rect dest1;'
mov ecx, DWORD PTR screen // 'SDL_Surface *screen;'
call SDL_FillRect // Calls 'SDL_FillRect(...)' function
add esp, 12
// ... More code here
Will give me what I need. Can you tell me what I am doing wrong?
SDL_FillRect(screen, &dest1, 0xffffff);
Thanks in Advance,
Matt U. :)