08.11.2012 Views

Designing Games with Game Maker - YoYo Games

Designing Games with Game Maker - YoYo Games

Designing Games with Game Maker - YoYo Games

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

pr_trianglefan.<br />

d3d_model_vertex(ind,x,y,z) Add vertex (x,y,z) to the model.<br />

d3d_model_vertex_color(ind,x,y,z,col,alpha) Add vertex (x,y,z) to<br />

the model, <strong>with</strong> its own color and alpha value.<br />

d3d_model_vertex_texture(ind,x,y,z,xtex,ytex) Add vertex (x,y,z)<br />

to the model <strong>with</strong> position (xtex,ytex) in the texture.<br />

d3d_model_vertex_texture_color(ind,x,y,z,xtex,ytex,col,alph<br />

a) Add vertex (x,y,z) to the model <strong>with</strong> texture and color values.<br />

d3d_model_vertex_normal(ind,x,y,z,nx,ny,nz) Add vertex (x,y,z) to<br />

the model, <strong>with</strong> normal vector (nx,ny,nz).<br />

d3d_model_vertex_normal_color(ind,x,y,z,nx,ny,nz,col,alpha)<br />

Add vertex (x,y,z) to the model, <strong>with</strong> normal vector (nx,ny,nz), and <strong>with</strong> its<br />

own color and alpha value.<br />

d3d_model_vertex_normal_texture(ind,x,y,z,nx,ny,nz,xtex,yte<br />

x) Add vertex (x,y,z) to the model, <strong>with</strong> normal vector (nx,ny,nz), <strong>with</strong><br />

texture position.<br />

d3d_model_vertex_normal_texture_color(ind,x,y,z,nx,ny,nz,xt<br />

ex,ytex,col,alpha) Add vertex (x,y,z) to the model, <strong>with</strong> normal vector<br />

(nx,ny,nz), <strong>with</strong> texture and color values.<br />

d3d_model_primitive_end(ind) End the description of the primitive in<br />

the model.<br />

Besides primitives you can also add basic shapes to the models. Again the functions look<br />

almost the same but <strong>with</strong> a model index and <strong>with</strong>out texture information:<br />

d3d_model_block(ind,x1,y1,z1,x2,y2,z2,hrepeat,vrepeat) Adds a<br />

block shape to the model.<br />

d3d_model_cylinder(ind,x1,y1,z1,x2,y2,z2,hrepeat,vrepeat,cl<br />

osed,steps) Adds a cylinder shape to the model.<br />

d3d_model_cone(ind,x1,y1,z1,x2,y2,z2,hrepeat,vrepeat,closed<br />

,steps) Adds a cone shape to the model.<br />

d3d_model_ellipsoid(ind,x1,y1,z1,x2,y2,z2,hrepeat,vrepeat,s<br />

teps) Adds a ellipsoid shape to the model.<br />

d3d_model_wall(ind,x1,y1,z1,x2,y2,z2,hrepeat,vrepeat) Adds a<br />

wall shape to the model.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!