fix(display) Переместили персонажа вниз экрана
This commit is contained in:
@@ -70,28 +70,28 @@ public class Foxy {
|
|||||||
|
|
||||||
if(inverse){
|
if(inverse){
|
||||||
GL11.glTexCoord2f(current_texture.floatX(frame.x2), current_texture.floatY(frame.y1));
|
GL11.glTexCoord2f(current_texture.floatX(frame.x2), current_texture.floatY(frame.y1));
|
||||||
GL11.glVertex2f(x, 0);
|
GL11.glVertex2f(x, y);
|
||||||
|
|
||||||
GL11.glTexCoord2f(current_texture.floatX(frame.x1), current_texture.floatY(frame.y1));
|
GL11.glTexCoord2f(current_texture.floatX(frame.x1), current_texture.floatY(frame.y1));
|
||||||
GL11.glVertex2f(x + current_texture.getWidthSprite()*K, 0);
|
GL11.glVertex2f(x + current_texture.getWidthSprite()*K, y);
|
||||||
|
|
||||||
GL11.glTexCoord2f(current_texture.floatX(frame.x1), current_texture.floatY(frame.y2));
|
GL11.glTexCoord2f(current_texture.floatX(frame.x1), current_texture.floatY(frame.y2));
|
||||||
GL11.glVertex2f(x + current_texture.getWidthSprite()*K, current_texture.getHeightSprite()*K);
|
GL11.glVertex2f(x + current_texture.getWidthSprite()*K, y + current_texture.getHeightSprite()*K);
|
||||||
|
|
||||||
GL11.glTexCoord2f(current_texture.floatX(frame.x2), current_texture.floatY(frame.y2));
|
GL11.glTexCoord2f(current_texture.floatX(frame.x2), current_texture.floatY(frame.y2));
|
||||||
GL11.glVertex2f(x, current_texture.getHeightSprite()*K);
|
GL11.glVertex2f(x, y + current_texture.getHeightSprite()*K);
|
||||||
} else {
|
} else {
|
||||||
GL11.glTexCoord2f(current_texture.floatX(frame.x1), current_texture.floatY(frame.y1));
|
GL11.glTexCoord2f(current_texture.floatX(frame.x1), current_texture.floatY(frame.y1));
|
||||||
GL11.glVertex2f(x, 0);
|
GL11.glVertex2f(x, y);
|
||||||
|
|
||||||
GL11.glTexCoord2f(current_texture.floatX(frame.x2), current_texture.floatY(frame.y1));
|
GL11.glTexCoord2f(current_texture.floatX(frame.x2), current_texture.floatY(frame.y1));
|
||||||
GL11.glVertex2f(x + current_texture.getWidthSprite()*K, 0);
|
GL11.glVertex2f(x + current_texture.getWidthSprite()*K, y);
|
||||||
|
|
||||||
GL11.glTexCoord2f(current_texture.floatX(frame.x2), current_texture.floatY(frame.y2));
|
GL11.glTexCoord2f(current_texture.floatX(frame.x2), current_texture.floatY(frame.y2));
|
||||||
GL11.glVertex2f(x + current_texture.getWidthSprite()*K, current_texture.getHeightSprite()*K);
|
GL11.glVertex2f(x + current_texture.getWidthSprite()*K, y + current_texture.getHeightSprite()*K);
|
||||||
|
|
||||||
GL11.glTexCoord2f(current_texture.floatX(frame.x1), current_texture.floatY(frame.y2));
|
GL11.glTexCoord2f(current_texture.floatX(frame.x1), current_texture.floatY(frame.y2));
|
||||||
GL11.glVertex2f(x, current_texture.getHeightSprite()*K);
|
GL11.glVertex2f(x, y + current_texture.getHeightSprite()*K);
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glEnd();
|
GL11.glEnd();
|
||||||
|
|||||||
@@ -68,6 +68,7 @@ public class Main {
|
|||||||
init_opengl(width, height);
|
init_opengl(width, height);
|
||||||
|
|
||||||
foxy = new Foxy();
|
foxy = new Foxy();
|
||||||
|
foxy.setY(Display.getHeight() - (34*4));
|
||||||
|
|
||||||
while(!Display.isCloseRequested()){
|
while(!Display.isCloseRequested()){
|
||||||
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
|
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
|
||||||
|
|||||||
Reference in New Issue
Block a user