summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2018-03-15 21:44:26 +1100
committer Vas Crabb <vas@vastheman.com>2018-03-15 21:44:26 +1100
commit5d61426a52289643e60afd2c84e35405923995da (patch)
tree7cb64fdea4bef983cb5114bf889c986c89bbddeb
parentfe42c734f0ca9909959d3660185675b88d3e9277 (diff)
fewer lines (nw)
-rw-r--r--src/mame/includes/model1.h61
1 files changed, 15 insertions, 46 deletions
diff --git a/src/mame/includes/model1.h b/src/mame/includes/model1.h
index ba4b0945dc5..9140d66e51a 100644
--- a/src/mame/includes/model1.h
+++ b/src/mame/includes/model1.h
@@ -127,67 +127,36 @@ public:
class quad_t
{
public:
- quad_t() : z(0), col(0) { p[0] = nullptr; p[1] = nullptr; p[2] = nullptr; p[3] = nullptr; }
+ quad_t() { }
quad_t(int ccol, float cz, point_t* p0, point_t* p1, point_t* p2, point_t* p3)
- : z(cz)
+ : p{ p0, p1, p2, p3 }
+ , z(cz)
, col(ccol)
{
- p[0] = p0;
- p[1] = p1;
- p[2] = p2;
- p[3] = p3;
}
int compare(const quad_t* other) const;
- point_t *p[4];
- float z;
- int col;
+ point_t *p[4] = { nullptr, nullptr, nullptr, nullptr };
+ float z = 0;
+ int col = 0;
};
struct lightparam_t
{
- float a;
- float d;
- float s;
- int p;
+ float a = 0;
+ float d = 0;
+ float s = 0;
+ int p = 0;
};
class view_t
{
public:
view_t() {
- xc = 0;
- yc = 0;
- x1 = 0;
- y1 = 0;
- x2 = 0;
- y2 = 0;
- zoomx = 0;
- zoomy = 0;
- viewx = 0;
- viewy = 0;
- a_bottom = 0;
- a_top = 0;
- a_left = 0;
- a_right = 0;
- vxx = 0;
- vyy = 0;
- vzz = 0;
- ayy = 0;
- ayyc = 0;
- ayys = 0;
- for(unsigned int i=0; i != 12; i++)
- translation[i] = 0;
light.x = 0;
light.y = 0;
light.z = 0;
- for(unsigned int i=0; i != 32; i++) {
- lightparams[i].a = 0;
- lightparams[i].d = 0;
- lightparams[i].s = 0;
- lightparams[i].p = 0;
- }
}
void init_translation_matrix();
@@ -207,11 +176,11 @@ public:
void recompute_frustum();
- int xc, yc, x1, y1, x2, y2;
- float zoomx, zoomy, viewx, viewy;
- float a_bottom, a_top, a_left, a_right;
- float vxx, vyy, vzz, ayy, ayyc, ayys;
- float translation[12];
+ int xc = 0, yc = 0, x1 = 0, y1 = 0, x2 = 0, y2 = 0;
+ float zoomx = 0, zoomy = 0, viewx = 0, viewy = 0;
+ float a_bottom = 0, a_top = 0, a_left = 0, a_right = 0;
+ float vxx = 0, vyy = 0, vzz = 0, ayy = 0, ayyc = 0, ayys = 0;
+ float translation[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
glm::vec3 light;
lightparam_t lightparams[32];
};