| 1102 | // |
| 1103 | //***************************************************************************** |
| 1104 | void DLParser_FillRect( MicroCodeCommand command ) |
| 1105 | { |
| 1106 | // |
| 1107 | // Removes annoying rect that appears in Conker and fillrects that cover screen in banjo tooie |
| 1108 | if( g_CI.Format != G_IM_FMT_RGBA ) |
| 1109 | { |
| 1110 | #ifdef DAEDALUS_DEBUG_DISPLAYLIST |
| 1111 | DL_PF(" Ignoring Fillrect "); |
| 1112 | #endif |
| 1113 | return; |
| 1114 | } |
| 1115 | |
| 1116 | //Always clear Zbuffer if Depthbuffer is selected //Corn |
| 1117 | if (g_DI.Address == g_CI.Address) |
| 1118 | { |
| 1119 | CGraphicsContext::Get()->ClearZBuffer(); |
| 1120 | |
| 1121 | #ifdef DAEDALUS_PSP |
| 1122 | if(gClearDepthFrameBuffer) |
| 1123 | #else |
| 1124 | if(true) //This always enabled for PC, this should be optional once we have a GUI to disable it! |
| 1125 | #endif |
| 1126 | { |
| 1127 | Clear_N64DepthBuffer(command); |
| 1128 | } |
| 1129 | #ifdef DAEDALUS_DEBUG_DISPLAYLIST |
| 1130 | DL_PF(" Clearing ZBuffer"); |
| 1131 | #endif |
| 1132 | return; |
| 1133 | } |
| 1134 | |
| 1135 | // Note, in some modes, the right/bottom lines aren't drawn |
| 1136 | |
| 1137 | // TODO - Check colour image format to work out how this should be decoded! |
| 1138 | // Should we init with Prim or Blend colour? Doesn't work well see Mk64 transition before a race |
| 1139 | c32 colour {}; |
| 1140 | |
| 1141 | u32 cycle_mode {gRDPOtherMode.cycle_type}; |
| 1142 | // |
| 1143 | // In Fill/Copy mode the coordinates are inclusive (i.e. add 1.0f to the w/h) |
| 1144 | // |
| 1145 | if ( cycle_mode >= CYCLE_COPY ) |
| 1146 | { |
| 1147 | if ( cycle_mode == CYCLE_FILL ) |
| 1148 | { |
| 1149 | u32 fill_colour = gRenderer->GetFillColour(); |
| 1150 | if(g_CI.Size == G_IM_SIZ_16b) |
| 1151 | { |
| 1152 | const N64Pf5551 c( (u16)fill_colour ); |
| 1153 | colour = ConvertPixelFormat< c32, N64Pf5551 >( c ); |
| 1154 | } |
| 1155 | else |
| 1156 | { |
| 1157 | const N64Pf8888 c( (u32)fill_colour ); |
| 1158 | colour = ConvertPixelFormat< c32, N64Pf8888 >( c ); |
| 1159 | } |
| 1160 | |
| 1161 | u32 clear_screen_x = command.fillrect.x1 - command.fillrect.x0; |
nothing calls this directly
no test coverage detected