// File: essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: draw_stats()
void draw_stats()
{
	attron(COLOR_PAIR(COLOR_WHITE));

	//for(int i=3;i<11+ZOO_SIZE;i++)
	//{
	//	mvaddstr(i,viewport_width+1,std::string(disp_columns-viewport_width-1,' ').c_str());
	//}
	clear_area(viewport_width+1,3,disp_columns-viewport_width-1,15+ZOO_SIZE);
	mvprintw(3,(viewport_width+1),"HP: %d/%d %s    ",p_ptr->health,p_ptr->sspecies->min_health,
		p_ptr->running?"running":"       ");
	/*mvprintw(4,(viewport_width+1),(std::string("     ")+
		std::string(current_weapon==PISTOL?"________ ":"         ")+
		std::string(current_weapon==RIFLE?"_______ ":"        ")+
		std::string(current_weapon==CANNON?"________":"        ")).c_str());*/
	mvprintw(5,(viewport_width+1),"Ammo ");
	if(current_weapon == PISTOL) attron(COLOR_PAIR(COLOR_YELLOW)); else attron(COLOR_PAIR(COLOR_WHITE));
	mvprintw(5,(viewport_width+1+5),"X Pistol ");
		if(current_weapon == RIFLE) attron(COLOR_PAIR(COLOR_YELLOW)); else attron(COLOR_PAIR(COLOR_WHITE));
	mvprintw(5,(viewport_width+1+5+9),"Y Rifle ");
	if(current_weapon == CANNON) attron(COLOR_PAIR(COLOR_YELLOW)); else attron(COLOR_PAIR(COLOR_WHITE));
	mvprintw(5,(viewport_width+1+5+9+8),"Z Cannon");
	attron(COLOR_PAIR(COLOR_WHITE));

	mvprintw(6,(viewport_width+1),"          %3d     %3d       %2d",ammo[PISTOL],ammo[RIFLE],ammo[CANNON]);
	mvprintw(7,(viewport_width+1),"%10s ",mode_text[current_mode]);
	attron(COLOR_PAIR(COLOR_BLUE));
	printw(std::string(10-(10*p_ptr->stamina / p_ptr->sspecies->stamina),'*').c_str());
	attron(COLOR_PAIR(COLOR_WHITE));
	printw("%s stamina", std::string(10*p_ptr->stamina / p_ptr->sspecies->stamina,'*').c_str());
	mvprintw(8,(viewport_width+1),"Devic LEx HEx Hol Noi Sce Brn");
	mvprintw(9,(viewport_width+1),"Count  %2d  %2d  %2d  %2d  %2d  %2d",
		count_inv_devices(LOW_EXPLOSIVE),count_inv_devices(HIGH_EXPLOSIVE),
		count_inv_devices(HOLOGRAM_PROJECTOR),count_inv_devices(NOISE_GENERATOR),
		count_inv_devices(SCENT_GENERATOR),count_inv_devices(BRAIN_SLICE));
	mvprintw(11+ZOO_SIZE,(viewport_width+1),(sound_this_turn+(sound_this_turn!=""?" from ":"")+dir_this_turn).c_str());
	if(current_mode == WALK_MODE)
	{
	mvprintw(13+ZOO_SIZE,viewport_width+3,"Press ? for help.");
	}
	else if(current_mode == FIRE_MODE)
	{
		mvprintw(13+ZOO_SIZE,viewport_width+3,"Tab to target, f to fire");
	}
	else if(current_mode == THROW_MODE)
	{
		mvprintw(13+ZOO_SIZE,viewport_width+3,"Tab to target, t to throw");
	}
	if(cycle_advice)
	{
	mvprintw(15+ZOO_SIZE,viewport_width+1,vadvice[current_advice].c_str());
	}
	mvprintw(16+ZOO_SIZE,viewport_width+3,"Press M to toggle advice");
	if(door_closable())
	{
	mvprintw(17+ZOO_SIZE,viewport_width+5,"Press C to close the door");
	}
	draw_memory();
}

// Assembly:
subq $0x148, %rsp            # imm = 0x148
movq 0x25372(%rip), %rax     # 0x3afe0
movq (%rax), %rdi
movl $0x700, %esi            # imm = 0x700
xorl %eax, %eax
movl %eax, %edx
callq 0x51a0
movl $0x32, %edi
movl $0x3, %esi
movl $0x1e, %edx
movl $0x16, %ecx
callq 0x8b80
movq 0x728b1(%rip), %rax     # 0x88550
movl 0xc(%rax), %eax
movl %eax, 0xa0(%rsp)
movq 0x728a0(%rip), %rax     # 0x88550
movq (%rax), %rax
movl 0x4(%rax), %eax
movl %eax, 0xa4(%rsp)
movq 0x7288c(%rip), %rax     # 0x88550
testb $0x1, 0x14(%rax)
je 0x15cdb
leaq 0x18664(%rip), %rax     # 0x2e335
movq %rax, 0x98(%rsp)
jmp 0x15cec
leaq 0x1966e(%rip), %rax     # 0x2f350
movq %rax, 0x98(%rsp)
jmp 0x15cec
movl 0xa4(%rsp), %r8d
movl 0xa0(%rsp), %ecx
movq 0x98(%rsp), %r9
movl $0x3, %edi
movl $0x32, %esi
leaq 0x184e0(%rip), %rdx     # 0x2e1f4
movb $0x0, %al
callq 0x53a0
movl $0x5, %edi
movl $0x32, %esi
leaq 0x184d9(%rip), %rdx     # 0x2e205
movb $0x0, %al
callq 0x53a0
cmpl $0x0, 0x2561a(%rip)     # 0x3b354
jne 0x15d56
movq 0x2529d(%rip), %rax     # 0x3afe0
movq (%rax), %rdi
movl $0x300, %esi            # imm = 0x300
xorl %eax, %eax
movl %eax, %edx
callq 0x51a0
jmp 0x15d6e
movq 0x25283(%rip), %rax     # 0x3afe0
movq (%rax), %rdi
movl $0x700, %esi            # imm = 0x700
xorl %eax, %eax
movl %eax, %edx
callq 0x51a0
movl $0x5, %edi
movl $0x37, %esi
leaq 0x1848c(%rip), %rdx     # 0x2e20b
movb $0x0, %al
callq 0x53a0
cmpl $0x1, 0x255c7(%rip)     # 0x3b354
jne 0x15da9
movq 0x2524a(%rip), %rax     # 0x3afe0
movq (%rax), %rdi
movl $0x300, %esi            # imm = 0x300
xorl %eax, %eax
movl %eax, %edx
callq 0x51a0
jmp 0x15dc1
movq 0x25230(%rip), %rax     # 0x3afe0
movq (%rax), %rdi
movl $0x700, %esi            # imm = 0x700
xorl %eax, %eax
movl %eax, %edx
callq 0x51a0
movl $0x5, %edi
movl $0x40, %esi
leaq 0x18443(%rip), %rdx     # 0x2e215
movb $0x0, %al
callq 0x53a0
cmpl $0x2, 0x25574(%rip)     # 0x3b354
jne 0x15dfc
movq 0x251f7(%rip), %rax     # 0x3afe0
movq (%rax), %rdi
movl $0x300, %esi            # imm = 0x300
xorl %eax, %eax
movl %eax, %edx
callq 0x51a0
jmp 0x15e14
movq 0x251dd(%rip), %rax     # 0x3afe0
movq (%rax), %rdi
movl $0x700, %esi            # imm = 0x700
xorl %eax, %eax
movl %eax, %edx
callq 0x51a0
leaq 0x18403(%rip), %rdx     # 0x2e21e
xorl %eax, %eax
movl %eax, 0x6c(%rsp)
movb %al, 0x77(%rsp)
movl $0x5, %edi
movl $0x48, %esi
callq 0x53a0
movl 0x6c(%rsp), %eax
movq 0x251a1(%rip), %rcx     # 0x3afe0
movq %rcx, 0x80(%rsp)
movq (%rcx), %rdi
movl %eax, %edx
movq %rdx, 0x78(%rsp)
movl $0x700, %esi            # imm = 0x700
callq 0x51a0
movb 0x77(%rsp), %al
movl 0x723f3(%rip), %ecx     # 0x88258
movl 0x723f0(%rip), %r8d     # 0x8825c
movl 0x723ed(%rip), %r9d     # 0x88260
leaq 0x183ad(%rip), %rdx     # 0x2e227
movl $0x6, %edi
movl $0x32, %esi
movl %esi, 0x70(%rsp)
callq 0x53a0
movl 0x70(%rsp), %esi
movb 0x77(%rsp), %al
movslq 0x254ec(%rip), %rdx     # 0x3b388
leaq 0x2545d(%rip), %rcx     # 0x3b300
movq (%rcx,%rdx,8), %rcx
leaq 0x18399(%rip), %rdx     # 0x2e247
movl $0x7, %edi
callq 0x53a0
movq 0x78(%rsp), %rdx
movq 0x80(%rsp), %rax
movq (%rax), %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x51a0
movq 0x72677(%rip), %rcx     # 0x88550
movl 0x18(%rcx), %edx
addl %edx, %edx
movl %edx, %eax
leal (%rax,%rax,4), %eax
movq (%rcx), %rcx
movl 0x34(%rcx), %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl $0xa, %eax
subl %ecx, %eax
cltq
movq %rax, 0x88(%rsp)
leaq 0x127(%rsp), %rdi
movq %rdi, 0x90(%rsp)
callq 0x5490
movq 0x88(%rsp), %rsi
movq 0x90(%rsp), %rcx
leaq 0x128(%rsp), %rdi
movl $0x2a, %edx
callq 0x5210
jmp 0x15f38
leaq 0x128(%rsp), %rdi
callq 0x5160
movq %rax, %rdi
xorl %eax, %eax
callq 0x52d0
jmp 0x15f51
leaq 0x128(%rsp), %rdi
callq 0x54f8
leaq 0x127(%rsp), %rdi
callq 0x5310
movq 0x2506e(%rip), %rax     # 0x3afe0
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x700, %esi            # imm = 0x700
callq 0x51a0
movq 0x725c6(%rip), %rcx     # 0x88550
movl 0x18(%rcx), %edx
addl %edx, %edx
movl %edx, %eax
leal (%rax,%rax,4), %eax
movq (%rcx), %rcx
movl 0x34(%rcx), %ecx
cltd
idivl %ecx
cltq
movq %rax, 0x58(%rsp)
leaq 0xef(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0x5490
movq 0x58(%rsp), %rsi
movq 0x60(%rsp), %rcx
leaq 0xf0(%rsp), %rdi
movl $0x2a, %edx
callq 0x5210
jmp 0x15fd4
leaq 0xf0(%rsp), %rdi
callq 0x5160
movq %rax, %rsi
leaq 0x18262(%rip), %rdi     # 0x2e24d
xorl %eax, %eax
callq 0x52d0
jmp 0x15ff4
leaq 0xf0(%rsp), %rdi
callq 0x54f8
leaq 0xef(%rsp), %rdi
callq 0x5310
leaq 0x18243(%rip), %rdx     # 0x2e258
xorl %eax, %eax
movl %eax, 0x20(%rsp)
movb %al, 0x3f(%rsp)
movl $0x8, %edi
movl $0x32, %esi
movl %esi, 0x2c(%rsp)
callq 0x53a0
movl 0x20(%rsp), %edi
callq 0xf890
movl %eax, 0x30(%rsp)
movl $0x1, %edi
callq 0xf890
movl %eax, 0x34(%rsp)
movl $0x2, %edi
callq 0xf890
movl %eax, 0x38(%rsp)
movl $0x3, %edi
callq 0xf890
movl %eax, 0x28(%rsp)
movl $0x4, %edi
callq 0xf890
movl %eax, 0x24(%rsp)
movl $0x5, %edi
callq 0xf890
movl 0x24(%rsp), %r10d
movl 0x28(%rsp), %edi
movl 0x2c(%rsp), %esi
movl 0x30(%rsp), %ecx
movl 0x34(%rsp), %r8d
movl 0x38(%rsp), %r9d
movl %eax, %r11d
movb 0x3f(%rsp), %al
movq %rsp, %rdx
movl %r11d, 0x10(%rdx)
movl %r10d, 0x8(%rdx)
movl %edi, (%rdx)
leaq 0x181bf(%rip), %rdx     # 0x2e276
movl $0x9, %edi
callq 0x53a0
leaq 0xca400(%rip), %rdi     # 0xe04c8
movq %rdi, 0x48(%rsp)
leaq 0x17f8d(%rip), %rsi     # 0x2e061
movq %rsi, 0x40(%rsp)
callq 0x213a0
movq 0x40(%rsp), %rdx
movq 0x48(%rsp), %rsi
movb %al, %cl
leaq 0x181a9(%rip), %rax     # 0x2e29a
testb %cl, %cl
cmovneq %rax, %rdx
leaq 0xa8(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x20670
movq 0x50(%rsp), %rsi
leaq 0xca3d3(%rip), %rdx     # 0xe04e8
leaq 0xc8(%rsp), %rdi
callq 0x1fe80
jmp 0x16124
leaq 0xc8(%rsp), %rdi
callq 0x5160
movq %rax, %rdx
xorl %eax, %eax
movl $0x12, %edi
movl $0x32, %esi
callq 0x53a0
jmp 0x16147
leaq 0xc8(%rsp), %rdi
callq 0x54f8
leaq 0xa8(%rsp), %rdi
callq 0x54f8
cmpl $0x0, 0x25220(%rip)     # 0x3b388
jne 0x16266
movl $0x14, %edi
movl $0x34, %esi
leaq 0x18122(%rip), %rdx     # 0x2e2a1
movb $0x0, %al
callq 0x53a0
jmp 0x162ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
jmp 0x161c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
leaq 0x128(%rsp), %rdi
callq 0x54f8
leaq 0x127(%rsp), %rdi
callq 0x5310
jmp 0x1632e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
jmp 0x1620b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x54f8
leaq 0xef(%rsp), %rdi
callq 0x5310
jmp 0x1632e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
jmp 0x16254
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
leaq 0xc8(%rsp), %rdi
callq 0x54f8
leaq 0xa8(%rsp), %rdi
callq 0x54f8
jmp 0x1632e
cmpl $0x1, 0x2511b(%rip)     # 0x3b388
jne 0x16289
movl $0x14, %edi
movl $0x34, %esi
leaq 0x18033(%rip), %rdx     # 0x2e2b3
movb $0x0, %al
callq 0x53a0
jmp 0x162ac
cmpl $0x2, 0x250f8(%rip)     # 0x3b388
jne 0x162aa
movl $0x14, %edi
movl $0x34, %esi
leaq 0x18029(%rip), %rdx     # 0x2e2cc
movb $0x0, %al
callq 0x53a0
jmp 0x162ac
jmp 0x162ae
testb $0x1, 0x2509b(%rip)     # 0x3b350
je 0x162e6
movslq 0x250ce(%rip), %rsi     # 0x3b38c
leaq 0x250d3(%rip), %rdi     # 0x3b398
callq 0x1fe60
movq %rax, %rdi
callq 0x5160
movq %rax, %rdx
movl $0x16, %edi
movl $0x32, %esi
movb $0x0, %al
callq 0x53a0
movl $0x17, %edi
movl $0x34, %esi
leaq 0x17fef(%rip), %rdx     # 0x2e2e6
movb $0x0, %al
callq 0x53a0
callq 0x11ce0
testb $0x1, %al
jne 0x16309
jmp 0x16321
movl $0x18, %edi
movl $0x36, %esi
leaq 0x17fe5(%rip), %rdx     # 0x2e2ff
movb $0x0, %al
callq 0x53a0
callq 0x15260
addq $0x148, %rsp            # imm = 0x148
retq
movq 0x118(%rsp), %rdi
callq 0x5480
nopl (%rax,%rax)