// File: KellerMartins[P]PDS2-Pacman/source/game/game.cpp
// Function: Game::Init(int, int, bool, RenderManager::BlurQuality)
void Init(int screenWidth, int screenHeight, bool fullscreen, RenderManager::BlurQuality quality){
        RenderManager::Init(screenWidth, screenHeight, fullscreen, "Pacman Remake - PDS2");
        RenderManager::SetBloomQuality(quality);
        RenderManager::SetCameraOffset((Vector3){0.0f, 18.5237f, 7.3416f});

        Mapa::CarregaArquivo("assets/maps/mapa1.txt");

        pacman = new Pacman(Mapa::GetPlayerSpawn().x,Mapa::GetPlayerSpawn().y);

        Vector2 enemyPos;
        if(Mapa::GetEnemySpawn(0, enemyPos))
            Enemy::AdicionaInimigo(new Blinky(enemyPos.x,enemyPos.y));

        if(Mapa::GetEnemySpawn(1, enemyPos))
            Enemy::AdicionaInimigo(new Pinky(enemyPos.x,enemyPos.y));

        if(Mapa::GetEnemySpawn(2, enemyPos))
            Enemy::AdicionaInimigo(new Inky(enemyPos.x,enemyPos.y));

        if(Mapa::GetEnemySpawn(3, enemyPos))
            Enemy::AdicionaInimigo(new Clyde(enemyPos.x,enemyPos.y));

        SetState(Menu);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movb %dl, %al
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movl %ecx, -0x10(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0xb4(%rbp)
movl -0x8(%rbp), %eax
movl %eax, -0xb0(%rbp)
movb -0x9(%rbp), %al
movb %al, -0xa9(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x9f60
movq -0xa8(%rbp), %rdx
leaq 0x97f3f(%rip), %rsi     # 0xa5043
leaq -0x30(%rbp), %rdi
callq 0x9b20
jmp 0xd10f
movl -0xb0(%rbp), %esi
movl -0xb4(%rbp), %edi
movb -0xa9(%rbp), %al
movzbl %al, %edx
andl $0x1, %edx
leaq -0x30(%rbp), %rcx
callq 0x17650
jmp 0xd132
leaq -0x30(%rbp), %rdi
callq 0x9530
leaq -0x31(%rbp), %rdi
callq 0x9960
movl -0x10(%rbp), %edi
callq 0x17f20
movl $0x0, -0x50(%rbp)
movl $0x4194308a, -0x4c(%rbp) # imm = 0x4194308A
movl $0x40eaee63, -0x48(%rbp) # imm = 0x40EAEE63
movl -0x48(%rbp), %eax
movl %eax, -0x58(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
movsd -0x60(%rbp), %xmm0
movss -0x58(%rbp), %xmm1
callq 0x18890
leaq -0x81(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x9f60
movq -0xc0(%rbp), %rdx
leaq 0x98099(%rip), %rsi     # 0xa5238
leaq -0x80(%rbp), %rdi
callq 0x9b20
jmp 0xd1aa
leaq -0x80(%rbp), %rdi
callq 0xf500
jmp 0xd1b5
leaq -0x80(%rbp), %rdi
callq 0x9530
leaq -0x81(%rbp), %rdi
callq 0x9960
movl $0x380, %edi            # imm = 0x380
callq 0x98b0
movq %rax, -0xd8(%rbp)
callq 0x106c0
movaps %xmm0, -0xd0(%rbp)
jmp 0xd1e9
movaps -0xd0(%rbp), %xmm0
movlpd %xmm0, -0x8c(%rbp)
cvttss2si -0x8c(%rbp), %eax
movl %eax, -0xf4(%rbp)
callq 0x106c0
movaps %xmm0, -0xf0(%rbp)
jmp 0xd214
movl -0xf4(%rbp), %esi
movq -0xd8(%rbp), %rdi
movaps -0xf0(%rbp), %xmm0
movlpd %xmm0, -0x94(%rbp)
cvttss2si -0x90(%rbp), %edx
callq 0x137b0
jmp 0xd23f
movq -0xd8(%rbp), %rax
movq %rax, 0xddc4b(%rip)     # 0xeae98
xorl %edi, %edi
leaq -0x9c(%rbp), %rsi
callq 0x106f0
testb $0x1, %al
jne 0xd264
jmp 0xd34c
movl $0x2f8, %edi            # imm = 0x2F8
callq 0x98b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x100(%rbp)
cvttss2si -0x9c(%rbp), %esi
cvttss2si -0x98(%rbp), %edx
callq 0x1d080
jmp 0xd292
movq -0x100(%rbp), %rdi
callq 0xbc10
jmp 0xd34c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xd2c6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x9530
leaq -0x31(%rbp), %rdi
callq 0x9960
jmp 0xd4bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xd2f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x9530
leaq -0x81(%rbp), %rdi
callq 0x9960
jmp 0xd4bb
movq -0xd8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x380, %esi            # imm = 0x380
callq 0x98e0
jmp 0xd4bb
movq -0x100(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x2f8, %esi            # imm = 0x2F8
callq 0x98e0
jmp 0xd4bb
movl $0x1, %edi
leaq -0x9c(%rbp), %rsi
callq 0x106f0
testb $0x1, %al
jne 0xd363
jmp 0xd3c1
movl $0x2f8, %edi            # imm = 0x2F8
callq 0x98b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x108(%rbp)
cvttss2si -0x9c(%rbp), %esi
cvttss2si -0x98(%rbp), %edx
callq 0x1d5f0
jmp 0xd391
movq -0x108(%rbp), %rdi
callq 0xbc10
jmp 0xd3c1
movq -0x108(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x2f8, %esi            # imm = 0x2F8
callq 0x98e0
jmp 0xd4bb
movl $0x2, %edi
leaq -0x9c(%rbp), %rsi
callq 0x106f0
testb $0x1, %al
jne 0xd3d8
jmp 0xd436
movl $0x2f8, %edi            # imm = 0x2F8
callq 0x98b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x110(%rbp)
cvttss2si -0x9c(%rbp), %esi
cvttss2si -0x98(%rbp), %edx
callq 0x1d3e0
jmp 0xd406
movq -0x110(%rbp), %rdi
callq 0xbc10
jmp 0xd436
movq -0x110(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x2f8, %esi            # imm = 0x2F8
callq 0x98e0
jmp 0xd4bb
movl $0x3, %edi
leaq -0x9c(%rbp), %rsi
callq 0x106f0
testb $0x1, %al
jne 0xd44d
jmp 0xd4a8
movl $0x2f8, %edi            # imm = 0x2F8
callq 0x98b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x118(%rbp)
cvttss2si -0x9c(%rbp), %esi
cvttss2si -0x98(%rbp), %edx
callq 0x1d210
jmp 0xd47b
movq -0x118(%rbp), %rdi
callq 0xbc10
jmp 0xd4a8
movq -0x118(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movl $0x2f8, %esi            # imm = 0x2F8
callq 0x98e0
jmp 0xd4bb
movl $0x1, %edi
callq 0xd4d0
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x9f50
nopw %cs:(%rax,%rax)