projects
/
open-adventure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Structurize locatiuon info.
[open-adventure.git]
/
actions.c
diff --git
a/actions.c
b/actions.c
index d8b1546b3a55ea61190a45674fa88702af2edf2a..4a86f019737d8c1fd75c362782e606831adf502e 100644
(file)
--- a/
actions.c
+++ b/
actions.c
@@
-145,10
+145,10
@@
static phase_codes_t attack(command_t command)
DESTROY(OGRE);
int dwarves = 0;
for (int i = 1; i < PIRATE; i++) {
DESTROY(OGRE);
int dwarves = 0;
for (int i = 1; i < PIRATE; i++) {
- if (game.d
loc[i]
== game.loc) {
+ if (game.d
warves[i].loc
== game.loc) {
++dwarves;
++dwarves;
- game.d
loc[i]
= LOC_LONGWEST;
- game.d
seen[i]
= false;
+ game.d
warves[i].loc
= LOC_LONGWEST;
+ game.d
warves[i].seen
= false;
}
}
rspeak((dwarves > 1) ?
}
}
rspeak((dwarves > 1) ?
@@
-303,11
+303,11
@@
static phase_codes_t vcarry(verb_t verb, obj_t obj)
{
if (obj == INTRANSITIVE) {
/* Carry, no object given yet. OK if only one object present. */
{
if (obj == INTRANSITIVE) {
/* Carry, no object given yet. OK if only one object present. */
- if (game.
atloc[game.loc]
== NO_OBJECT ||
- game.link[game.
atloc[game.loc]
] != 0 ||
+ if (game.
locs[game.loc].atloc
== NO_OBJECT ||
+ game.link[game.
locs[game.loc].atloc
] != 0 ||
atdwrf(game.loc) > 0)
return GO_UNKNOWN;
atdwrf(game.loc) > 0)
return GO_UNKNOWN;
- obj = game.
atloc[game.loc]
;
+ obj = game.
locs[game.loc].atloc
;
}
if (TOTING(obj)) {
}
if (TOTING(obj)) {
@@
-1245,8
+1245,8
@@
static phase_codes_t throwit(command_t command)
return throw_support(DWARF_DODGES);
} else {
int i = atdwrf(game.loc);
return throw_support(DWARF_DODGES);
} else {
int i = atdwrf(game.loc);
- game.d
seen[i]
= false;
- game.d
loc[i]
= LOC_NOWHERE;
+ game.d
warves[i].seen
= false;
+ game.d
warves[i].loc
= LOC_NOWHERE;
return throw_support((++game.dkill == 1) ?
DWARF_SMOKE :
KILLED_DWARF);
return throw_support((++game.dkill == 1) ?
DWARF_SMOKE :
KILLED_DWARF);