PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Simple Drawing Routines (Again :) )

Hello,

First off all, thank you so much for all your help! Your Hints are great! I thought about your postings and came to the point to rewrite everything... I will use André LaMothe´s Tricks of the Windows Game Programming Gurus and Tricks of the 3D Game Programming Gurus in Combination with J. Harbours Pocket PC Game Programming. But there are still a Lot of Proiblems *g*. First, where are the f-functions? (fmodf...) I only found fmod. Second, André has a function like this:

Code:

// Precompute first pixel Adress in video buffer
vb_start = vb_start + x0 + y0*lpitch;


Could someone explaint this to me? and how to port this to the PPC?
What is the lpitch component on the PPC is it cbxpitch?

Then he draws the Pixel with
Code:

*vb_start = color;


Can i do the same on a PPC Display, and how?
Then do i need to clip the client area on a PPC?

I know these are many Questions, but i am completly new to PPC Development :oops: (as i mentioned in an earlier post :) ) And everyone started as a noob sometime ago :)

So thanx alot, and hope to hear a lot feedback *g*

Greetz

Oli
Conan · 10 Jun 2004, 05:42 UTC — FMODF - floating point remainder
See the Microsoft link below re: fmodf

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_fmod.asp

As a self-confessdd noon you should learn the power of self-help & look at the supplied docs. You can also search this forum as most everything has been covered before inc. pitch.
joshbu [MSFT] · 10 Jun 2004, 17:52 UTC
A really good place to start might be learning, in detail, about pointers, memory, and addressing. This would likely be covered in a good C book. (Dietel and Dietel maybe?)

Once you have memories nailed, then you can come back to this sort of programming and it will make much more sense.
Pointer Arithmetic is the specific thing you need help on.

vb_start is a pointer (a numeric value that is a memory address).

*vb_start dereferences the pointer. In other words, that evaluates to whatever value is at the memory address that vb_start contains.

Dan East
good read and great ppc programming tutorials by jacco

http://www.bik5.com