2015-03-03 06:40:29 +00:00
|
|
|
/* ReC98
|
|
|
|
* -----
|
|
|
|
* Code segment #3 of TH02's MAINE.EXE
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "th02\th02.h"
|
|
|
|
|
|
|
|
char rank = RANK_NORMAL;
|
|
|
|
char unused_1 = 0;
|
|
|
|
|
2015-03-07 16:35:30 +00:00
|
|
|
resident_t *mikoconfig;
|
2015-03-03 06:40:29 +00:00
|
|
|
char unused_2;
|
|
|
|
char rem_lives;
|
|
|
|
char rem_bombs;
|
|
|
|
char unused_3;
|
|
|
|
char unused_4;
|
|
|
|
char unused_5;
|
|
|
|
long score;
|
|
|
|
int unused_6;
|
|
|
|
|
|
|
|
int pascal cfg_load(void)
|
|
|
|
{
|
2015-03-07 16:35:30 +00:00
|
|
|
int resident_sgm;
|
2015-03-03 06:40:29 +00:00
|
|
|
|
2015-03-16 21:35:52 +00:00
|
|
|
file_ropen(CFG_FN);
|
2015-03-07 16:35:30 +00:00
|
|
|
file_seek(offsetof(huuma_cfg_t, resident_sgm), 0);
|
|
|
|
file_read(&resident_sgm, sizeof(resident_sgm));
|
2015-03-03 06:40:29 +00:00
|
|
|
file_close();
|
2015-03-07 16:35:30 +00:00
|
|
|
if(!resident_sgm) {
|
2015-03-03 06:40:29 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2015-03-07 16:35:30 +00:00
|
|
|
mikoconfig = MK_FP(resident_sgm, 0);
|
2015-03-03 06:40:29 +00:00
|
|
|
rem_lives = mikoconfig->rem_lives;
|
|
|
|
rem_bombs = mikoconfig->rem_bombs;
|
|
|
|
rank = mikoconfig->rank;
|
|
|
|
score = mikoconfig->score;
|
|
|
|
return 1;
|
|
|
|
}
|