diff options
| author | Michal Idziorek <m.i@gmx.at> | 2017-09-27 13:51:57 +0200 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2017-09-27 13:51:57 +0200 |
| commit | f02aea9a6da1435bffcffd83f5f396eeffdb70d4 (patch) | |
| tree | 464de6c21d16640d2b2bcb2a04e94d82dcbe684c | |
| parent | 215f7d14a708448f2a5a4a96c693f371178f7801 (diff) | |
tuning build system and dirs
| -rw-r--r-- | Makefile | 7 | ||||
| l--------- | android/app/src/main/assets | 1 | ||||
| -rw-r--r-- | main.cpp | 20 |
3 files changed, 15 insertions, 13 deletions
@@ -1,12 +1,13 @@ CPPFLAGS = $(shell sdl2-config --cflags --libs) -CPPFLAGS = -I/Library/Fraemework/SDL2.framework/Headers --std=c++11 -LINKFLAGS = -framework SDL2 --std=c++11 +#MAC-CPPFLAGS = -I/Library/Fraemework/SDL2.framework/Headers --std=c++11 +#MAC-LINKFLAGS = -framework SDL2 --std=c++11 run: game ./game game: World.o main.o PerlinNoise.o - $(CXX) -o $@ $(LINKFLAGS) $^ + $(CXX) -o $@ $(CPPFLAGS) $^ +#MAC $(CXX) -o $@ $(LINKFLAGS) $^ clean: rm -f game diff --git a/android/app/src/main/assets b/android/app/src/main/assets new file mode 120000 index 0000000..e88c345 --- /dev/null +++ b/android/app/src/main/assets @@ -0,0 +1 @@ +../../../../assets/
\ No newline at end of file @@ -129,10 +129,10 @@ void sdl_play_sound() if (first) { - SDL_LoadWAV("music.wav", &wavSpec, &wavBuffer2, &wavLength2); + SDL_LoadWAV("assets/music.wav", &wavSpec, &wavBuffer2, &wavLength2); std::cout << "---music.wav---" << std::endl; show_AudioSpec(&wavSpec); - SDL_LoadWAV("coin.wav", &wavSpec, &wavBuffer, &wavLength); + SDL_LoadWAV("assets/coin.wav", &wavSpec, &wavBuffer, &wavLength); std::cout << "---coin.wav---" << std::endl; show_AudioSpec(&wavSpec); sample=wavLength; @@ -499,14 +499,14 @@ int main(int, char**){ ctx->ren=ctx->sdl_init.second.second; // init Textures - ctx->textures.push_back(sdl_load_texture("guy01.bmp",0,0,255,ctx->ren)); - ctx->textures.push_back(sdl_load_texture("guy02.bmp",0,0,255,ctx->ren)); - ctx->textures.push_back(sdl_load_texture("coin.bmp",255,255,255,ctx->ren)); - ctx->textures.push_back(sdl_load_texture("fonts.bmp",0,0,0,ctx->ren)); - ctx->textures.push_back(sdl_load_texture("earth01.bmp",0,0,0,ctx->ren)); - ctx->textures.push_back(sdl_load_texture("gridder01.bmp",255,255,255,ctx->ren)); - ctx->textures.push_back(sdl_load_texture("gridder02.bmp",255,255,255,ctx->ren)); - ctx->textures.push_back(sdl_load_texture("gridder03.bmp",255,255,255,ctx->ren)); + ctx->textures.push_back(sdl_load_texture("assets/guy01.bmp",0,0,255,ctx->ren)); + ctx->textures.push_back(sdl_load_texture("assets/guy02.bmp",0,0,255,ctx->ren)); + ctx->textures.push_back(sdl_load_texture("assets/coin.bmp",255,255,255,ctx->ren)); + ctx->textures.push_back(sdl_load_texture("assets/fonts.bmp",0,0,0,ctx->ren)); + ctx->textures.push_back(sdl_load_texture("assets/earth01.bmp",0,0,0,ctx->ren)); + ctx->textures.push_back(sdl_load_texture("assets/gridder01.bmp",255,255,255,ctx->ren)); + ctx->textures.push_back(sdl_load_texture("assets/gridder02.bmp",255,255,255,ctx->ren)); + ctx->textures.push_back(sdl_load_texture("assets/gridder03.bmp",255,255,255,ctx->ren)); // PERLIN GENEARTED MAP #ifndef __EMSCRIPTEN__ ctx->textures.push_back(SDL_CreateTexture(ctx->ren, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, 1024, 768)); |
