From 7ae67f5287f86f2eb38d309b4d0ea5ec4f2e7660 Mon Sep 17 00:00:00 2001 From: Bryce Harrington Date: Thu, 8 May 2014 10:46:06 -0700 Subject: Copy the shape defaults to a local variable Now we don't need to track old values, as our local settings will be discarded when the local variable goes out of scope. --- src/shapes.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/shapes.cpp') diff --git a/src/shapes.cpp b/src/shapes.cpp index 099ef66..6f61d11 100644 --- a/src/shapes.cpp +++ b/src/shapes.cpp @@ -4,6 +4,8 @@ * Use of this source code is governed by the 3-Clause BSD license * specified in the COPYING file included with this source code. */ +#include + #include "shapes.h" int star_points[11][2] = { @@ -20,6 +22,24 @@ int star_points[11][2] = { { 0, 85 } }; +void +shape_init(shapes_t *shape) +{ + memset(shape, 0, sizeof(shape)); +} + +void +shape_copy(const shapes_t *src, shapes_t *dest) +{ + *dest = *src; +} + +void +shape_randomize(shapes_t *shape) +{ + // TODO +} + /* Local Variables: mode:c++ -- cgit v1.3.1-4-g156e