Site Tools


documentation:development:opera:pf25:ppgfldr:ggsfldr:gpgfldr:6gpgb

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

documentation:development:opera:pf25:ppgfldr:ggsfldr:gpgfldr:6gpgb [2022/10/10 16:53] – created - external edit 127.0.0.1documentation: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 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:**  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?
  
-**A:** Here are two hints for drawing cels quickly:+**A:**  Here are two hints for drawing cels quickly:
  
   * 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:development:opera:pf25:ppgfldr:ggsfldr:gpgfldr:#xref22819|Huge Cels Draw Slowly]]. +//See also://  [[.:6gpgd#huge_cels_draw_slowly|Huge Cels Draw Slowly]].
- +
  
 ===== 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:**  The 3DO system uses the DMA when displaying cels. Can the CPU do other work during that time?
  
-**A:** When the cel engine is running, the CPU can't operate. When the cel engine finishes, the CPU can operate again.+**A:**  When the cel engine is running, the CPU can't operate. When the cel engine finishes, the CPU can operate again.
  
 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:**  I need to determine when a display process starts and be notified when it's finished.
- +
-**A:** A ''%%DisplayScreen()%%'' call returns immediately. The specified screen is displayed after the next vertical blank. +
- +
-A ''%%DrawCels()%%'' call does not return until the cels have been rendered.+
  
 +**A:**  A ''<nowiki>DisplayScreen()</nowiki>''  call returns immediately. The specified screen is displayed after the next vertical blank.
  
 +A ''<nowiki>DrawCels()</nowiki>''  call does not return until the cels have been rendered.
  
 ===== 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's features. None of the text calls takes or returns a CCB.+**Q:**  How do I render text into a cel so that I can take advantage of the cel engine's features. None of the text calls takes or returns a CCB.
  
-**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:**  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.
  
 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 ''%%MakeCCBRelative%%''. +Below is a code snippet. The trick is to use the call ''<nowiki>MakeCCBRelative</nowiki>''.
- +
-''%%%%''+
  
 +''<nowiki></nowiki>''
 <code> <code>
 +
 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->ccb_NextPtr = (CCB*)MakeCCBRelative(&testCelP->ccb_NextPtr, +testCelP->ccb_NextPtr = (CCB*)MakeCCBRelative(&testCelP->ccb_NextPtr,
 nextCelP); nextCelP);
     // be sure to clear this bit!     // be sure to clear this bit!
 ClearFlag(testCelP->ccb_Flags, CCB_NPABS); ClearFlag(testCelP->ccb_Flags, CCB_NPABS);
-The macros MakeCCBRelative and ClearFlag are defined in +The macros MakeCCBRelative and ClearFlag are defined in
 graphics.h. graphics.h.
 +
 </code> </code>
 +
  
documentation/development/opera/pf25/ppgfldr/ggsfldr/gpgfldr/6gpgb.1665435214.txt.gz · Last modified: 2022/10/10 16:53 by 127.0.0.1