--- map_int.s Fri Mar 15 11:15:42 2002 +++ map_char.s Fri Mar 15 11:16:04 2002 @@ -149,7 +149,7 @@ pushl %ebx call tile_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L271 pushl %eax pushl $64 @@ -175,7 +175,7 @@ pushl %ebx call tile_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al movl $1, %esi je .L272 pushl %eax @@ -202,9 +202,10 @@ pushl %ebx call tile_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L275 - testl %esi, %esi + movl %esi, %eax + testb %al, %al je .L276 pushl %ecx pushl $64 @@ -235,7 +236,8 @@ call mystrlcat addl $16, %esp .L275: - testl %esi, %esi + movl %esi, %eax + testb %al, %al jne .L278 pushl %ecx pushl $64 @@ -249,7 +251,7 @@ pushl %ebx call tile_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al movl $1, %esi je .L279 pushl %edx @@ -277,9 +279,10 @@ pushl %ebx call tile_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L282 - testl %esi, %esi + movl %esi, %eax + testb %al, %al je .L283 pushl %ecx pushl $64 @@ -311,7 +314,8 @@ call mystrlcat addl $16, %esp .L282: - testl %esi, %esi + movl %esi, %eax + testb %al, %al jne .L285 pushl %eax pushl $64 @@ -379,7 +383,7 @@ .globl map_is_empty .type map_is_empty,@function map_is_empty: - movl map+88, %edx + movl map+72, %edx xorl %eax, %eax testl %edx, %edx pushl %ebp @@ -399,7 +403,7 @@ movl $50, map+4 movl $0, map+8 movl $250, map+12 - movl $0, map+16 + movb $0, map+16 movl $50, map+20 movl $30, map+24 movl $35, map+28 @@ -409,15 +413,15 @@ movl $50, map+44 movl $20, map+48 movl $1, map+52 - movl $0, map+56 - movl $1, map+60 - movl $0, map+88 - movl $0, map+84 - movl $0, map+64 - movl $0, map+68 + movb $0, map+56 + movb $1, map+57 movl $0, map+72 - movl $0, map+80 - movl $0, map+76 + movl $0, map+68 + movl $0, map+60 + movb $0, map+64 + movb $0, map+65 + movb $0, map+67 + movb $0, map+66 popl %ebp ret .Lfe5: @@ -446,13 +450,13 @@ pushl $.LC55 sall $6, %eax pushl %eax - pushl map+88 + pushl map+72 xorl %esi, %esi call fc_real_realloc movl map+4, %edx addl $32, %esp cmpl %edx, %esi - movl %eax, map+88 + movl %eax, map+72 jge .L308 movl map, %eax .p2align 2 @@ -746,10 +750,10 @@ pushl %esi pushl %ebx subl $12, %esp - movl 8(%ebp), %ebx - testl %ebx, %ebx + movl 8(%ebp), %ecx + testl %ecx, %ecx movl 12(%ebp), %edi - movl $0, -24(%ebp) + movb $0, -21(%ebp) jle .L394 movl map, %eax decl %eax @@ -762,14 +766,14 @@ cmpl %eax, %edi jl .L393 .L394: - movl $1, -24(%ebp) + movb $1, -21(%ebp) .L393: subl $8, %esp pushl %edi pushl 8(%ebp) call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L396 pushl $.LC58 pushl $335 @@ -790,9 +794,8 @@ .L404: movl 8(%ebp), %edx leal (%edx,%ebx), %eax - movl -24(%ebp), %ecx movl %eax, -20(%ebp) - testl %ecx, %ecx + cmpb $0, -21(%ebp) leal (%edi,%esi), %eax movl %eax, -16(%ebp) je .L405 @@ -803,7 +806,7 @@ pushl %eax call normalize_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al je .L403 .L405: movl -20(%ebp), %eax @@ -850,11 +853,11 @@ pushl %esi pushl %ebx subl $28, %esp - movl 8(%ebp), %edx - testl %edx, %edx + movl 8(%ebp), %ebx + testl %ebx, %ebx movl 12(%ebp), %edi movl $0, -24(%ebp) - movl $0, -28(%ebp) + movb $0, -25(%ebp) jle .L415 movl map, %eax decl %eax @@ -867,14 +870,14 @@ cmpl %eax, %edi jl .L414 .L415: - movl $1, -28(%ebp) + movb $1, -25(%ebp) .L414: subl $8, %esp pushl %edi pushl 8(%ebp) call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L417 pushl $.LC60 pushl $350 @@ -892,10 +895,9 @@ movl 8(%ebp), %edx leal (%edx,%ebx), %eax movl %eax, -20(%ebp) + cmpb $0, -25(%ebp) leal (%edi,%esi), %eax movl %eax, -16(%ebp) - movl -28(%ebp), %eax - testl %eax, %eax je .L426 subl $8, %esp leal -16(%ebp), %eax @@ -904,7 +906,7 @@ pushl %eax call normalize_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al je .L424 .L426: movl -20(%ebp), %eax @@ -951,10 +953,10 @@ pushl %esi pushl %ebx subl $12, %esp - movl 8(%ebp), %edx - testl %edx, %edx + movl 8(%ebp), %ecx + testl %ecx, %ecx movl 12(%ebp), %edi - movl $0, -24(%ebp) + movb $0, -21(%ebp) jle .L435 movl map, %eax decl %eax @@ -967,14 +969,14 @@ cmpl %eax, %edi jl .L434 .L435: - movl $1, -24(%ebp) + movb $1, -21(%ebp) .L434: subl $8, %esp pushl %edi pushl 8(%ebp) call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L437 pushl $.LC61 pushl $363 @@ -996,10 +998,9 @@ movl 8(%ebp), %edx leal (%edx,%ebx), %eax movl %eax, -20(%ebp) + cmpb $0, -21(%ebp) leal (%edi,%esi), %eax movl %eax, -16(%ebp) - movl -24(%ebp), %eax - testl %eax, %eax je .L446 subl $8, %esp leal -16(%ebp), %eax @@ -1008,7 +1009,7 @@ pushl %eax call normalize_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al je .L444 .L446: movl -20(%ebp), %eax @@ -1017,13 +1018,13 @@ cmpl %edi, -16(%ebp) je .L444 .L447: - pushl %ecx + pushl %edx pushl 16(%ebp) pushl -16(%ebp) pushl %eax call map_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L453 .L444: incl %ebx @@ -1056,11 +1057,11 @@ pushl %esi pushl %ebx subl $28, %esp - movl 8(%ebp), %edx - testl %edx, %edx + movl 8(%ebp), %ecx + testl %ecx, %ecx movl 12(%ebp), %edi movl $0, -24(%ebp) - movl $0, -28(%ebp) + movb $0, -25(%ebp) jle .L456 movl map, %eax decl %eax @@ -1073,14 +1074,14 @@ cmpl %eax, %edi jl .L455 .L456: - movl $1, -28(%ebp) + movb $1, -25(%ebp) .L455: subl $8, %esp pushl %edi pushl 8(%ebp) call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L458 pushl $.LC62 pushl $378 @@ -1098,10 +1099,9 @@ movl 8(%ebp), %edx leal (%edx,%ebx), %eax movl %eax, -20(%ebp) + cmpb $0, -25(%ebp) leal (%edi,%esi), %eax movl %eax, -16(%ebp) - movl -28(%ebp), %eax - testl %eax, %eax je .L467 subl $8, %esp leal -16(%ebp), %eax @@ -1110,7 +1110,7 @@ pushl %eax call normalize_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al je .L465 .L467: movl -20(%ebp), %eax @@ -1119,13 +1119,13 @@ cmpl %edi, -16(%ebp) je .L465 .L468: - pushl %ecx + pushl %edx pushl 16(%ebp) pushl -16(%ebp) pushl %eax call map_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L465 incl -24(%ebp) .L465: @@ -1163,7 +1163,7 @@ movl 8(%ebp), %ebx testl %ebx, %ebx movl 12(%ebp), %edi - movl $0, -24(%ebp) + movb $0, -21(%ebp) jle .L476 movl map, %eax decl %eax @@ -1176,14 +1176,14 @@ cmpl %eax, %edi jl .L475 .L476: - movl $1, -24(%ebp) + movb $1, -21(%ebp) .L475: subl $8, %esp pushl %edi pushl 8(%ebp) call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L478 pushl $.LC63 pushl $391 @@ -1203,10 +1203,9 @@ movl 8(%ebp), %eax addl CAR_DIR_DX(%ebx), %eax movl %eax, -20(%ebp) - movl -24(%ebp), %ecx movl %edi, %eax addl CAR_DIR_DY(%ebx), %eax - testl %ecx, %ecx + cmpb $0, -21(%ebp) movl %eax, -16(%ebp) je .L483 subl $8, %esp @@ -1216,7 +1215,7 @@ pushl %eax call normalize_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al je .L481 .L483: subl $8, %esp @@ -1255,10 +1254,10 @@ pushl %esi pushl %ebx subl $12, %esp - movl 8(%ebp), %edx - testl %edx, %edx + movl 8(%ebp), %esi + testl %esi, %esi movl 12(%ebp), %edi - movl $0, -24(%ebp) + movb $0, -21(%ebp) jle .L490 movl map, %eax decl %eax @@ -1271,14 +1270,14 @@ cmpl %eax, %edi jl .L489 .L490: - movl $1, -24(%ebp) + movb $1, -21(%ebp) .L489: subl $8, %esp pushl %edi pushl 8(%ebp) call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L492 pushl $.LC65 pushl $404 @@ -1300,10 +1299,9 @@ movl 8(%ebp), %edx leal (%edx,%ebx), %eax movl %eax, -20(%ebp) + cmpb $0, -21(%ebp) leal (%edi,%esi), %eax movl %eax, -16(%ebp) - movl -24(%ebp), %eax - testl %eax, %eax je .L501 subl $8, %esp leal -16(%ebp), %eax @@ -1312,7 +1310,7 @@ pushl %eax call normalize_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al je .L499 .L501: movl -20(%ebp), %eax @@ -1363,7 +1361,7 @@ subl $12, %esp cmpl $1, 8(%ebp) movl 12(%ebp), %edi - movl $0, -24(%ebp) + movb $0, -21(%ebp) jle .L511 movl map, %eax subl $2, %eax @@ -1376,14 +1374,14 @@ cmpl %eax, %edi jl .L510 .L511: - movl $1, -24(%ebp) + movb $1, -21(%ebp) .L510: subl $8, %esp pushl %edi pushl 8(%ebp) call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L513 pushl $.LC66 pushl $419 @@ -1404,9 +1402,8 @@ .L521: movl 8(%ebp), %edx leal (%edx,%ebx), %eax - movl -24(%ebp), %ecx movl %eax, -20(%ebp) - testl %ecx, %ecx + cmpb $0, -21(%ebp) leal (%edi,%esi), %eax movl %eax, -16(%ebp) je .L522 @@ -1417,7 +1414,7 @@ pushl %eax call normalize_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al je .L520 .L522: subl $8, %esp @@ -1472,13 +1469,13 @@ cmpl $9, %eax jne .L541 .L530: - pushl %esi + pushl %ebx pushl $64 pushl 12(%ebp) pushl 8(%ebp) call map_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L541 subl $8, %esp pushl 12(%ebp) @@ -1487,12 +1484,11 @@ addl $16, %esp cmpw $2, %ax jg .L532 - movl map+52, %ebx - testl %ebx, %ebx - je .L532 - movl map+60, %ecx + movl map+52, %ecx testl %ecx, %ecx je .L532 + cmpb $0, map+57 + je .L532 .L541: .L540: movl $1, %eax @@ -1503,7 +1499,7 @@ movl 16(%ebp), %eax cmpl %eax, -16(%ebp) jge .L539 - movl $80, -20(%ebp) + movl $64, -20(%ebp) .p2align 2 .L536: movl -20(%ebp), %edx @@ -1684,7 +1680,7 @@ subl $12, %esp cmpl $2, 8(%ebp) movl 12(%ebp), %edi - movl $0, -24(%ebp) + movb $0, -21(%ebp) jle .L569 movl map, %eax subl $3, %eax @@ -1697,14 +1693,14 @@ cmpl %eax, %edi jl .L568 .L569: - movl $1, -24(%ebp) + movb $1, -21(%ebp) .L568: subl $8, %esp pushl %edi pushl 8(%ebp) call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L571 pushl $.LC67 pushl $507 @@ -1725,9 +1721,8 @@ .L579: movl 8(%ebp), %edx leal (%edx,%ebx), %eax - movl -24(%ebp), %edx movl %eax, -20(%ebp) - testl %edx, %edx + cmpb $0, -21(%ebp) leal (%edi,%esi), %eax movl %eax, -16(%ebp) je .L580 @@ -1738,7 +1733,7 @@ pushl %eax call normalize_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al je .L578 .L580: pushl %eax @@ -1747,7 +1742,7 @@ pushl -20(%ebp) call map_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L586 .L578: incl %ebx @@ -1780,10 +1775,10 @@ pushl %esi pushl %ebx subl $12, %esp - movl 8(%ebp), %ecx - testl %ecx, %ecx + movl 8(%ebp), %ebx + testl %ebx, %ebx movl 12(%ebp), %edi - movl $0, -24(%ebp) + movb $0, -21(%ebp) jle .L589 movl map, %eax decl %eax @@ -1796,14 +1791,14 @@ cmpl %eax, %edi jl .L588 .L589: - movl $1, -24(%ebp) + movb $1, -21(%ebp) .L588: subl $8, %esp pushl %edi pushl 8(%ebp) call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L591 pushl $.LC68 pushl $521 @@ -1820,9 +1815,8 @@ .L599: movl 8(%ebp), %edx leal (%edx,%ebx), %eax - movl -24(%ebp), %edx movl %eax, -20(%ebp) - testl %edx, %edx + cmpb $0, -21(%ebp) leal (%edi,%esi), %eax movl %eax, -16(%ebp) je .L600 @@ -1833,24 +1827,24 @@ pushl %eax call normalize_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al je .L598 .L600: - pushl %eax + pushl %ecx pushl $1 pushl -16(%ebp) pushl -20(%ebp) call map_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L602 - pushl %ecx + pushl %edx pushl $256 pushl -16(%ebp) pushl -20(%ebp) call map_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L598 .L602: movl $1, %eax @@ -1911,7 +1905,7 @@ pushl %eax call base_city_map_to_map addl $32, %esp - testl %eax, %eax + testb %al, %al je .L614 subl $8, %esp pushl -16(%ebp) @@ -1953,7 +1947,7 @@ pushl %ebx call tile_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L626 movl (%ebx), %eax movl %eax, %edx @@ -1969,7 +1963,7 @@ pushl %ebx call tile_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L628 movl (%ebx), %eax movl %eax, %edx @@ -2005,7 +1999,7 @@ pushl %ebx call tile_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L632 movl (%ebx), %eax movl %eax, %edx @@ -2021,7 +2015,7 @@ pushl %ebx call tile_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L634 movl (%ebx), %eax movl %eax, %edx @@ -2057,7 +2051,7 @@ pushl %ebx call tile_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L638 movl (%ebx), %eax movl %eax, %edx @@ -2073,7 +2067,7 @@ pushl %ebx call tile_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L640 movl (%ebx), %eax movl %eax, %edx @@ -2117,7 +2111,7 @@ movb $0, s.2 call contains_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L644 subl $12, %esp pushl $.LC37 @@ -2129,7 +2123,7 @@ pushl %edi call contains_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L645 subl $12, %esp pushl $.LC35 @@ -2148,7 +2142,7 @@ pushl %edi call contains_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L647 subl $12, %esp pushl $.LC44 @@ -2160,7 +2154,7 @@ pushl %edi call contains_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L648 subl $12, %esp pushl $.LC36 @@ -2179,7 +2173,7 @@ pushl %edi call contains_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L650 subl $12, %esp pushl $.LC38 @@ -2197,7 +2191,7 @@ pushl %edi call contains_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L651 subl $12, %esp pushl $.LC41 @@ -2215,7 +2209,7 @@ pushl %edi call contains_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L652 subl $12, %esp pushl $.LC45 @@ -2264,7 +2258,7 @@ call contains_special xorl %ebx, %ebx addl $16, %esp - testl %eax, %eax + testb %al, %al je .L657 movl $2, %ebx .L657: @@ -2273,7 +2267,7 @@ pushl %esi call contains_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L658 orl $4, %ebx .L658: @@ -2298,7 +2292,7 @@ pushl %ebx call contains_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L660 movl $1024, %eax jmp .L659 @@ -2309,7 +2303,7 @@ pushl %ebx call contains_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L661 movl $4, %eax jmp .L659 @@ -2320,7 +2314,7 @@ pushl %ebx call contains_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L662 movl $16, %eax jmp .L659 @@ -2331,7 +2325,7 @@ pushl %ebx call contains_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L663 movl $128, %eax jmp .L659 @@ -2342,7 +2336,7 @@ pushl %ebx call contains_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L664 movl $2048, %eax jmp .L659 @@ -2353,7 +2347,7 @@ pushl %ebx call contains_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L665 movl $8, %eax jmp .L659 @@ -2363,10 +2357,10 @@ pushl $2 pushl %ebx call contains_special - movl %eax, %edx + movb %al, %dl addl $16, %esp xorl %eax, %eax - testl %edx, %edx + testb %dl, %dl setne %al sall $1, %eax .L659: @@ -2404,18 +2398,18 @@ pushl %ebx call tile_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L680 subl $8, %esp pushl $4 pushl %ebx call tile_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L680 movl 8(%ebp), %edi testl %edi, %edi - movl $0, -24(%ebp) + movb $0, -21(%ebp) jle .L671 movl map, %eax decl %eax @@ -2429,14 +2423,14 @@ cmpl %eax, 12(%ebp) jl .L670 .L671: - movl $1, -24(%ebp) + movb $1, -21(%ebp) .L670: subl $8, %esp pushl 12(%ebp) pushl 8(%ebp) call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L673 pushl $.LC70 pushl $675 @@ -2452,10 +2446,9 @@ movl 8(%ebp), %eax addl CAR_DIR_DX(%esi), %eax movl %eax, -20(%ebp) - movl -24(%ebp), %ebx movl 12(%ebp), %eax addl CAR_DIR_DY(%esi), %eax - testl %ebx, %ebx + cmpb $0, -21(%ebp) movl %eax, -16(%ebp) je .L678 subl $8, %esp @@ -2465,7 +2458,7 @@ pushl %eax call normalize_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al je .L676 .L678: subl $8, %esp @@ -2484,14 +2477,14 @@ pushl %ebx call tile_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L680 subl $8, %esp pushl $4 pushl %ebx call tile_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L676 .L680: movl $1, %eax @@ -2797,7 +2790,7 @@ pushl %edi call map_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L709 pushl %ecx pushl $1024 @@ -3070,37 +3063,37 @@ pushl %edi pushl %esi pushl %ebx - movl terrain_control+20, %esi + movl terrain_control+8, %esi subl $12, %esp cmpl $8, %esi jg .L751 testl %esi, %esi movl $1, %eax jle .L727 - movl 8(%ebp), %edi - testl %edi, %edi - movl $0, -24(%ebp) + movl 8(%ebp), %ebx + testl %ebx, %ebx + movb $0, -21(%ebp) jle .L731 movl map, %eax decl %eax cmpl %eax, 8(%ebp) jge .L731 - movl 12(%ebp), %ebx - testl %ebx, %ebx + movl 12(%ebp), %ecx + testl %ecx, %ecx jle .L731 movl map+4, %eax decl %eax cmpl %eax, 12(%ebp) jl .L730 .L731: - movl $1, -24(%ebp) + movb $1, -21(%ebp) .L730: subl $8, %esp pushl 12(%ebp) pushl 8(%ebp) call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L733 pushl $.LC71 pushl $915 @@ -3121,10 +3114,9 @@ .L741: movl 8(%ebp), %edx leal (%edx,%ebx), %eax - movl -24(%ebp), %ecx movl 12(%ebp), %edx movl %eax, -20(%ebp) - testl %ecx, %ecx + cmpb $0, -21(%ebp) leal (%edx,%edi), %eax movl %eax, -16(%ebp) je .L742 @@ -3135,7 +3127,7 @@ pushl %eax call normalize_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al je .L740 .L742: movl -20(%ebp), %eax @@ -3185,37 +3177,37 @@ pushl %edi pushl %esi pushl %ebx - movl terrain_control+24, %esi + movl terrain_control+12, %esi subl $12, %esp cmpl $8, %esi jg .L776 testl %esi, %esi movl $1, %eax jle .L752 - movl 8(%ebp), %ecx - testl %ecx, %ecx - movl $0, -24(%ebp) + movl 8(%ebp), %eax + testl %eax, %eax + movb $0, -21(%ebp) jle .L756 movl map, %eax decl %eax cmpl %eax, 8(%ebp) jge .L756 - movl 12(%ebp), %edx - testl %edx, %edx + movl 12(%ebp), %edi + testl %edi, %edi jle .L756 movl map+4, %eax decl %eax cmpl %eax, 12(%ebp) jl .L755 .L756: - movl $1, -24(%ebp) + movb $1, -21(%ebp) .L755: subl $8, %esp pushl 12(%ebp) pushl 8(%ebp) call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L758 pushl $.LC72 pushl $938 @@ -3238,10 +3230,9 @@ leal (%edx,%ebx), %eax movl 12(%ebp), %edx movl %eax, -20(%ebp) + cmpb $0, -21(%ebp) leal (%edx,%edi), %eax movl %eax, -16(%ebp) - movl -24(%ebp), %eax - testl %eax, %eax je .L767 subl $8, %esp leal -16(%ebp), %eax @@ -3250,7 +3241,7 @@ pushl %eax call normalize_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al je .L765 .L767: movl -20(%ebp), %eax @@ -3305,7 +3296,7 @@ pushl %ebx call is_ground_unit addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L778 movl $3, %eax jmp .L777 @@ -3316,14 +3307,14 @@ pushl %esi call tile_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L779 subl $8, %esp pushl $8 pushl %edi call tile_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L779 xorl %eax, %eax jmp .L777 @@ -3336,7 +3327,7 @@ pushl %ebx call unit_flag addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L792 .L780: subl $8, %esp @@ -3344,14 +3335,14 @@ pushl %esi call tile_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L781 subl $8, %esp pushl $2 pushl %edi call tile_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L792 .L781: cmpl $9, (%esi) @@ -3364,14 +3355,14 @@ pushl %esi call tile_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L782 subl $8, %esp pushl $512 pushl %edi call tile_has_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L782 .L783: pushl 32(%ebp) @@ -3379,8 +3370,8 @@ pushl 24(%ebp) pushl 20(%ebp) call is_move_cardinal - movl %eax, %edx - movl terrain_control+28, %eax + movb %al, %dl + movl terrain_control+16, %eax addl $16, %esp cmpl $1, %eax je .L787 @@ -3393,13 +3384,13 @@ jmp .L782 .p2align 2 .L787: - testl %edx, %edx + testb %dl, %dl je .L782 jmp .L792 .p2align 2 .L789: xorl %eax, %eax - testl %edx, %edx + testb %dl, %dl sete %al incl %eax jmp .L777 @@ -3456,7 +3447,7 @@ pushl -16(%ebp) call is_real_tile addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L799 pushl $.LC73 pushl $1014 @@ -3465,8 +3456,7 @@ call __assert_fail .p2align 2 .L799: - movl is_server, %edx - testl %edx, %edx + cmpb $0, is_server je .L810 movl (%esi), %edx cmpl $12, %edx @@ -3594,27 +3584,27 @@ pushl 8(%ebp) pushl $.LC77 call debug_log_move_costs - movl 8(%ebp), %edi + movl 8(%ebp), %ecx movl $1212696648, %eax addl $32, %esp - testl %edi, %edi + testl %ecx, %ecx movl %eax, 54(%esi) movl %eax, 58(%esi) - movl $0, -24(%ebp) + movb $0, -21(%ebp) jle .L844 movl map, %eax decl %eax cmpl %eax, 8(%ebp) jge .L844 - movl 12(%ebp), %ebx - testl %ebx, %ebx + movl 12(%ebp), %edx + testl %edx, %edx jle .L844 movl map+4, %eax decl %eax cmpl %eax, 12(%ebp) jl .L843 .L844: - movl $1, -24(%ebp) + movb $1, -21(%ebp) .L843: subl $8, %esp movl 12(%ebp), %ecx @@ -3625,7 +3615,7 @@ movl %ecx, -32(%ebp) call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L846 pushl $.LC78 pushl $1070 @@ -3643,9 +3633,8 @@ movl -36(%ebp), %ecx movl -28(%ebp), %eax addl DIR_DX(%ecx), %eax - movl -24(%ebp), %ecx addl -32(%ebp), %edx - testl %ecx, %ecx + cmpb $0, -21(%ebp) movl %eax, -20(%ebp) movl %edx, -16(%ebp) je .L851 @@ -3656,7 +3645,7 @@ pushl %eax call normalize_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al je .L849 .L851: subl $8, %esp @@ -3743,21 +3732,21 @@ testl %esi, %esi movl %eax, 54(%ebx) movl %eax, 58(%ebx) - movl $0, -32(%ebp) + movb $0, -29(%ebp) jle .L889 movl map, %eax decl %eax cmpl %eax, %esi jge .L889 - movl -24(%ebp), %edx - testl %edx, %edx + movl -24(%ebp), %edi + testl %edi, %edi jle .L889 movl map+4, %eax decl %eax cmpl %eax, -24(%ebp) jl .L888 .L889: - movl $1, -32(%ebp) + movb $1, -29(%ebp) .L888: subl $8, %esp movl -24(%ebp), %eax @@ -3767,7 +3756,7 @@ movl %eax, -40(%ebp) call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L891 pushl $.LC81 pushl $1097 @@ -3780,13 +3769,12 @@ xorl %edi, %edi .p2align 2 .L895: + movl DIR_DY(%edi), %edx movl -36(%ebp), %eax addl DIR_DX(%edi), %eax - movl DIR_DY(%edi), %edx - movl %eax, -20(%ebp) - movl -32(%ebp), %eax addl -40(%ebp), %edx - testl %eax, %eax + cmpb $0, -29(%ebp) + movl %eax, -20(%ebp) movl %edx, -16(%ebp) je .L896 subl $8, %esp @@ -3796,7 +3784,7 @@ pushl %eax call normalize_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al je .L894 .L896: subl $8, %esp @@ -3862,8 +3850,8 @@ pushl 16(%ebx) pushl 12(%ebx) call map_get_tile - popl %ecx popl %edx + popl %ecx pushl %eax pushl %ebx call tile_move_cost_ptrs @@ -3936,7 +3924,7 @@ pushl %esi call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L908 pushl $.LC82 pushl $1144 @@ -3950,7 +3938,7 @@ leal -8(%ebp), %esp sall $6, %eax popl %ebx - addl map+88, %eax + addl map+72, %eax popl %esi popl %ebp ret @@ -3975,7 +3963,7 @@ pushl %esi call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L911 pushl $.LC83 pushl $1152 @@ -3988,7 +3976,7 @@ leal (%ebx,%esi), %eax leal -8(%ebp), %esp sall $6, %eax - addl map+88, %eax + addl map+72, %eax popl %ebx movswl 52(%eax),%eax popl %esi @@ -4015,7 +4003,7 @@ pushl %esi call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L914 pushl $.LC84 pushl $1160 @@ -4028,7 +4016,7 @@ leal (%ebx,%esi), %eax sall $6, %eax movl 16(%ebp), %edx - addl map+88, %eax + addl map+72, %eax movw %dx, 52(%eax) leal -8(%ebp), %esp popl %ebx @@ -4056,7 +4044,7 @@ pushl %esi call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L917 pushl $.LC85 pushl $1169 @@ -4069,7 +4057,7 @@ leal (%ebx,%esi), %eax leal -8(%ebp), %esp sall $6, %eax - addl map+88, %eax + addl map+72, %eax popl %ebx movl (%eax), %eax popl %esi @@ -4096,7 +4084,7 @@ pushl %esi call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L920 pushl $.LC86 pushl $1177 @@ -4109,7 +4097,7 @@ leal (%ebx,%esi), %eax leal -8(%ebp), %esp sall $6, %eax - addl map+88, %eax + addl map+72, %eax popl %ebx movl 4(%eax), %eax popl %esi @@ -4130,34 +4118,36 @@ pushl %esi pushl %ebx subl $8, %esp + pushl 16(%ebp) + subl $12, %esp movl 12(%ebp), %ebx - movl 16(%ebp), %eax - movl 8(%ebp), %esi - movl %eax, 12(%ebp) pushl %ebx + movl 8(%ebp), %esi pushl %esi call is_normal_map_pos - addl $16, %esp - testl %eax, %eax - jne .L923 + addl $20, %esp + testb %al, %al + jne .L925 + pushl %ebx pushl $.LC87 pushl $1186 pushl $.LC54 pushl $.LC59 call __assert_fail .p2align 2 -.L923: +.L925: imull map, %ebx leal (%ebx,%esi), %eax sall $6, %eax - addl map+88, %eax - movl 4(%eax), %eax - movl %eax, 8(%ebp) + addl map+72, %eax + pushl 4(%eax) + call contains_special leal -8(%ebp), %esp popl %ebx + movsbl %al,%eax popl %esi popl %ebp - jmp contains_special + ret .Lfe65: .size map_has_special,.Lfe65-map_has_special .align 4 @@ -4166,12 +4156,14 @@ tile_has_special: pushl %ebp movl %esp, %ebp - subl $8, %esp + subl $16, %esp + pushl 12(%ebp) movl 8(%ebp), %eax - movl 4(%eax), %eax - movl %eax, 8(%ebp) + pushl 4(%eax) + call contains_special + movsbl %al,%eax leave - jmp contains_special + ret .Lfe66: .size tile_has_special,.Lfe66-tile_has_special .section .rodata @@ -4227,7 +4219,7 @@ pushl %esi call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L932 pushl $.LC90 pushl $1221 @@ -4240,7 +4232,7 @@ leal (%ebx,%esi), %eax sall $6, %eax movl 16(%ebp), %edx - addl map+88, %eax + addl map+72, %eax movl %edx, (%eax) leal -8(%ebp), %esp popl %ebx @@ -4270,7 +4262,7 @@ pushl %edi call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L935 pushl $.LC91 pushl $1229 @@ -4283,21 +4275,21 @@ imull map, %eax leal (%eax,%edi), %eax sall $6, %eax - addl map+88, %eax + addl map+72, %eax subl $8, %esp orl %ebx, 4(%eax) pushl $2 pushl %ebx call contains_special addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L937 subl $8, %esp pushl $8 pushl %ebx call contains_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L936 .L937: movl %esi, 12(%ebp) @@ -4339,7 +4331,7 @@ pushl %edi call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L940 pushl $.LC92 pushl $1241 @@ -4353,7 +4345,7 @@ leal (%eax,%edi), %eax sall $6, %eax movl %ebx, %edx - addl map+88, %eax + addl map+72, %eax subl $8, %esp notl %edx andl %edx, 4(%eax) @@ -4361,14 +4353,14 @@ pushl %ebx call contains_special addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L942 subl $8, %esp pushl $8 pushl %ebx call contains_special addl $16, %esp - testl %eax, %eax + testb %al, %al je .L941 .L942: movl %esi, 12(%ebp) @@ -4408,7 +4400,7 @@ pushl %esi call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L945 pushl $.LC93 pushl $1253 @@ -4421,7 +4413,7 @@ leal (%ebx,%esi), %eax leal -8(%ebp), %esp sall $6, %eax - addl map+88, %eax + addl map+72, %eax popl %ebx movl 8(%eax), %eax popl %esi @@ -4448,7 +4440,7 @@ pushl %esi call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L948 pushl $.LC94 pushl $1261 @@ -4461,7 +4453,7 @@ leal (%ebx,%esi), %eax sall $6, %eax movl 16(%ebp), %edx - addl map+88, %eax + addl map+72, %eax movl %edx, 8(%eax) leal -8(%ebp), %esp popl %ebx @@ -4495,7 +4487,7 @@ movl 20(%ebp), %esi call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L951 pushl $.LC95 pushl $1270 @@ -4509,7 +4501,7 @@ pushl %ebx call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L953 pushl $.LC95 pushl $1271 @@ -4546,6 +4538,7 @@ movl %edx, %eax pushl %eax call normalize_map_pos + movsbl %al,%eax leave ret .Lfe74: @@ -4571,7 +4564,7 @@ call normalize_map_pos xorl %edi, %edi addl $16, %esp - testl %eax, %eax + testb %al, %al je .L957 cmpl %ebx, -20(%ebp) jne .L957 @@ -4719,7 +4712,7 @@ movl 28(%ebp), %esi call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L989 pushl $.LC98 pushl $1349 @@ -4733,7 +4726,7 @@ pushl %ebx call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L991 pushl $.LC98 pushl $1350 @@ -4818,7 +4811,7 @@ pushl 8(%ebp) call is_real_tile addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L997 pushl $.LC101 pushl $1377 @@ -4852,7 +4845,7 @@ pushl 16(%ebp) call normalize_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L995 decl %ebx movl (%edi), %eax @@ -4901,7 +4894,7 @@ pushl (%ebx) call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al je .L1009 leal -8(%ebp), %esp popl %ebx @@ -5019,7 +5012,7 @@ movl 8(%ebp), %edx testl %edx, %edx movl 12(%ebp), %ecx - movl $0, -24(%ebp) + movb $0, -21(%ebp) jle .L1024 movl map, %eax decl %eax @@ -5032,7 +5025,7 @@ cmpl %eax, %ecx jl .L1023 .L1024: - movl $1, -24(%ebp) + movb $1, -21(%ebp) .L1023: subl $8, %esp movl %ecx, %edi @@ -5041,7 +5034,7 @@ movl %edx, -28(%ebp) call is_normal_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L1026 pushl $.LC114 pushl $1445 @@ -5061,13 +5054,12 @@ .p2align 2 .L1030: movl DIR_DY(%ebx), %edx - addl %edi, %edx movl -28(%ebp), %eax - movl %edx, -16(%ebp) - movl -24(%ebp), %edx addl DIR_DX(%ebx), %eax - testl %edx, %edx + addl %edi, %edx + cmpb $0, -21(%ebp) movl %eax, -20(%ebp) + movl %edx, -16(%ebp) je .L1031 subl $8, %esp leal -16(%ebp), %eax @@ -5076,7 +5068,7 @@ pushl %eax call normalize_map_pos addl $16, %esp - testl %eax, %eax + testb %al, %al je .L1029 .L1031: movl 16(%ebp), %eax @@ -5119,7 +5111,7 @@ pushl 8(%ebp) call base_get_direction_for_step addl $32, %esp - testl %eax, %eax + testb %al, %al je .L1037 movl -4(%ebp), %eax leave @@ -5159,7 +5151,7 @@ pushl 8(%ebp) call is_tiles_adjacent addl $16, %esp - testl %eax, %eax + testb %al, %al jne .L1041 pushl $.LC116 pushl $1479 @@ -5178,13 +5170,13 @@ leal -20(%ebp), %eax pushl %eax call map_distance_vector - movl -20(%ebp), %ebx + movl -20(%ebp), %ecx xorl %eax, %eax addl $32, %esp - testl %ebx, %ebx - je .L1043 - movl -16(%ebp), %ecx testl %ecx, %ecx + je .L1043 + movl -16(%ebp), %edx + testl %edx, %edx jne .L1042 .L1043: movl $1, %eax @@ -5197,7 +5189,7 @@ ret .Lfe85: .size is_move_cardinal,.Lfe85-is_move_cardinal - .comm map,596,32 - .comm terrain_control,92,32 + .comm map,580,32 + .comm terrain_control,80,32 .comm tile_types,7072,32 .ident "GCC: (GNU) 2.96 20000731 (Red Hat Linux 7.1 2.96-85)"