2,7 → 2,6 |
#include "SDL/SDL_image.h" |
#include "SDL/SDL_opengl.h" |
|
#include <dirent.h> |
#include <iostream> |
#include <vector> |
#include <map> |
102,8 → 101,6 |
checkEvents(); |
update(); |
draw(); |
|
SDL_GL_SwapBuffers(); |
} |
} |
|
128,34 → 125,15 |
|
void SSSNAKESSS::draw() |
{ |
//drawTexture(textures["thing.png", 0, 0); |
} |
|
void SSSNAKESSS::end() |
{ |
SDL_FreeSurface(screen); |
SDL_Quit(); |
} |
|
vector<string> SSSNAKESSS::listDir(string dirName) |
vector<string> SSSNAKESSS::listDir(string dir) |
{ |
vector<string> files; |
vector<string> list; |
|
DIR *dp = opendir(dirName.c_str()); |
if (dp != NULL) |
{ |
dirent *ep; |
while ((ep = readdir(dp))) |
{ |
string n = ep->d_name; |
if (n != "." && n != "..") |
{ |
files.push_back(n); |
} |
} |
|
closedir(dp); |
} |
|
return files; |
return list; |
} |