{ 0x511FE, STOP_AT_DRAW_SIGHTS }, /* when sights are rendered */
{ 0x5351A, STOP_AT_EXPLOSION }, /* explosion debris */
{ 0x4C514, STOP_AT_EXPLOSION },
+ { 0x52C42, STOP_AT_PATCH_RENDER }, /* patch away planet check (behind observer) */
+ { 0x528C4, STOP_AT_PATCH_RENDER }, /* patch away planet check (behind observer) */
+ { 0x45806, STOP_AT_PATCH_RENDER }, /* patch away planet rendering (would crash without check above) */
{ 0x0, STOP_AT_END }, /* end */
};
m68k_write_memory_32(0x54ffc, 1);
}
+/* skip certain parts when rendering improved graphics */
+void mercenary_patch_render(void)
+{
+ switch (REG_PC) {
+ case 0x52C42: /* take that branch, so planets get rendered behind obersver */
+ REG_PC += 10;
+ break;
+ case 0x528C4: /* take that branch, so planets get rendered behind obersver */
+ REG_PC += 10;
+ break;
+ case 0x45806: /* just RTS to avoid crashing of rendering functions when planets are behind obersver */
+ REG_PC -= 2;
+ break;
+ }
+}
+
uint32_t mercenary_palette_view(void)
{
return m68k_read_memory_32(0x007c14);