projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Using a reset point no longer marks statistics as invalid.
[supertux.git]
/
src
/
video
/
drawing_context.cpp
diff --git
a/src/video/drawing_context.cpp
b/src/video/drawing_context.cpp
index
5814c04
..
0b56308
100644
(file)
--- a/
src/video/drawing_context.cpp
+++ b/
src/video/drawing_context.cpp
@@
-14,11
+14,12
@@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
+#include "video/drawing_context.hpp"
+
#include <algorithm>
#include <config.h>
#include <algorithm>
#include <config.h>
-#include "video/drawing_context.hpp"
-
+#include "math/sizef.hpp"
#include "supertux/gameconfig.hpp"
#include "supertux/globals.hpp"
#include "util/obstackpp.hpp"
#include "supertux/gameconfig.hpp"
#include "supertux/globals.hpp"
#include "util/obstackpp.hpp"
@@
-30,15
+31,6
@@
#include "video/texture_manager.hpp"
#include "video/video_systems.hpp"
#include "video/texture_manager.hpp"
#include "video/video_systems.hpp"
-static inline int next_po2(int val)
-{
- int result = 1;
- while(result < val)
- result *= 2;
-
- return result;
-}
-
DrawingContext::DrawingContext() :
renderer(0),
lightmap(0),
DrawingContext::DrawingContext() :
renderer(0),
lightmap(0),
@@
-283,6
+275,14
@@
DrawingContext::draw_inverse_ellipse(const Vector& pos, const Vector& size, cons
requests->push_back(request);
}
requests->push_back(request);
}
+Rectf
+DrawingContext::get_cliprect() const
+{
+ return Rectf(get_translation().x, get_translation().y,
+ get_translation().x + SCREEN_WIDTH,
+ get_translation().y + SCREEN_HEIGHT);
+}
+
void
DrawingContext::get_light(const Vector& position, Color* color)
{
void
DrawingContext::get_light(const Vector& position, Color* color)
{