Game programming

Moderators: None (Apply to moderate this forum)
Number of threads: 2047
Number of posts: 5331

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Edit Report
Pelle : bpp conversion Posted by Pelle Lindstrand on 13 Jul 2000 at 2:22 PM
hi veryone,<br>
<br>
I code in C under DOS using the watcom 11.0 compiler. I have a problem with my current project, a 2d shoot'em'up game. I want to support different modes with different bit depths and I'm using a VBE driver to support these modes. Now, to be able to switch between modes while in-game I handle all graphical data as if it were 32bit and then when it's time to show the data I want to convert it from 32bit to the current bit depth (8, 15, 16 or 32). 32 to 8 is a easy but 32 to 15 is a bit tricky. I want to do these conversions really fast because it is valuable FPS at stake here :)<br>
<br>
If this is a good way of doing it, I'll need a temporary buffer to store the converted data that is going to be displayed, what type should this have? void? Because 32bit data needs the type dword (4 bytes, long or 32bit int) or should I store all data as bytes and store it as r,g,b,r,g,b,r,g,...?<br>
<br>
So, how do I convert 32bit data fast to any other bit depth?<br>
<br>
--- pelle<br>



Edit Report
Pelle : updated info Posted by Pelle Lindstrand on 14 Jul 2000 at 11:51 AM
Change of plans people, I think I've found a solution, if I recalculate all data everytime the bpp change and convert it to the new bpp I might get around all problems, is this a good way?<br>
<br>
--- pelle





 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.