I think it''s like this:
FOO *Foo;
...
In c:
a = Foo->Bar;
In assembly:
mov a, FOO PTR [Foo].Bar
Fade to Black in 16 bit color mode
Completely black slowly, or immediately? I suppose slowly, while a fade is slow... If you put all gammas to 0, won''t the screen go black at once?
To make it easier, why not put those two variables (whatever they were called) in two new variables. ptr is the data type the two display pointers are declared as (probably some redefinition of an int). Look in the correct *.h file:
ptr source, dest;
source = lddsrouceblabla...
dest = destination-variable
In the asm-code, replace the two wrong lines:
mov esi, ddsdSource.lpddsprimary
mov edi, ddsdDest.lpddsprimary
with:
mov esi, source
mov edi, dest
BTW, you should learn some asm. It''s really great when you need some high-speed graphics.
To make it easier, why not put those two variables (whatever they were called) in two new variables. ptr is the data type the two display pointers are declared as (probably some redefinition of an int). Look in the correct *.h file:
ptr source, dest;
source = lddsrouceblabla...
dest = destination-variable
In the asm-code, replace the two wrong lines:
mov esi, ddsdSource.lpddsprimary
mov edi, ddsdDest.lpddsprimary
with:
mov esi, source
mov edi, dest
BTW, you should learn some asm. It''s really great when you need some high-speed graphics.
That ASM code is for additive blending not fading to black! Check out my alpha-blending article here on GameDev. To fade a screen to black you are basically alpha-blending you screen with the color (0,0,0). There is sample code in the article written in C++ so it should be easy to follow. If you want ASM it is in there as well.
The article talks about alpha-blending to images not fading to black. There are some speed-ups that you can use when you know one of the images is all black. You should be able to figure it out once you read the article.
Good luck
hebertjo
The article talks about alpha-blending to images not fading to black. There are some speed-ups that you can use when you know one of the images is all black. You should be able to figure it out once you read the article.
Good luck
hebertjo
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement