(file_sct_init, fl_sct_init): Fix parameter type from s_char * to
struct sctstr *. Callers changed not to cast.
This commit is contained in:
parent
5d6e8c0685
commit
053847beac
2 changed files with 6 additions and 10 deletions
|
@ -175,8 +175,7 @@ static int stable(void);
|
||||||
static void elevate_land(void);
|
static void elevate_land(void);
|
||||||
static void elevate_sea(void);
|
static void elevate_sea(void);
|
||||||
static int map_symbol(int x, int y);
|
static int map_symbol(int x, int y);
|
||||||
static void fl_sct_init(coord x, coord y, s_char *ptr,
|
static void fl_sct_init(coord, coord, struct sctstr *, time_t timestamp);
|
||||||
time_t timestamp);
|
|
||||||
static void set_coastal_flags(void);
|
static void set_coastal_flags(void);
|
||||||
|
|
||||||
static void print_vars(void);
|
static void print_vars(void);
|
||||||
|
@ -1091,7 +1090,7 @@ write_sects(void)
|
||||||
sct = sectsbuf;
|
sct = sectsbuf;
|
||||||
for (y = 0; y < YSIZE; y++) {
|
for (y = 0; y < YSIZE; y++) {
|
||||||
for (x = 0; x < XSIZE; x++, sct++) {
|
for (x = 0; x < XSIZE; x++, sct++) {
|
||||||
fl_sct_init(x * 2 + (y & 01), y, (s_char *)sct, current_time);
|
fl_sct_init(x * 2 + (y & 1), y, sct, current_time);
|
||||||
total = elev[sct->sct_x][y];
|
total = elev[sct->sct_x][y];
|
||||||
if (total < LANDMIN) {
|
if (total < LANDMIN) {
|
||||||
sct->sct_type = SCT_WATER;
|
sct->sct_type = SCT_WATER;
|
||||||
|
@ -1219,10 +1218,8 @@ qprint(const char * const fmt, ...)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fl_sct_init(coord x, coord y, s_char *ptr, time_t timestamp)
|
fl_sct_init(coord x, coord y, struct sctstr *sp, time_t timestamp)
|
||||||
{
|
{
|
||||||
struct sctstr *sp = (struct sctstr *)ptr;
|
|
||||||
|
|
||||||
sp->ef_type = EF_SECTOR;
|
sp->ef_type = EF_SECTOR;
|
||||||
sp->sct_x = x;
|
sp->sct_x = x;
|
||||||
sp->sct_y = y;
|
sp->sct_y = y;
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
#include "optlist.h"
|
#include "optlist.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
static void file_sct_init(coord x, coord y, s_char *ptr,
|
static void file_sct_init(coord, coord, struct sctstr *ptr,
|
||||||
time_t timestamp);
|
time_t timestamp);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -195,8 +195,7 @@ main(int argc, char *argv[])
|
||||||
memset(&sct, 0, sizeof(sct));
|
memset(&sct, 0, sizeof(sct));
|
||||||
for (y = 0; y < WORLD_Y; y++) {
|
for (y = 0; y < WORLD_Y; y++) {
|
||||||
for (x = 0; x < WORLD_X / 2; x++) {
|
for (x = 0; x < WORLD_X / 2; x++) {
|
||||||
file_sct_init(x * 2 + (y & 01), y, (s_char *)&sct,
|
file_sct_init(x * 2 + (y & 1), y, &sct, current_time);
|
||||||
current_time);
|
|
||||||
putsect(&sct);
|
putsect(&sct);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -218,7 +217,7 @@ main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
file_sct_init(coord x, coord y, s_char *ptr, time_t timestamp)
|
file_sct_init(coord x, coord y, struct sctstr *ptr, time_t timestamp)
|
||||||
{
|
{
|
||||||
struct sctstr *sp = (struct sctstr *)ptr;
|
struct sctstr *sp = (struct sctstr *)ptr;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue