summaryrefslogtreecommitdiff
path: root/src/manager/managerE.c
blob: 200a52d58c9355f6e5c28f84234c3db6e20578d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "global.h"
#include "entity.h"
#include "manager.h"
#include "flags.h"
#include "room.h"
#include "audio.h"
#include "functions.h"

void sub_08058E60(ManagerE* this) {
    if (!this->manager.action) {
        this->manager.action = 1;
        if (CheckFlags(this->unk_3e)) {
            DeleteManager(&this->manager);
            return;
        }
    }
    if (!CheckFlags(this->unk_3e))
        return;
    if (this->manager.unk_0b != 0) {
        this->manager.unk_0b = 0;
        sub_08078A90(0xff);
        sub_08078B48();
    }
    if (this->unk_3a == 0) {
        if (this->unk_38 != 0) {
            SoundReq(this->unk_38);
        }
        LoadRoomEntityList(GetCurrentRoomProperty(this->manager.unk_0a));
        DeleteThisEntity();
    } else {
        this->unk_3a -= 1;
    }
}