Merge pull request #186 from kichikuou/DrawDungeon

Implement DrawDungeon.SetWalkedAll
This commit is contained in:
Nunuhara Cabbage
2024-09-17 20:05:31 -07:00
committed by GitHub
3 changed files with 14 additions and 2 deletions
+1
View File
@@ -73,6 +73,7 @@ bool dungeon_load(struct dungeon_context *ctx, int num);
void dungeon_set_camera(int surface, float x, float y, float z, float angle, float angle_p);
void dungeon_set_walked(int surface, int x, int y, int z, int flag);
int dungeon_get_walked(int surface, int x, int y, int z);
void dungeon_set_walked_all(int surface);
int dungeon_calc_conquer(int surface);
bool dungeon_load_walk_data(int surface, int map, struct page **page);
bool dungeon_save_walk_data(int surface, int map, struct page **page);
+12
View File
@@ -326,6 +326,18 @@ void dungeon_set_walked(int surface, int x, int y, int z, int flag)
}
}
void dungeon_set_walked_all(int surface)
{
struct dungeon_context *ctx = dungeon_get_context(surface);
if (!ctx)
return;
int nr_cells = dgn_nr_cells(ctx->dgn);
for (struct dgn_cell *c = ctx->dgn->cells; c < ctx->dgn->cells + nr_cells; c++) {
c->walked = 1;
dungeon_map_reveal(ctx, c->x, c->y, c->z, false);
}
}
int dungeon_get_walked(int surface, int x, int y, int z)
{
struct dungeon_context *ctx = dungeon_get_context(surface);
+1 -2
View File
@@ -255,7 +255,6 @@ CELL_SETTER(DrawDungeon_SetTexDoorE, int, cell->east_door, true);
HLL_QUIET_UNIMPLEMENTED( , void, DrawDungeon, SetDrawHalfFlag, int surface, int flag);
HLL_QUIET_UNIMPLEMENTED(0, int, DrawDungeon, GetDrawHalfFlag, int surface);
//void DrawDungeon_SetWalkedAll(int surface);
//int DrawDungeon_CalcNumofFloor(int surface);
//int DrawDungeon_CalcNumofWalk(int surface);
//int DrawDungeon_CalcNumofWalk2(int surface);
@@ -384,7 +383,7 @@ HLL_QUIET_UNIMPLEMENTED( , void, DrawDungeon, RestartTimer, void);
HLL_EXPORT(SetDrawHalfFlag, DrawDungeon_SetDrawHalfFlag), \
HLL_EXPORT(GetDrawHalfFlag, DrawDungeon_GetDrawHalfFlag), \
HLL_EXPORT(SetWalked, dungeon_set_walked), \
HLL_TODO_EXPORT(SetWalkedAll, DrawDungeon_SetWalkedAll), \
HLL_EXPORT(SetWalkedAll, dungeon_set_walked_all), \
HLL_TODO_EXPORT(CalcNumofFloor, DrawDungeon_CalcNumofFloor), \
HLL_TODO_EXPORT(CalcNumofWalk, DrawDungeon_CalcNumofWalk), \
HLL_TODO_EXPORT(CalcNumofWalk2, DrawDungeon_CalcNumofWalk2), \