Skip to content

Commit

Permalink
Merge branch 'port' of https://github.com/fgsfdsfgs/perfect_dark into…
Browse files Browse the repository at this point in the history
… port-debugger
  • Loading branch information
fgsfdsfgs committed May 12, 2024
2 parents c2fcb99 + ce64241 commit 86eaa62
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/game/bg.c
Original file line number Diff line number Diff line change
Expand Up @@ -6407,12 +6407,16 @@ void bgFindEnteredRooms(struct coord *bbmin, struct coord *bbmax, RoomNum *rooms
void bgCalculateGlaresForVisibleRooms(void)
{
s32 i;

g_NumRoomsWithGlares = 0;
for (i = 1; i < g_Vars.roomcount; i++) {
if (g_Rooms[i].flags & ROOMFLAG_ONSCREEN) {
artifactsCalculateGlaresForRoom(i);
if (g_NumRoomsWithGlares < 100) {
g_GlareRooms[g_NumRoomsWithGlares++] = i;

if (!g_Vars.mplayerisrunning) {
for (i = 1; i < g_Vars.roomcount; i++) {
if (g_Rooms[i].flags & ROOMFLAG_ONSCREEN) {
artifactsCalculateGlaresForRoom(i);
if (g_NumRoomsWithGlares < 100) {
g_GlareRooms[g_NumRoomsWithGlares++] = i;
}
}
}
}
Expand Down

0 comments on commit 86eaa62

Please sign in to comment.