Noeda / dfterm3

Remote Dwarf Fortress playing
ISC License
45 stars 2 forks source link

Don't require custom DFHack #14

Closed Noeda closed 10 years ago

Noeda commented 10 years ago

Right now, the DFHack Dfterm3 plugin requires a change to DFHack itself.

The only change is to add SDL_PushEvent() to callable functions from plugins. Linux does not need the change (vanilla DFHack can be used) but Windows does require it.

I don't remember anymore why I could not use the same method on Windows to avoid custom DFHack as I can do on Linux but I'm sure I could at least write a hack so that no custom DFHack is needed.

lethosor commented 10 years ago

I would greatly appreciate this, since I've had trouble compiling dfhack on my own for non-Windows platforms. Also, using a Ruby or Lua script instead might work, although it probably wouldn't be as fast. I don't know how much of a speed difference there would be for reading screen data between C and Ruby/Lua.

Noeda commented 10 years ago

The plugin has been modified to not require custom Dfhack.

lethosor commented 10 years ago

Does this commit mean that r4 will work without modification? Also, it seems the modification in r3 is required on OS X as well (that was fun to figure out after compiling the first 98% of DFHack). I'll see if I can get the Windows fix to work - is this the relevant section?

Noeda commented 10 years ago

Yes, r4 should work without modification. Even vanilla r3 should work now because of temporary hack: Noeda/dfterm3-plugin@2fd1c43a1d34d65538bbffd8385134e412345ad4

Is something not working? Maybe I'll have to reopen this...

lethosor commented 10 years ago

It's just a problem with compiling the plugin with r3 on OS X. I can probably fix it similarly to how it was fixed on Windows, although it might be easier to just compile it on r4 (no need to reopen this).