// File: /workspace/github_cpp_makefile_star2_O2/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 $0x2c8, %rsp            # imm = 0x2C8
movl %edx, %r15d
movss %xmm0, -0x30(%rbp)
movq %rdi, %r14
leaq 0x758a(%rip), %rax      # 0x10d88
movq %rax, (%rdi)
leaq 0x28(%rdi), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
andw $0x0, 0x40(%rdi)
movb %sil, 0x4c(%rdi)
leaq 0x1b47(%rip), %rsi      # 0xb363
leaq -0xf0(%rbp), %rdi
leaq -0x2f0(%rbp), %rdx
callq 0x3120
leaq -0xf0(%rbp), %rdi
callq 0x39be
leaq -0xf0(%rbp), %rdi
callq 0x3340
callq 0x4aac
cmpb $0x1, 0x31(%rax)
jne 0x98b2
leaq 0x1862(%rip), %rsi      # 0xb0bb
leaq -0x2f0(%rbp), %rdi
pushq $0x10
popq %rdx
callq 0x3310
leaq 0x1afe(%rip), %rsi      # 0xb36d
leaq -0x2f0(%rbp), %rdi
callq 0x32c0
movq %rax, %rdi
callq 0x3150
leaq 0x1aee(%rip), %rsi      # 0xb378
movq %rax, %rdi
callq 0x32c0
movq %rax, %rdi
callq 0x3150
leaq -0x2f0(%rbp), %rdi
callq 0x3390
leaq -0x2f0(%rbp), %rdi
callq 0x33b0
leaq 0x79e1(%rip), %rax      # 0x1129a
cmpb $0x0, (%rax)
je 0x9938
leaq 0x1abe(%rip), %rdi      # 0xb383
xorl %eax, %eax
callq 0x3050
leaq 0x1ab7(%rip), %rsi      # 0xb38a
leaq -0xd0(%rbp), %rdi
leaq -0x2f0(%rbp), %rdx
callq 0x3120
leaq 0x1a96(%rip), %rsi      # 0xb383
leaq -0xb0(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x3120
leaq -0xb0(%rbp), %rdi
callq 0x6758
movl %eax, %esi
leaq -0xd0(%rbp), %rdi
callq 0x9bce
movl %eax, %edi
callq 0x32b0
leaq -0xb0(%rbp), %rdi
callq 0x3340
leaq -0xd0(%rbp), %rdi
callq 0x3340
jmp 0x998f
leaq 0x179a(%rip), %rsi      # 0xb0d9
leaq -0x2f0(%rbp), %rdi
pushq $0x10
popq %rdx
callq 0x3310
xorl %edi, %edi
callq 0x3290
movq %rax, %r12
leaq -0x2f0(%rbp), %rdi
movl %r12d, %esi
callq 0x3440
movq %rax, %rdi
callq 0x3150
leaq -0x2f0(%rbp), %rdi
callq 0x3390
movl %r12d, %edi
callq 0x32b0
leaq -0x2f0(%rbp), %rdi
callq 0x33b0
leaq 0x19fa(%rip), %rsi      # 0xb390
leaq -0x90(%rbp), %rdi
leaq -0x2f0(%rbp), %rdx
callq 0x3120
leaq -0x90(%rbp), %rdi
callq 0x77be
leaq -0x90(%rbp), %rdi
callq 0x3340
movl $0xf8, %edi
callq 0x32d0
movq %rax, %r12
movq %rax, %rdi
callq 0x9c7c
movq %r12, 0x10(%r14)
movq %r12, 0x8(%r14)
movl %r15d, 0x8(%r12)
cmpb $0x1, 0x4c(%r14)
jne 0x9a60
movl $0x88, %edi
callq 0x32d0
movq %rax, %r12
leaq 0x199f(%rip), %rsi      # 0xb39d
leaq -0x70(%rbp), %rdi
leaq -0x2f0(%rbp), %rdx
callq 0x3120
movb $0x1, %r13b
leaq 0x198f(%rip), %rsi      # 0xb3a7
leaq -0x50(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x3120
leaq -0x70(%rbp), %rsi
leaq -0x50(%rbp), %rdx
movq %r12, %rdi
callq 0x9d42
movq %r12, 0x18(%r14)
xorl %r13d, %r13d
leaq -0x50(%rbp), %rdi
callq 0x3340
leaq -0x70(%rbp), %rdi
callq 0x3340
movq 0x18(%r14), %rdi
movl %r15d, 0x8(%rdi)
movq %rdi, 0x8(%r14)
movq (%rdi), %rax
callq *0x18(%rax)
cvtss2sd -0x30(%rbp), %xmm0
andq $0x0, 0x28(%r14)
movsd %xmm0, 0x30(%r14)
andq $0x0, 0x38(%r14)
movw $0x1, 0x40(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x80f8
andl $0x0, 0x48(%r14)
addq $0x2c8, %rsp            # imm = 0x2C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9b49
movq %rax, %r14
leaq -0x50(%rbp), %rdi
callq 0x3340
movb $0x1, %r13b
jmp 0x9abe
jmp 0x9ace
jmp 0x9b49
movq %rax, %r14
leaq -0x70(%rbp), %rdi
callq 0x3340
testb %r13b, %r13b
jne 0x9ad1
jmp 0x9b4c
movq %rax, %r14
movq %r12, %rdi
callq 0x32a0
jmp 0x9b4c
movq %rax, %r14
leaq -0x90(%rbp), %rdi
callq 0x3340
jmp 0x9b4c
jmp 0x9b49
movq %rax, %r14
leaq -0xf0(%rbp), %rdi
callq 0x3340
jmp 0x9b4c
movq %rax, %r14
leaq -0x2f0(%rbp), %rdi
callq 0x33b0
jmp 0x9b4c
jmp 0x9b49
movq %rax, %r14
jmp 0x9b26
movq %rax, %r14
leaq -0xb0(%rbp), %rdi
callq 0x3340
leaq -0xd0(%rbp), %rdi
callq 0x3340
jmp 0x9b4c
jmp 0x9b49
jmp 0x9b49
movq %rax, %r14
leaq -0x2f0(%rbp), %rdi
callq 0x33b0
jmp 0x9b4c
movq %rax, %r14
andq $0x0, (%rbx)
movq %r14, %rdi
callq 0x3450
movq %rax, %rdi
callq 0x3aae