De-namespaced a class, to make it less verbose.

This commit is contained in:
Alex Szpakowski
2015-01-24 04:09:56 -04:00
parent e662fbdf80
commit cf60cf89fc
17 changed files with 88 additions and 115 deletions
+1 -1
View File
@@ -185,7 +185,7 @@ private:
Glyph *addGlyph(uint32 glyph);
Glyph *findGlyph(uint32 glyph);
Object::StrongRef<love::font::Rasterizer> rasterizer;
StrongRef<love::font::Rasterizer> rasterizer;
int height;
float lineHeight;
+7 -7
View File
@@ -173,7 +173,7 @@ void Graphics::setViewportSize(int width, int height)
// We want to affect the main screen, not any Canvas that's currently active
// (not that any *should* be active when this is called.)
std::vector<Object::StrongRef<Canvas>> canvases = states.back().canvases;
std::vector<StrongRef<Canvas>> canvases = states.back().canvases;
setCanvas();
// Set the viewport to top-left corner.
@@ -662,7 +662,7 @@ void Graphics::setCanvas(Canvas *canvas)
canvas->startGrab();
std::vector<Object::StrongRef<Canvas>> canvasref;
std::vector<StrongRef<Canvas>> canvasref;
canvasref.push_back(canvas);
std::swap(state.canvases, canvasref);
@@ -680,7 +680,7 @@ void Graphics::setCanvas(const std::vector<Canvas *> &canvases)
auto attachments = std::vector<Canvas *>(canvases.begin() + 1, canvases.end());
canvases[0]->startGrab(attachments);
std::vector<Object::StrongRef<Canvas>> canvasrefs;
std::vector<StrongRef<Canvas>> canvasrefs;
canvasrefs.reserve(canvases.size());
for (Canvas *c : canvases)
@@ -689,12 +689,12 @@ void Graphics::setCanvas(const std::vector<Canvas *> &canvases)
std::swap(state.canvases, canvasrefs);
}
void Graphics::setCanvas(const std::vector<Object::StrongRef<Canvas>> &canvases)
void Graphics::setCanvas(const std::vector<StrongRef<Canvas>> &canvases)
{
std::vector<Canvas *> canvaslist;
canvaslist.reserve(canvases.size());
for (const Object::StrongRef<Canvas> &c : canvases)
for (const StrongRef<Canvas> &c : canvases)
canvaslist.push_back(c.get());
return setCanvas(canvaslist);
@@ -715,7 +715,7 @@ std::vector<Canvas *> Graphics::getCanvas() const
std::vector<Canvas *> canvases;
canvases.reserve(states.back().canvases.size());
for (const Object::StrongRef<Canvas> &c : states.back().canvases)
for (const StrongRef<Canvas> &c : states.back().canvases)
canvases.push_back(c.get());
return canvases;
@@ -1091,7 +1091,7 @@ love::image::ImageData *Graphics::newScreenshot(love::image::Image *image, bool
{
// Temporarily unbind the currently active canvas (glReadPixels reads the
// active framebuffer, not the main one.)
std::vector<Object::StrongRef<Canvas>> canvases = states.back().canvases;
std::vector<StrongRef<Canvas>> canvases = states.back().canvases;
setCanvas();
int w = getWidth();
+4 -4
View File
@@ -207,7 +207,7 @@ public:
void setCanvas(Canvas *canvas);
void setCanvas(const std::vector<Canvas *> &canvases);
void setCanvas(const std::vector<Object::StrongRef<Canvas>> &canvases);
void setCanvas(const std::vector<StrongRef<Canvas>> &canvases);
void setCanvas();
std::vector<Canvas *> getCanvas() const;
@@ -458,10 +458,10 @@ private:
bool scissor;
OpenGL::Viewport scissorBox;
Object::StrongRef<Font> font;
Object::StrongRef<Shader> shader;
StrongRef<Font> font;
StrongRef<Shader> shader;
std::vector<Object::StrongRef<Canvas>> canvases;
std::vector<StrongRef<Canvas>> canvases;
ColorMask colorMask;
+2 -2
View File
@@ -158,11 +158,11 @@ private:
// The ImageData from which the texture is created. May be null if
// Compressed image data was used to create the texture.
Object::StrongRef<love::image::ImageData> data;
StrongRef<love::image::ImageData> data;
// Or the Compressed Image Data from which the texture is created. May be
// null if raw ImageData was used to create the texture.
Object::StrongRef<love::image::CompressedData> cdata;
StrongRef<love::image::CompressedData> cdata;
// Real dimensions of the texture, if it was auto-padded to POT size.
int paddedWidth, paddedHeight;
+1 -1
View File
@@ -178,7 +178,7 @@ private:
int range_min;
int range_max;
Object::StrongRef<Texture> texture;
StrongRef<Texture> texture;
// Whether the per-vertex colors are used when drawing.
bool colors_enabled;
@@ -739,7 +739,7 @@ std::vector<Quad *> ParticleSystem::getQuads() const
std::vector<Quad *> quadlist;
quadlist.reserve(quads.size());
for (const Object::StrongRef<Quad> &q : quads)
for (const StrongRef<Quad> &q : quads)
quadlist.push_back(q.get());
return quadlist;
+2 -2
View File
@@ -576,7 +576,7 @@ protected:
Vertex *particleVerts;
// The texture to be drawn.
Object::StrongRef<Texture> texture;
StrongRef<Texture> texture;
// Whether the particle emitter is active.
bool active;
@@ -656,7 +656,7 @@ protected:
std::vector<Colorf> colors;
// Quads.
std::vector<Object::StrongRef<Quad>> quads;
std::vector<StrongRef<Quad>> quads;
bool relativeRotation;
+1 -1
View File
@@ -124,7 +124,7 @@ private:
*/
void setColorv(Vertex *v, const Color &color);
Object::StrongRef<Texture> texture;
StrongRef<Texture> texture;
// Max number of sprites in the batch.
int size;