trunk/src/mame/machine/seicop.c
| r18273 | r18274 | |
| 2044 | 2044 | */ |
| 2045 | 2045 | static void cop_take_hit_box_params(UINT8 offs) |
| 2046 | 2046 | { |
| 2047 | | INT16 start_x,start_y,end_x,end_y; |
| 2047 | INT16 start_x,start_y,height,width; |
| 2048 | 2048 | |
| 2049 | | /* TODO: hack for SD Gundam */ |
| 2050 | | #if 0 |
| 2051 | | if(cop_collision_info[offs].hitbox_y == 0x2800 && cop_collision_info[offs].hitbox_x == 0xa000) |
| 2052 | 2049 | { |
| 2053 | | end_y = 0xff; |
| 2054 | | start_y = -16; |
| 2055 | | end_x = 0xff; |
| 2056 | | start_x = 0; |
| 2057 | | } |
| 2058 | | else |
| 2059 | | #endif |
| 2060 | | { |
| 2061 | | end_y = INT8(cop_collision_info[offs].hitbox_y >> 8); |
| 2062 | | start_y = INT8(cop_collision_info[offs].hitbox_y); |
| 2063 | | end_x = INT8(cop_collision_info[offs].hitbox_x >> 8); |
| 2064 | | start_x = INT8(cop_collision_info[offs].hitbox_x); |
| 2065 | | } |
| 2050 | height = UINT8(cop_collision_info[offs].hitbox_y >> 8); |
| 2051 | start_y = INT8(cop_collision_info[offs].hitbox_y); |
| 2052 | width = UINT8(cop_collision_info[offs].hitbox_x >> 8); |
| 2053 | start_x = INT8(cop_collision_info[offs].hitbox_x); |
| 2054 | } |
| 2066 | 2055 | |
| 2067 | | cop_collision_info[offs].min_x = start_x + (cop_collision_info[offs].x >> 16); |
| 2068 | | cop_collision_info[offs].min_y = start_y + (cop_collision_info[offs].y >> 16); |
| 2069 | | cop_collision_info[offs].max_x = end_x + (cop_collision_info[offs].x >> 16); |
| 2070 | | cop_collision_info[offs].max_y = end_y + (cop_collision_info[offs].y >> 16); |
| 2056 | cop_collision_info[offs].min_x = (cop_collision_info[offs].x >> 16) + start_x; |
| 2057 | cop_collision_info[offs].max_x = cop_collision_info[offs].min_x + width; |
| 2058 | cop_collision_info[offs].min_y = (cop_collision_info[offs].y >> 16) + start_y; |
| 2059 | cop_collision_info[offs].max_y = cop_collision_info[offs].min_y + height; |
| 2071 | 2060 | } |
| 2072 | 2061 | |
| 2073 | 2062 | |
| r18273 | r18274 | |
| 2755 | 2744 | /* 0xc [1] */ |
| 2756 | 2745 | |
| 2757 | 2746 | cur_angle = space.read_byte(cop_register[1] + (0xc ^ 3)); |
| 2758 | | space.write_byte(cop_register[1] + (0^3),space.read_byte(cop_register[1] + (0^3)) & 0xfb); //correct? |
| 2747 | //space.write_byte(cop_register[1] + (0^3),space.read_byte(cop_register[1] + (0^3)) & 0xfb); //correct? |
| 2759 | 2748 | |
| 2760 | 2749 | if(cur_angle >= cop_angle_compare) |
| 2761 | 2750 | { |
| r18273 | r18274 | |
| 2763 | 2752 | if(cur_angle <= cop_angle_compare) |
| 2764 | 2753 | { |
| 2765 | 2754 | cur_angle = cop_angle_compare; |
| 2766 | | space.write_byte(cop_register[1] + (0^3),space.read_byte(cop_register[1] + (0^3)) | 2); |
| 2755 | //space.write_byte(cop_register[1] + (0^3),space.read_byte(cop_register[1] + (0^3)) | 2); |
| 2767 | 2756 | } |
| 2768 | 2757 | } |
| 2769 | 2758 | else if(cur_angle <= cop_angle_compare) |
| r18273 | r18274 | |
| 2772 | 2761 | if(cur_angle >= cop_angle_compare) |
| 2773 | 2762 | { |
| 2774 | 2763 | cur_angle = cop_angle_compare; |
| 2775 | | space.write_byte(cop_register[1] + (0^3),space.read_byte(cop_register[1] + (0^3)) | 2); |
| 2764 | //space.write_byte(cop_register[1] + (0^3),space.read_byte(cop_register[1] + (0^3)) | 2); |
| 2776 | 2765 | } |
| 2777 | 2766 | } |
| 2778 | 2767 | |