[Change] Finished bringing land dialogue stuff inline with new toolkit changes.
This commit is contained in:
parent
597091c929
commit
c132caba67
298
src/land.c
298
src/land.c
@ -122,7 +122,7 @@ static void commodity_exchange_open(void) {
|
|||||||
|
|
||||||
window_addButton(wid, -20, 20,
|
window_addButton(wid, -20, 20,
|
||||||
BUTTON_WIDTH, BUTTON_HEIGHT, "btnCommodityClose",
|
BUTTON_WIDTH, BUTTON_HEIGHT, "btnCommodityClose",
|
||||||
"Close", commodity_exchange_close);
|
"Close", window_close);
|
||||||
|
|
||||||
window_addButton(wid, -40-((BUTTON_WIDTH-20)/2), 20*2+BUTTON_HEIGHT,
|
window_addButton(wid, -40-((BUTTON_WIDTH-20)/2), 20*2+BUTTON_HEIGHT,
|
||||||
(BUTTON_WIDTH-20)/2, BUTTON_HEIGHT, "btnCommodityBuy",
|
(BUTTON_WIDTH-20)/2, BUTTON_HEIGHT, "btnCommodityBuy",
|
||||||
@ -247,7 +247,7 @@ static void outfits_open(void) {
|
|||||||
/* Buttons. */
|
/* Buttons. */
|
||||||
window_addButton(wid, -20, 20,
|
window_addButton(wid, -20, 20,
|
||||||
BUTTON_WIDTH, BUTTON_HEIGHT, "btnCloseOutfits",
|
BUTTON_WIDTH, BUTTON_HEIGHT, "btnCloseOutfits",
|
||||||
"Close", outfits_close);
|
"Close", window_close);
|
||||||
|
|
||||||
window_addButton(wid, -40-BUTTON_WIDTH, 40+BUTTON_HEIGHT,
|
window_addButton(wid, -40-BUTTON_WIDTH, 40+BUTTON_HEIGHT,
|
||||||
BUTTON_WIDTH, BUTTON_HEIGHT, "btnBuyOutfit",
|
BUTTON_WIDTH, BUTTON_HEIGHT, "btnBuyOutfit",
|
||||||
@ -429,13 +429,13 @@ static int outfit_canBuy(Outfit* outfit, int q, int errmsg) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void outfits_buy(char* str) {
|
static void outfits_buy(unsigned int wid, char* str) {
|
||||||
(void)str;
|
(void)str;
|
||||||
char* outfitname;
|
char* outfitname;
|
||||||
Outfit* outfit;
|
Outfit* outfit;
|
||||||
int q;
|
int q;
|
||||||
|
|
||||||
outfitname = toolkit_getList(secondary_wid, "iarOutfits");
|
outfitname = toolkit_getList(wid, "iarOutfits");
|
||||||
outfit = outfit_get(outfitname);
|
outfit = outfit_get(outfitname);
|
||||||
|
|
||||||
q = outfits_getMod();
|
q = outfits_getMod();
|
||||||
@ -445,7 +445,7 @@ static void outfits_buy(char* str) {
|
|||||||
|
|
||||||
player->credits -= outfit->price * pilot_addOutfit(player, outfit,
|
player->credits -= outfit->price * pilot_addOutfit(player, outfit,
|
||||||
MIN(q, outfit->max));
|
MIN(q, outfit->max));
|
||||||
outfits_update(NULL);
|
outfits_update(wid, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int outfit_canSell(Outfit* outfit, int q, int errmsg) {
|
static int outfit_canSell(Outfit* outfit, int q, int errmsg) {
|
||||||
@ -470,13 +470,13 @@ static int outfit_canSell(Outfit* outfit, int q, int errmsg) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void outfits_sell(char* str) {
|
static void outfits_sell(unsigned int wid, char* str) {
|
||||||
(void)str;
|
(void)str;
|
||||||
char* outfitname;
|
char* outfitname;
|
||||||
Outfit* outfit;
|
Outfit* outfit;
|
||||||
int q;
|
int q;
|
||||||
|
|
||||||
outfitname = toolkit_getList(secondary_wid, "iarOutfits");
|
outfitname = toolkit_getList(wid, "iarOutfits");
|
||||||
outfit = outfit_get(outfitname);
|
outfit = outfit_get(outfitname);
|
||||||
|
|
||||||
q = outfits_getMod();
|
q = outfits_getMod();
|
||||||
@ -485,7 +485,7 @@ static void outfits_sell(char* str) {
|
|||||||
if(outfit_canSell(outfit, q, 1) == 0) return;
|
if(outfit_canSell(outfit, q, 1) == 0) return;
|
||||||
|
|
||||||
player->credits += outfit->price * pilot_rmOutfit(player, outfit, q);
|
player->credits += outfit->price * pilot_rmOutfit(player, outfit, q);
|
||||||
outfits_update(NULL);
|
outfits_update(wid, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the current modifier status. */
|
/* Return the current modifier status. */
|
||||||
@ -523,37 +523,38 @@ static void shipyard_open(void) {
|
|||||||
glTexture** tships;
|
glTexture** tships;
|
||||||
int nships;
|
int nships;
|
||||||
char buf[128];
|
char buf[128];
|
||||||
|
unsigned int wid;
|
||||||
|
|
||||||
/* Window creation. */
|
/* Window creation. */
|
||||||
snprintf(buf, 128, "%s - Shipyard", land_planet->name);
|
snprintf(buf, 128, "%s - Shipyard", land_planet->name);
|
||||||
secondary_wid = window_create(buf,
|
wid = window_create(buf,
|
||||||
-1, -1, SHIPYARD_WIDTH, SHIPYARD_HEIGHT);
|
-1, -1, SHIPYARD_WIDTH, SHIPYARD_HEIGHT);
|
||||||
/* Buttons. */
|
/* Buttons. */
|
||||||
window_addButton(secondary_wid, -20, 20,
|
window_addButton(wid, -20, 20,
|
||||||
BUTTON_WIDTH, BUTTON_HEIGHT, "btnCloseShipyard",
|
BUTTON_WIDTH, BUTTON_HEIGHT, "btnCloseShipyard",
|
||||||
"Close", shipyard_close);
|
"Close", window_close);
|
||||||
|
|
||||||
window_addButton(secondary_wid, -20, 40+BUTTON_HEIGHT,
|
window_addButton(wid, -20, 40+BUTTON_HEIGHT,
|
||||||
BUTTON_WIDTH, BUTTON_HEIGHT, "btnYourShips",
|
BUTTON_WIDTH, BUTTON_HEIGHT, "btnYourShips",
|
||||||
"Your Ships", shipyard_yours_open);
|
"Your Ships", shipyard_yours_open);
|
||||||
|
|
||||||
window_addButton(secondary_wid, -40-BUTTON_WIDTH, 20,
|
window_addButton(wid, -40-BUTTON_WIDTH, 20,
|
||||||
BUTTON_WIDTH, BUTTON_HEIGHT, "btnBuyShip",
|
BUTTON_WIDTH, BUTTON_HEIGHT, "btnBuyShip",
|
||||||
"Buy", shipyard_buy);
|
"Buy", shipyard_buy);
|
||||||
|
|
||||||
window_addButton(secondary_wid, -40-BUTTON_WIDTH, 40+BUTTON_HEIGHT,
|
window_addButton(wid, -40-BUTTON_WIDTH, 40+BUTTON_HEIGHT,
|
||||||
BUTTON_WIDTH, BUTTON_HEIGHT, "btnInfoShip",
|
BUTTON_WIDTH, BUTTON_HEIGHT, "btnInfoShip",
|
||||||
"Info", shipyard_info);
|
"Info", shipyard_info);
|
||||||
|
|
||||||
/* Target gfx. */
|
/* Target gfx. */
|
||||||
window_addRect(secondary_wid, -40, -50,
|
window_addRect(wid, -40, -50,
|
||||||
128, 96, "rctTarget", &cBlack, 0);
|
128, 96, "rctTarget", &cBlack, 0);
|
||||||
|
|
||||||
window_addImage(secondary_wid, -40-128, -50-96,
|
window_addImage(wid, -40-128, -50-96,
|
||||||
"imgTarget", NULL, 1);
|
"imgTarget", NULL, 1);
|
||||||
|
|
||||||
/* Text. */
|
/* Text. */
|
||||||
window_addText(secondary_wid, 40+300+40, -55,
|
window_addText(wid, 40+300+40, -55,
|
||||||
80, 96, 0, "txtSDesc", &gl_smallFont, &cDConsole,
|
80, 96, 0, "txtSDesc", &gl_smallFont, &cDConsole,
|
||||||
"Name:\n"
|
"Name:\n"
|
||||||
"Class:\n"
|
"Class:\n"
|
||||||
@ -562,11 +563,11 @@ static void shipyard_open(void) {
|
|||||||
"Price:\n"
|
"Price:\n"
|
||||||
"Money:\n");
|
"Money:\n");
|
||||||
|
|
||||||
window_addText(secondary_wid, 40+300+40+80, -55,
|
window_addText(wid, 40+300+40+80, -55,
|
||||||
130, 96, 0, "txtDDesc", &gl_smallFont, &cBlack, NULL);
|
130, 96, 0, "txtDDesc", &gl_smallFont, &cBlack, NULL);
|
||||||
|
|
||||||
|
|
||||||
window_addText(secondary_wid, 20+300+40, -160,
|
window_addText(wid, 20+300+40, -160,
|
||||||
SHIPYARD_WIDTH-300, 200, 0, "txtDescription",
|
SHIPYARD_WIDTH-300, 200, 0, "txtDescription",
|
||||||
&gl_smallFont, NULL, NULL);
|
&gl_smallFont, NULL, NULL);
|
||||||
|
|
||||||
@ -588,12 +589,12 @@ static void shipyard_open(void) {
|
|||||||
}
|
}
|
||||||
free(ships);
|
free(ships);
|
||||||
}
|
}
|
||||||
window_addImageArray(secondary_wid, 20, 40,
|
window_addImageArray(wid, 20, 40,
|
||||||
310, SHIPYARD_HEIGHT-80, "iarShipyard", 64./96.*128., 64.,
|
310, SHIPYARD_HEIGHT-80, "iarShipyard", 64./96.*128., 64.,
|
||||||
tships, sships, nships, shipyard_update);
|
tships, sships, nships, shipyard_update);
|
||||||
|
|
||||||
/* Write the shipyard stuff. */
|
/* Write the shipyard stuff. */
|
||||||
shipyard_update(NULL);
|
shipyard_update(wid, NULL);
|
||||||
|
|
||||||
if(!has_visited(VISITED_SHIPYARD)) {
|
if(!has_visited(VISITED_SHIPYARD)) {
|
||||||
/* @todo mission check. */
|
/* @todo mission check. */
|
||||||
@ -601,25 +602,19 @@ static void shipyard_open(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void shipyard_close(char* str) {
|
static void shipyard_update(unsigned int wid, char* str) {
|
||||||
if(strcmp(str, "btnCloseShipyard")==0)
|
|
||||||
window_destroy(secondary_wid);
|
|
||||||
secondary_wid = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void shipyard_update(char* str) {
|
|
||||||
(void)str;
|
(void)str;
|
||||||
char* shipname;
|
char* shipname;
|
||||||
Ship* ship;
|
Ship* ship;
|
||||||
char buf[80], buf2[16], buf3[16];
|
char buf[80], buf2[16], buf3[16];
|
||||||
|
|
||||||
shipname = toolkit_getList(secondary_wid, "iarShipyard");
|
shipname = toolkit_getList(wid, "iarShipyard");
|
||||||
|
|
||||||
/* No ships. */
|
/* No ships. */
|
||||||
if(strcmp(shipname, "None")==0) {
|
if(strcmp(shipname, "None")==0) {
|
||||||
window_modifyImage(secondary_wid, "imgTarget", NULL);
|
window_modifyImage(wid, "imgTarget", NULL);
|
||||||
window_disableButton(secondary_wid, "btnBuyShip");
|
window_disableButton(wid, "btnBuyShip");
|
||||||
window_disableButton(secondary_wid, "btnInfoShip");
|
window_disableButton(wid, "btnInfoShip");
|
||||||
snprintf(buf, 80,
|
snprintf(buf, 80,
|
||||||
"None\n"
|
"None\n"
|
||||||
"NA\n"
|
"NA\n"
|
||||||
@ -627,17 +622,17 @@ static void shipyard_update(char* str) {
|
|||||||
"\n"
|
"\n"
|
||||||
"NA\n"
|
"NA\n"
|
||||||
"NA\n");
|
"NA\n");
|
||||||
window_modifyText(secondary_wid, "txtDDesc", buf);
|
window_modifyText(wid, "txtDDesc", buf);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ship = ship_get(shipname);
|
ship = ship_get(shipname);
|
||||||
|
|
||||||
if(player_nships()==0) window_disableButton(secondary_wid, "btnYourShips");
|
if(player_nships()==0) window_disableButton(wid, "btnYourShips");
|
||||||
else window_enableButton(secondary_wid, "btnYourShips");
|
else window_enableButton(wid, "btnYourShips");
|
||||||
|
|
||||||
window_modifyImage(secondary_wid, "imgTarget", ship->gfx_target);
|
window_modifyImage(wid, "imgTarget", ship->gfx_target);
|
||||||
window_modifyText(secondary_wid, "txtDescription", ship->description);
|
window_modifyText(wid, "txtDescription", ship->description);
|
||||||
|
|
||||||
credits2str(buf2, ship->price, 2);
|
credits2str(buf2, ship->price, 2);
|
||||||
credits2str(buf3, player->credits, 2);
|
credits2str(buf3, player->credits, 2);
|
||||||
@ -654,28 +649,27 @@ static void shipyard_update(char* str) {
|
|||||||
buf2,
|
buf2,
|
||||||
buf3);
|
buf3);
|
||||||
|
|
||||||
window_modifyText(secondary_wid, "txtDDesc", buf);
|
window_modifyText(wid, "txtDDesc", buf);
|
||||||
|
|
||||||
if(ship->price > player->credits)
|
if(ship->price > player->credits)
|
||||||
window_disableButton(secondary_wid, "btnBuyShip");
|
window_disableButton(wid, "btnBuyShip");
|
||||||
else window_enableButton(secondary_wid, "btnBuyShip");
|
else window_enableButton(wid, "btnBuyShip");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void shipyard_info(char* str) {
|
static void shipyard_info(unsigned int wid, char* str) {
|
||||||
(void)str;
|
(void)str;
|
||||||
char* shipname;
|
char* shipname;
|
||||||
|
|
||||||
shipname = toolkit_getList(secondary_wid, "iarShipyard");
|
shipname = toolkit_getList(wid, "iarShipyard");
|
||||||
ship_view(shipname);
|
ship_view(0, shipname);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void shipyard_buy(char* str) {
|
static void shipyard_buy(unsigned int wid, char* str) {
|
||||||
(void)str;
|
(void)str;
|
||||||
char* shipname, buf[16];
|
char* shipname, buf[16];
|
||||||
Ship* ship;
|
Ship* ship;
|
||||||
|
|
||||||
shipname = toolkit_getList(secondary_wid, "iarShipyard");
|
shipname = toolkit_getList(wid, "iarShipyard");
|
||||||
ship = ship_get(shipname);
|
ship = ship_get(shipname);
|
||||||
|
|
||||||
if(pilot_cargoUsed(player) > ship->cap_cargo) {
|
if(pilot_cargoUsed(player) > ship->cap_cargo) {
|
||||||
@ -696,45 +690,47 @@ static void shipyard_buy(char* str) {
|
|||||||
|
|
||||||
player->credits -= ship->price; /* Auch! Paying is hard! */
|
player->credits -= ship->price; /* Auch! Paying is hard! */
|
||||||
|
|
||||||
shipyard_update(NULL);
|
shipyard_update(wid, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void shipyard_yours_open(char* str) {
|
static void shipyard_yours_open(unsigned int parent, char* str) {
|
||||||
(void)str;
|
(void)str;
|
||||||
|
(void)parent;
|
||||||
char** sships;
|
char** sships;
|
||||||
glTexture** tships;
|
glTexture** tships;
|
||||||
int nships;
|
int nships;
|
||||||
|
unsigned int wid;
|
||||||
|
|
||||||
/* Create window. */
|
/* Create window. */
|
||||||
terciary_wid = window_create("Your Ships",
|
wid = window_create("Your Ships",
|
||||||
-1, -1, SHIPYARD_WIDTH, SHIPYARD_HEIGHT);
|
-1, -1, SHIPYARD_WIDTH, SHIPYARD_HEIGHT);
|
||||||
|
|
||||||
/* Buttons. */
|
/* Buttons. */
|
||||||
window_addButton(terciary_wid, -20, 20,
|
window_addButton(wid, -20, 20,
|
||||||
BUTTON_WIDTH, BUTTON_HEIGHT, "btnCloseYourShips",
|
BUTTON_WIDTH, BUTTON_HEIGHT, "btnCloseYourShips",
|
||||||
"Shipyard", shipyard_yours_close);
|
"Shipyard", window_close);
|
||||||
|
|
||||||
window_addButton(terciary_wid, -40-BUTTON_WIDTH, 20,
|
window_addButton(wid, -40-BUTTON_WIDTH, 20,
|
||||||
BUTTON_WIDTH, BUTTON_HEIGHT, "btnChangeShip",
|
BUTTON_WIDTH, BUTTON_HEIGHT, "btnChangeShip",
|
||||||
"Change Ship", shipyard_yoursChange);
|
"Change Ship", shipyard_yoursChange);
|
||||||
|
|
||||||
window_addButton(terciary_wid, -40-BUTTON_WIDTH, 40+BUTTON_HEIGHT,
|
window_addButton(wid, -40-BUTTON_WIDTH, 40+BUTTON_HEIGHT,
|
||||||
BUTTON_WIDTH, BUTTON_HEIGHT, "btnTransportShip",
|
BUTTON_WIDTH, BUTTON_HEIGHT, "btnTransportShip",
|
||||||
"Transport Ship", shipyard_yoursTransport);
|
"Transport Ship", shipyard_yoursTransport);
|
||||||
|
|
||||||
window_addButton(terciary_wid, -20, 40+BUTTON_HEIGHT,
|
window_addButton(wid, -20, 40+BUTTON_HEIGHT,
|
||||||
BUTTON_WIDTH, BUTTON_HEIGHT, "btnSellShip",
|
BUTTON_WIDTH, BUTTON_HEIGHT, "btnSellShip",
|
||||||
"Sell Ship", shipyard_yoursSell);
|
"Sell Ship", shipyard_yoursSell);
|
||||||
|
|
||||||
/* Image. */
|
/* Image. */
|
||||||
window_addRect(terciary_wid, -40, -50,
|
window_addRect(wid, -40, -50,
|
||||||
128, 96, "rctTarget", &cBlack, 0);
|
128, 96, "rctTarget", &cBlack, 0);
|
||||||
|
|
||||||
window_addImage(terciary_wid, -40-128, -50-96,
|
window_addImage(wid, -40-128, -50-96,
|
||||||
"imgTarget", NULL, 1);
|
"imgTarget", NULL, 1);
|
||||||
|
|
||||||
/* Text. */
|
/* Text. */
|
||||||
window_addText(terciary_wid, 40+300+40, -55,
|
window_addText(wid, 40+300+40, -55,
|
||||||
100, 96, 0, "txtSDesc", &gl_smallFont, &cDConsole,
|
100, 96, 0, "txtSDesc", &gl_smallFont, &cDConsole,
|
||||||
"Name:\n"
|
"Name:\n"
|
||||||
"Ship:\n"
|
"Ship:\n"
|
||||||
@ -747,14 +743,14 @@ static void shipyard_yours_open(char* str) {
|
|||||||
"Transportation\n"
|
"Transportation\n"
|
||||||
"Sell price\n");
|
"Sell price\n");
|
||||||
|
|
||||||
window_addText(terciary_wid, 40+300+40+100, -55,
|
window_addText(wid, 40+300+40+100, -55,
|
||||||
130, 96, 0, "txtDDesc", &gl_smallFont, &cBlack, NULL);
|
130, 96, 0, "txtDDesc", &gl_smallFont, &cBlack, NULL);
|
||||||
|
|
||||||
window_addText(terciary_wid, 40+300+40, -215,
|
window_addText(wid, 40+300+40, -215,
|
||||||
100, 20, 0, "txtSOutfits", &gl_smallFont, &cDConsole,
|
100, 20, 0, "txtSOutfits", &gl_smallFont, &cDConsole,
|
||||||
"Outfits:\n");
|
"Outfits:\n");
|
||||||
|
|
||||||
window_addText(terciary_wid, 40+300+40, -215-gl_smallFont.h-5,
|
window_addText(wid, 40+300+40, -215-gl_smallFont.h-5,
|
||||||
SHIPYARD_WIDTH-40-300-40-20, 200, 0, "txtDOutfits",
|
SHIPYARD_WIDTH-40-300-40-20, 200, 0, "txtDOutfits",
|
||||||
&gl_smallFont, &cBlack, NULL);
|
&gl_smallFont, &cBlack, NULL);
|
||||||
|
|
||||||
@ -763,20 +759,14 @@ static void shipyard_yours_open(char* str) {
|
|||||||
sships = malloc(sizeof(char*)*nships);
|
sships = malloc(sizeof(char*)*nships);
|
||||||
tships = malloc(sizeof(glTexture*)*nships);
|
tships = malloc(sizeof(glTexture*)*nships);
|
||||||
player_ships(sships, tships);
|
player_ships(sships, tships);
|
||||||
window_addImageArray(terciary_wid, 20, 40,
|
window_addImageArray(wid, 20, 40,
|
||||||
310, SHIPYARD_HEIGHT-80, "lstYourShips", 64./96.*128., 64.,
|
310, SHIPYARD_HEIGHT-80, "lstYourShips", 64./96.*128., 64.,
|
||||||
tships, sships, nships, shipyard_yoursUpdate);
|
tships, sships, nships, shipyard_yoursUpdate);
|
||||||
|
|
||||||
shipyard_yoursUpdate(NULL);
|
shipyard_yoursUpdate(wid, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void shipyard_yours_close(char* str) {
|
static void shipyard_yoursUpdate(unsigned int wid, char* str) {
|
||||||
(void)str;
|
|
||||||
window_destroy(terciary_wid);
|
|
||||||
terciary_wid = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void shipyard_yoursUpdate(char* str) {
|
|
||||||
(void)str;
|
(void)str;
|
||||||
char buf[256], buf2[16], buf3[16], *buf4;
|
char buf[256], buf2[16], buf3[16], *buf4;
|
||||||
char* shipname;
|
char* shipname;
|
||||||
@ -784,12 +774,12 @@ static void shipyard_yoursUpdate(char* str) {
|
|||||||
char* loc;
|
char* loc;
|
||||||
int price;
|
int price;
|
||||||
|
|
||||||
shipname = toolkit_getList(terciary_wid, "lstYourShips");
|
shipname = toolkit_getList(wid, "lstYourShips");
|
||||||
if(strcmp(shipname, "None")==0) {
|
if(strcmp(shipname, "None")==0) {
|
||||||
/* No ships. */
|
/* No ships. */
|
||||||
window_disableButton(terciary_wid, "btnChangeShip");
|
window_disableButton(wid, "btnChangeShip");
|
||||||
window_disableButton(terciary_wid, "btnTransportShip");
|
window_disableButton(wid, "btnTransportShip");
|
||||||
window_disableButton(terciary_wid, "btnSellShip");
|
window_disableButton(wid, "btnSellShip");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ship = player_getShip(shipname);
|
ship = player_getShip(shipname);
|
||||||
@ -797,7 +787,7 @@ static void shipyard_yoursUpdate(char* str) {
|
|||||||
price = shipyard_yoursTransportPrice(shipname);
|
price = shipyard_yoursTransportPrice(shipname);
|
||||||
|
|
||||||
/* Update the image. */
|
/* Update the image. */
|
||||||
window_modifyImage(terciary_wid, "imgTarget", ship->ship->gfx_target);
|
window_modifyImage(wid, "imgTarget", ship->ship->gfx_target);
|
||||||
|
|
||||||
/* Update text. */
|
/* Update text. */
|
||||||
credits2str(buf2, price, 2); /* Transport. */
|
credits2str(buf2, price, 2); /* Transport. */
|
||||||
@ -823,33 +813,33 @@ static void shipyard_yoursUpdate(char* str) {
|
|||||||
buf2,
|
buf2,
|
||||||
buf3);
|
buf3);
|
||||||
|
|
||||||
window_modifyText(terciary_wid, "txtDDesc", buf);
|
window_modifyText(wid, "txtDDesc", buf);
|
||||||
|
|
||||||
buf4 = pilot_getOutfits(ship);
|
buf4 = pilot_getOutfits(ship);
|
||||||
window_modifyText(terciary_wid, "txtDOutfits", buf4);
|
window_modifyText(wid, "txtDOutfits", buf4);
|
||||||
free(buf4);
|
free(buf4);
|
||||||
|
|
||||||
/* Button disabling. */
|
/* Button disabling. */
|
||||||
if(strcmp(land_planet->name, loc)) {
|
if(strcmp(land_planet->name, loc)) {
|
||||||
/* Ship not here. */
|
/* Ship not here. */
|
||||||
window_disableButton(terciary_wid, "btnChangeShip");
|
window_disableButton(wid, "btnChangeShip");
|
||||||
if(price > player->credits)
|
if(price > player->credits)
|
||||||
window_disableButton(terciary_wid, "btnTransportShip");
|
window_disableButton(wid, "btnTransportShip");
|
||||||
else window_enableButton(terciary_wid, "btnTransportShip");
|
else window_enableButton(wid, "btnTransportShip");
|
||||||
} else {
|
} else {
|
||||||
window_enableButton(terciary_wid, "btnChangeShip");
|
window_enableButton(wid, "btnChangeShip");
|
||||||
window_disableButton(terciary_wid, "btnTransportShip");
|
window_disableButton(wid, "btnTransportShip");
|
||||||
}
|
}
|
||||||
/* If ship is there you can always sell. */
|
/* If ship is there you can always sell. */
|
||||||
window_enableButton(terciary_wid, "btnSellShip");
|
window_enableButton(wid, "btnSellShip");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void shipyard_yoursChange(char* str) {
|
static void shipyard_yoursChange(unsigned int wid, char* str) {
|
||||||
(void)str;
|
(void)str;
|
||||||
char* shipname, *loc;
|
char* shipname, *loc;
|
||||||
Pilot* newship;
|
Pilot* newship;
|
||||||
|
|
||||||
shipname = toolkit_getList(terciary_wid, "lstYourShips");
|
shipname = toolkit_getList(wid, "lstYourShips");
|
||||||
newship = player_getShip(shipname);
|
newship = player_getShip(shipname);
|
||||||
if(strcmp(shipname, "None")==0) {
|
if(strcmp(shipname, "None")==0) {
|
||||||
/* No ships. */
|
/* No ships. */
|
||||||
@ -872,16 +862,16 @@ static void shipyard_yoursChange(char* str) {
|
|||||||
player_swapShip(shipname);
|
player_swapShip(shipname);
|
||||||
|
|
||||||
/* Recreate the window. */
|
/* Recreate the window. */
|
||||||
shipyard_yours_close(NULL);
|
window_destroy(wid);
|
||||||
shipyard_yours_open(NULL);
|
shipyard_yours_open(0, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void shipyard_yoursSell(char* str) {
|
static void shipyard_yoursSell(unsigned int wid, char* str) {
|
||||||
(void)str;
|
(void)str;
|
||||||
char* shipname, buf[16];
|
char* shipname, buf[16];
|
||||||
int price;
|
int price;
|
||||||
|
|
||||||
shipname = toolkit_getList(terciary_wid, "lstYourShips");
|
shipname = toolkit_getList(wid, "lstYourShips");
|
||||||
if(strcmp(shipname, "None")==0) { /* No ships. */
|
if(strcmp(shipname, "None")==0) { /* No ships. */
|
||||||
dialogue_alert("You can't sell nothing!");
|
dialogue_alert("You can't sell nothing!");
|
||||||
return;
|
return;
|
||||||
@ -904,16 +894,16 @@ static void shipyard_yoursSell(char* str) {
|
|||||||
shipname, buf);
|
shipname, buf);
|
||||||
|
|
||||||
/* Recreate the window. */
|
/* Recreate the window. */
|
||||||
shipyard_yours_close(NULL);
|
window_destroy(wid);
|
||||||
shipyard_yours_open(NULL);
|
shipyard_yours_open(0, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void shipyard_yoursTransport(char* str) {
|
static void shipyard_yoursTransport(unsigned int wid, char* str) {
|
||||||
(void)str;
|
(void)str;
|
||||||
int price;
|
int price;
|
||||||
char* shipname, buf[16];
|
char* shipname, buf[16];
|
||||||
|
|
||||||
shipname = toolkit_getList(terciary_wid, "lstYourShips");
|
shipname = toolkit_getList(wid, "lstYourShips");
|
||||||
if(strcmp(shipname, "None")==0) { /* No ships. */
|
if(strcmp(shipname, "None")==0) { /* No ships. */
|
||||||
dialogue_alert("You can't transport nothing here!");
|
dialogue_alert("You can't transport nothing here!");
|
||||||
return;
|
return;
|
||||||
@ -938,7 +928,7 @@ static void shipyard_yoursTransport(char* str) {
|
|||||||
player_setLoc(shipname, land_planet->name);
|
player_setLoc(shipname, land_planet->name);
|
||||||
|
|
||||||
/* Update the window to reflect the change. */
|
/* Update the window to reflect the change. */
|
||||||
shipyard_yoursUpdate(NULL);
|
shipyard_yoursUpdate(wid, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int shipyard_yoursTransportPrice(char* shipname) {
|
static int shipyard_yoursTransportPrice(char* shipname) {
|
||||||
@ -958,16 +948,18 @@ static int shipyard_yoursTransportPrice(char* shipname) {
|
|||||||
|
|
||||||
/* Spaceport bar. */
|
/* Spaceport bar. */
|
||||||
static void spaceport_bar_open(void) {
|
static void spaceport_bar_open(void) {
|
||||||
secondary_wid = window_create("SpacePort Bar", -1, -1, BAR_WIDTH, BAR_HEIGHT);
|
unsigned int wid;
|
||||||
|
|
||||||
window_addButton(secondary_wid, -20, 20, BUTTON_WIDTH, BUTTON_HEIGHT,
|
wid = window_create("SpacePort Bar", -1, -1, BAR_WIDTH, BAR_HEIGHT);
|
||||||
"btnCloseBar", "Close", spaceport_bar_close);
|
|
||||||
|
|
||||||
window_addButton(secondary_wid, 20, 20,
|
window_addButton(wid, -20, 20, BUTTON_WIDTH, BUTTON_HEIGHT,
|
||||||
|
"btnCloseBar", "Close", window_close);
|
||||||
|
|
||||||
|
window_addButton(wid, 20, 20,
|
||||||
BUTTON_WIDTH, BUTTON_HEIGHT, "btnNews",
|
BUTTON_WIDTH, BUTTON_HEIGHT, "btnNews",
|
||||||
"News", (void(*)(char*))news_open);
|
"News", (void(*)(unsigned int,char*))news_open);
|
||||||
|
|
||||||
window_addText(secondary_wid, 20, -30,
|
window_addText(wid, 20, -30,
|
||||||
BAR_WIDTH-40, BAR_HEIGHT - 40 - BUTTON_HEIGHT, 0,
|
BAR_WIDTH-40, BAR_HEIGHT - 40 - BUTTON_HEIGHT, 0,
|
||||||
"txtDescription", &gl_smallFont, &cBlack,
|
"txtDescription", &gl_smallFont, &cBlack,
|
||||||
land_planet->bar_description);
|
land_planet->bar_description);
|
||||||
@ -978,98 +970,86 @@ static void spaceport_bar_open(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void spaceport_bar_close(char* str) {
|
|
||||||
if(strcmp(str, "btnCloseBar")==0)
|
|
||||||
window_destroy(secondary_wid);
|
|
||||||
secondary_wid = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Planet news reports. */
|
/* Planet news reports. */
|
||||||
static void news_open(void) {
|
static void news_open(unsigned int parent, char* str) {
|
||||||
terciary_wid = window_create("News Reports",
|
(void)parent;
|
||||||
|
(void)str;
|
||||||
|
unsigned int wid;
|
||||||
|
|
||||||
|
wid = window_create("News Reports",
|
||||||
-1, -1, NEWS_WIDTH, NEWS_HEIGHT);
|
-1, -1, NEWS_WIDTH, NEWS_HEIGHT);
|
||||||
|
|
||||||
window_addButton(terciary_wid, -20, 20,
|
window_addButton(wid, -20, 20,
|
||||||
BUTTON_WIDTH, BUTTON_HEIGHT,
|
BUTTON_WIDTH, BUTTON_HEIGHT,
|
||||||
"btnCloseNews", "Close", news_close);
|
"btnCloseNews", "Close", window_close);
|
||||||
|
|
||||||
window_addText(terciary_wid, 20, 20 + BUTTON_HEIGHT + 20,
|
window_addText(wid, 20, 20 + BUTTON_HEIGHT + 20,
|
||||||
NEWS_WIDTH-40, NEWS_HEIGHT - 20 - BUTTON_HEIGHT - 20 - 20 -20,
|
NEWS_WIDTH-40, NEWS_HEIGHT - 20 - BUTTON_HEIGHT - 20 - 20 -20,
|
||||||
0, "txtNews", &gl_smallFont, &cBlack,
|
0, "txtNews", &gl_smallFont, &cBlack,
|
||||||
"News reporters report that they are on strike right now! D:");
|
"News reporters report that they are on strike right now! D:");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void news_close(char* str) {
|
|
||||||
if(strcmp(str, "btnCloseNews")==0)
|
|
||||||
window_destroy(terciary_wid);
|
|
||||||
terciary_wid = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Mission computer, cos' missions rule! */
|
/* Mission computer, cos' missions rule! */
|
||||||
static void misn_open(void) {
|
static void misn_open(void) {
|
||||||
secondary_wid = window_create("Mission Computer",
|
unsigned int wid;
|
||||||
|
|
||||||
|
wid = window_create("Mission Computer",
|
||||||
-1, -1, MISSION_WIDTH, MISSION_HEIGHT);
|
-1, -1, MISSION_WIDTH, MISSION_HEIGHT);
|
||||||
|
|
||||||
/* Buttons. */
|
/* Buttons. */
|
||||||
window_addButton(secondary_wid, -20, 20,
|
window_addButton(wid, -20, 20,
|
||||||
BUTTON_WIDTH, BUTTON_HEIGHT, "btnCloseMission",
|
BUTTON_WIDTH, BUTTON_HEIGHT, "btnCloseMission",
|
||||||
"Close", misn_close);
|
"Close", window_close);
|
||||||
|
|
||||||
window_addButton(secondary_wid, -20, 40+BUTTON_HEIGHT,
|
window_addButton(wid, -20, 40+BUTTON_HEIGHT,
|
||||||
BUTTON_WIDTH, BUTTON_HEIGHT, "btnAcceptMission",
|
BUTTON_WIDTH, BUTTON_HEIGHT, "btnAcceptMission",
|
||||||
"Accept", misn_accept);
|
"Accept", misn_accept);
|
||||||
|
|
||||||
/* Text. */
|
/* Text. */
|
||||||
window_addText(secondary_wid, 300+40, -60,
|
window_addText(wid, 300+40, -60,
|
||||||
300, 40, 0, "txtSReward",
|
300, 40, 0, "txtSReward",
|
||||||
&gl_smallFont, &cDConsole, "Reward:");
|
&gl_smallFont, &cDConsole, "Reward:");
|
||||||
|
|
||||||
window_addText(secondary_wid, 300+100, -60,
|
window_addText(wid, 300+100, -60,
|
||||||
240, 40, 0, "txtReward", &gl_smallFont, &cBlack, NULL);
|
240, 40, 0, "txtReward", &gl_smallFont, &cBlack, NULL);
|
||||||
|
|
||||||
window_addText(secondary_wid, 300+40, -100,
|
window_addText(wid, 300+40, -100,
|
||||||
300, MISSION_HEIGHT - BUTTON_WIDTH - 120, 0,
|
300, MISSION_HEIGHT - BUTTON_WIDTH - 120, 0,
|
||||||
"txtDesc", &gl_smallFont, &cBlack, NULL);
|
"txtDesc", &gl_smallFont, &cBlack, NULL);
|
||||||
|
|
||||||
misn_genList(1);
|
misn_genList(wid, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void misn_close(char* str) {
|
static void misn_accept(unsigned int wid, char* str) {
|
||||||
if(strcmp(str, "btnCloseMission")==0)
|
|
||||||
window_destroy(secondary_wid);
|
|
||||||
secondary_wid = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void misn_accept(char* str) {
|
|
||||||
char* misn_name;
|
char* misn_name;
|
||||||
Mission* misn;
|
Mission* misn;
|
||||||
int pos;
|
int pos;
|
||||||
(void)str;
|
(void)str;
|
||||||
|
|
||||||
misn_name = toolkit_getList(secondary_wid, "lstMission");
|
misn_name = toolkit_getList(wid, "lstMission");
|
||||||
|
|
||||||
if(strcmp(misn_name, "No Missions")==0) return;
|
if(strcmp(misn_name, "No Missions")==0) return;
|
||||||
|
|
||||||
if(dialogue_YesNo("Accept Mission",
|
if(dialogue_YesNo("Accept Mission",
|
||||||
"Are you sure you want to accept this mission?")) {
|
"Are you sure you want to accept this mission?")) {
|
||||||
pos = toolkit_getListPos(secondary_wid, "lstMission");
|
pos = toolkit_getListPos(wid, "lstMission");
|
||||||
misn = &mission_computer[pos];
|
misn = &mission_computer[pos];
|
||||||
if(mission_accept(misn)) {
|
if(mission_accept(misn)) {
|
||||||
/* Success is accepting the mission. */
|
/* Success is accepting the mission. */
|
||||||
memmove(misn, &mission_computer[pos+1],
|
memmove(misn, &mission_computer[pos+1],
|
||||||
sizeof(Mission) * (mission_ncomputer-pos-1));
|
sizeof(Mission) * (mission_ncomputer-pos-1));
|
||||||
mission_ncomputer--;
|
mission_ncomputer--;
|
||||||
misn_genList(0);
|
misn_genList(wid, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void misn_genList(int first) {
|
static void misn_genList(unsigned int wid, int first) {
|
||||||
int i, j;
|
int i, j;
|
||||||
char** misn_names;
|
char** misn_names;
|
||||||
|
|
||||||
if(!first)
|
if(!first)
|
||||||
window_destroyWidget(secondary_wid, "lstMission");
|
window_destroyWidget(wid, "lstMission");
|
||||||
|
|
||||||
/* List. */
|
/* List. */
|
||||||
if(mission_ncomputer != 0) {
|
if(mission_ncomputer != 0) {
|
||||||
@ -1087,32 +1067,32 @@ static void misn_genList(int first) {
|
|||||||
misn_names[0] = strdup("No Missions");
|
misn_names[0] = strdup("No Missions");
|
||||||
}
|
}
|
||||||
|
|
||||||
window_addList(secondary_wid, 20, -40,
|
window_addList(wid, 20, -40,
|
||||||
300, MISSION_HEIGHT-60,
|
300, MISSION_HEIGHT-60,
|
||||||
"lstMission", misn_names, j, 0, misn_update);
|
"lstMission", misn_names, j, 0, misn_update);
|
||||||
|
|
||||||
misn_update(NULL);
|
misn_update(wid, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void misn_update(char* str) {
|
static void misn_update(unsigned int wid, char* str) {
|
||||||
char* active_misn;
|
char* active_misn;
|
||||||
Mission* misn;
|
Mission* misn;
|
||||||
|
|
||||||
(void)str;
|
(void)str;
|
||||||
|
|
||||||
active_misn = toolkit_getList(secondary_wid, "lstMission");
|
active_misn = toolkit_getList(wid, "lstMission");
|
||||||
if(strcmp(active_misn, "No Missions")==0) {
|
if(strcmp(active_misn, "No Missions")==0) {
|
||||||
window_modifyText(secondary_wid, "txtReward", "None");
|
window_modifyText(wid, "txtReward", "None");
|
||||||
window_modifyText(secondary_wid, "txtDesc",
|
window_modifyText(wid, "txtDesc",
|
||||||
"There are no missions available here.");
|
"There are no missions available here.");
|
||||||
|
|
||||||
window_disableButton(secondary_wid, "btnAcceptMission");
|
window_disableButton(wid, "btnAcceptMission");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
misn = &mission_computer[toolkit_getListPos(secondary_wid, "lstMission")];
|
misn = &mission_computer[toolkit_getListPos(wid, "lstMission")];
|
||||||
window_modifyText(secondary_wid, "txtReward", misn->reward);
|
window_modifyText(wid, "txtReward", misn->reward);
|
||||||
window_modifyText(secondary_wid, "txtDesc", misn->desc);
|
window_modifyText(wid, "txtDesc", misn->desc);
|
||||||
window_enableButton(secondary_wid, "btnAcceptMission");
|
window_enableButton(wid, "btnAcceptMission");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return how much it will cost to refuel the player. */
|
/* Return how much it will cost to refuel the player. */
|
||||||
@ -1121,7 +1101,7 @@ static int refuel_price(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Refuel the player. */
|
/* Refuel the player. */
|
||||||
static void spaceport_refuel(char* str) {
|
static void spaceport_refuel(unsigned int wid, char* str) {
|
||||||
(void)str;
|
(void)str;
|
||||||
|
|
||||||
if(player->credits < refuel_price()) {
|
if(player->credits < refuel_price()) {
|
||||||
@ -1132,7 +1112,7 @@ static void spaceport_refuel(char* str) {
|
|||||||
|
|
||||||
player->credits -= refuel_price();
|
player->credits -= refuel_price();
|
||||||
player->fuel = player->fuel_max;
|
player->fuel = player->fuel_max;
|
||||||
window_destroyWidget(land_wid, "btnRefuel");
|
window_destroyWidget(wid, "btnRefuel");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Land the player. */
|
/* Land the player. */
|
||||||
@ -1166,32 +1146,32 @@ void land(Planet* p) {
|
|||||||
"txtPlanetDesc", &gl_smallFont, &cBlack, p->description);
|
"txtPlanetDesc", &gl_smallFont, &cBlack, p->description);
|
||||||
/* Buttons. */
|
/* Buttons. */
|
||||||
window_addButton(land_wid, -20, 20, BUTTON_WIDTH, BUTTON_HEIGHT,
|
window_addButton(land_wid, -20, 20, BUTTON_WIDTH, BUTTON_HEIGHT,
|
||||||
"btnTakeoff", "Takeoff", (void(*)(char*))takeoff);
|
"btnTakeoff", "Takeoff", (void(*)(unsigned int,char*))takeoff);
|
||||||
|
|
||||||
if(planet_hasService(land_planet, PLANET_SERVICE_COMMODITY))
|
if(planet_hasService(land_planet, PLANET_SERVICE_COMMODITY))
|
||||||
window_addButton(land_wid, -20, 20 + BUTTON_HEIGHT + 20,
|
window_addButton(land_wid, -20, 20 + BUTTON_HEIGHT + 20,
|
||||||
BUTTON_WIDTH, BUTTON_HEIGHT, "btnCommodity",
|
BUTTON_WIDTH, BUTTON_HEIGHT, "btnCommodity",
|
||||||
"Commodity Exchange", (void(*)(char*))commodity_exchange_open);
|
"Commodity Exchange", (void(*)(unsigned int,char*))commodity_exchange_open);
|
||||||
|
|
||||||
if(planet_hasService(land_planet, PLANET_SERVICE_SHIPYARD))
|
if(planet_hasService(land_planet, PLANET_SERVICE_SHIPYARD))
|
||||||
window_addButton(land_wid, -20 - BUTTON_WIDTH - 20, 20,
|
window_addButton(land_wid, -20 - BUTTON_WIDTH - 20, 20,
|
||||||
BUTTON_WIDTH, BUTTON_HEIGHT, "btnShipyard",
|
BUTTON_WIDTH, BUTTON_HEIGHT, "btnShipyard",
|
||||||
"Shipyard", (void(*)(char*))shipyard_open);
|
"Shipyard", (void(*)(unsigned int,char*))shipyard_open);
|
||||||
|
|
||||||
if(planet_hasService(land_planet, PLANET_SERVICE_OUTFITS))
|
if(planet_hasService(land_planet, PLANET_SERVICE_OUTFITS))
|
||||||
window_addButton(land_wid, -20 - BUTTON_WIDTH - 20, 20 + BUTTON_HEIGHT + 20,
|
window_addButton(land_wid, -20 - BUTTON_WIDTH - 20, 20 + BUTTON_HEIGHT + 20,
|
||||||
BUTTON_WIDTH, BUTTON_HEIGHT, "btnOutfits",
|
BUTTON_WIDTH, BUTTON_HEIGHT, "btnOutfits",
|
||||||
"Outfits", (void(*)(char*))outfits_open);
|
"Outfits", (void(*)(unsigned int,char*))outfits_open);
|
||||||
|
|
||||||
/* Third column. */
|
/* Third column. */
|
||||||
if(planet_hasService(land_planet, PLANET_SERVICE_BASIC)) {
|
if(planet_hasService(land_planet, PLANET_SERVICE_BASIC)) {
|
||||||
window_addButton(land_wid, 20, 20,
|
window_addButton(land_wid, 20, 20,
|
||||||
BUTTON_WIDTH, BUTTON_HEIGHT, "btnNews",
|
BUTTON_WIDTH, BUTTON_HEIGHT, "btnNews",
|
||||||
"Mission Terminal", (void(*)(char*))misn_open);
|
"Mission Terminal", (void(*)(unsigned int,char*))misn_open);
|
||||||
|
|
||||||
window_addButton(land_wid, 20, 20 + BUTTON_HEIGHT + 20,
|
window_addButton(land_wid, 20, 20 + BUTTON_HEIGHT + 20,
|
||||||
BUTTON_WIDTH, BUTTON_HEIGHT, "btnBar",
|
BUTTON_WIDTH, BUTTON_HEIGHT, "btnBar",
|
||||||
"Spaceport Bar", (void(*)(char*))spaceport_bar_open);
|
"Spaceport Bar", (void(*)(unsigned int,char*))spaceport_bar_open);
|
||||||
|
|
||||||
if(player->fuel < player->fuel_max) {
|
if(player->fuel < player->fuel_max) {
|
||||||
credits2str(cred, refuel_price(), 2);
|
credits2str(cred, refuel_price(), 2);
|
||||||
@ -1284,8 +1264,6 @@ void takeoff(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @fn void land_cleanup(void)
|
|
||||||
*
|
|
||||||
* @brief Cleans up some land-related variables.
|
* @brief Cleans up some land-related variables.
|
||||||
*/
|
*/
|
||||||
void land_cleanup(void) {
|
void land_cleanup(void) {
|
||||||
@ -1294,11 +1272,9 @@ void land_cleanup(void) {
|
|||||||
landed = 0;
|
landed = 0;
|
||||||
land_visited = 0;
|
land_visited = 0;
|
||||||
|
|
||||||
/* Clean up window. */
|
/* Destroy window. */
|
||||||
if(land_wid != 0) {
|
if(land_wid > 0)
|
||||||
window_destroy(land_wid);
|
window_destroy(land_wid);
|
||||||
land_wid = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Clean up possible stray graphic. */
|
/* Clean up possible stray graphic. */
|
||||||
if(gfx_exterior != NULL) {
|
if(gfx_exterior != NULL) {
|
||||||
|
Loading…
Reference in New Issue
Block a user