From 6932c836cfb5f02565feb4700f42633ed5c84d68 Mon Sep 17 00:00:00 2001 From: Vicent Marti Date: Mon, 16 Jun 2008 23:38:21 +0000 Subject: Added massive parser documentation. Some parser changes. svn-id: r32726 --- graphics/VectorRenderer.cpp | 14 +++++++------- graphics/VectorRenderer.h | 20 +++++++++++--------- 2 files changed, 18 insertions(+), 16 deletions(-) (limited to 'graphics') diff --git a/graphics/VectorRenderer.cpp b/graphics/VectorRenderer.cpp index abfd53edcd..0194231427 100644 --- a/graphics/VectorRenderer.cpp +++ b/graphics/VectorRenderer.cpp @@ -54,19 +54,19 @@ VectorRenderer *createRenderer(int mode) { void VectorRenderer::drawStep(const Common::Rect &area, const DrawStep &step) { if (step.flags & DrawStep::kStepCallbackOnly) { - (this->*(step.drawing_call))(area, step); + (this->*(step.drawingCall))(area, step); return; } if (step.flags & DrawStep::kStepSetBG) - setBgColor(step.color2.r, step.color2.g, step.color2.b); + setBgColor(step.bgColor.r, step.bgColor.g, step.bgColor.b); if (step.flags & DrawStep::kStepSetFG) - setFgColor(step.color1.r, step.color1.g, step.color1.b); + setFgColor(step.fgColor.r, step.fgColor.g, step.fgColor.b); if (step.flags & DrawStep::kStepSetGradient) - setGradientColors(step.color1.r, step.color1.g, step.color1.b, - step.color2.r, step.color2.g, step.color2.b); + setGradientColors(step.gradColor1.r, step.gradColor1.g, step.gradColor1.b, + step.gradColor2.r, step.gradColor2.g, step.gradColor2.b); if (step.flags & DrawStep::kStepSetShadow) shadowEnable(step.shadow); @@ -78,12 +78,12 @@ void VectorRenderer::drawStep(const Common::Rect &area, const DrawStep &step) { setStrokeWidth(step.stroke); if (step.flags & DrawStep::kStepSetFillMode) - setFillMode((FillMode)step.fill_mode); + setFillMode((FillMode)step.fillMode); if (step.flags & DrawStep::kStepSettingsOnly) return; - (this->*(step.drawing_call))(area, step); + (this->*(step.drawingCall))(area, step); } /******************************************************************** diff --git a/graphics/VectorRenderer.h b/graphics/VectorRenderer.h index 310f32f856..b4c4bb656d 100644 --- a/graphics/VectorRenderer.h +++ b/graphics/VectorRenderer.h @@ -45,10 +45,12 @@ struct DrawStep { struct { uint8 r, g, b; } - color1, /** Foreground color/gradient start */ - color2; /** Background color/gradient end */ + fgColor, /** Foreground color */ + bgColor, /** backgroudn color */ + gradColor1, /** gradient start*/ + gradColor2; /** gradient end */ - bool fill_area; /** If enabled, the draw step occupies the whole drawing area */ + bool fillArea; /** If enabled, the draw step occupies the whole drawing area */ struct { uint16 pos; @@ -60,12 +62,12 @@ struct DrawStep { uint8 shadow, stroke, factor, radius; /** Misc options... */ - uint8 fill_mode; /** active fill mode */ - uint8 extra_data; /** Generic parameter for extra options (orientation/bevel) */ + uint8 fillMode; /** active fill mode */ + uint8 extraData; /** Generic parameter for extra options (orientation/bevel) */ uint32 scale; /** scale of all the coordinates in FIXED POINT with 16 bits mantissa */ - void (VectorRenderer::*drawing_call)(const Common::Rect &, const DrawStep &); /** Pointer to drawing function */ + void (VectorRenderer::*drawingCall)(const Common::Rect &, const DrawStep &); /** Pointer to drawing function */ enum DrawStepFlags { kStepCallbackOnly = (1 << 0), @@ -330,7 +332,7 @@ public: } void stepGetPositions(const DrawStep &step, const Common::Rect &area, uint16 &in_x, uint16 &in_y, uint16 &in_w, uint16 &in_h) { - if (step.fill_area) { + if (step.fillArea) { in_x = area.left; in_y = area.top; in_w = area.width(); @@ -392,13 +394,13 @@ public: void drawCallback_TRIANGLE(const Common::Rect &area, const DrawStep &step) { uint16 x, y, w, h; stepGetPositions(step, area, x, y, w, h); - drawTriangle(x, y, w, h, (TriangleOrientation)step.extra_data); + drawTriangle(x, y, w, h, (TriangleOrientation)step.extraData); } void drawCallback_BEVELSQ(const Common::Rect &area, const DrawStep &step) { uint16 x, y, w, h; stepGetPositions(step, area, x, y, w, h); - drawBeveledSquare(x, y, w, h, step.extra_data); + drawBeveledSquare(x, y, w, h, step.extraData); } /** -- cgit v1.2.3