diff options
| author | Bryce Harrington <b.harrington@samsung.com> | 2014-05-08 10:46:06 -0700 |
|---|---|---|
| committer | Bryce Harrington <b.harrington@samsung.com> | 2014-05-08 18:50:52 -0700 |
| commit | 7ae67f5287f86f2eb38d309b4d0ea5ec4f2e7660 (patch) | |
| tree | 2c265d1ec5f698d51d1fd5ea6dce6da4dab3ca03 /src/shapes.cpp | |
| parent | e4a47f2f5e6a4422c8899cf1858df649f11098ea (diff) | |
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.
Diffstat (limited to 'src/shapes.cpp')
| -rw-r--r-- | src/shapes.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
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 <string.h> + #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++ |