// File: Jacobious52[P]Tanks/IntroView.cpp
// Function: IntroView::draw()
void IntroView::draw()
{
    // draw rain
    if (tag == 1)
    {
        for (int i = 0; i < get_size().x; i+=5)
        {
            ConsoleTools::set_fcolor(ConsoleTools::cyan);
            ConsoleTools::set_cursor(Point<int>(i, rand() % get_size().y));
            printf("|");
        }
    }

    if (player1 != "" && player2 != "")
    {
        // draw player vs info
        ConsoleTools::set_cursor(get_size().x/2 - StringTools::string_width(player1)/2, get_size().y/3);
        ConsoleTools::set_fcolor(ConsoleTools::red);
        printf("%s", player1.c_str());

        _vs_text.draw();

        ConsoleTools::set_cursor(get_size().x/2 - StringTools::string_width(player2)/2, 2*get_size().y/3);
        ConsoleTools::set_fcolor(ConsoleTools::blue);
        printf("%s", player2.c_str());
    }
    else
    {
        // draw the loading text
        ConsoleTools::set_cursor(get_size().x/2 - (18 + StringTools::string_width(_load_num_string))/2, get_size().y/2);
        ConsoleTools::set_fcolor(ConsoleTools::yellow);
        ConsoleTools::clear_line();
        printf("Pretending to load%s", _load_num_string.c_str());
    }

    // draw children
    View::draw();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xd0(%rbp)
cmpl $0x1, 0x8(%rax)
jne 0x9a93
movl $0x0, -0xc(%rbp)
movq -0xd0(%rbp), %rdi
movl -0xc(%rbp), %eax
movl %eax, -0xd4(%rbp)
callq 0x106a0
movq %rax, %rcx
movl -0xd4(%rbp), %eax
movq %rcx, -0x14(%rbp)
cmpl -0x14(%rbp), %eax
jge 0x9a91
movl $0x24, %edi
callq 0x4af0
movl -0xc(%rbp), %eax
movl %eax, -0xdc(%rbp)
callq 0x4110
movq -0xd0(%rbp), %rdi
movl %eax, -0xd8(%rbp)
callq 0x106a0
movl -0xdc(%rbp), %esi
movq %rax, %rcx
movl -0xd8(%rbp), %eax
movq %rcx, -0x24(%rbp)
cltd
idivl -0x20(%rbp)
leaq -0x1c(%rbp), %rdi
callq 0x4ed0
movq -0x1c(%rbp), %rdi
callq 0x4c50
leaq 0xa6a6(%rip), %rdi      # 0x14122
movb $0x0, %al
callq 0x4070
movl -0xc(%rbp), %eax
addl $0x5, %eax
movl %eax, -0xc(%rbp)
jmp 0x99fb
jmp 0x9a93
movq -0xd0(%rbp), %rdi
addq $0x38, %rdi
leaq 0xa566(%rip), %rsi      # 0x1400b
callq 0x9ed0
testb $0x1, %al
jne 0x9ab3
jmp 0x9d04
movq -0xd0(%rbp), %rdi
addq $0x58, %rdi
leaq 0xa546(%rip), %rsi      # 0x1400b
callq 0x9ed0
testb $0x1, %al
jne 0x9ad3
jmp 0x9d04
movq -0xd0(%rbp), %rdi
callq 0x106a0
movq -0xd0(%rbp), %rsi
movq %rax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %ecx, %eax
sarl %eax
movl %eax, -0xec(%rbp)
addq $0x38, %rsi
leaq -0x50(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0x4190
movq -0xe8(%rbp), %rdi
callq 0xaeb0
movl %eax, -0xe0(%rbp)
jmp 0x9b24
movq -0xd0(%rbp), %rdi
movl -0xec(%rbp), %eax
movl -0xe0(%rbp), %ecx
movl %ecx, %edx
shrl $0x1f, %edx
addl %edx, %ecx
sarl %ecx
subl %ecx, %eax
movl %eax, -0xfc(%rbp)
callq 0x106a0
movq %rax, -0xf8(%rbp)
jmp 0x9b56
movl -0xfc(%rbp), %edi
movq -0xf8(%rbp), %rax
movq %rax, -0x64(%rbp)
movslq -0x60(%rbp), %rax
imulq $0x55555556, %rax, %rcx # imm = 0x55555556
movq %rcx, %rax
shrq $0x3f, %rax
shrq $0x20, %rcx
movl %ecx, %esi
addl %eax, %esi
callq 0x4c00
jmp 0x9b88
leaq -0x50(%rbp), %rdi
callq 0x4200
movl $0x1f, %edi
callq 0x4af0
movq -0xd0(%rbp), %rdi
addq $0x38, %rdi
callq 0x4180
movq %rax, %rsi
leaq 0xa5ec(%rip), %rdi      # 0x141a1
xorl %eax, %eax
callq 0x4070
movq -0xd0(%rbp), %rdi
addq $0x78, %rdi
callq 0xa760
movq -0xd0(%rbp), %rdi
callq 0x106a0
movq -0xd0(%rbp), %rsi
movq %rax, -0x6c(%rbp)
movl -0x6c(%rbp), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %ecx, %eax
sarl %eax
movl %eax, -0x10c(%rbp)
addq $0x58, %rsi
leaq -0x90(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x4190
movq -0x108(%rbp), %rdi
callq 0xaeb0
movl %eax, -0x100(%rbp)
jmp 0x9c20
movq -0xd0(%rbp), %rdi
movl -0x10c(%rbp), %eax
movl -0x100(%rbp), %ecx
movl %ecx, %edx
shrl $0x1f, %edx
addl %edx, %ecx
sarl %ecx
subl %ecx, %eax
movl %eax, -0x11c(%rbp)
callq 0x106a0
movq %rax, -0x118(%rbp)
jmp 0x9c52
movl -0x11c(%rbp), %edi
movq -0x118(%rbp), %rax
movq %rax, -0x98(%rbp)
movl -0x94(%rbp), %eax
addl %eax, %eax
cltq
imulq $0x55555556, %rax, %rcx # imm = 0x55555556
movq %rcx, %rax
shrq $0x3f, %rax
shrq $0x20, %rcx
movl %ecx, %esi
addl %eax, %esi
callq 0x4c00
jmp 0x9c8d
leaq -0x90(%rbp), %rdi
callq 0x4200
movl $0x22, %edi
callq 0x4af0
movq -0xd0(%rbp), %rdi
addq $0x58, %rdi
callq 0x4180
movq %rax, %rsi
leaq 0xa4e4(%rip), %rdi      # 0x141a1
movb $0x0, %al
callq 0x4070
jmp 0x9e23
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x4200
jmp 0x9ce0
jmp 0x9e38
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x4200
jmp 0x9cff
jmp 0x9e38
movq -0xd0(%rbp), %rdi
callq 0x106a0
movq -0xd0(%rbp), %rsi
movq %rax, -0xa0(%rbp)
movl -0xa0(%rbp), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %ecx, %eax
sarl %eax
movl %eax, -0x12c(%rbp)
addq $0xd8, %rsi
leaq -0xc0(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0x4190
movq -0x128(%rbp), %rdi
callq 0xaeb0
movl %eax, -0x120(%rbp)
jmp 0x9d61
movq -0xd0(%rbp), %rdi
movl -0x12c(%rbp), %eax
movl -0x120(%rbp), %edx
movl %edx, %esi
addl $0x12, %esi
movl %edx, %ecx
shrl $0x1f, %esi
movl %esi, %edx
leal 0x12(%rcx,%rdx), %ecx
sarl %ecx
subl %ecx, %eax
movl %eax, -0x13c(%rbp)
callq 0x106a0
movq %rax, -0x138(%rbp)
jmp 0x9d9c
movl -0x13c(%rbp), %edi
movq -0x138(%rbp), %rax
movq %rax, -0xc8(%rbp)
movl -0xc4(%rbp), %esi
movl %esi, %eax
shrl $0x1f, %eax
addl %eax, %esi
sarl %esi
callq 0x4c00
jmp 0x9dc6
leaq -0xc0(%rbp), %rdi
callq 0x4200
movl $0x21, %edi
callq 0x4af0
callq 0x4c30
movq -0xd0(%rbp), %rdi
addq $0xd8, %rdi
callq 0x4180
movq %rax, %rsi
leaq 0xa391(%rip), %rdi      # 0x1418f
movb $0x0, %al
callq 0x4070
jmp 0x9e23
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x4200
jmp 0x9e21
jmp 0x9e38
movq -0xd0(%rbp), %rdi
callq 0x105f0
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x45e0
movq %rax, %rdi
callq 0x4ec0
nopl (%rax)