comparison engine/core/video/image.h @ 239:3804348fe3fb

Removed some weird stubs. Correctly set resource location. Note that the resource location on the ResourceClass seems to be of questionable utility anyway.
author phoku@33b003aa-7bff-0310-803a-e67f0ece8222
date Tue, 24 Mar 2009 16:32:08 +0000
parents 90005975cdbb
children ad1f09d954f9
comparison
equal deleted inserted replaced
238:d76169461729 239:3804348fe3fb
129 * @param width Width of the image. 129 * @param width Width of the image.
130 * @param height Height of the image. 130 * @param height Height of the image.
131 */ 131 */
132 Image(const uint8_t* data, unsigned int width, unsigned int height); 132 Image(const uint8_t* data, unsigned int width, unsigned int height);
133 133
134 //TODO: fill in these stub! Note that m_location is not properly initialized.
135 virtual const ResourceLocation& getResourceLocation() { return m_location; }
136
137 virtual void setResourceLocation(const ResourceLocation& location) { }
138 virtual void setResourceFile(const std::string& filename) { }
139
140 /** Renders itself to the Destination surface at the rectangle rect. 134 /** Renders itself to the Destination surface at the rectangle rect.
141 * 135 *
142 * @param rect The position and clipping where to draw this image to. 136 * @param rect The position and clipping where to draw this image to.
143 * @param target Target surface to draw to, e.g. main screen or other image 137 * @param target Target surface to draw to, e.g. main screen or other image
144 * @param alpha The alpha value, with which to draw self. opaque by default. 138 * @param alpha The alpha value, with which to draw self. opaque by default.
186 virtual void saveAsPng(const std::string& filename, SDL_Surface& surface); 180 virtual void saveAsPng(const std::string& filename, SDL_Surface& surface);
187 /** Clears any possible clip areas 181 /** Clears any possible clip areas
188 * @see pushClipArea 182 * @see pushClipArea
189 */ 183 */
190 virtual void clearClipArea(); 184 virtual void clearClipArea();
191
192 ResourceLocation m_location;
193 185
194 // The SDL Surface used. 186 // The SDL Surface used.
195 SDL_Surface* m_surface; 187 SDL_Surface* m_surface;
196 // The X shift of the Image 188 // The X shift of the Image
197 int m_xshift; 189 int m_xshift;