diff --git a/PixelBuffer.cpp b/PixelBuffer.cpp index d1696e678b6e11197d1872bcca3aa1a898ebe28e..3348a7bc85e5b89267f04b248e6455603e2120af 100644 --- a/PixelBuffer.cpp +++ b/PixelBuffer.cpp @@ -10,7 +10,7 @@ Color PixelBuffer::peek(PixelPoint const& pos) const if(pos.x < 0 || pos.x >= w() || pos.y < 0 || pos.y >= h()) { return _t; } - return peekUnchecked(pos); + return peek_unchecked(pos); } PixelIterator PixelBuffer::begin() const @@ -32,7 +32,7 @@ DynamicPixelBuffer::DynamicPixelBuffer(int w, int h) { } -Color DynamicPixelBuffer::peekUnchecked(PixelPoint const &pos) const +Color DynamicPixelBuffer::peek_unchecked(PixelPoint const &pos) const { return buffer[(pos.y * w()) + pos.x]; }; diff --git a/PixelBuffer.hpp b/PixelBuffer.hpp index 55d73d3bba814b7851baa0e3ea23b7638da204bd..ecc2ef81a968cba788d72b55ef47730187dfab2a 100644 --- a/PixelBuffer.hpp +++ b/PixelBuffer.hpp @@ -73,7 +73,7 @@ protected: // Safe version of peek(), implemented by derived classes. [pos] is // guaranteed to be ≥ (0, 0) and < (width, height). - virtual Color peekUnchecked(PixelPoint const &pos) const = 0; + virtual Color peek_unchecked(PixelPoint const &pos) const = 0; public: int const w() const { return width; } @@ -104,7 +104,7 @@ public: } PixelPoint const& pos() const { return position; } - Color peek() const { return buffer->peekUnchecked(position); } + Color peek() const { return buffer->peek_unchecked(position); } void operator ++() { position.x++; @@ -139,7 +139,7 @@ public: : PixelBuffer(W, H), buffer(filter_null_terminators(chars)) { } - Color peekUnchecked(PixelPoint const &pos) const { + Color peek_unchecked(PixelPoint const &pos) const { return buffer[pos.y][pos.x]; }; @@ -185,7 +185,7 @@ class DynamicPixelBuffer : public PixelBuffer { public: DynamicPixelBuffer(int w, int h); - Color peekUnchecked(PixelPoint const &pos) const; + Color peek_unchecked(PixelPoint const &pos) const; // Returns [trap] if [pos] is outside the buffer boundaries. Color& at(PixelPoint const &pos); void clear(Color ch = {}); diff --git a/PixelShaders.cpp b/PixelShaders.cpp index 376ec5e68630a9ce9abef6eeeea324296450fd91..a5c1f33786ed2332c66566a5f46ad28a45ad440f 100644 --- a/PixelShaders.cpp +++ b/PixelShaders.cpp @@ -15,7 +15,7 @@ public: } } rng; -Color HitShader::peekUnchecked(PixelPoint const &pos) const +Color HitShader::peek_unchecked(PixelPoint const &pos) const { auto dist = std::uniform_real_distribution<float>{ percent }; auto src = input.peek(pos); @@ -25,7 +25,7 @@ Color HitShader::peekUnchecked(PixelPoint const &pos) const return (dist(rng.rng) > 0.95f) ? color : (is_final ? _t : src); } -Color DiagonalFadeoutShader::peekUnchecked(PixelPoint const &pos) const +Color DiagonalFadeoutShader::peek_unchecked(PixelPoint const &pos) const { // (percent * 1) would only correspond to the top-left triangle. auto src = input.peek(pos); diff --git a/PixelShaders.hpp b/PixelShaders.hpp index bb20dc2de2823d08007dec4422d3ed3790644126..a94aa90ecbc22346f22517307974791cf7bfca34 100644 --- a/PixelShaders.hpp +++ b/PixelShaders.hpp @@ -18,7 +18,7 @@ public: is_final(is_final) { } - virtual Color peekUnchecked(PixelPoint const &pos) const; + virtual Color peek_unchecked(PixelPoint const &pos) const; }; class DiagonalFadeoutShader : public ShadedPixelBuffer { @@ -29,7 +29,7 @@ public: ShadedPixelBuffer(input), percent(percent) { } - virtual Color peekUnchecked(PixelPoint const &pos) const; + virtual Color peek_unchecked(PixelPoint const &pos) const; }; #endif /* PIXELSHADERS_HPP */ diff --git a/player.cpp b/player.cpp index e142ba6659f484c9eb7c8204e5d4291972bf00ee..72b48f50c1bcc0590818f7a3bf8ba17a528d3d13 100644 --- a/player.cpp +++ b/player.cpp @@ -131,7 +131,7 @@ Player::Shader::Shader(Player const &player) : { } //hoffmanncl72341---------------------------- -Color Player::Shader::peekUnchecked(PixelPoint const &pos) const +Color Player::Shader::peek_unchecked(PixelPoint const &pos) const { auto const &basesprite = [this]() { //hoffmanncl72341---------------------------- diff --git a/player.hpp b/player.hpp index aaa14cdc90ced8353a34e791e360a1121040d7d7..a7235d29a932ba6fc79577413a7591925e5b8f9b 100644 --- a/player.hpp +++ b/player.hpp @@ -17,7 +17,7 @@ protected: // sprite... class Shader : public PixelBuffer { protected: - virtual Color peekUnchecked(PixelPoint const &pos) const; + virtual Color peek_unchecked(PixelPoint const &pos) const; public: Player const &player;