![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package vms-empire for openSUSE:Factory checked in at 2016-01-20 09:55:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/vms-empire (Old) and /work/SRC/openSUSE:Factory/.vms-empire.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "vms-empire" Changes: -------- --- /work/SRC/openSUSE:Factory/vms-empire/vms-empire.changes 2015-12-09 22:36:01.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.vms-empire.new/vms-empire.changes 2016-01-20 09:55:15.000000000 +0100 @@ -1,0 +2,7 @@ +Mon Jan 18 23:14:23 UTC 2016 - nemysis@openSUSE.org + +- Update to 1.14, please see + + /usr/share/doc/packages/vms-empire/NEWS + +------------------------------------------------------------------- Old: ---- vms-empire-1.13.tar.gz New: ---- vms-empire-1.14.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ vms-empire.spec ++++++ --- /var/tmp/diff_new_pack.MY6N32/_old 2016-01-20 09:55:16.000000000 +0100 +++ /var/tmp/diff_new_pack.MY6N32/_new 2016-01-20 09:55:16.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package vms-empire # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: vms-empire -Version: 1.13 +Version: 1.14 Release: 0 Summary: Simulation of a full-scale war between two emperors License: GPL-2.0 ++++++ vms-empire-1.13.tar.gz -> vms-empire-1.14.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vms-empire-1.13/Makefile new/vms-empire-1.14/Makefile --- old/vms-empire-1.13/Makefile 2014-12-14 23:05:55.000000000 +0100 +++ new/vms-empire-1.14/Makefile 2016-01-05 07:49:05.000000000 +0100 @@ -4,7 +4,7 @@ # See the file COPYING, distributed with empire, for restriction # and warranty information. -VERS=1.13 +VERS=1.14 # Use -g to compile the program for debugging. #DEBUG = -g -DDEBUG @@ -128,3 +128,6 @@ release: vms-empire-$(VERS).tar.gz vms-empire.html shipper version=$(VERS) | sh -e -x + +refresh: vms-empire.html + shipper -N -w version=$(VERS) | sh -e -x diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vms-empire-1.13/NEWS new/vms-empire-1.14/NEWS --- old/vms-empire-1.13/NEWS 2014-12-14 23:05:39.000000000 +0100 +++ new/vms-empire-1.14/NEWS 2016-01-05 07:49:39.000000000 +0100 @@ -1,24 +1,29 @@ vms-empire news -1.13: 2014-12-14: +1.14: 2016-01-05 06:49:17Z + Add an identifying magic cookie and version to save files. + Full ANSI prototypes for private functions as well as public. + Markup fix for probability table. + +1.13: 2014-12-14T17:06:26Z Comment on entry to and exit from edit mode. Cleaned up packaging and install/uninstall productions. -1.12: 2014-05-20: +1.12: 2014-05-20T09:03:09Z Incorporated Dennis Pinckard's fix for a Mac OS/X port bug. Added desktop file. -1.11: 2013-12-31T17:28:06 +1.11: 2013-12-31T17:31:04Z Clean up code to modern C, apply cppcheck. Fix code typo reported as Debian bug #593434 -1.10: 2013-08-22T23:46:03 +1.10: 2013-08-22T23:47:21Z Fix core dump when a satellite bounced off the world edge. Full ANSIfication of function prototypes (which fixed the sat bug - the code appears to have been tickling some obscure bug in the compilation of function calls with K&R-style prototypes). -1.9: 2012-02-16T02:49:47 +1.9: 2012-02-16T22:59:22Z Drop RPM packaging. Documentation cleanups. 1.8: 2010-10-21T12:47:33Z diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vms-empire-1.13/attack.c new/vms-empire-1.14/attack.c --- old/vms-empire-1.13/attack.c 2013-08-27 17:00:47.000000000 +0200 +++ new/vms-empire-1.14/attack.c 2014-12-15 00:16:47.000000000 +0100 @@ -79,8 +79,9 @@ void attack_obj(piece_info_t *att_obj, loc_t loc) { - void describe(), survive(); - + void describe(piece_info_t *, piece_info_t *, loc_t); + void survive(piece_info_t *, loc_t); + piece_info_t *def_obj; /* defender */ int owner; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vms-empire-1.13/compmove.c new/vms-empire-1.14/compmove.c --- old/vms-empire-1.13/compmove.c 2013-08-27 17:00:47.000000000 +0200 +++ new/vms-empire-1.14/compmove.c 2014-12-15 17:26:35.000000000 +0100 @@ -34,7 +34,7 @@ void comp_move(int nmoves) { - void do_cities(), do_pieces(), check_endgame(); + void do_cities(void), do_pieces(void), check_endgame(void); int i; piece_info_t *obj; @@ -366,7 +366,7 @@ void do_pieces(void) { - void cpiece_move(); + void cpiece_move(piece_info_t *); int i; piece_info_t *obj, *next_obj; @@ -389,12 +389,10 @@ void cpiece_move(piece_info_t *obj) { - void move1(); + void move1(piece_info_t *); bool changed_loc; int max_hits; - loc_t saved_loc; - city_info_t *cityp; if (obj->type == SATELLITE) { move_sat (obj); @@ -406,11 +404,12 @@ max_hits = piece_attr[obj->type].max_hits; if (obj->type == FIGHTER) { /* init fighter range */ - cityp = find_city (obj->loc); + city_info_t *cityp = find_city (obj->loc); if (cityp != NULL) obj->range = piece_attr[FIGHTER].range; } while (obj->moved < obj_moves (obj)) { + loc_t saved_loc; saved_loc = obj->loc; /* remember starting location */ move1 (obj); if (saved_loc != obj->loc) changed_loc = true; @@ -441,7 +440,8 @@ void move1(piece_info_t *obj) { - void army_move(), transport_move(), fighter_move(), ship_move(); + void army_move(piece_info_t *), transport_move(piece_info_t *); + void fighter_move(piece_info_t *), ship_move(piece_info_t *); switch (obj->type) { case ARMY: army_move (obj); break; @@ -483,10 +483,12 @@ void army_move(piece_info_t *obj) { - loc_t move_away(); - loc_t find_attack(); - void make_army_load_map(), make_unload_map(), make_tt_load_map(); - void board_ship(); + loc_t move_away(view_map_t *, loc_t, char *); + loc_t find_attack(loc_t, char *, char *); + void make_army_load_map(piece_info_t *, view_map_t *, view_map_t *); + void make_unload_map(view_map_t *, view_map_t *); + void make_tt_load_map(view_map_t *, view_map_t *); + void board_ship(piece_info_t *, path_map_t *, loc_t); loc_t new_loc; path_map_t path_map2[MAP_SIZE]; @@ -760,12 +762,11 @@ { piece_info_t *p; int i; - loc_t x_loc; p = find_best_tt (obj->ship, obj->loc); /* look here first */ for (i = 0; i < 8; i++) { /* try surrounding squares */ - x_loc = obj->loc + dir_offset[i]; + loc_t x_loc = obj->loc + dir_offset[i]; if (map[x_loc].on_board) p = find_best_tt (p, x_loc); @@ -792,11 +793,10 @@ loc_t move_away(view_map_t *vmap, loc_t loc, char *terrain) { - loc_t new_loc; int i; for (i = 0; i < 8; i++) { - new_loc = loc + dir_offset[i]; + loc_t new_loc = loc + dir_offset[i]; if (map[new_loc].on_board && strchr (terrain, vmap[new_loc].contents)) return (new_loc); @@ -815,14 +815,14 @@ loc_t find_attack(loc_t loc, char *obj_list, char *terrain) { - loc_t new_loc, best_loc; + loc_t best_loc; int i, best_val; char *p; best_loc = loc; /* nothing found yet */ best_val = INFINITY; for (i = 0; i < 8; i++) { - new_loc = loc + dir_offset[i]; + loc_t new_loc = loc + dir_offset[i]; if (map[new_loc].on_board /* can we move here? */ && strchr (terrain, map[new_loc].contents)) { @@ -851,8 +851,6 @@ void transport_move(piece_info_t *obj) { - void tt_do_move(); - loc_t new_loc; /* empty transports can attack */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vms-empire-1.13/control new/vms-empire-1.14/control --- old/vms-empire-1.13/control 2014-12-14 23:00:00.000000000 +0100 +++ new/vms-empire-1.14/control 2015-04-08 19:51:01.000000000 +0200 @@ -3,7 +3,7 @@ Package: vms-empire -Description: The ancestor of all 4x (expand/explore/exploit/exterminate) games. +Description: The ancestor of all expand/explore/exploit/exterminate games. Empire is a simulation of a full-scale war between two emperors, the computer and you. Naturally, there is only room for one, so the object of the game is to destroy the other. The computer plays by the @@ -11,17 +11,21 @@ expand/explore/exploit/exterminate games, including Civilization and Master of Orion. -XBS-Destinations: freecode +#XBS-Destinations: freshcode Homepage: http://www.catb.org/~esr/vms-empire XBS-HTML-Target: index.html -XBS-Gitorious-URL: https://gitorious.org/vms-empire +XBS-Repository-URL: http://thyrsus.com/gitweb/?p=vms-empire.git -XBS-Ohloh-URL: https://www.ohloh.net/p/vms-empire +XBS-Developer-Clone: git@thyrsus.com:vms-empire -XBS-Freecode-Tags: Games/Entertainment +XBS-Anonymous-Clone: git://thyrsus.com/repositories/vms-empire.git + +XBS-OpenHub-URL: https://www.openhub.net/p/vms-empire + +#XBS-Project-Tags: Games/Entertainment XBS-Logo: vms-empire.png diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vms-empire-1.13/display.c new/vms-empire-1.14/display.c --- old/vms-empire-1.13/display.c 2013-08-27 17:00:47.000000000 +0200 +++ new/vms-empire-1.14/display.c 2014-12-15 17:26:35.000000000 +0100 @@ -232,7 +232,7 @@ print_sector(int whose, view_map_t vmap[], int sector) /* whose is USER or COMP, vmap is map to display, sector is sector to display */ { - void display_screen(); + void display_screen(view_map_t []); int first_row, first_col, last_row, last_col; int display_rows, display_cols; @@ -437,7 +437,7 @@ void print_zoom(view_map_t *vmap) { - void print_zoom_cell (); + void print_zoom_cell (view_map_t *, int, int, int, int); int row_inc, col_inc; int r, c; @@ -485,7 +485,7 @@ void print_pzoom(char *s, path_map_t *pmap, view_map_t *vmap) { - void print_pzoom_cell(); + void print_pzoom_cell(path_map_t *, view_map_t *, int, int, int, int); int row_inc, col_inc; int r, c; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vms-empire-1.13/edit.c new/vms-empire-1.14/edit.c --- old/vms-empire-1.13/edit.c 2014-05-28 20:47:13.000000000 +0200 +++ new/vms-empire-1.14/edit.c 2014-12-15 01:46:31.000000000 +0100 @@ -22,22 +22,24 @@ void edit(loc_t edit_cursor) { - char e_cursor(); - void e_leave(), e_print(), e_random(); - void e_stasis(), e_end(), e_wake(), e_sleep(); - void e_info(), e_prod(), e_help(), e_explore(); - void e_fill(), e_land(), e_city_func(), e_transport(); - void e_attack(), e_repair(); + char e_cursor(loc_t *); + void e_leave(void), e_print(loc_t *), e_random(loc_t); + void e_stasis(loc_t), e_end(loc_t *, loc_t, int); + void e_wake(loc_t), e_sleep(loc_t); + void e_info(loc_t), e_prod(loc_t), e_help(void), e_explore(loc_t); + void e_fill(loc_t), e_land(loc_t), e_transport(loc_t); + void e_city_func(loc_t *, loc_t, int *); + void e_attack(loc_t), e_repair(loc_t); loc_t path_start; int path_type; - char e; path_start = -1; /* not building a path yet */ comment ("Edit mode..."); for (;;) { /* until user gives command to leave */ + char e; display_loc_u (edit_cursor); /* position cursor */ e = e_cursor (&edit_cursor); /* handle cursor movement */ @@ -117,7 +119,6 @@ e_cursor(loc_t *edit_cursor) { chtype e; - int p; /* set up terminal */ (void) crmode (); @@ -126,6 +127,7 @@ topini (); /* clear any error messages */ for (;;) { + int p; p = direction (e); if (p == -1) break; @@ -353,10 +355,10 @@ { city_info_t *cityp; piece_info_t *obj; - int i; cityp = find_city (loc); if (cityp != NULL) { + int i; for (i = 0; i < NUM_OBJECTS; i++) cityp->func[i] = NOFUNC; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vms-empire-1.13/empire.6 new/vms-empire-1.14/empire.6 --- old/vms-empire-1.13/empire.6 2014-05-21 15:00:44.000000000 +0200 +++ new/vms-empire-1.14/empire.6 2016-01-05 07:50:42.000000000 +0100 @@ -2,12 +2,12 @@ .\" Title: Empire .\" Author: [see the "AUTHORS" section] .\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/> -.\" Date: 05/21/2014 +.\" Date: 01/05/2016 .\" Manual: Games .\" Source: empire .\" Language: English .\" -.TH "EMPIRE" "6" "05/21/2014" "empire" "Games" +.TH "EMPIRE" "6" "01/05/2016" "empire" "Games" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -313,13 +313,15 @@ The following table gives the probability that the piece listed on the side will defeat the piece listed at the top in a battle\&. (The table assumes that both pieces are undamaged\&.) .TS allbox center tab(:); -l c c c c c +c l c c c c l c c c c c l c c c c c l c c c c c l c c c c c l c c c c c. T{ +\ \& +T}:T{ AFPT T}:T{ D @@ -329,8 +331,6 @@ C T}:T{ B -T}:T{ -\ \& T} T{ AFPT @@ -889,6 +889,8 @@ .PP No doubt numerous\&. .PP +The savefile format changed incompatibly after version 1\&.13\&. +.PP Satellites are not completely implemented\&. You should be able to move to a square that contains a satellite, but the program won\*(Aqt let you\&. Enemy satellites should not cause your pieces to awaken\&. .SH "AUTHORS" .PP diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vms-empire-1.13/empire.c new/vms-empire-1.14/empire.c --- old/vms-empire-1.13/empire.c 2014-05-28 20:46:10.000000000 +0200 +++ new/vms-empire-1.14/empire.c 2014-12-15 17:26:35.000000000 +0100 @@ -28,7 +28,7 @@ empire(void) { void do_command(char); - void print_zoom(); + void print_zoom(view_map_t *); char order; int turn = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vms-empire-1.13/game.c new/vms-empire-1.14/game.c --- old/vms-empire-1.13/game.c 2013-08-27 17:00:47.000000000 +0200 +++ new/vms-empire-1.14/game.c 2014-12-15 17:36:24.000000000 +0100 @@ -174,13 +174,15 @@ { count_t regen_land(); - count_t placed, i; - loc_t loc; + count_t placed; count_t num_land; num_land = 0; /* nothing in land array yet */ placed = 0; /* nothing placed yet */ while (placed < NUM_CITY) { + count_t i; + loc_t loc; + while (num_land == 0) num_land = regen_land (placed); i = irand (num_land-1); /* select random piece of land */ loc = land[i]; @@ -302,7 +304,7 @@ { void find_cont(void), make_pair(void); - loc_t compi, useri; + loc_t compi; city_info_t *compp, *userp; int comp_cont, user_cont; int pair; @@ -324,7 +326,7 @@ compp = cont_tab[comp_cont].cityp[compi]; do { /* select different user city */ - useri = irand ((long)cont_tab[user_cont].ncity); + loc_t useri = irand ((long)cont_tab[user_cont].ncity); userp = cont_tab[user_cont].cityp[useri]; } while (userp == compp); @@ -507,6 +509,10 @@ #define wbuf(buf) if (!xwrite (f, (char *)buf, sizeof (buf))) return #define wval(val) if (!xwrite (f, (char *)&val, sizeof (val))) return +#define SAVECOOKIE "EMPSAVE 1\n" /* increase digit when format changes */ + +static char buf[32]; + void save_game(void) { FILE *f; /* file to save game in */ @@ -516,6 +522,7 @@ perror ("Cannot save saved game"); return; } + wbuf(SAVECOOKIE); wbuf (map); wbuf (comp_map); wbuf (user_map); @@ -547,7 +554,7 @@ int restore_game(void) { - void read_embark(); + void read_embark(piece_info_t *, int); FILE *f; /* file to save game in */ long i; @@ -559,6 +566,11 @@ perror ("Cannot open saved game"); return (false); } + if (fgets(buf, sizeof(buf), f) == NULL) + return false; + else if (strcmp(buf, SAVECOOKIE) != 0) + return false; + i = fread(buf, 1, sizeof(char), f); /* skip trailing nul after cookie */ rbuf (map); rbuf (comp_map); rbuf (user_map); @@ -639,10 +651,9 @@ piece_info_t *ship; piece_info_t *obj; - int count; for (ship = list; ship != NULL; ship = ship->piece_link.next) { - count = ship->count; /* get # of pieces we need */ + int count = ship->count; /* get # of pieces we need */ if (count < 0) inconsistent (); ship->count = 0; /* nothing on board yet */ for (obj = map[ship->loc].objp; obj && count; @@ -749,10 +760,9 @@ void replay_movie(void) { - void print_movie_cell(); + void print_movie_cell(char *, int, int, int, int); FILE *f; /* file to save game in */ - int row_inc, col_inc; int r, c; int round; @@ -765,6 +775,7 @@ round = 0; clear_screen (); for (;;) { + int row_inc, col_inc; if (fread ((char *)mapbuf, 1, sizeof (mapbuf), f) != sizeof (mapbuf)) break; round += 1; @@ -803,12 +814,11 @@ count_t i; int counts[2*NUM_OBJECTS+2]; int user_cost, comp_cost; - char *p; (void) memset ((char *)counts, '\0', sizeof (counts)); for (i = 0; i < MAP_SIZE; i++) { - p = strchr (pieces, mbuf[i]); + char *p = strchr (pieces, mbuf[i]); if (p) counts[p-pieces] += 1; } user_cost = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vms-empire-1.13/map.c new/vms-empire-1.14/map.c --- old/vms-empire-1.13/map.c 2013-08-27 17:00:47.000000000 +0200 +++ new/vms-empire-1.14/map.c 2014-12-15 17:26:35.000000000 +0100 @@ -1003,7 +1003,7 @@ loc_t loc, char *terrain, char *adj_char) { int i, count, bestcount; - loc_t bestloc, new_loc; + loc_t bestloc; int path_count, bestpath; char *p; @@ -1015,7 +1015,7 @@ bestloc = loc; for (i = 0; i < 8; i++) { /* for each adjacent square */ - new_loc = loc + dir_offset[order[i]]; + loc_t new_loc = loc + dir_offset[order[i]]; if (path_map[new_loc].terrain == T_PATH) { /* which is on path */ p = strchr (terrain, vmap[new_loc].contents); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vms-empire-1.13/object.c new/vms-empire-1.14/object.c --- old/vms-empire-1.13/object.c 2013-12-31 23:19:01.000000000 +0100 +++ new/vms-empire-1.14/object.c 2014-12-15 01:57:48.000000000 +0100 @@ -120,12 +120,10 @@ find_transport(int owner, loc_t loc) { int i; - loc_t new_loc; - piece_info_t *t; for (i = 0; i < 8; i++) { /* look around */ - new_loc = loc + dir_offset[i]; - t = find_nfull (TRANSPORT, new_loc); + loc_t new_loc = loc + dir_offset[i]; + piece_info_t *t = find_nfull (TRANSPORT, new_loc); if (t != NULL && t->owner == owner) return (new_loc); } return (loc); /* no tt found */ @@ -182,7 +180,7 @@ void kill_obj(piece_info_t *obj, loc_t loc) { - void kill_one(); + void kill_one(piece_info_t **, piece_info_t *); piece_info_t **list; view_map_t *vmap; @@ -217,11 +215,9 @@ void kill_city(city_info_t *cityp) { - view_map_t *vmap; piece_info_t *p; piece_info_t *next_p; piece_info_t **list; - int i; /* change ownership of hardware at this location; but not satellites */ for (p = map[cityp->loc].objp; p; p = next_p) { @@ -246,7 +242,8 @@ } if (cityp->owner != UNOWNED) { - vmap = MAP(cityp->owner); + view_map_t *vmap = MAP(cityp->owner); + int i; cityp->owner = UNOWNED; cityp->work = 0; cityp->prod = NOPIECE; @@ -512,10 +509,9 @@ void scan(view_map_t vmap[], loc_t loc) { - void update(), check(void); + void update(view_map_t [], loc_t), check(void); int i; - loc_t xloc; #ifdef DEBUG check (); /* perform a consistency check */ @@ -523,7 +519,7 @@ ASSERT (map[loc].on_board); /* passed loc must be on board */ for (i = 0; i < 8; i++) { /* for each surrounding cell */ - xloc = loc + dir_offset[i]; + loc_t xloc = loc + dir_offset[i]; update (vmap, xloc); } update (vmap, loc); /* update current location as well */ @@ -537,12 +533,11 @@ scan_sat(view_map_t vmap[], loc_t loc) { int i; - loc_t xloc; ASSERT (map[loc].on_board); for (i = 0; i < 8; i++) { /* for each surrounding cell */ - xloc = loc + 2 * dir_offset[i]; + loc_t xloc = loc + 2 * dir_offset[i]; if (xloc >= 0 && xloc < MAP_SIZE && map[xloc].on_board) scan (vmap, xloc); } @@ -590,12 +585,12 @@ void set_prod(city_info_t *cityp) { - int i; - scan (user_map, cityp->loc); display_loc_u (cityp->loc); for (;;) { + int i; + prompt ("What do you want the city at %d to produce? ",loc_disp(cityp->loc)); i = get_piece_name (); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vms-empire-1.13/term.c new/vms-empire-1.14/term.c --- old/vms-empire-1.13/term.c 2014-01-09 02:41:07.000000000 +0100 +++ new/vms-empire-1.14/term.c 2014-12-15 17:26:35.000000000 +0100 @@ -323,9 +323,9 @@ bool getyn(char *message) { - char c; - for (;;) { + char c; + prompt (message,0,0,0,0,0,0,0,0); c = get_chx (); @@ -343,10 +343,8 @@ int get_range(char *message, int low, int high) { - int result; - for (;;) { - result = getint (message); + int result = getint (message); if (result >= low && result <= high) return (result); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vms-empire-1.13/usermove.c new/vms-empire-1.14/usermove.c --- old/vms-empire-1.13/usermove.c 2013-08-27 17:00:47.000000000 +0200 +++ new/vms-empire-1.14/usermove.c 2014-12-15 17:26:35.000000000 +0100 @@ -24,9 +24,9 @@ void user_move(void) { - void piece_move(); + void piece_move(piece_info_t *); - int i, j, sec, sec_start; + int i, j, sec_start; piece_info_t *obj, *next_obj; int prod; @@ -74,7 +74,7 @@ /* loop through sectors, moving every piece in the sector */ for (i = sec_start; i < sec_start + NUM_SECTORS; i++) { - sec = i % NUM_SECTORS; + int sec = i % NUM_SECTORS; sector_change (); /* allow screen to be redrawn */ for (j = 0; j < NUM_OBJECTS; j++) /* loop through obj lists */ @@ -104,16 +104,16 @@ void piece_move(piece_info_t *obj) { - void move_random(), move_fill(), move_land(), move_explore(); - void move_path(), move_dir(), move_armyload(), ask_user(); - void move_armyattack(), move_ttload(), move_repair(); - void move_transport(); + void move_random(piece_info_t *), move_fill(piece_info_t *); + void move_land(piece_info_t *), move_explore(piece_info_t *); + void move_path(piece_info_t *), move_dir(piece_info_t *); + void move_armyload(piece_info_t *), ask_user(piece_info_t *); + void move_armyattack(piece_info_t *), move_ttload(piece_info_t *); + void move_repair(piece_info_t *), move_transport(piece_info_t *); bool changed_loc; int speed, max_hits; - int saved_moves; bool need_input; - loc_t saved_loc; city_info_t *cityp; /* set func for piece if on city */ @@ -128,8 +128,8 @@ need_input = false; /* don't require user input yet */ while (obj->moved < obj_moves (obj)) { - saved_moves = obj->moved; /* save moves made */ - saved_loc = obj->loc; /* remember starting location */ + int saved_moves = obj->moved; /* save moves made */ + loc_t saved_loc = obj->loc; /* remember starting location */ if (awake (obj) || need_input){ /* need user input? */ ask_user (obj); @@ -208,12 +208,11 @@ { loc_t loc_list[8]; int i, nloc; - loc_t loc; nloc = 0; for (i = 0; i < 8; i++) { - loc = obj->loc + dir_offset[i]; + loc_t loc = obj->loc + dir_offset[i]; if (good_loc (obj, loc)) { loc_list[nloc] = loc; /* remember this location */ nloc++; /* count locations we can move to */ @@ -406,13 +405,12 @@ { long best_dist; loc_t best_loc; - long new_dist; piece_info_t *p; best_dist = find_nearest_city (obj->loc, USER, &best_loc); for (p = user_obj[CARRIER]; p != NULL; p = p->piece_link.next) { - new_dist = dist (obj->loc, p->loc); + long new_dist = dist (obj->loc, p->loc); if (new_dist < best_dist) { best_dist = new_dist; best_loc = p->loc; @@ -504,16 +502,19 @@ void ask_user(piece_info_t *obj) { - void user_skip(), user_fill(), user_dir(), user_set_dir(); - void user_wake(), user_set_city_func(), user_cancel_auto(); - void user_redraw(), user_random(), user_land(), user_sentry(); - void user_help(), reset_func(), user_explore(); - void user_build(), user_transport(); - void user_armyattack(), user_repair(); - - char c; + void user_skip(piece_info_t *), user_fill(piece_info_t *); + void user_dir(piece_info_t *, int), user_set_dir(piece_info_t *); + void user_wake(piece_info_t *), user_set_city_func(piece_info_t *); + void user_cancel_auto(void), user_redraw(void); + void user_random(piece_info_t *), user_land(piece_info_t *); + void user_sentry(piece_info_t *), user_help(void); + void reset_func(piece_info_t *), user_explore(piece_info_t *); + void user_build(piece_info_t *), user_transport(piece_info_t *); + void user_armyattack(piece_info_t *), user_repair(piece_info_t *); for (;;) { + char c; + display_loc_u (obj->loc); /* display piece to move */ describe_obj (obj); /* describe object to be moved */ display_score (); /* show current score */ @@ -738,9 +739,13 @@ void user_set_city_func(piece_info_t *obj) { - void e_city_fill(), e_city_explore(), e_city_stasis(); - void e_city_wake(), e_city_random(), e_city_repair(); - void e_city_attack(); + void e_city_fill(city_info_t *, int); + void e_city_explore(city_info_t *, int); + void e_city_stasis(city_info_t *, int); + void e_city_wake(city_info_t *, int); + void e_city_random(city_info_t *, int); + void e_city_repair(city_info_t *, int); + void e_city_attack(city_info_t *, int); int type; char e; @@ -814,7 +819,9 @@ void user_dir(piece_info_t *obj, int dir) { - void user_dir_army(), user_dir_fighter(), user_dir_ship(); + void user_dir_army(piece_info_t *, loc_t); + void user_dir_fighter(piece_info_t *, loc_t); + void user_dir_ship(piece_info_t *, loc_t); loc_t loc; @@ -1037,7 +1044,6 @@ awake(piece_info_t *obj) { int i; - char c; long t; if (obj->type == ARMY && vmap_at_sea (user_map, obj->loc)) { @@ -1054,7 +1060,7 @@ return (true); } for (i = 0; i < 8; i++) { /* for each surrounding cell */ - c = user_map[obj->loc+dir_offset[i]].contents; + char c = user_map[obj->loc+dir_offset[i]].contents; if (islower (c) || c == MAP_CITY || c == 'X') { if (obj->func < 0) obj->func = NOFUNC; /* awaken */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vms-empire-1.13/util.c new/vms-empire-1.14/util.c --- old/vms-empire-1.13/util.c 2013-08-27 17:00:47.000000000 +0200 +++ new/vms-empire-1.14/util.c 2014-12-15 01:46:53.000000000 +0100 @@ -80,7 +80,9 @@ void check(void) { - void check_cargo(), check_obj(), check_obj_cargo(); + void check_cargo(piece_info_t *, int); + void check_obj(piece_info_t **, int); + void check_obj_cargo(piece_info_t **); long i, j; piece_info_t *p; @@ -212,10 +214,10 @@ check_cargo(piece_info_t *list, int cargo_type) { piece_info_t *p, *q; - long j, count; + long j; for (p = list; p != NULL; p = p->piece_link.next) { - count = 0; + long count = 0; for (q = p->cargo; q != NULL; q = q->cargo_link.next) { count += 1; /* count items in list */ ASSERT (q->type == cargo_type); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/vms-empire-1.13/vms-empire.xml new/vms-empire-1.14/vms-empire.xml --- old/vms-empire-1.13/vms-empire.xml 2013-12-31 23:19:01.000000000 +0100 +++ new/vms-empire-1.14/vms-empire.xml 2016-01-05 07:41:16.000000000 +0100 @@ -351,12 +351,12 @@ <colspec colname='c6'/> <tbody> <row rowsep='1'> + <entry align='center'></entry> <entry align='left' colsep='1'>AFPT</entry> <entry align='center' colsep='1'>D</entry> <entry align='center' colsep='1'>S</entry> <entry align='center' colsep='1'>C</entry> <entry align='center' colsep='1'>B</entry> - <entry align='center'></entry> </row> <row> <entry align='left' colsep='1'>AFPT</entry> @@ -1066,6 +1066,8 @@ <para>No doubt numerous.</para> +<para>The savefile format changed incompatibly after version 1.13.</para> + <para>Satellites are not completely implemented. You should be able to move to a square that contains a satellite, but the program won't let you. Enemy satellites should not cause your pieces to awaken.</para>