Subversion Repositories sssnakesss

Compare Revisions

Ignore whitespace Rev 9 → Rev 10

/src/sssnakesss.cpp
9,6 → 9,8
 
using namespace std;
 
#include "point.hpp"
#include "snake.hpp"
#include "texture.hpp"
#include "sssnakesss.hpp"
 
36,6 → 38,8
initData();
snake = new Snake;
return true;
}
 
128,11 → 132,13
 
void SSSNAKESSS::draw()
{
//drawTexture(textures["thing.png", 0, 0);
//drawTexture(textures["food.png"], 20, 20);
}
 
void SSSNAKESSS::end()
{
delete snake;
SDL_FreeSurface(screen);
SDL_Quit();
}
/src/texture.cpp
11,7 → 11,7
{
loaded = false;
GLenum textureFormat = GL_RGB;
GLenum textureFormat = GL_RGBA;
SDL_Surface *surface = IMG_Load(filename.c_str());
if (surface)
/src/snake.cpp
1,6 → 1,15
#include <vector>
 
using namespace std;
 
#include "point.hpp"
#include "snake.hpp"
 
void snake::nextPoint(point newPoint)
Snake::Snake()
{
}
}
 
void Snake::nextPoint(Point newPoint)
{
points.push_back(newPoint);
}
/src/main.cpp
1,3 → 1,17
#include "SDL/SDL.h"
#include "SDL/SDL_image.h"
#include "SDL/SDL_opengl.h"
 
#include <dirent.h>
#include <iostream>
#include <vector>
#include <map>
 
using namespace std;
 
#include "point.hpp"
#include "snake.hpp"
#include "texture.hpp"
#include "sssnakesss.hpp"
 
int main(int argc, char *argv[])
/src/point.cpp
1,7 → 1,7
#include "point.hpp"
 
point::point(int x, int y)
{
X = x;
Y = y;
}
#include "point.hpp"
 
Point::Point(int x, int y)
{
X = x;
Y = y;
}