summaryrefslogtreecommitdiff
path: root/src/map/magic.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2013-02-07 19:38:32 -0800
committerBen Longbons <b.r.longbons@gmail.com>2013-02-07 22:41:23 -0800
commit83b2e0b3ceda907b7186acfcc56c214fc04d9c13 (patch)
treef4dcc8d8b59fd9a633bc2604cc92f0523cc76ee4 /src/map/magic.cpp
parentc67c2b7435a13d7ce17b2075e22dc5c6036f702a (diff)
downloadtmwa-83b2e0b3ceda907b7186acfcc56c214fc04d9c13.tar.gz
tmwa-83b2e0b3ceda907b7186acfcc56c214fc04d9c13.tar.bz2
tmwa-83b2e0b3ceda907b7186acfcc56c214fc04d9c13.tar.xz
tmwa-83b2e0b3ceda907b7186acfcc56c214fc04d9c13.zip
Remove some macros
Diffstat (limited to 'src/map/magic.cpp')
-rw-r--r--src/map/magic.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/map/magic.cpp b/src/map/magic.cpp
index 5e08d30..1377979 100644
--- a/src/map/magic.cpp
+++ b/src/map/magic.cpp
@@ -29,8 +29,6 @@ char *magic_preprocess_message(character_t *character, char *start,
return end + 2; /* step past blank */
}
-#define ISBLANK(c) ((c) == ' ')
-
/* Returns a dynamically allocated copy of `src'.
* `*parameter' may point within that copy or be NULL. */
static
@@ -39,7 +37,7 @@ char *magic_tokenise(char *src, char **parameter)
char *retval = strdup(src);
char *seeker = retval;
- while (*seeker && !ISBLANK(*seeker))
+ while (*seeker && *seeker != ' ')
++seeker;
if (!*seeker)
@@ -49,7 +47,7 @@ char *magic_tokenise(char *src, char **parameter)
*seeker = 0; /* Terminate invocation */
++seeker;
- while (ISBLANK(*seeker))
+ while (*seeker == ' ')
++seeker;
*parameter = seeker;
@@ -91,7 +89,7 @@ int magic_message(character_t *caster, char *spell_, size_t)
spell_create_env(&magic_conf, spell, caster, power, parameter);
effect_set_t *effects;
- if (bool(spell->flags & SPELL_FLAG_NONMAGIC) || (power >= 1))
+ if (bool(spell->flags & SPELL_FLAG::NONMAGIC) || (power >= 1))
effects = spell_trigger(spell, caster, env, &near_miss);
else
effects = NULL;
@@ -113,7 +111,7 @@ int magic_message(character_t *caster, char *spell_, size_t)
spell_bind(caster, invocation);
spell_execute(invocation);
- return bool(spell->flags & SPELL_FLAG_SILENT) ? -1 : 1;
+ return bool(spell->flags & SPELL_FLAG::SILENT) ? -1 : 1;
}
else
magic_free_env(env);