Samsung BQ4 Series User Manual Page 112

  • Download
  • Add to my manuals
  • Print
  • Page
    / 294
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 111
112
// Si el subsprite se pasa de la textura pasamos a la
siguiente textura vertical
// Calculamos cuantos sprites caben verticalmente
iNumSprVer := Textura[1].iAltoTex div iAltoSub;
// ¿El subsprite se sale de la textura actual?
if (iSubY+1) > iNumSprVer then
begin
if iNumSprVer <> 0 then
begin
// Calculamos en que textura va a caer nuestro
subsprite
iTexAct := iSubY div iNumSprVer+1;
// Calculamos en que subsprite cae dentro de esa
textura
iSubY2 := iSubY mod iNumSprVer;
end
else
begin
iTexAct := 1;
iSubY2 := 0;
end
end
else
iSubY2 := iSubY;
end;
// Dibujamos todas las texturas del sprite (o sólo la
actual)
for i := 1 to iNumTex do
begin
// ¿Hay que imprimir sólo una textura?
if iTexAct > 0 then
// ¿No es esta textura?
if i <> iTexAct then
// Pasamos a la siguiente textura
Continue;
// Calculamos desde donde comienza la textura
rDespX := x+Textura[i].iIncX;
rDespY := y+Textura[i].iIncY;
// Dibujamos todos los triángulos del objeto que
contiene cada sprite
for j := 1 to 2 do
begin
glBindTexture(GL_TEXTURE_2D, Textura[i].ID);
Page view 111
1 2 ... 107 108 109 110 111 112 113 114 115 116 117 ... 293 294

Comments to this Manuals

No comments