Move assets into assets/ directory

master
outfrost 2019-02-01 14:53:34 +01:00
parent beec252f21
commit 41fa7c1142
7 changed files with 5 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

BIN
assets/level01.tga Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

BIN
assets/playercharacter.3ds Normal file

Binary file not shown.

BIN
assets/wall01.3ds Normal file

Binary file not shown.

BIN
assets/wall01side.tga Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 MiB

View File

@ -29,7 +29,7 @@ static const char* replaceFileExtension(const AiString path, const char* ext);
void initLevel() {
const AiScene* sceneData = importScene("out/assets/wall01.3ds");
const AiScene* sceneData = importScene("assets/wall01.3ds");
blockWall01.sceneData = sceneData;
if (sceneData != NULL) {
const unsigned int numTextures = sceneData->mNumMeshes;
@ -49,8 +49,8 @@ void initLevel() {
NULL, NULL, NULL, NULL, NULL, NULL) == AI_SUCCESS) {
const char* textureFile = replaceFileExtension(originalTexturePath, ".tga");
size_t textureFileLength = strlen(textureFile);
char* texturePath = malloc(strlen("out/assets/") + textureFileLength + 1);
strcpy(texturePath, "out/assets/");
char* texturePath = malloc(strlen("assets/") + textureFileLength + 1);
strcpy(texturePath, "assets/");
strncat(texturePath, textureFile, textureFileLength);
TgaImage* textureImage = readTga(texturePath);
if (textureImage == NULL) {
@ -74,7 +74,7 @@ void initLevel() {
glBindTexture(GL_TEXTURE_2D, 0);
}
buildLevelFromImage(readTga("out/assets/level01.tga"));
buildLevelFromImage(readTga("assets/level01.tga"));
}
void buildLevelFromImage(TgaImage* image) {

View File

@ -11,7 +11,7 @@ static AiVector3D playerPos;
void initPlayer() {
playerCharacter.sceneData = importScene("out/assets/playercharacter.3ds");
playerCharacter.sceneData = importScene("assets/playercharacter.3ds");
// TODO import textures
}