diff --git a/demo3.cpp b/demo3.cpp index fa57895..24a08a1 100644 --- a/demo3.cpp +++ b/demo3.cpp @@ -38,179 +38,93 @@ const int8_t heightProfile[] = { const unsigned char imageBackground[] = { 55, 44 // width, height - ,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xff,0xff - ,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b - ,0x3b,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14 - ,0x14,0x14,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2 - ,0xd2,0xff,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b - ,0x3b,0x3b,0x3b,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14 - ,0x14,0x14,0x14,0x14,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2 - ,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0x3b,0x3b,0x3b,0x3b,0x3b - ,0x3b,0x3b,0x3b,0x3b,0x3b,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14 - ,0x14,0x14,0x14,0x14,0x14,0x14,0xd2,0xd2,0xd2,0xd2,0xd2,0xff,0xff,0xd2 - ,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0x3b,0x3b,0x3b - ,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x14,0x14,0x14,0x14,0x14,0x14,0x14 - ,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0xd2,0xd2,0xd2,0xd2,0xff,0xff - ,0xff,0xff,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0x3b,0x3b - ,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x14,0x14,0x14,0x14 - ,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0xd2,0xd2,0xd2,0xd2 - ,0xff,0xff,0xff,0xff,0xff,0xff,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2 - ,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x14,0x14 - ,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0xd2,0xd2 - ,0xd2,0xd2,0xff,0xff,0xff,0xff,0xff,0xff,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2 - ,0xd2,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b - ,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14 - ,0xd2,0xd2,0xd2,0xd2,0xff,0xff,0xff,0xff,0xff,0xff,0xd2,0xd2,0xd2,0xd2 - ,0xd2,0xd2,0xd2,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b - ,0x3b,0x3b,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14 - ,0x14,0x14,0xd2,0xd2,0xd2,0xd2,0xff,0xff,0xff,0xff,0xff,0xff,0xd2,0xd2 - ,0xd2,0xd2,0xd2,0xd2,0xd2,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b - ,0x3b,0x3b,0x3b,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14 - ,0x14,0x14,0x14,0x14,0xd2,0xd2,0xd2,0xd2,0xd2,0xff,0xff,0xff,0xff,0xff - ,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b - ,0x3b,0x3b,0x3b,0x3b,0x3b,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14 - ,0x14,0x14,0x14,0x14,0x14,0x14,0xd2,0xd2,0xd2,0xd2,0xd2,0xff,0xff,0xff - ,0xff,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0x3b,0x3b,0x3b,0x3b - ,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x14,0x14,0x14,0x14,0x14,0x14,0x14 - ,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0xd2,0xd2,0xd2,0xd2,0xd2,0xff - ,0xff,0xff,0xff,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0x3b,0x3b - ,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x14,0x14,0x14,0x14,0x14 - ,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0xd2,0xd2,0xd2,0xd2 - ,0xff,0xff,0xff,0xff,0xff,0xff,0xd2,0xd2,0xff,0xd2,0xd2,0xd2,0xd2,0xd2 - ,0xd2,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x14,0x14,0x14,0x14 - ,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0xd2,0xd2 - ,0xd2,0xd2,0xff,0xff,0xff,0xff,0xff,0xff,0xd2,0xd2,0xff,0xd2,0xd2,0xd2 - ,0xd2,0xd2,0xd2,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x14,0x14 - ,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14 - ,0xd2,0xd2,0xd2,0xd2,0xd2,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xd2 - ,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b - ,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14 - ,0x14,0x14,0xd2,0xd2,0xd2,0xd2,0xd2,0xff,0xff,0xff,0xff,0xff,0xff,0xff - ,0xff,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b - ,0x3b,0x3b,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14 - ,0x14,0x14,0x14,0x14,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xff,0xd2,0xff,0xff - ,0xff,0xff,0xff,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0x3b,0x3b,0x3b - ,0x3b,0x3b,0x3b,0x3b,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14 - ,0x14,0x14,0x14,0x14,0x14,0x14,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2 - ,0xd2,0xff,0xff,0xff,0xff,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0x3b - ,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x14,0x14,0x14,0x14,0x14,0x14,0x14 - ,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2 - ,0xd2,0xd2,0xd2,0xff,0xff,0xff,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2 - ,0xd2,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x14,0x14,0x14,0x14,0x14 - ,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0xd2,0xd2,0xd2,0xd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3b,0x3b,0x3b,0x14,0x14 - ,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0xff,0xff - ,0xff,0xff,0xff,0xff,0xff,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2 - ,0xd2,0xd2,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b - ,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14 - ,0xff,0xd2,0xff,0xff,0xff,0xff,0xff,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2 - ,0xd2,0xd2,0xd2,0xd2,0xd2,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b - ,0x3b,0x3b,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14 - ,0x14,0x14,0xff,0xd2,0xff,0xff,0xff,0xff,0xff,0xd2,0xd2,0xd2,0xd2,0xd2 - ,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b - ,0x3b,0x3b,0x3b,0x3b,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14 - ,0x14,0x14,0x14,0x14,0xff,0xd2,0xff,0xff,0xd2,0xff,0xff,0xd2,0xd2,0xd2 - ,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0x3b,0x3b,0x3b,0x3b,0x3b - ,0x3b,0x3b,0x3b,0x3b,0x3b,0x3b,0x14,0x14,0x14,0x14,0x14,0x14,0x14,0x14 - ,0x14,0x14,0x14,0x14,0x14,0x14,0xff,0xd2,0xff,0xff,0xd2,0xff,0xff,0xd2 - ,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0x3b,0x3b - ,0x3b,0x3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0xdb,0xdb,0xdb,0xff + ,0xff,0xff,0xd2,0xd2,0xd2,0xd2,0x69,0x3b,0x3b,0x3b,0xdb,0xdb,0xdb,0xdb + ,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xff,0xff,0xff,0xd2,0xd2,0xd2,0xd2 + ,0xd2,0x3b,0x3b,0x3b,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb + ,0xdb,0xdb,0xff,0xff,0xd2,0xd2,0xd2,0xd2,0xd2,0x69,0x3b,0x3b,0xdb,0xdb + ,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xff,0xff,0xd2,0xd2 + ,0xd2,0xd2,0xd2,0xd2,0x3b,0x3b }; Unit floorHeightAt(int16_t x, int16_t y) @@ -228,25 +142,29 @@ uint16_t backgroundColumn = 0; */ inline void pixelFunc(PixelInfo pixel) { - uint8_t c; + uint8_t c = 0; int16_t intensity = 0; if (pixel.isWall) { c = 50; - intensity = pixel.hit.direction % 2 == 0 ? 2 : 0; + + intensity = pixel.depth / (UNITS_PER_SQUARE * 3); + intensity += pixel.hit.direction % 2 == 0 ? 2 : 0; } - else if (pixel.isFloor && !pixel.isHorizon) + else if (pixel.isFloor) { c = floorColor; - intensity = pixel.depth / (UNITS_PER_SQUARE * 3); + + if (!pixel.isHorizon) + intensity = pixel.depth / (UNITS_PER_SQUARE * 3); } else { if (previousColumn == pixel.position.x) { - c = imageBackground[2 + backgroundColumn * 44 + pixel.position.y / 2]; + c = imageBackground[2 + backgroundColumn * 22 + min(pixel.position.y,43) / 2]; } else { @@ -274,7 +192,7 @@ void draw() RayConstraints c; c.maxHits = 6; - c.maxSteps = 12; + c.maxSteps = 20; c.computeTextureCoords = 0; render(player.mCamera,floorHeightAt,0,0,pixelFunc,c);