GM Commands eingebaut. mal gucken ob das klappt

This commit is contained in:
Enno Rehling 2001-01-30 20:26:06 +00:00
parent 5eeacb9fd6
commit f0fb8d42dd
17 changed files with 51 additions and 16 deletions

View File

@ -135,7 +135,7 @@ publish-debug:: subdirs-debug
publish-release:: subdirs-release publish-release:: subdirs-release
publish-profile:: subdirs-profile publish-profile:: subdirs-profile
publish-debug publish-release publish-profile:: $(BUILD_DIR)/$(LIBRARY) $(BUILD_DIR)/$(BINARY) publish-debug publish-release publish-profile:: $(PUBLISH_DIR)/$(LIBRARY) $(PUBLISH_DIR)/$(BINARY)
clean:: $(BUILD_DIR) $(PUBLISH_DIR) clean:: $(BUILD_DIR) $(PUBLISH_DIR)
rm -fr Release-$(ARCHITECTURE)/* Debug-$(ARCHITECTURE)/* Profile-$(ARCHITECTURE)/* rm -fr Release-$(ARCHITECTURE)/* Debug-$(ARCHITECTURE)/* Profile-$(ARCHITECTURE)/*

View File

@ -17,6 +17,9 @@ $(BUILD_DIR)/$(LIBRARY):: $(BUILD_DIR) $(OBJECTS)
$(AR) $(ARFLAGS) $@ $(OBJECTS) $(AR) $(ARFLAGS) $@ $(OBJECTS)
$(INSTALL) $@ $(PUBLISH_DIR)/ $(INSTALL) $@ $(PUBLISH_DIR)/
$(PUBLISH_DIR)/$(LIBRARY): $(BUILD_DIR)/$(LIBRARY)
$(INSTALL) $< $@
# executable: # executable:
#$(BUILD_DIR)/$(BINARY):: $(OBJECTS) #$(BUILD_DIR)/$(BINARY):: $(OBJECTS)
# $(LD) $(LDFLAGS) -o $@ $(OBJECTS) # $(LD) $(LDFLAGS) -o $@ $(OBJECTS)

View File

@ -18,6 +18,9 @@ $(BUILD_DIR)/$(LIBRARY):: $(BUILD_DIR) $(OBJECTS)
$(AR) $(ARFLAGS) $@ $(OBJECTS) $(AR) $(ARFLAGS) $@ $(OBJECTS)
$(INSTALL) $@ $(PUBLISH_DIR)/ $(INSTALL) $@ $(PUBLISH_DIR)/
$(PUBLISH_DIR)/$(LIBRARY): $(BUILD_DIR)/$(LIBRARY)
$(INSTALL) $< $@
# executable: # executable:
#$(BUILD_DIR)/$(BINARY):: $(OBJECTS) #$(BUILD_DIR)/$(BINARY):: $(OBJECTS)
# $(LD) $(LDFLAGS) -o $@ $(OBJECTS) # $(LD) $(LDFLAGS) -o $@ $(OBJECTS)

View File

@ -17,6 +17,9 @@ $(BUILD_DIR)/$(LIBRARY):: $(BUILD_DIR) $(OBJECTS)
$(AR) $(ARFLAGS) $@ $(OBJECTS) $(AR) $(ARFLAGS) $@ $(OBJECTS)
$(INSTALL) $@ $(PUBLISH_DIR)/ $(INSTALL) $@ $(PUBLISH_DIR)/
$(PUBLISH_DIR)/$(LIBRARY): $(BUILD_DIR)/$(LIBRARY)
$(INSTALL) $< $@
# executable: # executable:
#$(BUILD_DIR)/$(BINARY):: $(OBJECTS) #$(BUILD_DIR)/$(BINARY):: $(OBJECTS)
# $(LD) $(LDFLAGS) -o $@ $(OBJECTS) # $(LD) $(LDFLAGS) -o $@ $(OBJECTS)

View File

@ -17,6 +17,9 @@ $(BUILD_DIR)/$(LIBRARY):: $(BUILD_DIR) $(OBJECTS)
$(AR) $(ARFLAGS) $@ $(OBJECTS) $(AR) $(ARFLAGS) $@ $(OBJECTS)
$(INSTALL) $@ $(PUBLISH_DIR)/ $(INSTALL) $@ $(PUBLISH_DIR)/
$(PUBLISH_DIR)/$(LIBRARY): $(BUILD_DIR)/$(LIBRARY)
$(INSTALL) $< $@
# executable: # executable:
#$(BUILD_DIR)/$(BINARY):: $(OBJECTS) #$(BUILD_DIR)/$(BINARY):: $(OBJECTS)
# $(LD) $(LDFLAGS) -o $@ $(OBJECTS) # $(LD) $(LDFLAGS) -o $@ $(OBJECTS)

View File

@ -15,10 +15,6 @@ INCLUDES += -I../util -I../kernel -I../gamecode -I..
# library: # library:
$(BUILD_DIR)/$(LIBRARY):: $(BUILD_DIR) $(OBJECTS) $(BUILD_DIR)/$(LIBRARY):: $(BUILD_DIR) $(OBJECTS)
$(AR) $(ARFLAGS) $@ $(OBJECTS) $(AR) $(ARFLAGS) $@ $(OBJECTS)
$(INSTALL) $@ $(PUBLISH_DIR)/
# executable:
#$(BUILD_DIR)/$(BINARY):: $(OBJECTS)
# $(LD) $(LDFLAGS) -o $@ $(OBJECTS)
# $(INSTALL) $@ $(PUBLISH_DIR)/
$(PUBLISH_DIR)/$(LIBRARY): $(BUILD_DIR)/$(LIBRARY)
$(INSTALL) $< $@

View File

@ -6,8 +6,6 @@ BINARY =
SOURCES = $(wildcard *.c) SOURCES = $(wildcard *.c)
OBJECTS = $(SOURCES:%.c=$(BUILD_DIR)/%.o) OBJECTS = $(SOURCES:%.c=$(BUILD_DIR)/%.o)
OBJECTS -= $(BUILD_DIR)/weather.o
include $(ERESSEA)/Makefile.include include $(ERESSEA)/Makefile.include
## more definitions ## more definitions
@ -17,7 +15,9 @@ INCLUDES += -I../util -I../kernel -I../gamecode -I..
# library: # library:
$(BUILD_DIR)/$(LIBRARY):: $(BUILD_DIR) $(OBJECTS) $(BUILD_DIR)/$(LIBRARY):: $(BUILD_DIR) $(OBJECTS)
$(AR) $(ARFLAGS) $@ $(OBJECTS) $(AR) $(ARFLAGS) $@ $(OBJECTS)
$(INSTALL) $@ $(PUBLISH_DIR)/
$(PUBLISH_DIR)/$(LIBRARY): $(BUILD_DIR)/$(LIBRARY)
$(INSTALL) $< $@
# executable: # executable:
#$(BUILD_DIR)/$(BINARY):: $(OBJECTS) #$(BUILD_DIR)/$(BINARY):: $(OBJECTS)

View File

@ -204,7 +204,7 @@ gmcommands(void)
strlist * order; strlist * order;
for (order = u->orders; order; order = order->next) for (order = u->orders; order; order = order->next)
if (igetkeyword(order->s) == K_GM) { if (igetkeyword(order->s) == K_GM) {
gm_command(u, order->s); gm_command(order->s, u);
} }
if (u==*up) up = &u->next; if (u==*up) up = &u->next;
} }

View File

@ -1,6 +1,6 @@
/* vi: set ts=2: /* vi: set ts=2:
* *
* $Id: gmcmd.h,v 1.2 2001/01/30 20:02:06 enno Exp $ * $Id: gmcmd.h,v 1.3 2001/01/30 20:26:03 enno Exp $
* Eressea PB(E)M host Copyright (C) 1998-2000 * Eressea PB(E)M host Copyright (C) 1998-2000
* Christian Schlittchen (corwin@amber.kn-bremen.de) * Christian Schlittchen (corwin@amber.kn-bremen.de)
* Katja Zedel (katze@felidae.kn-bremen.de) * Katja Zedel (katze@felidae.kn-bremen.de)
@ -15,10 +15,10 @@
struct attrib; struct attrib;
struct unit; struct unit;
void init_gmcmd(void); extern void init_gmcmd(void);
/* initialize this module */ /* initialize this module */
void gmcommands(void); extern void gmcommands(void);
/* execute commands */ /* execute commands */

View File

@ -17,6 +17,9 @@ $(BUILD_DIR)/$(LIBRARY):: $(BUILD_DIR) $(OBJECTS)
$(AR) $(ARFLAGS) $@ $(OBJECTS) $(AR) $(ARFLAGS) $@ $(OBJECTS)
$(INSTALL) $@ $(PUBLISH_DIR)/ $(INSTALL) $@ $(PUBLISH_DIR)/
$(PUBLISH_DIR)/$(LIBRARY): $(BUILD_DIR)/$(LIBRARY)
$(INSTALL) $< $@
# executable: # executable:
#$(BUILD_DIR)/$(BINARY):: $(OBJECTS) #$(BUILD_DIR)/$(BINARY):: $(OBJECTS)
# $(LD) $(LDFLAGS) -o $@ $(OBJECTS) # $(LD) $(LDFLAGS) -o $@ $(OBJECTS)

View File

@ -17,6 +17,9 @@ $(BUILD_DIR)/$(LIBRARY):: $(BUILD_DIR) $(OBJECTS)
$(AR) $(ARFLAGS) $@ $(OBJECTS) $(AR) $(ARFLAGS) $@ $(OBJECTS)
$(INSTALL) $@ $(PUBLISH_DIR)/ $(INSTALL) $@ $(PUBLISH_DIR)/
$(PUBLISH_DIR)/$(LIBRARY): $(BUILD_DIR)/$(LIBRARY)
$(INSTALL) $< $@
# executable: # executable:
#$(BUILD_DIR)/$(BINARY):: $(OBJECTS) #$(BUILD_DIR)/$(BINARY):: $(OBJECTS)
# $(LD) $(LDFLAGS) -o $@ $(OBJECTS) # $(LD) $(LDFLAGS) -o $@ $(OBJECTS)

View File

@ -17,6 +17,9 @@ $(BUILD_DIR)/$(LIBRARY):: $(BUILD_DIR) $(OBJECTS)
$(AR) $(ARFLAGS) $@ $(OBJECTS) $(AR) $(ARFLAGS) $@ $(OBJECTS)
$(INSTALL) $@ $(PUBLISH_DIR)/ $(INSTALL) $@ $(PUBLISH_DIR)/
$(PUBLISH_DIR)/$(LIBRARY): $(BUILD_DIR)/$(LIBRARY)
$(INSTALL) $< $@
# executable: # executable:
#$(BUILD_DIR)/$(BINARY):: $(OBJECTS) #$(BUILD_DIR)/$(BINARY):: $(OBJECTS)
# $(LD) $(LDFLAGS) -o $@ $(OBJECTS) # $(LD) $(LDFLAGS) -o $@ $(OBJECTS)

View File

@ -14,3 +14,6 @@ include $(ERESSEA)/Makefile.include
$(BUILD_DIR)/$(LIBRARY):: $(OBJECTS) $(BUILD_DIR)/$(LIBRARY):: $(OBJECTS)
$(AR) $(ARFLAGS) $@ $(OBJECTS) $(AR) $(ARFLAGS) $@ $(OBJECTS)
$(INSTALL) $@ $(PUBLISH_DIR)/ $(INSTALL) $@ $(PUBLISH_DIR)/
$(PUBLISH_DIR)/$(LIBRARY): $(BUILD_DIR)/$(LIBRARY)
$(INSTALL) $< $@

View File

@ -2,5 +2,11 @@
## enable some new features in the source: ## enable some new features in the source:
# #
USE_GM_COMMANDS = 1
CONVERT_TRIGGERS = 1 CONVERT_TRIGGERS = 1
CFLAGS += -DUSE_GM_COMMANDS
LD=gcc
AR=ar
CC=gcc
INSTALL=install

View File

@ -51,3 +51,6 @@ LIBS += $(LIBNAMES:%=-l%) -lm
$(BUILD_DIR)/$(BINARY):: subdirs-$(CONFIG) $(BUILD_DIR) $(OBJECTS) $(BUILD_DIR)/$(BINARY):: subdirs-$(CONFIG) $(BUILD_DIR) $(OBJECTS)
$(LD) -o $@ $(OBJECTS) $(LDFLAGS) $(LD) -o $@ $(OBJECTS) $(LDFLAGS)
$(INSTALL) $@ $(PUBLISH_DIR)/ $(INSTALL) $@ $(PUBLISH_DIR)/
$(PUBLISH_DIR)/$(BINARY): $(BUILD_DIR)/$(BINARY)
$(INSTALL) $< $@

View File

@ -1,6 +1,6 @@
/* vi: set ts=2: /* vi: set ts=2:
* *
* $Id: main.c,v 1.4 2001/01/28 08:20:05 enno Exp $ * $Id: main.c,v 1.5 2001/01/30 20:26:05 enno Exp $
* Eressea PB(E)M host Copyright (C) 1998-2000 * Eressea PB(E)M host Copyright (C) 1998-2000
* Christian Schlittchen (corwin@amber.kn-bremen.de) * Christian Schlittchen (corwin@amber.kn-bremen.de)
* Katja Zedel (katze@felidae.kn-bremen.de) * Katja Zedel (katze@felidae.kn-bremen.de)
@ -43,6 +43,7 @@
#include <modules/museum.h> #include <modules/museum.h>
#include <modules/score.h> #include <modules/score.h>
#include <modules/xmas2000.h> #include <modules/xmas2000.h>
#include <modules/gmcmd.h>
/* gamecode includes */ /* gamecode includes */
#include <creation.h> #include <creation.h>
@ -107,6 +108,9 @@ init_game(void)
init_weapons(); init_weapons();
init_attributes(); init_attributes();
#ifdef USE_GM_COMMANDS
init_gmcmd();
#endif
init_conversion(); init_conversion();
init_museum(); init_museum();

View File

@ -26,3 +26,5 @@ $(BUILD_DIR)/$(LIBRARY):: $(BUILD_DIR) $(OBJECTS)
$(AR) $(ARFLAGS) $@ $(OBJECTS) $(AR) $(ARFLAGS) $@ $(OBJECTS)
$(INSTALL) $@ $(PUBLISH_DIR)/ $(INSTALL) $@ $(PUBLISH_DIR)/
$(PUBLISH_DIR)/$(LIBRARY): $(BUILD_DIR)/$(LIBRARY)
$(INSTALL) $< $@