The MASM Forum Archive 2004 to 2012
Welcome, Guest. Please login or register.
March 23, 2023, 08:33:28 AM

Login with username, password and session length
Search:     Advanced search
128553 Posts in 15254 Topics by 684 Members
Latest Member: mottt
* Home Help Search Login Register
+  The MASM Forum Archive 2004 to 2012
|-+  General Forums
| |-+  The Campus
| | |-+  Information Needed
« previous next »
Pages: [1] Print
Author Topic: Information Needed  (Read 4486 times)
Dark Schneider
Member
**
Gender: Male
Posts: 45


Always newbie.


Information Needed
« on: February 17, 2005, 07:28:25 AM »

Hello again,

I want to know completely about bitmap and sound.
Where can I find this information?
Does any detailed tutorial exist somewhere?

Please help me, thanks.
« Last Edit: February 17, 2005, 08:01:25 AM by Dark Schneider » Logged
petezl
Member
*****
Gender: Male
Posts: 192



Re: Information Needed
« Reply #1 on: February 17, 2005, 10:17:02 AM »

You are asking too much to expect an answer! Comprehensive information doesn't exist for win32 asm. You have to learn it by searching asm forums, experimenting, studying snippets of code and asking questions. If you are in a hurry then learn a higher level language like C. It still won't teach you everything but will teach you a syntax that's capable of doing most of what you ask.

Peter.
Logged

Cats and women do as they please
Dogs and men should realise it.
fallenhobbit
Guest


Email
Re: Information Needed
« Reply #2 on: February 17, 2005, 10:20:59 AM »

Comprehensive info for c/C++ does exist because most games are written in c/c++ using one of various graphics libraries. Now for the fun trick. Find some C source, get yourself an install of MinGW, and then at the command line run g++ -c-S somefile.cpp
an assembly listing file will be generated. Enjoy.
Logged
pbrennick
Guest


Email
Re: Information Needed
« Reply #3 on: February 17, 2005, 03:42:53 PM »

Way to go fallenhobbit.  And after you have done that, take a look at Donkey's graphics library.  He has put a lot of work into it and works on bettering it all the time.  It is written in GoASM syntax, but that is very similar to masm and is callable from masm.  Also, it is not a bad idea to eventually know how to work with more than one assembler.  Just don't be surprised about what might happen next!

Paul
Logged
Dark Schneider
Member
**
Gender: Male
Posts: 45


Always newbie.


Heh?
« Reply #4 on: February 21, 2005, 05:53:08 AM »

I means the very basic concepts of bit map and sound (e.g. how it works, basic APIs that manupulate it) not that complex graphic libraries.
Thanks for your advice anyway, I will take time to learn it I'm not in a hurry at all.
Logged
petezl
Member
*****
Gender: Male
Posts: 192



Re: Information Needed
« Reply #5 on: February 21, 2005, 09:27:42 AM »

Ok!... , "completely" was a tall order. Basics I can help you with.

The easiest way to use Bitmaps and sound is to load them into a resource.
Code:
4000 BITMAP mybitmap.bmp
5000 WAVE mysound.wav
There are several ways to handle a bitmap in the program, best to start with something like
Code:
.elseif uMsg==WM_INITDIALOG
invoke LoadBitmap, hInstance, 4000
mov hbitmap, eax

.elseif uMsg == WM_PAINT
invoke BeginPaint, hDlg, addr ps
mov hdc, eax
invoke CreateCompatibleDC, NULL
mov hMemDC, eax
invoke SelectObject, hMemDC, hbitmap
invoke GetClientRect, hDlg, addr rect
invoke BitBlt, hdc,0,0, rect.right, rect.bottom, hMemDC,0,0, SRCCOPY
invoke DeleteDC, hMemDC
invoke EndPaint, hDlg,addr ps

For the sound, have a look at the "PlaySound" api call
Code:
invoke PlaySoundA,5000,hInstance,40005h    ; SND_RESOURCE+SND_ASYNC

Peter.



Logged

Cats and women do as they please
Dogs and men should realise it.
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP The MASM Forum Archive 2004 to 2012 | Powered by SMF 1.0.12.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!