flat assembler
Message board for the users of flat assembler.
Index
> Windows > Windows game programming for dummies new Examples |
Author |
|
madmatt 10 Jun 2004, 08:55
Here are the last 3 bmp files for the window's game programming for dummies Chapter 10 examples. Simply drop them into your Chapter 10 folder. (Also forgot to mention to copy the macros.inc file from the fasmlibdll folder into your include folder!)
|
|||
10 Jun 2004, 08:55 |
|
i-don 12 Jun 2004, 12:55
Thanks madmatt, still buggy on 16bit picture view. 8bits and the other working great! Part of the picture turned green in both of 16bits demo. Have no idea why, may be my display card got limitation. Having no problem before on DirectX with 16bits such as game or other apps.
I'll try to get a screenshot of it. i-don. |
|||
12 Jun 2004, 12:55 |
|
Madis731 12 Jun 2004, 18:07
I don't know why you have problems in 16 because my laptop (W2K SP4 / ATI mobility 8MB / DX9b) runs 16 & 32 at the same speed (is 16 compatibility mode?) but 8 is a bit faster. Strange is that while returning from 8bit-mode, desktop remains colourless for a while and automatically REFRESHes everything around (also arranging my icons in folders). 16bit is my desktop mode and no mode switching is neccessary when running 16bit. Strangely enough it doesn't happen on 32bit also^o)
|
|||
12 Jun 2004, 18:07 |
|
i-don 12 Jun 2004, 19:29
No problem on 8bit or 32bit on my pc (win95b|dx7|4mb d3d|32bit desktop|800x600 res). All same speed as yours. Only a color bleeding in 16bits. here is screenshot (reduce to 1/2 size):
I even reduce the color of the image into 16bits (34k colors) and re-open using both demos and again, same bleeding. I use as a texture in a dx game and running 16bit mode, it show no bleeding at all. something like dx scene color and 2d sprite color does not match, I guess. i-don |
|||
12 Jun 2004, 19:29 |
|
madmatt 13 Jun 2004, 02:18
Hello Idon,
Glad to see MOST of the examples work for you! I'm learning a lot converting the c/c++ source to assembly, but sometimes the conversion doesn't come easy! The problem could be your card either doesn't support the 16-bit mode, or is substituting 15-bit mode in place of the 16-bit mode, I assume the latter. The bmp file format only supports 8 and 24bits of color. Therefore the bmp file has to be converted from 24bit to 16bit, which has 5 bits of blue and red, and 6 bits of green. Your card most likely is using 15-bit mode, 5 bits of red,green,blue. Here is something you can try, in DdrawLoadBitmap-16bit.asm, the GameMain procedure, change this code: Code: copypixels: mov bx,0 mov al,[esi+2] shr al,3 mov bl,al shl bx,6 mov al,[esi+1] shr al,2 or bl,al shl bx,5 mov al,[esi] shr al,3 or bl,al mov [edi],bx add edi,2 ;size of 16bit pixel (2 bytes) add esi,3 ;size of 24bit pixel (3 bytes) dec ecx jne copypixels to this: Code: copypixels: mov bx,0 mov al,[esi+2] shr al,3 mov bl,al shl bx,5 mov al,[esi+1] shr al,3 or bl,al shl bx,5 mov al,[esi] shr al,3 or bl,al mov [edi],bx add edi,2 ;size of 16bit pixel (2 bytes) add esi,3 ;size of 24bit pixel (3 bytes) dec ecx jne copypixels Well, hopefully this will solve the problem. I've made the changes to convert the 24bit image to 15bits. You could also make the same changes in the blitbmpimage-16bit.asm , GameInit section. |
|||
13 Jun 2004, 02:18 |
|
i-don 13 Jun 2004, 03:32
kudos madmatt, you're right about using 15bit reading substitute in my display card. Now, it turned alive for 16bits. Just post the results, in-case anything not quite right somewhere in there.
Useful informations for DirectX newbie like me Thanks again, i-don. |
|||
13 Jun 2004, 03:32 |
|
Madis731 18 Jun 2004, 13:53
Hmm, there are a lot of newbies around here:D
I found an interesting link. It's well commented and thorough: http://www.gameprog.it/pub/lang/assembly/direct3d.htm but there's one catch - it is in Italian and I don't know much Italian:P and it's MASM. The latter one isn't hard to convert, but the language can be a problem, because it didn't remind me of English as I've heard:( ...does anyone know Italian?... (Babelfish didn't want to preserve formating so it was impossible to 'read') P.S. You might find direct3d2 and 3d3 which introduce us to matrices, lightning and using FP in ASM! |
|||
18 Jun 2004, 13:53 |
|
pelaillo 18 Jun 2004, 16:23
Very interesting link! I don't know nothing about DirectX so I need to read it before helping you. It is a huge file so it is impossible for me to translate it all, but if you want little slices, I will be glad to do the translation.
|
|||
18 Jun 2004, 16:23 |
|
Madis731 19 Jun 2004, 23:59
Well, no need to translate ALL of it but rather just give us some overview and is it worth to try these examples. I just skimmed through the code and noticed much commented sections, but unfortunately didn't understand much (except international words) so just a short preview/review would be welcome.:$
Thanks, Madis |
|||
19 Jun 2004, 23:59 |
|
madmatt 20 Jun 2004, 01:12
Hello Madis731,
I took a look at this site also and looks very interesting. If you go to his home page you'll see a LOT more too. I sent the guy an email asking if he has an english version. BTW, the next update to the windows game programming examples will be ready in another few days to a week. May have to also find another place to upload the examples, because there are starting to get too large for this site. I'm thinking of Programmers Heaven, so stay tuned! MadMatt |
|||
20 Jun 2004, 01:12 |
|
Madis731 20 Jun 2004, 20:12
It's nice to have progress on topics that I like
Hehe, and I know, they are actually: http://www.gameprog.it/?resource=533 ;the usual stuff Init+Destroy http://www.gameprog.it/?resource=538 ;Lightning & textures http://www.gameprog.it/?resource=829 ;Multitexturing & stuff And I printed the '533' out for a deeper look when I'm on a holiday. On 24th of June we usually light bonfires and sing cum ba ya... or how did it go "Jaanipäev" we call it. This could be translated to John's Day or sth. OK, be back in a week or so...bye 4 now! |
|||
20 Jun 2004, 20:12 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.