Main Page | Data Structures | File List | Data Fields | Globals

screen/screen.h File Reference

Screen management. More...

#include <jagtypes.h>
#include <op.h>
#include <sprite.h>

Data Structures

struct  screen

Typedefs

typedef long fixp

Functions

screennew_screen ()
void set_simple_screen (depth d, int width, int height, screen *scr, phrase *data)
phrase * alloc_simple_screen (depth d, int width, int height, screen *scr)
phrase * alloc_double_buffered_screens (depth d, int width, int height, screen *scr1, screen *scr2)
phrase * alloc_z_double_buffered_screens (depth d, int width, int height, screen *scr1, screen *scr2)
spritesprite_of_screen (int x, int y, screen *scr)
void clear_screen (screen *dst)


Detailed Description

Screen management.

A "screen" is an additionnal structure that allows to see a part of memory as a frame buffer. It has some private field that are to be used for blitter programming. It also has a logical origin defined by its X coordinate and Y coordinate (screen::x and screen::y) that are to be used by some primitives (for example to define where the left-upper corner of a block is located in the frame).

Finally, it has also a screen::data field which is the address of the graphical data viewed as a frame buffer.

Some facilities are offered to allocate certain kind of frame buffers.


Typedef Documentation

typedef long fixp
 

The type of fixpoint 16.16 integers


Function Documentation

phrase* alloc_double_buffered_screens depth  d,
int  width,
int  height,
screen scr1,
screen scr2
 

Allocate a screen buffer for double buffering. Set the two screens accordingly. It returns the address of the buffer allocated.

Parameters:
d  Depth of the graphical data.
width  Width in pixels of the graphical data. This must be a valid blitter width.
height  Height in pixels of the graphical data.
scr1  Address of the first screen.
scr2  Address of the second screen.

phrase* alloc_simple_screen depth  d,
int  width,
int  height,
screen scr
 

Allocate a screen buffer and set the screen accordingly. It returns the address of the buffer allocated.

Parameters:
d  Depth of the graphical data.
width  Width in pixels of the graphical data. This must be a valid blitter width.
height  Height in pixels of the graphical data.
scr  Address of the screen.

phrase* alloc_z_double_buffered_screens depth  d,
int  width,
int  height,
screen scr1,
screen scr2
 

Allocate a screen buffer for double buffering with Z-buffer. Set the two screens accordingly. It returns the address of the buffer allocated.

Parameters:
d  Depth of the graphical data.
width  Width in pixels of the graphical data. This must be a valid blitter width.
height  Height in pixels of the graphical data.
scr1  Address of the first screen.
scr2  Address of the second screen.

void clear_screen screen dst  ) 
 

Clear the given screen (fill with color 0). For low depth screen (< 8bpp), prefer blitset instead.

Parameters:
dst  Address of the screen

screen* new_screen  ) 
 

Allocate a new screen with malloc.

void set_simple_screen depth  d,
int  width,
int  height,
screen scr,
phrase *  data
 

Initialise a screen.

Parameters:
d  Depth of the graphical data.
width  Width in pixels of the graphical data. This must be a valid blitter width.
height  Height in pixels of the graphical data.
scr  Address of the screen.
data  Address of the graphical data. This must be phrase aligned.

sprite* sprite_of_screen int  x,
int  y,
screen scr
 

Create a sprite corresponding to the given screen. The sprite is not transparent by default.

Parameters:
x  X coordinate of the sprite
y  Y coordinate of the sprite
scr  Address of the screen


Generated on Wed Jan 10 03:11:03 2007 for The Removers Libraries by  doxygen 1.4.4