// File: /workspace/github_cpp_makefile_star2_O1/Jacobious52[P]Tanks/Game.cpp
// Function: Game::Game(bool, float, int)
Game(bool skip, float game_time, int rain)
        : _skip_intro(skip)
    {
        ConsoleTools::play_music("music.wav");

        // clear computer.txt for writing
        if (DebugView::shared_view()->show == true)
        {
            std::ofstream file("computer.txt");
            file << "Computer 1" << std::endl << "Computer 2" << std::endl;
            file.close();
        }

        // write the seed of this game for replay
        if (ConsoleTools::replay == false)
        {
            std::ofstream file("replay.txt");
            int t = time(0);
            file << t << std::endl;
            file.close();
            srand(t);
        }
        else
        {
            printf("seed: ");
            srand(ConsoleTools::get_input<int>("int: ", Point<int>(StringTools::string_width("seed: "), 0)));
        }

        // load texture map file
        TextureTools::load_texture_file("textures.txt");

        // setup intro view
        intro_view = new IntroView();
        current_view = intro_view;
        intro_view->tag = rain;

        // switch to gameview straight away
        if (_skip_intro == true)
        {
            game_view = new GameView("Default 1", "Default 2");
            game_view->tag = rain;
            current_view = game_view;
            current_view->draw();
        }

        // : create timer and link to self
        timer = Timer(game_time, true);
        timer.set_delegate(this);

        tick_time = 0;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2d8, %rsp            # imm = 0x2D8
movl %edx, %r15d
movss %xmm0, -0x2c(%rbp)
movq %rdi, %r14
leaq 0x67e0(%rip), %rax      # 0x10d88
movq %rax, (%rdi)
leaq 0x28(%rdi), %rax
movq %rax, -0x38(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movw $0x0, 0x40(%rdi)
movb %sil, 0x4c(%rdi)
leaq -0xe8(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x1dc5(%rip), %rsi      # 0xc39b
leaq 0x1dc7(%rip), %rdx      # 0xc3a4
leaq -0xf8(%rbp), %rdi
callq 0x5744
leaq -0xf8(%rbp), %rdi
callq 0x39ae
movq -0xf8(%rbp), %rdi
cmpq %rbx, %rdi
je 0xa606
callq 0x3240
callq 0x4d7e
cmpb $0x1, 0x31(%rax)
jne 0xa6ce
leaq 0x1acf(%rip), %rsi      # 0xc0eb
leaq -0x2f8(%rbp), %rdi
movl $0x10, %edx
callq 0x32b0
leaq 0x1d71(%rip), %rsi      # 0xc3a5
leaq -0x2f8(%rbp), %r12
movl $0xa, %edx
movq %r12, %rdi
callq 0x32d0
movq -0x2f8(%rbp), %rax
addq -0x18(%rax), %r12
movq %r12, %rdi
movl $0xa, %esi
callq 0x3260
movsbl %al, %esi
leaq -0x2f8(%rbp), %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3180
movq %rax, %r12
leaq 0x1d2f(%rip), %rsi      # 0xc3b0
movl $0xa, %edx
movq %rax, %rdi
callq 0x32d0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3260
movsbl %al, %esi
movq %r12, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3180
leaq -0x2f8(%rbp), %rdi
callq 0x3330
leaq -0x2f8(%rbp), %rdi
callq 0x3350
leaq 0x6ba5(%rip), %rax      # 0x1127a
cmpb $0x0, (%rax)
je 0xa780
leaq 0x1cd6(%rip), %rdi      # 0xc3bb
xorl %eax, %eax
callq 0x3060
leaq -0xc8(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x1cc3(%rip), %rsi      # 0xc3c2
leaq 0x1cc1(%rip), %rdx      # 0xc3c7
leaq -0xd8(%rbp), %rdi
callq 0x5744
leaq -0xa8(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x1c97(%rip), %rsi      # 0xc3bb
leaq 0x1c96(%rip), %rdx      # 0xc3c1
leaq -0xb8(%rbp), %rdi
callq 0x5744
leaq -0xb8(%rbp), %rdi
callq 0x6d4e
movl %eax, %esi
leaq -0xd8(%rbp), %rdi
callq 0xaa72
movl %eax, %edi
callq 0x3250
movq -0xb8(%rbp), %rdi
cmpq %r13, %rdi
je 0xa769
callq 0x3240
movq -0xd8(%rbp), %rdi
cmpq %r12, %rdi
je 0xa7fb
callq 0x3240
jmp 0xa7fb
leaq 0x1982(%rip), %rsi      # 0xc109
leaq -0x2f8(%rbp), %rdi
movl $0x10, %edx
callq 0x32b0
xorl %edi, %edi
callq 0x3230
movq %rax, %r12
leaq -0x2f8(%rbp), %rdi
movl %r12d, %esi
callq 0x3420
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3260
movsbl %al, %esi
movq %r13, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3180
leaq -0x2f8(%rbp), %rdi
callq 0x3330
movl %r12d, %edi
callq 0x3250
leaq -0x2f8(%rbp), %rdi
callq 0x3350
leaq -0x88(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x1bbb(%rip), %rsi      # 0xc3c8
leaq 0x1bc0(%rip), %rdx      # 0xc3d4
leaq -0x98(%rbp), %rdi
callq 0x5744
leaq -0x98(%rbp), %rdi
callq 0x814a
movq -0x98(%rbp), %rdi
cmpq %rbx, %rdi
je 0xa83d
callq 0x3240
movl $0xf8, %edi
callq 0x3270
movq %rax, %r12
movq %rax, %rdi
callq 0xab3e
movq %r12, 0x10(%r14)
movq %r12, 0x8(%r14)
movl %r15d, 0x8(%r12)
cmpb $0x1, 0x4c(%r14)
jne 0xa8f7
movl $0x88, %edi
callq 0x3270
movq %rax, %r12
leaq -0x68(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x1b4f(%rip), %rsi      # 0xc3d5
leaq 0x1b51(%rip), %rdx      # 0xc3de
leaq -0x78(%rbp), %rdi
callq 0x5744
leaq -0x48(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x1b3a(%rip), %rsi      # 0xc3df
leaq 0x1b3c(%rip), %rdx      # 0xc3e8
leaq -0x58(%rbp), %rdi
callq 0x5744
leaq -0x78(%rbp), %rsi
leaq -0x58(%rbp), %rdx
movq %r12, %rdi
callq 0xac4c
movq %r12, 0x18(%r14)
movq -0x58(%rbp), %rdi
cmpq %rbx, %rdi
je 0xa8d7
callq 0x3240
movq -0x78(%rbp), %rdi
cmpq %r13, %rdi
je 0xa8e5
callq 0x3240
movq 0x18(%r14), %rdi
movl %r15d, 0x8(%rdi)
movq %rdi, 0x8(%r14)
movq (%rdi), %rax
callq *0x18(%rax)
cvtss2sd -0x2c(%rbp), %xmm0
xorl %eax, %eax
movq %rax, 0x28(%r14)
movsd %xmm0, 0x30(%r14)
movq %rax, 0x38(%r14)
movw $0x1, 0x40(%r14)
movq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0x8bcc
movl $0x0, 0x48(%r14)
addq $0x2d8, %rsp            # imm = 0x2D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x58(%rbp), %rdi
cmpq %rbx, %rdi
je 0xa94f
callq 0x3240
jmp 0xa94f
movq %rax, %r14
movq -0x78(%rbp), %rdi
cmpq %r13, %rdi
je 0xa96d
callq 0x3240
jmp 0xa96d
jmp 0xa96a
movq %rax, %r14
jmp 0xa9a9
jmp 0xa9cd
jmp 0xa9cd
movq %rax, %r14
movq %r12, %rdi
jmp 0xa9b5
movq %rax, %r14
movq -0x98(%rbp), %rdi
jmp 0xa98c
jmp 0xa9cd
jmp 0xa9cd
movq %rax, %r14
movq -0xf8(%rbp), %rdi
cmpq %rbx, %rdi
jne 0xa9b5
jmp 0xa9e1
jmp 0xa9cd
movq %rax, %r14
movq -0xb8(%rbp), %rdi
cmpq %r13, %rdi
je 0xa9a9
callq 0x3240
movq -0xd8(%rbp), %rdi
cmpq %r12, %rdi
je 0xa9e1
callq 0x3240
jmp 0xa9e1
movq %rax, %r14
leaq -0x2f8(%rbp), %rdi
callq 0x3350
jmp 0xa9e1
movq %rax, %r14
jmp 0xa9e1
movq %rax, %r14
leaq -0x2f8(%rbp), %rdi
callq 0x3350
movq -0x38(%rbp), %rax
movq $0x0, (%rax)
movq %r14, %rdi
callq 0x3440
movq %rax, %rdi
callq 0x3ad6