// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x48, %rsp
movl %esi, %ebx
movl %edi, %ebp
movl $0x3, 0x114d7(%rip)     # 0x1e318
callq 0xbd86
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movslq %ebp, %rax
movslq %ebx, %rbx
imulq $0x4b0, %rax, %r14      # imm = 0x4B0
leaq 0x8a655(%rip), %r15     # 0x974c0
addq %r14, %r15
movq (%r15,%rbx,8), %rsi
testq %rsi, %rsi
je 0xce9a
cmpl $-0x1, 0x70(%rsi)
je 0xce8c
movq %rsi, %rdi
callq 0xac97
leaq (%r15,%rbx,8), %rax
movq (%rax), %rsi
addq $0x30, %rsi
leaq 0x8(%rsp), %rdi
callq 0x5400
leaq 0x5e64f(%rip), %rax     # 0x6b4f0
addq %r14, %rax
movq (%rax,%rbx,8), %rbx
testq %rbx, %rbx
je 0xcfe2
movl $0x110, %esi            # imm = 0x110
addq (%rbx), %rsi
leaq 0x8(%rsp), %rdi
callq 0x5400
cmpb $0x1, 0x14(%rbx)
jne 0xceda
leaq 0x81e2(%rip), %rsi      # 0x150b2
leaq 0x8(%rsp), %rdi
callq 0x53e0
movl 0x18(%rbx), %esi
movq (%rbx), %rax
movl 0x34(%rax), %ecx
pushq $0x4
popq %rbp
movl %ecx, %eax
cltd
idivl %ebp
pushq $0x2
popq %r14
cmpl %eax, %esi
jge 0xcefc
leaq 0x81c8(%rip), %rsi      # 0x150c2
jmp 0xcf0d
movl %ecx, %eax
cltd
idivl %r14d
cmpl %eax, %esi
jge 0xcf17
leaq 0x81ca(%rip), %rsi      # 0x150d7
leaq 0x8(%rsp), %rdi
callq 0x53e0
movl 0xc(%rbx), %esi
movq (%rbx), %rax
movl 0x4(%rax), %ecx
leal (%rcx,%rcx,2), %eax
cltd
idivl %ebp
cmpl %eax, %esi
jle 0xcf33
leaq 0x81b8(%rip), %rsi      # 0x150e9
jmp 0xcf5f
movl %ecx, %eax
cltd
idivl %r14d
cmpl %eax, %esi
jle 0xcf46
leaq 0x81b8(%rip), %rsi      # 0x150fc
jmp 0xcf5f
movl %ecx, %eax
cltd
idivl %ebp
cmpl %eax, %esi
leaq 0x81c3(%rip), %rax      # 0x15117
leaq 0x81d6(%rip), %rsi      # 0x15131
cmovgq %rax, %rsi
leaq 0x8(%rsp), %rdi
callq 0x53e0
movq (%rbx), %rax
cmpl $0x0, 0x20(%rax)
je 0xcf86
leaq 0x81d1(%rip), %rsi      # 0x1514a
leaq 0x8(%rsp), %rdi
callq 0x53e0
movq (%rbx), %rax
movss 0x14(%rax), %xmm0
ucomiss 0x7082(%rip), %xmm0     # 0x14014
jae 0xcfa7
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0xcf9e
jnp 0xcfb8
leaq 0x81d4(%rip), %rsi      # 0x15179
jmp 0xcfae
leaq 0x81ac(%rip), %rsi      # 0x1515a
leaq 0x8(%rsp), %rdi
callq 0x53e0
movq (%rbx), %rax
movl 0x10(%rax), %eax
cmpl $0x7, %eax
jle 0xcfcc
leaq 0x81c9(%rip), %rsi      # 0x15193
jmp 0xcfd8
cmpl $0x4, %eax
jl 0xcfe2
leaq 0x81cd(%rip), %rsi      # 0x151a5
leaq 0x8(%rsp), %rdi
callq 0x53e0
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x5330
leaq 0x28(%rsp), %rdi
callq 0x633b
leaq 0x28(%rsp), %rdi
callq 0x5418
movq 0x10fcc(%rip), %rax     # 0x1dfd8
movq (%rax), %rdi
callq 0x50f0
xorl %edi, %edi
callq 0xcc13
leaq 0x8(%rsp), %rdi
callq 0x5418
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x5418
jmp 0xd044
jmp 0xd041
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5418
movq %rbx, %rdi
callq 0x53c0