This shows you the differences between two versions of the page.
documentation:development:opera:pf25:ppgfldr:ggsfldr:gpgfldr:6gpgb [2022/10/10 16:53] – created - external edit 127.0.0.1 | documentation:development:opera:pf25:ppgfldr:ggsfldr:gpgfldr:6gpgb [2023/03/27 09:36] (current) – trapexit | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Cels ====== | ====== Cels ====== | ||
- | |||
---- | ---- | ||
- | |||
- | |||
===== Cel Rendering Speed ===== | ===== Cel Rendering Speed ===== | ||
Line 12: | Line 9: | ||
**A:** Several factors influence rendering speed: | **A:** Several factors influence rendering speed: | ||
- | | + | * If the image is scaled 1:1 and not rotated, rendering time should be a function of the size of the image source data and on the amount of screen area the image covers. |
* If the image is scaled down, rendering time can speed up a little, but not significantly. | * If the image is scaled down, rendering time can speed up a little, but not significantly. | ||
* If the image is scaled up, rendering slows down. | * If the image is scaled up, rendering slows down. | ||
Line 24: | Line 21: | ||
A new feature called super clipping helps speed things up when portions of a cel extend beyond the boundaries of the screen. | A new feature called super clipping helps speed things up when portions of a cel extend beyond the boundaries of the screen. | ||
- | **Q:** I am drawing a cel in a variety of shapes and sizes. Are there any guidelines to determine the optimum size (number of pixels) for the original image? | + | **Q: |
- | **A:** Here are two hints for drawing cels quickly: | + | **A: |
* Packed cels with transparency render faster than unpacked cels. | * Packed cels with transparency render faster than unpacked cels. | ||
* Small cels render faster than big ones, even when scaled. | * Small cels render faster than big ones, even when scaled. | ||
- | //See also:// [[:documentation: | + | //See also:// |
- | + | ||
===== CPU and DMA ===== | ===== CPU and DMA ===== | ||
- | **Q:** The 3DO system uses the DMA when displaying cels. Can the CPU do other work during that time? | + | **Q: |
- | **A:** When the cel engine is running, the CPU can't operate. When the cel engine finishes, the CPU can operate again. | + | **A: |
Remember, however, that the cel engine renders graphics much faster than the CPU. | Remember, however, that the cel engine renders graphics much faster than the CPU. | ||
The cel engine pauses for CPU interrupts so that time critical events to maintain the system still function. | The cel engine pauses for CPU interrupts so that time critical events to maintain the system still function. | ||
- | |||
- | |||
===== When Cel-Display Calls Return ===== | ===== When Cel-Display Calls Return ===== | ||
- | **Q:** I need to determine when a display process starts and be notified when it's finished. | + | **Q: |
- | + | ||
- | **A:** A '' | + | |
- | + | ||
- | A '' | + | |
+ | **A: | ||
+ | A ''< | ||
===== Displaying Text as a Cel ===== | ===== Displaying Text as a Cel ===== | ||
- | **Q:** How do I render text into a cel so that I can take advantage of the cel engine' | + | **Q: |
- | **A:** Currently text routines can only render into a bitmap, so you need to have the cel engine extract the text from an off-screen bitmap. | + | **A: |
Make sure the CCB for the extracting cel correctly represents the data in the off-screen bitmap. Pay special attention to the CCB preamble words. | Make sure the CCB for the extracting cel correctly represents the data in the off-screen bitmap. Pay special attention to the CCB preamble words. | ||
- | |||
- | |||
===== Using Relative Addressing with Cels ===== | ===== Using Relative Addressing with Cels ===== | ||
- | Below is a code snippet. The trick is to use the call '' | + | Below is a code snippet. The trick is to use the call '' |
- | + | ||
- | '' | + | |
+ | ''< | ||
< | < | ||
+ | |||
CCB* testCelP; | CCB* testCelP; | ||
CCB* nextCelP; | CCB* nextCelP; | ||
// assign the relative offset to the next cel | // assign the relative offset to the next cel | ||
- | testCelP-> | + | testCelP-> |
nextCelP); | nextCelP); | ||
// be sure to clear this bit! | // be sure to clear this bit! | ||
ClearFlag(testCelP-> | ClearFlag(testCelP-> | ||
- | The macros MakeCCBRelative and ClearFlag are defined in | + | The macros MakeCCBRelative and ClearFlag are defined in |
graphics.h. | graphics.h. | ||
+ | |||
</ | </ | ||
+ | |||