tag:blogger.com,1999:blog-5374017.post6053481123381622231..comments2023-12-22T08:02:00.933-08:00Comments on Rom's Rants: RomTerraria v4 and Mac/Linux FAQMichael Russellhttp://www.blogger.com/profile/14404101180817070293noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-5374017.post-56276892218827124612015-07-25T14:57:35.974-07:002015-07-25T14:57:35.974-07:00Andrew,
Yes, to some extent.
My code isn't...Andrew,<br /><br />Yes, to some extent. <br /><br />My code isn't just swapping types as much as it's either injecting hooks into RTHooks.dll (which would be replaced with RTHooksMG.dll with the MonoGame side) or rewriting code at the opcode level. Swapping out the types is an unfortunately simple example.Michael Russellhttps://www.blogger.com/profile/14404101180817070293noreply@blogger.comtag:blogger.com,1999:blog-5374017.post-2758552431921121322015-07-25T11:44:42.662-07:002015-07-25T11:44:42.662-07:00"If I have to do that kind of odd detection f..."If I have to do that kind of odd detection for each branch, the complexity will eventually get overwhelming."<br /><br />Isn't this crying out for dependency inversion (either with your own code or a framework like Ninject)? Define a repository interface, then create XNA and MonoGame repository classes, instantiating the right one based on the executable being used.Andrew Timsonhttps://www.blogger.com/profile/10695912397762180933noreply@blogger.com