• No se han encontrado resultados

ENTREVISTA DIRIGIDA LA DIRECTORA DE LA ESCUELA DE EDUCACIÓN BÁSICA ELEMENTAL “JOSÉ LUIS TAMAYO” DEL RECINTO EL REAL

3.9.1. ANÁLISIS DE LAS ENCUESTAS DIRIGIDAS A DOCENTES

Draws the surface transparency setting.

draw_surface_part_ext(id,left,top,width,height,x,y,xscale,y

scale,color,alpha)

Draws the indicated

but now with scale factors and a color and transparency setting.

draw_surface_general(id,left,top,width,height,x,y,xscale,ys

cale,rot

indicated part of the surface with its origin at position (x,y) but now with scale factors, a rotation angle, a color for each of the four vertices (top-left, top-right, bottom-right, and bottom-left) alpha transparency val

surface_copy(destination,x,y,source)

Copies the source surface at positio (x,y) in the destination

n surface. (Without any form of blending.)

Note that rmat

difference and next

draw the

Note that you can also create sprites and backgrounds from surfaces. See the section on changing resources for more informatio

Some care

e it

vents. This will cause serious problems with the projection and viewport.

Surfaces do not work correctly with 3D mode. You can use them while not in 3DD mode (by calling d3d_end() e

Surfaces will not be saved when saving a game.

surface_copy_part(destination,x,y,source,xs,ys,ws,hs)

Copies the indicated part of the source surface at position (x,y) in the destination surface. (Without any form of blending.)

there are no functions to copy part of the screen to a surface. (This is impossible due to possible fo s between the screen and the surfaces.) If this is required you must set a surface as render target room. You can then use the surface copying routines to get parts of it.

n.

must be taken when using these functions. In particular please notice the following:

You should never change the drawing target while you are actually drawing on the screen, that is, never us in drawing e

before using them, but once you start 3D mode again the surfaces will be destroyed.

For reasons of speed, the surface is maintained in videomemory only. As a result, you might loose the surfac when e.g. the screen resolution changes or the screensaver pops up.

Tiles

As you should know you can add tiles to rooms. A tile is a part of a background resource. Tiles are just visible images. They do n

Anything that better uses a tile for the

nice graph

You actually have more control over tiles than you might think. You can add them when designing the room but you can also add them during the running of the game. You can change their position, and even scale them or make them partia ransparent. A tile has the following properties:

background

. The background resource from which the tile is taken.

left, top, width, height

. The part of the background that is used.

x,y

. The position of the top left corner of the tile in the room.

ot react to events and they do not generate collisions. As a result, tiles are handled a lot faster than objects. does not need events or collisions can best be done through tiles. Also, often one

ics while a simple object is used to generate the collision events.

lly t

depth

. The depth of the tile. You can choose any depth you like, making tiles appear between object instances.

visible

. Whether the tile is visible.

xscale, yscale

. Each tile can be drawn scaled (default is 1).

blend

. A blending color used when drawing the tile.

ow its id. When you add tiles when creating rooms the id is shown in the information bar at the bottom. There is also a function to find the id of a tile at a particular position.

The w

m with the indicated values (see above for their meaning). The function returns the id

e given id exists.

tile_get_x(id)

Returns the x-position of the tile with the given id.

tile_get_top(id)

Returns the top value of the tile with the given id. he width of the tile with the given id.

tile_get_visible(id)

Returns whether the tile with the given id is visible.

id)

Returns the xscale of the tile with the given id.

id)

Returns the yscale of the tile with the given id.

und(id)

Returns the background of the tile with the given id.

id)

Returns the blending color of the tile with the given id.

id)

Returns the alpha value of the tile with the given id.

id,x,y)

Sets the position of the tile with the given id.

left,right,width,height)

Sets the region of the tile d.

id,background)

Sets the background for the tile with the

alpha

. An alpha value indicating tile transparency. 1 = not transparent, 0 = fully transparent. To change the properties of a particular tile you need to kn

follo ing functions exist that deal with tiles:

tile_add(background,left,top,width,height,x,y,depth)

Adds a new tile to the roo

of the tile that can be used later on.

tile_delete(id)

Deletes the tile with the given id.

tile_exists(id)

Returns whether a tile with th

tile_get_y(id)

Returns the y-position of the tile with the given id.

tile_get_left(id)

Returns the left value of the tile with the given id.