// File: essarrdee[P]mutantaliens/mutantaliens.cpp
// Function: draw_info(int, int)
void draw_info(int x,int y)
{
	current_mode = INFO_MODE;
	draw_stats();
	std::string s;
	//for(int i = 0; y<10; y++)
	//{
	//	mvaddstr(i,0,std::string(viewport_width,' ').c_str());
	//}
	if(map_items[x][y] != NULL)
	{
		if(map_items[x][y]->device_type != NOT_DEVICE)
		{
			update_device_desciption(map_items[x][y]);
		}
		//mvprintw(0,0,map_items[x][y]->description.c_str());
		s += map_items[x][y]->description;
	}
	if(map_occupants[x][y] != NULL)
	{
		actor* a = map_occupants[x][y];
	//mvprintw(0,0,map_occupants[x][y]->sspecies->description.c_str());
		s += a->sspecies->description;
		if(a->running) s += " It is running.";
		if(a->stamina < a->sspecies->stamina/4) s+= " It looks exhausted.";
		else if(a->stamina < a->sspecies->stamina/2) s += " It looks sweaty.";
		if(a->health > (3*a->sspecies->min_health)/4) s+= " It looks healthy.";
		else if(a->health > (a->sspecies->min_health/2)) s += "It looks slightly wounded.";
		else if(a->health > (a->sspecies->min_health/4)) s += "It looks heavily wounded.";
		else s += "It looks close to death.";
		if(a->sspecies->psychic_range) s+= " It is psychic.";
	    if(a->sspecies->smell_clarity >= 1.0f) s += " It has a good sense of smell.";
		else if(a->sspecies->smell_clarity != 0.0f) s += " It has a sense of smell.";
		if(a->sspecies->vis_range >= 8) s += " It can see well.";
		else if(a->sspecies->vis_range >= 4) s+= " It can just about see.";

	}
	pretty_print(s);
	getch();
	draw_scene();
}

// Assembly:
subq $0x78, %rsp
movl %edi, 0x74(%rsp)
movl %esi, 0x70(%rsp)
movl $0x3, 0x23842(%rip)     # 0x3b388
callq 0x15c60
leaq 0x50(%rsp), %rdi
callq 0x53e0
movslq 0x74(%rsp), %rcx
leaq 0x9c9cf(%rip), %rax     # 0xb4530
imulq $0x4b0, %rcx, %rcx      # imm = 0x4B0
addq %rcx, %rax
movslq 0x70(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x17c0c
movslq 0x74(%rsp), %rcx
leaq 0x9c9a9(%rip), %rax     # 0xb4530
imulq $0x4b0, %rcx, %rcx      # imm = 0x4B0
addq %rcx, %rax
movslq 0x70(%rsp), %rcx
movq (%rax,%rcx,8), %rax
cmpl $-0x1, 0x70(%rax)
je 0x17bdb
movslq 0x74(%rsp), %rax
imulq $0x4b0, %rax, %rcx      # imm = 0x4B0
leaq 0x9c97d(%rip), %rax     # 0xb4530
addq %rcx, %rax
movslq 0x70(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x13660
jmp 0x17bc6
jmp 0x17bdb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
jmp 0x17f1a
movslq 0x74(%rsp), %rax
imulq $0x4b0, %rax, %rcx      # imm = 0x4B0
leaq 0x9c942(%rip), %rax     # 0xb4530
addq %rcx, %rax
movslq 0x70(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
addq $0x30, %rsi
leaq 0x50(%rsp), %rdi
callq 0x5390
jmp 0x17c0a
jmp 0x17c0c
movslq 0x74(%rsp), %rcx
leaq 0x70948(%rip), %rax     # 0x88560
imulq $0x4b0, %rcx, %rcx      # imm = 0x4B0
addq %rcx, %rax
movslq 0x70(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x17eb2
movslq 0x74(%rsp), %rax
imulq $0x4b0, %rax, %rcx      # imm = 0x4B0
leaq 0x7091b(%rip), %rax     # 0x88560
addq %rcx, %rax
movslq 0x70(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq (%rax), %rsi
addq $0x110, %rsi            # imm = 0x110
leaq 0x50(%rsp), %rdi
callq 0x5390
jmp 0x17c71
movq 0x38(%rsp), %rax
testb $0x1, 0x14(%rax)
je 0x17c91
leaq 0x166ca(%rip), %rsi     # 0x2e34d
leaq 0x50(%rsp), %rdi
callq 0x52a0
jmp 0x17c8f
jmp 0x17c91
movq 0x38(%rsp), %rax
movl 0x18(%rax), %eax
movl %eax, 0x14(%rsp)
movq 0x38(%rsp), %rax
movq (%rax), %rax
movl 0x34(%rax), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0x14(%rsp), %eax
cmpl %ecx, %eax
jge 0x17ccf
leaq 0x1669c(%rip), %rsi     # 0x2e35d
leaq 0x50(%rsp), %rdi
callq 0x52a0
jmp 0x17ccd
jmp 0x17d0f
movq 0x38(%rsp), %rax
movl 0x18(%rax), %eax
movl %eax, 0x10(%rsp)
movq 0x38(%rsp), %rax
movq (%rax), %rax
movl 0x34(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0x10(%rsp), %eax
cmpl %ecx, %eax
jge 0x17d0d
leaq 0x16673(%rip), %rsi     # 0x2e372
leaq 0x50(%rsp), %rdi
callq 0x52a0
jmp 0x17d0b
jmp 0x17d0d
jmp 0x17d0f
movq 0x38(%rsp), %rax
movl 0xc(%rax), %eax
movl %eax, 0xc(%rsp)
movq 0x38(%rsp), %rax
movq (%rax), %rax
imull $0x3, 0x4(%rax), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0xc(%rsp), %eax
cmpl %ecx, %eax
jle 0x17d51
leaq 0x16644(%rip), %rsi     # 0x2e384
leaq 0x50(%rsp), %rdi
callq 0x52a0
jmp 0x17d4c
jmp 0x17de6
movq 0x38(%rsp), %rax
movl 0xc(%rax), %eax
movl %eax, 0x8(%rsp)
movq 0x38(%rsp), %rax
movq (%rax), %rax
movl 0x4(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0x8(%rsp), %eax
cmpl %ecx, %eax
jle 0x17d8f
leaq 0x16616(%rip), %rsi     # 0x2e397
leaq 0x50(%rsp), %rdi
callq 0x52a0
jmp 0x17d8d
jmp 0x17de4
movq 0x38(%rsp), %rax
movl 0xc(%rax), %eax
movl %eax, 0x4(%rsp)
movq 0x38(%rsp), %rax
movq (%rax), %rax
movl 0x4(%rax), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl 0x4(%rsp), %eax
cmpl %ecx, %eax
jle 0x17dcd
leaq 0x165f3(%rip), %rsi     # 0x2e3b2
leaq 0x50(%rsp), %rdi
callq 0x52a0
jmp 0x17dcb
jmp 0x17de2
leaq 0x165f8(%rip), %rsi     # 0x2e3cc
leaq 0x50(%rsp), %rdi
callq 0x52a0
jmp 0x17de0
jmp 0x17de2
jmp 0x17de4
jmp 0x17de6
movq 0x38(%rsp), %rax
movq (%rax), %rax
cmpl $0x0, 0x20(%rax)
je 0x17e09
leaq 0x165ea(%rip), %rsi     # 0x2e3e5
leaq 0x50(%rsp), %rdi
callq 0x52a0
jmp 0x17e07
jmp 0x17e09
movq 0x38(%rsp), %rax
movq (%rax), %rax
movss 0x14(%rax), %xmm0
movss 0x151f6(%rip), %xmm1    # 0x2d014
ucomiss %xmm1, %xmm0
jb 0x17e38
leaq 0x165cb(%rip), %rsi     # 0x2e3f5
leaq 0x50(%rsp), %rdi
callq 0x52a0
jmp 0x17e36
jmp 0x17e68
movq 0x38(%rsp), %rax
movq (%rax), %rax
movss 0x14(%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x17e51
jp 0x17e51
jmp 0x17e66
leaq 0x165bc(%rip), %rsi     # 0x2e414
leaq 0x50(%rsp), %rdi
callq 0x52a0
jmp 0x17e64
jmp 0x17e66
jmp 0x17e68
movq 0x38(%rsp), %rax
movq (%rax), %rax
cmpl $0x8, 0x10(%rax)
jl 0x17e8b
leaq 0x165b1(%rip), %rsi     # 0x2e42e
leaq 0x50(%rsp), %rdi
callq 0x52a0
jmp 0x17e89
jmp 0x17eb0
movq 0x38(%rsp), %rax
movq (%rax), %rax
cmpl $0x4, 0x10(%rax)
jl 0x17eae
leaq 0x165a0(%rip), %rsi     # 0x2e440
leaq 0x50(%rsp), %rdi
callq 0x52a0
jmp 0x17eac
jmp 0x17eae
jmp 0x17eb0
jmp 0x17eb2
leaq 0x18(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x5180
jmp 0x17ec3
leaq 0x18(%rsp), %rdi
callq 0x74d0
jmp 0x17ecf
leaq 0x18(%rsp), %rdi
callq 0x54f8
movq 0x23100(%rip), %rax     # 0x3afe0
movq (%rax), %rdi
callq 0x5120
jmp 0x17eea
xorl %edi, %edi
callq 0x176d0
jmp 0x17ef3
leaq 0x50(%rsp), %rdi
callq 0x54f8
addq $0x78, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x48(%rsp)
movl %eax, 0x44(%rsp)
leaq 0x18(%rsp), %rdi
callq 0x54f8
leaq 0x50(%rsp), %rdi
callq 0x54f8
movq 0x48(%rsp), %rdi
callq 0x5480
nop