Commit Graph

350 Commits (b76bdad50f03e5083b7dae99c5e1d2d8f80fc72d)

Author SHA1 Message Date
Petr Mrázek 9db20bd84d Header changes/cleanup. 2011-12-31 12:48:42 +01:00
Alexander Gavrilov b652ec4132 Implement context-sensitive keybinding support.
Allow defining commands with guard conditions, and binding
one or more commands to alphabetic and function keys. When
the relevant key is pressed, the first listed command with
successfully evaluated guard is chosen.

For consistency, the guard is also checked when the command
is invoked from the console; this requires suspending the
core inside PluginManager, before invoking plugin code.
2011-12-31 13:25:46 +04:00
Petr Mrázek b36e5ac248 Add missing files. 2011-12-07 20:50:37 +01:00
Petr Mrázek f7d78539d3 Renaming Creatures to Units 2011-12-02 10:56:40 +01:00
Petr Mrázek 44dad25690 No nullptr, propector -> prospect 2011-11-14 09:24:36 +01:00
Petr Mrázek 4f0695a6d5 Messing with materials. 2011-11-03 04:30:59 +01:00
Petr Mrázek a29bb4578f Move kitchen exclusion module methods to a source file. 2011-10-30 03:20:54 +01:00
Petr Mrázek bfc8df3005 Added plant raw struct 2011-10-28 04:40:35 +02:00
Petr Mrázek b545de7f43 Items refactor. readItem turned into copyItem, most Items methods now accept plain df_item * instead of the copies. 2011-10-26 22:18:13 +02:00
Petr Mrázek 866b63f567 More of the items overhaul 2011-10-25 13:30:41 +02:00
Petr Mrázek 2adf1d22eb Item description method found! 2011-10-25 05:31:37 +02:00
Petr Mrázek 04495a304c Kill item variable accessors. YES. 2011-10-25 04:48:06 +02:00
Petr Mrázek a83d9fa944 Added mouse position and designation coord, along with a 'trackpos' command for kittens plugin. 2011-09-26 03:39:27 +02:00
Petr Mrázek dc81367a68 Gems are now properly detected in prospector. Nuked some legacy garbage. 2011-09-24 06:48:06 +02:00
Petr Mrázek 1df71d2b7a More tweaks related to creatures, murder implication flag for items/corpse pieces. 2011-09-21 13:47:12 +02:00
Petr Mrázek dca4c43b0b Creatures module rewrite 2011-09-18 13:49:10 +02:00
Petr Mrázek 4d6ad9e073 A whole bunch of fixes for crash bugs. 2011-08-05 05:02:36 +02:00
Petr Mrázek be358ec1de Ported deramp, cleanowned and cleartask tools. 2011-08-05 00:41:31 +02:00
Petr Mrázek 331ada8f91 Don't take over console in TEXT mode. 2011-08-01 03:31:52 +02:00
Petr Mrázek 9cf69164ed BitArray implementation, now used in Maps for the flags. 2011-07-30 16:47:49 +02:00
Petr Mrázek a9a3a3ff5f Merge branch 'topic_tools' 2011-07-28 02:36:25 +02:00
Petr Mrázek 8dec3546a3 More plugin work 2011-07-26 11:01:16 +02:00
Petr Mrázek d65f5596cb Ported mode, probe. Some changes required for that. 2011-07-25 10:14:58 +02:00
Petr Mrázek a8ff3d9d48 Merge pull request #116 from matthew-cline/TOPIC-items
Improved Items module and itemhacks plugin
2011-07-25 01:10:07 -07:00
Matthew Cline 109f34cd6e Improved Items module and itemhacks plugin
Items module:
* Identified flags for "owned by hostile" and "owned by trader".
* Identified an unknown uint32_t field as being the item age.
* Added and documented ClassNameCheck for more item ref types, though
  they aren't used yet (other than to mark that item ref class as a
  "known" class).
* Added method to get list of an item's unknown item ref classes.
* Made all unknown flags have name 'unk#', instead of some also having
  the name 'u_ngrd#'.

Itemhacks plugin:
* Folded second command into "dumpitems unknown", which will list
  any items which have the unknown vector field non-empty (which seems
  to be associated with tasked items).
* "dumpitems unknown" will also dump any item with a set unknown flag
  or with item refs of an unknown class.
2011-07-24 21:35:50 -07:00
Petr Mrázek bd9643c8cc Merge branch 'dfapi'
Conflicts:
	CMakeLists.txt
	library/DFProcess-linux.cpp
	library/include/dfhack-c/modules/Creatures_C.h
	library/include/dfhack/modules/Maps.h
	library/modules/Creatures_C.cpp
2011-07-23 17:29:05 +02:00
Petr Mrázek 6b6eed34cc Merge https://github.com/zilpin/dfhack 2011-07-23 17:08:15 +02:00
Petr Mrázek caf6f881df Minimize notes module. 2011-07-23 03:25:42 +02:00
Petr Mrázek e00a4e8888 Fix ore/gem sorting. 2011-07-22 03:00:56 +02:00
Petr Mrázek 7325808c98 Fixes to materials. 2011-07-22 02:44:36 +02:00
Petr Mrázek 131c32494a Added DF material structs reversed by Quietust 2011-07-21 22:37:02 +02:00
Matthew Cline 86577d4f8a Notes module
Gets a vector of pointers to note structs
2011-07-20 18:26:52 -07:00
Petr Mrázek bde3616015 Merge pull request #110 from matthew-cline/TOPIC-inorganic
More info on inorganic materials
2011-07-20 12:35:58 -07:00
Petr Mrázek 873cbd8388 Make 'die' plugin a builtin, made the console interaction less confusing. 2011-07-20 20:58:19 +02:00
Matthew Cline 6631f97a6a More info on inorganic materials
Get value, wall tile, boulder tile, smelting info and strand extraction
info for inorganic materials.  Prospector uses this to separete out vein
materials into ores, gems and other.

Offsets provided for both Linux and Windows, but only tested on Linux.
2011-07-20 06:18:50 -07:00
Petr Mrázek 0defcc9889 Making Items a bit more sane. It's still using Accessors though. 2011-07-20 10:41:13 +02:00
zilpin 3d5169901c minor bug fixes 2011-07-18 16:34:35 -04:00
zilpin 4eb13800cd -WriteVein(), and some convenience functions for the vein bitmaps. 2011-07-18 15:55:41 -04:00
Matthew Cline a923d19f76 Get game's current world save folder
Use World::ReadWorldFolder() to get "region1" (or whatever it currently
is).  Only have offset for Linux.
2011-07-16 16:00:50 -07:00
Petr Mrázek d6d108dd34 Qt plugin fixes for windows, renamed interface to df_interface in Gui. 2011-07-16 18:10:08 +02:00
Petr Mrázek 96153a7b05 Merge branch 'dfapi' of github.com:peterix/dfhack into dfapi 2011-07-14 04:06:12 +02:00
Petr Mrázek 792d272fbf Windows side of the Console rewrite 2011-07-14 04:05:27 +02:00
Matthew Cline d1170d54c3 Vermin module and colonies plugin
This is the start of the vermin module.  Right now it just gets a list
of the positions at which vermin are created (spawn points).  Most
spawn points are invisible and transient, but colonies (ant hills and
such) are permanent and visible.  The address of the spawn points vector
is only provided for Linux 0.31.25

The colonies plugin uses the vermin module to list the location and
species of colonies, and can either wipe them all out or turn them all
into honey bee colonies.
2011-07-12 23:17:51 -07:00
Matthew Cline 5c1526d6d9 creatures: read and write pregnancy counter
Also change creaturemanger to print out the ticks-until-birth for
pregnant creatures.
2011-07-11 02:48:10 -07:00
Matthew Cline cb9c9aae7c Deal with third flag group in creatures
Added support for reading and writing the third creature flag group,
t_creaturflags3 (the offest already exists in Memory.xml).  So far I've
only figured out three of the flags (out of an apparent 13):

1) announce_titan, which causes the creature to be announced as if
   it was a titan or FB which had just arrived.

2) scuttle, which causes the creature to be die like it had been
   killed in the game.  That is, it leaves behind a corpse, and
   will generate unhappy thoughts in dwarves if approriate.

3) ghostly, for creatures which are the ghosts of dead dwarves.

I updated creaturemanager to use scuttle for --kill, and added the
action --erase to kill in the old way which doesn't leave a corpse or
creatre unhappy thoughts.
2011-07-10 04:00:52 -07:00
Petr Mrázek d894ef0ffa Hotkey UI for linux. 2011-07-09 11:33:58 +02:00
Petr Mrázek 367d79bcfa Weather plugin to mirror the weather tool. 2011-07-07 10:57:57 +02:00
Petr Mrázek 8b298f8d91 More maps tweaks, function for block event removal, added cleanmap version that nukes spatter objects instead of rewriting their
bitmaps.
2011-07-07 09:49:58 +02:00
Petr Mrázek 4ff5db06be Maps no longer copy the map block pointer array, blocks are structs, map data is public. 2011-07-07 07:00:36 +02:00
Petr Mrázek 56a409d9a4 sync, some map data structures, commented out some dead code 2011-07-06 11:13:36 +02:00
Petr Mrázek f2b91d3269 Making ready for adding plugins. Fixes all over the place, more removal of obsolete parts. 2011-06-20 01:12:07 +02:00
Petr Mrázek e0fb8f7c81 Crud removal: Context is gone. Added missing FakeSDL.h 2011-06-17 15:02:43 +02:00
Petr Mrázek 93be1eb1fb Yay, kittens! Also some license cleanup, IO thread usage, more SDL wrapping and ability to run reveal from DFHack console. 2011-06-16 23:53:39 +02:00
Petr Mrázek b29871cb8c Fixed tick count offset, hotkey support is back from the dead (untested) 2011-06-15 06:09:24 +02:00
Petr Mrázek 22b79bb46e Now works on Windows again, some more cleanups, added a singleton Core object for holding all the globals. 2011-06-14 16:13:28 +02:00
Petr Mrázek 0a428b509e Vegetation module becomes rather skeletal. 2011-06-13 21:11:02 +02:00
Petr Mrázek 511f459182 Stripped nonsense from the DFHack vector wrapper. Next step: removal. 2011-06-13 01:14:10 +02:00
Petr Mrázek 81d648dfa7 First 'working' DFHack inside DF, for 'some' values of 'working'. 2011-06-12 23:17:40 +02:00
Petr Mrázek da2fb1cb1a Fix creature owned items vector offset on Windows, added support for owned items to more versions. 2011-05-28 10:18:50 +02:00
Petr Mrázek e5e0391d76 stop dfstatus from wasting time. added 'stopwatch.h' to extras for getting accurate unix time in milliseconds 2011-05-21 21:54:53 +02:00
Petr Mrázek 61dea59e29 Fix a big heap of warnings. 2011-05-15 22:24:40 +02:00
Petr Mrázek 515f4952a9 Merge https://github.com/angavrilov/dfhack
Conflicts:
	library/include/dfhack/DFProcess.h
2011-05-15 21:50:20 +02:00
Petr Mrázek fe6eb4b70a Fix for MSVC build, added prototype cmd.exe detection on windows. 2011-05-15 05:19:51 +02:00
Petr Mrázek 43fc15476a Added ability to set trees on fire. 2011-05-15 00:26:44 +02:00
Petr Mrázek 7dbb41cc66 Add method for writing block/map feature indexes 2011-05-13 05:00:29 +02:00
Alexander Gavrilov a7be2aee33 Support actually removing owner links between items and creatures. 2011-05-12 21:10:29 +04:00
Alexander Gavrilov c7f4f8c281 Support printing refs in dfitemdump, and add methods for containers. 2011-05-12 21:10:29 +04:00
Petr Mrázek 4631ec2e0d Item quantity support for 31.25 2011-05-11 23:53:16 +02:00
Alexander Gavrilov ed1477b53d Support listing items owned by a creature. 2011-05-09 14:49:44 +04:00
Alexander Gavrilov 14f291d539 Support reading the item ID field, which is used for cross-referencing. 2011-05-09 14:04:39 +04:00
Alexander Gavrilov e993bbcb67 Implement class name caching and optimized equality check. 2011-05-09 13:48:54 +04:00
Petr Mrázek 6dc80d393f Remove silly debug output 2011-05-08 03:36:26 +02:00
Petr Mrázek 96bfec5402 The mood offset on linux was OK. General fixage of things. 2011-05-08 03:21:34 +02:00
Petr Mrázek 8c4916958e A fixme in Maps: replace feature reading with accessors 2011-05-07 20:23:31 +02:00
Petr Mrázek 8b2ab8de68 Ending the map feature failtrain. 2011-05-07 09:07:28 +02:00
Petr Mrázek 97af676bdb Fix color variable naming in t_descriptor_color 2011-05-07 03:48:41 +02:00
Petr Mrázek fc0f6f1e48 Minor rearrangement with no impact 2011-05-07 03:44:10 +02:00
Petr Mrázek 03a3f29871 Fix misplaced exports 2011-04-28 05:10:37 +02:00
Petr Mrázek f481ee7b5d Add missing stddef.h include in Creatures module. 2011-04-24 02:49:49 +02:00
Petr Mrázek bc855b296f Merge branch 'master' of https://github.com/angavrilov/dfhack 2011-04-17 16:08:13 +02:00
Petr Mrázek 6e607d45d9 Fixed mingw32 build. 2011-04-17 01:48:58 +02:00
Petr Mrázek b0cb59a3f2 The item designator tool lives again. 2011-04-16 23:57:04 +02:00
Petr Mrázek 89169053ff Item support for windows 31.25 2011-04-16 21:02:20 +02:00
Alexander Gavrilov 56b29cf12e Merge remote-tracking branch 'origin/master' 2011-04-15 10:58:09 +04:00
Petr Mrázek 34128c2f6d Item Accessor method pointer was used incorrectly. 2011-04-14 15:16:12 +02:00
Petr Mrázek 1a8c27ce01 Fix accessor mess I made. Added Accessor description dump to the dfitemdump tool and Items module. 2011-04-14 01:42:03 +02:00
Alexander Gavrilov ebc4d21e66 Improve name structure handling, and support duplicating them (on linux).
The name structure actually contains additional linguistical data,
ignoring which produces wrong renderings for non-dwarfish names.
This data also obviously has to be copied with the structure.

Copying STL strings works by replicating the shared copy logic
(i.e. incrementing the reference counter), but leaks memory owned
by the string being overwritten.
2011-04-13 20:36:10 +04:00
Petr Mrázek f5911a14a6 Some const correctness, re-enabled job printing in the creature dump tool. 2011-04-12 13:59:07 +02:00
Petr Mrázek 212500ee00 Big Items refactor, made all the Accessor offsets optional. 2011-04-11 22:13:06 +02:00
Petr Mrázek 77f0885d9e Merge https://github.com/angavrilov/dfhack into items 2011-04-11 12:48:28 +02:00
Alexander Gavrilov 2e0ec2db72 Support retrieving the item owner reference.
Reference is done by item id, and stored in some kind
of generic reference vector in the item structure.
2011-04-11 14:32:53 +04:00
Alexander Gavrilov fbf76440b5 Try to handle signed and unsigned 16-bit accessors.
Not sure whether it makes much sense, seeing as some
accessors (e.g. wear) actually return 32-bit values,
assuming that the caller would correctly sign-extend
the lower half and discard the upper.
2011-04-10 22:44:01 +04:00
Alexander Gavrilov f6ae41fe49 Provide access to item header, including flags, and wear information.
Add preliminary offsets for the item data to Memory.xml
2011-04-10 22:42:25 +04:00
Alexander Gavrilov e3897b0f93 Improve the accessor instruction parser.
Instead of hard-coding complete machine code patterns, try
to really parse a certain subset of MOV instructions.
2011-04-10 21:51:21 +04:00
Petr Mrázek 1d35044db3 Started removing C++-isms from C wrapper. Removed DFGlobal.h 2011-04-10 13:12:28 +02:00
Petr Mrázek c1deee768e Add missing files, wix build on windows. 2011-04-10 11:03:24 +02:00
Petr Mrázek d4e2850768 Make C-wrapper compile times less ridiculous. 2011-04-10 10:50:32 +02:00
Petr Mrázek bb04aa1a32 Linux header cleanups. Windows side will follow. 2011-04-10 10:19:15 +02:00
Petr Mrázek 7b1f3ce72b Job ID is a Word, not DWord. 2011-04-03 21:43:16 +02:00
Petr Mrázek 8b8c70b5ff Big creature jobs read/write fix (it was cmpletely broken) 2011-04-03 21:27:47 +02:00
Petr Mrázek 4cfc12b52b Engravings module. 2011-04-03 00:15:47 +02:00
Petr Mrázek 837ea52c22 Fix windows/wine version information bugs related to processes without a PE header. 2011-03-31 05:39:12 +02:00
doomchild 1bf6a2ea71 generally, function signatures are supposed to match between header and implementation file... 2011-03-29 10:42:04 -05:00
doomchild 4c55f54464 spelled a couple of allocator names wrong 2011-03-29 10:41:45 -05:00
doomchild cf59b7802d added getPosition 2011-03-29 10:23:04 -05:00
doomchild e34831a354 added getters/setters for cursor/view coords, window size, and screen tiles added ReadHotkeys 2011-03-29 09:59:12 -05:00
Petr Mrázek 635e1998ee Stop DFVector from accessing VersionInfo in the constructor (slight optimization). 2011-03-25 06:40:33 +01:00
Petr Mrázek 1a1a28ee3d World module offsets for windows 31.22 2011-03-25 03:27:07 +01:00
Petr Mrázek 4c030e7cc1 Some linux 31.22 offsets, slight tweaks to Materials 2011-03-25 02:31:27 +01:00
Petr Mrázek 754647fe96 The mysterious variable is mysterious, 31.22 support, needs testing 2011-03-24 23:21:50 +01:00
Petr Mrázek ecb239f64c Merge branch 'worldmap' 2011-03-24 17:43:28 +01:00
Petr Mrázek 1f4ac33200 Clarification of some values of geology and local feature reading 2011-03-24 17:41:34 +01:00
Petr Mrázek 7c971cd8f1 World coords for dfposition 2011-03-24 06:13:21 +01:00
Petr Mrázek d0a171a350 Add a form of ReadFeature applicable to already read blocks. 2011-03-24 04:39:38 +01:00
Petr Mrázek 4090a378c1 Remove message spam, make sure the old methods act the same. 2011-03-24 04:20:34 +01:00
Petr Mrázek 64a578b204 Added cache for map features inside the Maps module along with convenience feature getter for blocks. Adamantine vein refiller tool. 2011-03-24 04:00:23 +01:00
Petr Mrázek fe92edfb4e No more generated config files. 2011-03-20 06:20:23 +01:00
Petr Mrázek 2bc7aacb79 Remove precompiled garbage, fix dfcleanmap for real 2011-03-19 20:17:04 +01:00
Petr Mrázek a7f3258018 Get rid of SHM in modules. 2011-03-18 17:58:48 +01:00
Petr Mrázek d75c940958 Kill Position module everywhere. 2011-03-18 11:45:37 +01:00
Petr Mrázek e1b80e6f33 Massive tool and wrapper fixage. 2011-03-18 11:38:37 +01:00
Petr Mrázek a6c724bfb5 Module rearrangement and doxygen documentification. API break. 2011-03-18 11:09:26 +01:00
Petr Mrázek b94ddf50d0 Eliminated silly dependency cascade within the library. Some documentation tweaks. 2011-03-18 08:53:59 +01:00
doomchild 5cbc9e5918 added Maps_ReadLocalFeatures 2011-03-14 14:59:31 -05:00
doomchild d347713860 Merge remote branch 'upstream/master' 2011-03-14 09:54:19 -05:00
doomchild c5e9f67389 added ReadVegetation implementation 2011-03-11 16:58:42 -06:00
doomchild 870be3a1e7 added tree buffer allocators
renamed a couple of allocators for consistency
2011-03-11 16:58:22 -06:00
Petr Mrázek 4e3a66fcd8 Merge branch 'master' of https://github.com/doomchild/dfhack 2011-03-11 22:38:25 +01:00
doomchild b9e8aa8952 Materials_getRaceEx finally works as expected 2011-03-11 14:10:51 -06:00
doomchild 49b7f8acb5 fixed a couple of bad return values 2011-03-11 14:10:22 -06:00
Petr Mrázek c223bb858f Added MapExtras, ported dfliquids to MapCache. Fixed vein non-ident bug in dfvdig. 2011-03-11 03:09:45 +01:00
doomchild 5bd51c2e08 updated to use the allocator callbacks correctly 2011-03-09 12:26:04 -06:00
doomchild 187a8a0578 added a function to read all the veins at once
updated vein reading functions to use the allocator callbacks correctly
2011-03-09 12:22:00 -06:00
Petr Mrázek bbbea3d023 Merge branch 'master' of https://github.com/doomchild/dfhack 2011-03-06 23:57:22 +01:00
Petr Mrázek 9e62ee6e75 Maps + Materials for 31.20. Still many broken offsets! 2011-03-06 20:27:40 +01:00
doomchild 2c9016d2f2 added checks for allocator callback being null 2011-03-03 14:17:09 -06:00
doomchild 4cf037d5d3 changed a couple of argument types to be more explicit 2011-03-03 14:15:38 -06:00
Petr Mrázek f307d2c4c3 Merge https://github.com/doomchild/dfhack 2011-03-03 17:51:27 +01:00
Petr Mrázek 6f7a8e3af5 Export fail removal - sa_feature, other minor changes 2011-03-03 17:50:17 +01:00
doomchild f4be3ef4fe updated to use t_gamemodes struct in Read/WriteGameMode calls 2011-03-03 10:18:27 -06:00
Petr Mrázek 680fe2981e Merge branch 'master' of https://github.com/tomprince/dfhack 2011-03-03 16:56:38 +01:00
Petr Mrázek 552180d430 Merge branch 'master' of https://github.com/doomchild/dfhack 2011-03-03 16:24:26 +01:00
Petr Mrázek faea954da1 Now with less endless loops. 2011-03-02 22:43:46 +01:00
Petr Mrázek 777e997da2 Make vein reading a little saner. 2011-03-02 22:36:02 +01:00
Petr Mrázek 3ff4e2c43e Get rid of 'unknown vein' spam. 2011-03-02 22:32:08 +01:00
Tom Prince a82e249205 Move definition of sa_feature to .cpp to avoid unsed variable warning.
Signed-off-by: Tom Prince <tom.prince@ualberta.net>
2011-03-01 17:29:27 -05:00
Petr Mrázek 267bc1d446 Game/Control mode improvements. Use dfposition to check them. 2011-03-01 22:18:26 +01:00
doomchild 0b77744905 added game mode reader 2011-03-01 14:38:55 -06:00
doomchild bdb0ebd8ea added grass vein and world construction readers 2011-03-01 14:38:18 -06:00
Petr Mrázek b1061d0f94 Game mode reading, removed some include paths 2011-03-01 06:59:23 +01:00