Solved

How do you load a PCX the Fast Way

Posted on 1997-05-31
2
233 Views
Last Modified: 2010-04-10
I am currently loading a pcx but by doing a byte by byte way and plotting it on the screen then I started using a virtual screen, but still I did not want the long pause of blackness during the loading of the pcx.  

Is there a way to read word by word or even better double word.
0
Comment
Question by:kane020397
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
byang earned 90 total points
ID: 1163781
You can read it line by line. Since you know the width of the image from the header, you know the maximum possible compressed line size, which is 2 times the width assuming no compression is possible.

The fastest way is to read the entire file into a memory buffer in one shot, the write an assembler routine to decode it.
0
 

Author Comment

by:kane020397
ID: 1163782
I was expecting more of a errmmm..... Faster method like the one the use in games such as jazz jack rabbit etc....

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question