// File: /workspace/github_cpp_makefile_star2_O1/hobbitsyfeet[P]Turn/chart.cc
// Function: Chart::displayRange(int, int, int)
void Chart::displayRange(int centrePosX,int centrePosY, int radius){

  vector<vector<container> >::iterator row;
  vector<container>::iterator col;
  int dist;
  for(row = world.begin(); row < world.end() ; row++){
    for(col = row->begin(); col < row->end(); col++){
      dist = sqrt( ( (col->getPosX() - centrePosX)*(col->getPosX() - centrePosX) )
		   + 	 ( col->getPosY() - centrePosY)*(col->getPosY() - centrePosY) );



      if(getFogOfWar()){
	if(dist <= radius){
	  if(centrePosX == col->getPosX() && centrePosY == col->getPosY()){
	    cout<<"P ";
    }
    else if(col->checkAvailable() == true && canEnter( col->getPosX(),col->getPosY() ) == true){
      cout<<"p ";
    }
	  else{
	    if(col->getGeoType()=='-' || col->getGeoType() =='O')
	      cout<<' ';
	    else
	      col->displayType();
	    cout<<' ';
	  }
	}
	else
	  cout<<"- ";
      }
      else{
	if(centrePosX == col->getPosX() && centrePosY == col->getPosY())
	  cout<<"P ";

	else{
	  if(col->getGeoType()=='-' || col->getGeoType() =='O')
	    cout<<"  ";
	  else{
	    col->displayType();
	    cout<<' ';
	  }
	}
      }
    }
    cout<<endl;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq (%rdi), %r13
movq %rdi, -0x40(%rbp)
cmpq 0x8(%rdi), %r13
jae 0x866a
movl %ecx, %r12d
movl %edx, %r14d
movl %esi, %r15d
movl %ecx, -0x34(%rbp)
movq (%r13), %rbx
cmpq 0x8(%r13), %rbx
jae 0x862a
movq %r13, -0x48(%rbp)
movl (%rbx), %eax
movl 0x4(%rbx), %ecx
subl %r15d, %eax
imull %eax, %eax
subl %r14d, %ecx
imull %ecx, %ecx
addl %eax, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
ucomisd 0x3254(%rip), %xmm0     # 0xb6d8
jb 0x848c
sqrtsd %xmm0, %xmm0
jmp 0x8491
callq 0x21a0
movq -0x40(%rbp), %rax
cmpb $0x1, 0x38(%rax)
jne 0x84bc
cvttsd2si %xmm0, %eax
cmpl %r12d, %eax
jle 0x8509
movl $0x2, %edx
movq 0x6b20(%rip), %rdi      # 0xefd0
leaq 0x3272(%rip), %rsi      # 0xb729
jmp 0x85d8
cmpl %r15d, (%rbx)
jne 0x84df
cmpl %r14d, 0x4(%rbx)
jne 0x84df
movl $0x2, %edx
movq 0x6afd(%rip), %rdi      # 0xefd0
leaq 0x324c(%rip), %rsi      # 0xb726
jmp 0x85d8
movzbl 0x9(%rbx), %eax
cmpl $0x4f, %eax
je 0x84f1
cmpl $0x2d, %eax
jne 0x85a3
movl $0x2, %edx
movq 0x6ad3(%rip), %rdi      # 0xefd0
leaq 0x321f(%rip), %rsi      # 0xb723
jmp 0x85d8
movslq (%rbx), %r12
cmpl %r15d, %r12d
jne 0x852c
cmpl %r14d, 0x4(%rbx)
jne 0x852c
movl $0x2, %edx
movq 0x6aad(%rip), %rdi      # 0xefd0
leaq 0x31fc(%rip), %rsi      # 0xb726
jmp 0x8571
movq %rbx, %rdi
callq 0x82ee
testb %al, %al
je 0x857c
movslq 0x4(%rbx), %rax
movq -0x40(%rbp), %rcx
movq 0x8(%rcx), %rcx
negq %rax
leaq (%rax,%rax,2), %rax
movq (%rcx,%rax,8), %rax
leaq (%r12,%r12,2), %rcx
shlq $0x4, %rcx
cmpb $0x1, -0x28(%rax,%rcx)
jne 0x857c
movl $0x2, %edx
movq 0x6a66(%rip), %rdi      # 0xefd0
leaq 0x2dae(%rip), %rsi      # 0xb31f
callq 0x2240
movl -0x34(%rbp), %r12d
jmp 0x85dd
movzbl 0x9(%rbx), %eax
cmpl $0x4f, %eax
je 0x858a
cmpl $0x2d, %eax
jne 0x85ed
movb $0x20, -0x29(%rbp)
movl $0x1, %edx
movq 0x6a36(%rip), %r12      # 0xefd0
movq %r12, %rdi
leaq -0x29(%rbp), %rsi
jmp 0x8603
movb %al, -0x2c(%rbp)
movl $0x1, %edx
movl %r12d, %r13d
movq 0x6a1b(%rip), %r12      # 0xefd0
movq %r12, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x2240
movb $0x20, -0x2d(%rbp)
movl $0x1, %edx
movq %r12, %rdi
movl %r13d, %r12d
movq -0x48(%rbp), %r13
leaq -0x2d(%rbp), %rsi
callq 0x2240
addq $0x30, %rbx
cmpq 0x8(%r13), %rbx
jb 0x8462
jmp 0x862a
movb %al, -0x2a(%rbp)
movl $0x1, %edx
movq 0x69d4(%rip), %r12      # 0xefd0
movq %r12, %rdi
leaq -0x2a(%rbp), %rsi
callq 0x2240
movl -0x34(%rbp), %r13d
movb $0x20, -0x2b(%rbp)
movl $0x1, %edx
movq %r12, %rdi
leaq -0x2b(%rbp), %rsi
callq 0x2240
movl %r13d, %r12d
movq -0x48(%rbp), %r13
jmp 0x85dd
movq 0x699f(%rip), %rbx      # 0xefd0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2170
addq $0x18, %r13
movq -0x40(%rbp), %rax
cmpq 0x8(%rax), %r13
jb 0x8450
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop