Reworked the files before the big cleanup of the code.
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 196 KiB After Width: | Height: | Size: 196 KiB |
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 134 KiB |
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 144 KiB |
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 67 KiB After Width: | Height: | Size: 67 KiB |
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 93 KiB |
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 77 KiB |
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 120 KiB |
Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 115 KiB |
Before Width: | Height: | Size: 132 KiB After Width: | Height: | Size: 132 KiB |
Before Width: | Height: | Size: 140 KiB After Width: | Height: | Size: 140 KiB |
Before Width: | Height: | Size: 405 KiB After Width: | Height: | Size: 405 KiB |
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 97 KiB |
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 124 KiB |
BIN
charset.png
Before Width: | Height: | Size: 3.9 KiB |
33
meson.build
|
@ -5,12 +5,8 @@ catch2 = dependency('catch2-with-main')
|
||||||
fmt = dependency('fmt')
|
fmt = dependency('fmt')
|
||||||
json = dependency('nlohmann_json')
|
json = dependency('nlohmann_json')
|
||||||
sfml = dependency('sfml')
|
sfml = dependency('sfml')
|
||||||
sdl2 = dependency('sdl2')
|
|
||||||
sdl2main = dependency('sdl2main')
|
|
||||||
|
|
||||||
dependencies = [
|
dependencies = [fmt, json, sfml]
|
||||||
fmt, json, sfml
|
|
||||||
]
|
|
||||||
|
|
||||||
executable('runtests', [
|
executable('runtests', [
|
||||||
'dbc.cpp',
|
'dbc.cpp',
|
||||||
|
@ -19,36 +15,9 @@ executable('runtests', [
|
||||||
],
|
],
|
||||||
dependencies: dependencies + [catch2])
|
dependencies: dependencies + [catch2])
|
||||||
|
|
||||||
executable('raycaster', [
|
|
||||||
'dbc.cpp',
|
|
||||||
'matrix.cpp',
|
|
||||||
'raycaster.cpp',
|
|
||||||
],
|
|
||||||
dependencies: dependencies)
|
|
||||||
|
|
||||||
executable('raycaster_pixels', [
|
|
||||||
'dbc.cpp',
|
|
||||||
'matrix.cpp',
|
|
||||||
'raycaster_pixels.cpp',
|
|
||||||
],
|
|
||||||
dependencies: dependencies)
|
|
||||||
|
|
||||||
executable('timcaster', [
|
|
||||||
'./scratchpad/timcaster.cpp',
|
|
||||||
],
|
|
||||||
dependencies: dependencies + [sdl2, sdl2main])
|
|
||||||
|
|
||||||
executable('sfmlcaster', [
|
executable('sfmlcaster', [
|
||||||
'dbc.cpp',
|
'dbc.cpp',
|
||||||
'matrix.cpp',
|
'matrix.cpp',
|
||||||
'sfmlcaster.cpp',
|
'sfmlcaster.cpp',
|
||||||
],
|
],
|
||||||
dependencies: dependencies)
|
dependencies: dependencies)
|
||||||
|
|
||||||
executable('fenstercaster', [
|
|
||||||
'dbc.cpp',
|
|
||||||
'matrix.cpp',
|
|
||||||
'miniaudio.cpp',
|
|
||||||
'fenscaster.cpp'
|
|
||||||
],
|
|
||||||
dependencies: dependencies)
|
|
||||||
|
|
|
@ -135,14 +135,14 @@ int main(int /*argc*/, char */*argv*/[])
|
||||||
|
|
||||||
//load some textures
|
//load some textures
|
||||||
unsigned long tw, th, error = 0;
|
unsigned long tw, th, error = 0;
|
||||||
error |= loadImage(texture[0], tw, th, "pics/eagle.png");
|
error |= loadImage(texture[0], tw, th, "assets/eagle.png");
|
||||||
error |= loadImage(texture[1], tw, th, "pics/redbrick.png");
|
error |= loadImage(texture[1], tw, th, "assets/redbrick.png");
|
||||||
error |= loadImage(texture[2], tw, th, "pics/purplestone.png");
|
error |= loadImage(texture[2], tw, th, "assets/purplestone.png");
|
||||||
error |= loadImage(texture[3], tw, th, "pics/greystone.png");
|
error |= loadImage(texture[3], tw, th, "assets/greystone.png");
|
||||||
error |= loadImage(texture[4], tw, th, "pics/bluestone.png");
|
error |= loadImage(texture[4], tw, th, "assets/bluestone.png");
|
||||||
error |= loadImage(texture[5], tw, th, "pics/mossy.png");
|
error |= loadImage(texture[5], tw, th, "assets/mossy.png");
|
||||||
error |= loadImage(texture[6], tw, th, "pics/wood.png");
|
error |= loadImage(texture[6], tw, th, "assets/wood.png");
|
||||||
error |= loadImage(texture[7], tw, th, "pics/colorstone.png");
|
error |= loadImage(texture[7], tw, th, "assets/colorstone.png");
|
||||||
if(error) { std::cout << "error loading images" << std::endl; return 1; }
|
if(error) { std::cout << "error loading images" << std::endl; return 1; }
|
||||||
|
|
||||||
//load some sprite textures
|
//load some sprite textures
|
||||||
|
|
|
@ -107,14 +107,14 @@ int main(int /*argc*/, char */*argv*/[])
|
||||||
#else
|
#else
|
||||||
//generate some textures
|
//generate some textures
|
||||||
unsigned long tw, th;
|
unsigned long tw, th;
|
||||||
loadImage(texture[0], tw, th, "pics/eagle.png");
|
loadImage(texture[0], tw, th, "assets/eagle.png");
|
||||||
loadImage(texture[1], tw, th, "pics/redbrick.png");
|
loadImage(texture[1], tw, th, "assets/redbrick.png");
|
||||||
loadImage(texture[2], tw, th, "pics/purplestone.png");
|
loadImage(texture[2], tw, th, "assets/purplestone.png");
|
||||||
loadImage(texture[3], tw, th, "pics/greystone.png");
|
loadImage(texture[3], tw, th, "assets/greystone.png");
|
||||||
loadImage(texture[4], tw, th, "pics/bluestone.png");
|
loadImage(texture[4], tw, th, "assets/bluestone.png");
|
||||||
loadImage(texture[5], tw, th, "pics/mossy.png");
|
loadImage(texture[5], tw, th, "assets/mossy.png");
|
||||||
loadImage(texture[6], tw, th, "pics/wood.png");
|
loadImage(texture[6], tw, th, "assets/wood.png");
|
||||||
loadImage(texture[7], tw, th, "pics/colorstone.png");
|
loadImage(texture[7], tw, th, "assets/colorstone.png");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//start the main loop
|
//start the main loop
|
||||||
|
|
|
@ -123,15 +123,15 @@ void load_textures() {
|
||||||
texture[i].resize(texWidth * texHeight);
|
texture[i].resize(texWidth * texHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
loadImage(texture[0], "pics/tile16.png");
|
loadImage(texture[0], "assets/tile16.png");
|
||||||
loadImage(texture[1], "pics/tile02.png");
|
loadImage(texture[1], "assets/tile02.png");
|
||||||
loadImage(texture[2], "pics/tile03.png");
|
loadImage(texture[2], "assets/tile03.png");
|
||||||
loadImage(texture[3], "pics/tile32.png");
|
loadImage(texture[3], "assets/tile32.png");
|
||||||
loadImage(texture[4], "pics/tile05.png");
|
loadImage(texture[4], "assets/tile05.png");
|
||||||
loadImage(texture[5], "pics/tile17.png");
|
loadImage(texture[5], "assets/tile17.png");
|
||||||
loadImage(texture[6], "pics/tile10.png");
|
loadImage(texture[6], "assets/tile10.png");
|
||||||
loadImage(texture[7], "pics/tile01.png");
|
loadImage(texture[7], "assets/tile01.png");
|
||||||
loadImage(texture[8], "pics/portal.png");
|
loadImage(texture[8], "assets/portal.png");
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw_sfml_rect(sf::RenderWindow &window, sf::Vector2f pos, sf::Vector2f size, uint8_t color) {
|
void draw_sfml_rect(sf::RenderWindow &window, sf::Vector2f pos, sf::Vector2f size, uint8_t color) {
|
||||||
|
|