From aa0544a73122cd4f18bfcb28e8ddebf348686f5d Mon Sep 17 00:00:00 2001 From: Luke Bratch Date: Thu, 10 Mar 2011 12:55:26 +0000 Subject: Ensure some variables are initialised --- Sprite.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Sprite.cpp') diff --git a/Sprite.cpp b/Sprite.cpp index e920361..373b04e 100644 --- a/Sprite.cpp +++ b/Sprite.cpp @@ -2,6 +2,8 @@ #include "Sprite.h" Sprite::Sprite() { + // Set initial clip to the whole image + clipNo = 0; isVisible = true; } @@ -27,8 +29,6 @@ bool Sprite::visible() { bool Sprite::setImage(std::string path) { image = loadImage(path); - // Set initial clip to the whole image - clipNo = 0; clip[0].x = 0; clip[0].y = 0; clip[0].w = image->w; -- cgit v1.2.3