// File: /workspace/github_cpp_makefile_star2_O1/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %esi, %ebx
movl %edi, %ebp
movl $0x3, 0x10761(%rip)     # 0x21328
callq 0xf5d5
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
movslq %ebp, %rax
movslq %ebx, %rbx
imulq $0x4b0, %rax, %r15      # imm = 0x4B0
leaq 0x898db(%rip), %r12     # 0x9a4d0
addq %r15, %r12
movq (%r12,%rbx,8), %rdi
testq %rdi, %rdi
je 0x10c23
cmpl $-0x1, 0x70(%rdi)
je 0x10c0c
callq 0xd971
leaq (%r12,%rbx,8), %rax
movq (%rax), %rax
movq 0x30(%rax), %rsi
movq 0x38(%rax), %rdx
movq %rsp, %rdi
callq 0x50c0
leaq 0x5d8d6(%rip), %rax     # 0x6e500
addq %r15, %rax
movq (%rax,%rbx,8), %rbx
testq %rbx, %rbx
je 0x10d7c
movq (%rbx), %rax
movq 0x110(%rax), %rsi
movq 0x118(%rax), %rdx
movq %rsp, %rdi
callq 0x50c0
cmpb $0x1, 0x14(%rbx)
jne 0x10c68
leaq 0x8489(%rip), %rsi      # 0x190e9
movq %rsp, %rdi
callq 0x5420
movl 0x18(%rbx), %eax
movq (%rbx), %rcx
movl 0x34(%rcx), %ecx
leal 0x3(%rcx), %edx
testl %ecx, %ecx
cmovnsl %ecx, %edx
sarl $0x2, %edx
cmpl %edx, %eax
jge 0x10c89
leaq 0x8472(%rip), %rsi      # 0x190f9
jmp 0x10c9d
movl %ecx, %edx
shrl $0x1f, %edx
addl %ecx, %edx
sarl %edx
cmpl %edx, %eax
jge 0x10ca5
leaq 0x8471(%rip), %rsi      # 0x1910e
movq %rsp, %rdi
callq 0x5420
movl 0xc(%rbx), %eax
movq (%rbx), %rcx
movl 0x4(%rcx), %ecx
leal (%rcx,%rcx,2), %edx
leal (%rcx,%rcx,2), %esi
addl $0x3, %esi
testl %edx, %edx
cmovnsl %edx, %esi
sarl $0x2, %esi
cmpl %esi, %eax
jle 0x10ccc
leaq 0x8456(%rip), %rsi      # 0x19120
jmp 0x10d01
movl %ecx, %edx
shrl $0x1f, %edx
addl %ecx, %edx
sarl %edx
cmpl %edx, %eax
jle 0x10ce2
leaq 0x8453(%rip), %rsi      # 0x19133
jmp 0x10d01
leal 0x3(%rcx), %edx
testl %ecx, %ecx
cmovnsl %ecx, %edx
sarl $0x2, %edx
cmpl %edx, %eax
leaq 0x8458(%rip), %rax      # 0x1914e
leaq 0x846b(%rip), %rsi      # 0x19168
cmovgq %rax, %rsi
movq %rsp, %rdi
callq 0x5420
movq (%rbx), %rax
cmpl $0x0, 0x20(%rax)
je 0x10d21
leaq 0x8468(%rip), %rsi      # 0x19181
movq %rsp, %rdi
callq 0x5420
movq (%rbx), %rax
movss 0x14(%rax), %xmm0
ucomiss 0x72e4(%rip), %xmm0     # 0x18014
jae 0x10d45
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x10d3c
jnp 0x10d54
leaq 0x846d(%rip), %rsi      # 0x191b0
jmp 0x10d4c
leaq 0x8445(%rip), %rsi      # 0x19191
movq %rsp, %rdi
callq 0x5420
movq (%rbx), %rax
movl 0x10(%rax), %eax
cmpl $0x7, %eax
jle 0x10d68
leaq 0x8464(%rip), %rsi      # 0x191ca
jmp 0x10d74
cmpl $0x4, %eax
jl 0x10d7c
leaq 0x8468(%rip), %rsi      # 0x191dc
movq %rsp, %rdi
callq 0x5420
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0x166e0
leaq 0x20(%rsp), %rdi
callq 0x68a8
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x10db4
callq 0x5230
movq 0x1021d(%rip), %rax     # 0x20fd8
movq (%rax), %rdi
callq 0x50f0
xorl %edi, %edi
callq 0x1093e
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x10dd8
callq 0x5230
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x10dfe
callq 0x5230
jmp 0x10dfe
jmp 0x10dfb
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x10e0c
callq 0x5230
movq %rbx, %rdi
callq 0x53d0