diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2016-12-21 21:40:05 -0500 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2016-12-21 21:40:05 -0500 |
commit | ae9ceadaa184f5e9775135ae264c8bbffd4efa9d (patch) | |
tree | 3707642bda2646ede6d4c77f33b9d8a0326b0636 /include/save_util.hpp | |
parent | a44540462145212f7f2cc3ea2690308c58f60358 (diff) | |
parent | fa802f8fbc62910b37002bcdd2f7c110f488e392 (diff) |
Merge branch 'master' of https://github.com/tcsullivan/gamedev
Diffstat (limited to 'include/save_util.hpp')
-rw-r--r-- | include/save_util.hpp | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/include/save_util.hpp b/include/save_util.hpp deleted file mode 100644 index 3d5cf54..0000000 --- a/include/save_util.hpp +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef SAVE_UTIL_H_ -#define SAVE_UTIL_H_ - -/* - * Save macros. - */ - -#define E_SAVE_COORDS { xmle->SetAttribute("x", loc.x); xmle->SetAttribute("y", loc.y); } - -#define E_SAVE_HEALTH xmle->SetAttribute("health", health); - -/* - * Load macos. - */ - -#define E_LOAD_COORDS(yy) { float n; \ - if (xmle->QueryFloatAttribute("x", &n) == XML_NO_ERROR) \ - spawn(n, yy); \ - else \ - spawn(xmle->FloatAttribute("spawnx"), 100); \ - \ - if (xmle->QueryFloatAttribute("y", &n) == XML_NO_ERROR) \ - loc.y = n; } - -#define E_LOAD_HEALTH { float n; \ - \ - if (xmle->QueryFloatAttribute("maxHealth", &n) != XML_NO_ERROR) \ - maxHealth = 1; \ - \ - if (xmle->QueryFloatAttribute("health", &n) == XML_NO_ERROR) \ - health = n; \ - else \ - health = maxHealth; } - - -#endif // SAVE_UTIL_H_ |