diff --git a/.gitignore b/.gitignore index 10760875f..71d983519 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ output/* !output/Memory.xml # a file generated by cmake -library/config.h +dfhack/include/config.h # any build folders build*/ @@ -18,3 +18,6 @@ build*/ #ignore Kdevelop stuff .kdev4 + +#fake curses header +examples/fake-curses.h diff --git a/CMakeLists.txt b/CMakeLists.txt index de66d3c76..84930eaca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,11 +26,17 @@ SET( LIBRARY_OUTPUT_PATH ${dfhack_SOURCE_DIR}/output CACHE PATH "Output director SET( EXECUTABLE_OUTPUT_PATH ${dfhack_SOURCE_DIR}/output CACHE PATH "Output directory for the dfhack tools" ) SET( CMAKE_SWIG_OUTDIR ${dfhack_SOURCE_DIR}/output CACHE PATH "Global output directory for swig generated language wrappers" ) -include_directories (${CMAKE_SOURCE_DIR}/library/) -include_directories (${CMAKE_SOURCE_DIR}/shmserver/) -include_directories (${CMAKE_SOURCE_DIR}/depends/) - -add_subdirectory (library) +include_directories (${CMAKE_SOURCE_DIR}/dfhack/include/) +include_directories (${CMAKE_SOURCE_DIR}/dfhack/shm/) +include_directories (${CMAKE_SOURCE_DIR}/dfhack/depends/md5/) +include_directories (${CMAKE_SOURCE_DIR}/dfhack/depends/tinyxml/) +include_directories (${CMAKE_SOURCE_DIR}/dfhack/depends/argstream/) + +add_subdirectory (dfhack) +#add_subdirectory (dfhack/shm) +#FIXME: add exports for MSVC +#add_subdirectory (dfhack/depends/md5) +#add_subdirectory (dfhack/depends/tinyxml) +#add_subdirectory (dfhack/depends/argstream) add_subdirectory (tools) add_subdirectory (examples) -add_subdirectory (shmserver) \ No newline at end of file diff --git a/depends/cpfile b/depends/cpfile deleted file mode 100644 index a2e527d49..000000000 --- a/depends/cpfile +++ /dev/null @@ -1,1127 +0,0 @@ -boost/aligned_storage.hpp -boost/assert.hpp -boost/call_traits.hpp -boost/checked_delete.hpp -boost/config.hpp -boost/config/abi/msvc_prefix.hpp -boost/config/abi/msvc_suffix.hpp -boost/config/abi_prefix.hpp -boost/config/abi_suffix.hpp -boost/config/auto_link.hpp -boost/config/compiler/common_edg.hpp -boost/config/compiler/gcc.hpp -boost/config/compiler/gcc_xml.hpp -boost/config/compiler/intel.hpp -boost/config/compiler/visualc.hpp -boost/config/no_tr1/cmath.hpp -boost/config/no_tr1/complex.hpp -boost/config/no_tr1/functional.hpp -boost/config/no_tr1/memory.hpp -boost/config/no_tr1/utility.hpp -boost/config/platform/linux.hpp -boost/config/platform/macos.hpp -boost/config/platform/win32.hpp -boost/config/posix_features.hpp -boost/config/requires_threads.hpp -boost/config/select_compiler_config.hpp -boost/config/select_platform_config.hpp -boost/config/select_stdlib_config.hpp -boost/config/stdlib/dinkumware.hpp -boost/config/stdlib/libcomo.hpp -boost/config/stdlib/libstdcpp3.hpp -boost/config/stdlib/modena.hpp -boost/config/stdlib/msl.hpp -boost/config/stdlib/roguewave.hpp -boost/config/stdlib/sgi.hpp -boost/config/stdlib/stlport.hpp -boost/config/stdlib/vacpp.hpp -boost/config/suffix.hpp -boost/config/user.hpp -boost/config/warning_disable.hpp -boost/detail/allocator_utilities.hpp -boost/detail/call_traits.hpp -boost/detail/indirect_traits.hpp -boost/detail/is_function_ref_tester.hpp -boost/detail/iterator.hpp -boost/detail/lightweight_mutex.hpp -boost/detail/no_exceptions_support.hpp -boost/detail/ob_call_traits.hpp -boost/detail/workaround.hpp -boost/implicit_cast.hpp -boost/iterator.hpp -boost/iterator/detail/config_def.hpp -boost/iterator/detail/config_undef.hpp -boost/iterator/detail/enable_if.hpp -boost/iterator/detail/facade_iterator_category.hpp -boost/iterator/interoperable.hpp -boost/iterator/iterator_adaptor.hpp -boost/iterator/iterator_categories.hpp -boost/iterator/iterator_facade.hpp -boost/iterator/iterator_traits.hpp -boost/iterator/reverse_iterator.hpp -boost/mpl/advance.hpp -boost/mpl/advance_fwd.hpp -boost/mpl/always.hpp -boost/mpl/and.hpp -boost/mpl/apply.hpp -boost/mpl/apply_fwd.hpp -boost/mpl/apply_wrap.hpp -boost/mpl/arg.hpp -boost/mpl/arg_fwd.hpp -boost/mpl/assert.hpp -boost/mpl/at.hpp -boost/mpl/at_fwd.hpp -boost/mpl/aux_/adl_barrier.hpp -boost/mpl/aux_/advance_backward.hpp -boost/mpl/aux_/advance_forward.hpp -boost/mpl/aux_/arg_typedef.hpp -boost/mpl/aux_/arithmetic_op.hpp -boost/mpl/aux_/arity.hpp -boost/mpl/aux_/arity_spec.hpp -boost/mpl/aux_/at_impl.hpp -boost/mpl/aux_/begin_end_impl.hpp -boost/mpl/aux_/clear_impl.hpp -boost/mpl/aux_/common_name_wknd.hpp -boost/mpl/aux_/comparison_op.hpp -boost/mpl/aux_/config/adl.hpp -boost/mpl/aux_/config/arrays.hpp -boost/mpl/aux_/config/bcc.hpp -boost/mpl/aux_/config/bind.hpp -boost/mpl/aux_/config/compiler.hpp -boost/mpl/aux_/config/ctps.hpp -boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp -boost/mpl/aux_/config/dtp.hpp -boost/mpl/aux_/config/eti.hpp -boost/mpl/aux_/config/forwarding.hpp -boost/mpl/aux_/config/gcc.hpp -boost/mpl/aux_/config/has_apply.hpp -boost/mpl/aux_/config/has_xxx.hpp -boost/mpl/aux_/config/integral.hpp -boost/mpl/aux_/config/intel.hpp -boost/mpl/aux_/config/lambda.hpp -boost/mpl/aux_/config/msvc.hpp -boost/mpl/aux_/config/msvc_typename.hpp -boost/mpl/aux_/config/nttp.hpp -boost/mpl/aux_/config/operators.hpp -boost/mpl/aux_/config/overload_resolution.hpp -boost/mpl/aux_/config/pp_counter.hpp -boost/mpl/aux_/config/preprocessor.hpp -boost/mpl/aux_/config/static_constant.hpp -boost/mpl/aux_/config/ttp.hpp -boost/mpl/aux_/config/typeof.hpp -boost/mpl/aux_/config/use_preprocessed.hpp -boost/mpl/aux_/config/workaround.hpp -boost/mpl/aux_/contains_impl.hpp -boost/mpl/aux_/count_args.hpp -boost/mpl/aux_/empty_impl.hpp -boost/mpl/aux_/find_if_pred.hpp -boost/mpl/aux_/fold_impl.hpp -boost/mpl/aux_/fold_impl_body.hpp -boost/mpl/aux_/full_lambda.hpp -boost/mpl/aux_/has_apply.hpp -boost/mpl/aux_/has_begin.hpp -boost/mpl/aux_/has_key_impl.hpp -boost/mpl/aux_/has_rebind.hpp -boost/mpl/aux_/has_size.hpp -boost/mpl/aux_/has_tag.hpp -boost/mpl/aux_/has_type.hpp -boost/mpl/aux_/include_preprocessed.hpp -boost/mpl/aux_/inserter_algorithm.hpp -boost/mpl/aux_/integral_wrapper.hpp -boost/mpl/aux_/is_msvc_eti_arg.hpp -boost/mpl/aux_/iter_apply.hpp -boost/mpl/aux_/iter_fold_if_impl.hpp -boost/mpl/aux_/iter_fold_impl.hpp -boost/mpl/aux_/lambda_arity_param.hpp -boost/mpl/aux_/lambda_no_ctps.hpp -boost/mpl/aux_/lambda_spec.hpp -boost/mpl/aux_/lambda_support.hpp -boost/mpl/aux_/largest_int.hpp -boost/mpl/aux_/logical_op.hpp -boost/mpl/aux_/msvc_dtw.hpp -boost/mpl/aux_/msvc_eti_base.hpp -boost/mpl/aux_/msvc_is_class.hpp -boost/mpl/aux_/msvc_never_true.hpp -boost/mpl/aux_/msvc_type.hpp -boost/mpl/aux_/na.hpp -boost/mpl/aux_/na_assert.hpp -boost/mpl/aux_/na_fwd.hpp -boost/mpl/aux_/na_spec.hpp -boost/mpl/aux_/nested_type_wknd.hpp -boost/mpl/aux_/nttp_decl.hpp -boost/mpl/aux_/numeric_cast_utils.hpp -boost/mpl/aux_/numeric_op.hpp -boost/mpl/aux_/O1_size_impl.hpp -boost/mpl/aux_/overload_names.hpp -boost/mpl/aux_/preprocessed/bcc/advance_backward.hpp -boost/mpl/aux_/preprocessed/bcc/advance_forward.hpp -boost/mpl/aux_/preprocessed/bcc/and.hpp -boost/mpl/aux_/preprocessed/bcc/apply.hpp -boost/mpl/aux_/preprocessed/bcc/apply_fwd.hpp -boost/mpl/aux_/preprocessed/bcc/apply_wrap.hpp -boost/mpl/aux_/preprocessed/bcc/arg.hpp -boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp -boost/mpl/aux_/preprocessed/bcc/bind.hpp -boost/mpl/aux_/preprocessed/bcc/bind_fwd.hpp -boost/mpl/aux_/preprocessed/bcc/bitand.hpp -boost/mpl/aux_/preprocessed/bcc/bitor.hpp -boost/mpl/aux_/preprocessed/bcc/bitxor.hpp -boost/mpl/aux_/preprocessed/bcc/deque.hpp -boost/mpl/aux_/preprocessed/bcc/divides.hpp -boost/mpl/aux_/preprocessed/bcc/equal_to.hpp -boost/mpl/aux_/preprocessed/bcc/fold_impl.hpp -boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp -boost/mpl/aux_/preprocessed/bcc/greater.hpp -boost/mpl/aux_/preprocessed/bcc/greater_equal.hpp -boost/mpl/aux_/preprocessed/bcc/inherit.hpp -boost/mpl/aux_/preprocessed/bcc/iter_fold_if_impl.hpp -boost/mpl/aux_/preprocessed/bcc/iter_fold_impl.hpp -boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp -boost/mpl/aux_/preprocessed/bcc/less.hpp -boost/mpl/aux_/preprocessed/bcc/less_equal.hpp -boost/mpl/aux_/preprocessed/bcc/list.hpp -boost/mpl/aux_/preprocessed/bcc/list_c.hpp -boost/mpl/aux_/preprocessed/bcc/map.hpp -boost/mpl/aux_/preprocessed/bcc/minus.hpp -boost/mpl/aux_/preprocessed/bcc/modulus.hpp -boost/mpl/aux_/preprocessed/bcc/not_equal_to.hpp -boost/mpl/aux_/preprocessed/bcc/or.hpp -boost/mpl/aux_/preprocessed/bcc/placeholders.hpp -boost/mpl/aux_/preprocessed/bcc/plus.hpp -boost/mpl/aux_/preprocessed/bcc/quote.hpp -boost/mpl/aux_/preprocessed/bcc/reverse_fold_impl.hpp -boost/mpl/aux_/preprocessed/bcc/reverse_iter_fold_impl.hpp -boost/mpl/aux_/preprocessed/bcc/set.hpp -boost/mpl/aux_/preprocessed/bcc/set_c.hpp -boost/mpl/aux_/preprocessed/bcc/shift_left.hpp -boost/mpl/aux_/preprocessed/bcc/shift_right.hpp -boost/mpl/aux_/preprocessed/bcc/template_arity.hpp -boost/mpl/aux_/preprocessed/bcc/times.hpp -boost/mpl/aux_/preprocessed/bcc/unpack_args.hpp -boost/mpl/aux_/preprocessed/bcc/vector.hpp -boost/mpl/aux_/preprocessed/bcc/vector_c.hpp -boost/mpl/aux_/preprocessed/bcc551/advance_backward.hpp -boost/mpl/aux_/preprocessed/bcc551/advance_forward.hpp -boost/mpl/aux_/preprocessed/bcc551/and.hpp -boost/mpl/aux_/preprocessed/bcc551/apply.hpp -boost/mpl/aux_/preprocessed/bcc551/apply_fwd.hpp -boost/mpl/aux_/preprocessed/bcc551/apply_wrap.hpp -boost/mpl/aux_/preprocessed/bcc551/arg.hpp -boost/mpl/aux_/preprocessed/bcc551/basic_bind.hpp -boost/mpl/aux_/preprocessed/bcc551/bind.hpp -boost/mpl/aux_/preprocessed/bcc551/bind_fwd.hpp -boost/mpl/aux_/preprocessed/bcc551/bitand.hpp -boost/mpl/aux_/preprocessed/bcc551/bitor.hpp -boost/mpl/aux_/preprocessed/bcc551/bitxor.hpp -boost/mpl/aux_/preprocessed/bcc551/deque.hpp -boost/mpl/aux_/preprocessed/bcc551/divides.hpp -boost/mpl/aux_/preprocessed/bcc551/equal_to.hpp -boost/mpl/aux_/preprocessed/bcc551/fold_impl.hpp -boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp -boost/mpl/aux_/preprocessed/bcc551/greater.hpp -boost/mpl/aux_/preprocessed/bcc551/greater_equal.hpp -boost/mpl/aux_/preprocessed/bcc551/inherit.hpp -boost/mpl/aux_/preprocessed/bcc551/iter_fold_if_impl.hpp -boost/mpl/aux_/preprocessed/bcc551/iter_fold_impl.hpp -boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp -boost/mpl/aux_/preprocessed/bcc551/less.hpp -boost/mpl/aux_/preprocessed/bcc551/less_equal.hpp -boost/mpl/aux_/preprocessed/bcc551/list.hpp -boost/mpl/aux_/preprocessed/bcc551/list_c.hpp -boost/mpl/aux_/preprocessed/bcc551/map.hpp -boost/mpl/aux_/preprocessed/bcc551/minus.hpp -boost/mpl/aux_/preprocessed/bcc551/modulus.hpp -boost/mpl/aux_/preprocessed/bcc551/not_equal_to.hpp -boost/mpl/aux_/preprocessed/bcc551/or.hpp -boost/mpl/aux_/preprocessed/bcc551/placeholders.hpp -boost/mpl/aux_/preprocessed/bcc551/plus.hpp -boost/mpl/aux_/preprocessed/bcc551/quote.hpp -boost/mpl/aux_/preprocessed/bcc551/reverse_fold_impl.hpp -boost/mpl/aux_/preprocessed/bcc551/reverse_iter_fold_impl.hpp -boost/mpl/aux_/preprocessed/bcc551/set.hpp -boost/mpl/aux_/preprocessed/bcc551/set_c.hpp -boost/mpl/aux_/preprocessed/bcc551/shift_left.hpp -boost/mpl/aux_/preprocessed/bcc551/shift_right.hpp -boost/mpl/aux_/preprocessed/bcc551/template_arity.hpp -boost/mpl/aux_/preprocessed/bcc551/times.hpp -boost/mpl/aux_/preprocessed/bcc551/unpack_args.hpp -boost/mpl/aux_/preprocessed/bcc551/vector.hpp -boost/mpl/aux_/preprocessed/bcc551/vector_c.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/advance_backward.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/advance_forward.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/and.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/apply.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/apply_fwd.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/apply_wrap.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/arg.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/basic_bind.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/bind.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/bind_fwd.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/bitand.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/bitor.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/bitxor.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/deque.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/divides.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/equal_to.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/fold_impl.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/full_lambda.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/greater.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/greater_equal.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/inherit.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_if_impl.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/iter_fold_impl.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/lambda_no_ctps.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/less.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/less_equal.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/list.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/list_c.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/map.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/minus.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/modulus.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/not_equal_to.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/or.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/placeholders.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/plus.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/quote.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/reverse_fold_impl.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/reverse_iter_fold_impl.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/set.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/set_c.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/shift_left.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/shift_right.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/template_arity.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/times.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/unpack_args.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/vector.hpp -boost/mpl/aux_/preprocessed/bcc_pre590/vector_c.hpp -boost/mpl/aux_/preprocessed/dmc/advance_backward.hpp -boost/mpl/aux_/preprocessed/dmc/advance_forward.hpp -boost/mpl/aux_/preprocessed/dmc/and.hpp -boost/mpl/aux_/preprocessed/dmc/apply.hpp -boost/mpl/aux_/preprocessed/dmc/apply_fwd.hpp -boost/mpl/aux_/preprocessed/dmc/apply_wrap.hpp -boost/mpl/aux_/preprocessed/dmc/arg.hpp -boost/mpl/aux_/preprocessed/dmc/basic_bind.hpp -boost/mpl/aux_/preprocessed/dmc/bind.hpp -boost/mpl/aux_/preprocessed/dmc/bind_fwd.hpp -boost/mpl/aux_/preprocessed/dmc/bitand.hpp -boost/mpl/aux_/preprocessed/dmc/bitor.hpp -boost/mpl/aux_/preprocessed/dmc/bitxor.hpp -boost/mpl/aux_/preprocessed/dmc/deque.hpp -boost/mpl/aux_/preprocessed/dmc/divides.hpp -boost/mpl/aux_/preprocessed/dmc/equal_to.hpp -boost/mpl/aux_/preprocessed/dmc/fold_impl.hpp -boost/mpl/aux_/preprocessed/dmc/full_lambda.hpp -boost/mpl/aux_/preprocessed/dmc/greater.hpp -boost/mpl/aux_/preprocessed/dmc/greater_equal.hpp -boost/mpl/aux_/preprocessed/dmc/inherit.hpp -boost/mpl/aux_/preprocessed/dmc/iter_fold_if_impl.hpp -boost/mpl/aux_/preprocessed/dmc/iter_fold_impl.hpp -boost/mpl/aux_/preprocessed/dmc/lambda_no_ctps.hpp -boost/mpl/aux_/preprocessed/dmc/less.hpp -boost/mpl/aux_/preprocessed/dmc/less_equal.hpp -boost/mpl/aux_/preprocessed/dmc/list.hpp -boost/mpl/aux_/preprocessed/dmc/list_c.hpp -boost/mpl/aux_/preprocessed/dmc/map.hpp -boost/mpl/aux_/preprocessed/dmc/minus.hpp -boost/mpl/aux_/preprocessed/dmc/modulus.hpp -boost/mpl/aux_/preprocessed/dmc/not_equal_to.hpp -boost/mpl/aux_/preprocessed/dmc/or.hpp -boost/mpl/aux_/preprocessed/dmc/placeholders.hpp -boost/mpl/aux_/preprocessed/dmc/plus.hpp -boost/mpl/aux_/preprocessed/dmc/quote.hpp -boost/mpl/aux_/preprocessed/dmc/reverse_fold_impl.hpp -boost/mpl/aux_/preprocessed/dmc/reverse_iter_fold_impl.hpp -boost/mpl/aux_/preprocessed/dmc/set.hpp -boost/mpl/aux_/preprocessed/dmc/set_c.hpp -boost/mpl/aux_/preprocessed/dmc/shift_left.hpp -boost/mpl/aux_/preprocessed/dmc/shift_right.hpp -boost/mpl/aux_/preprocessed/dmc/template_arity.hpp -boost/mpl/aux_/preprocessed/dmc/times.hpp -boost/mpl/aux_/preprocessed/dmc/unpack_args.hpp -boost/mpl/aux_/preprocessed/dmc/vector.hpp -boost/mpl/aux_/preprocessed/dmc/vector_c.hpp -boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp -boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp -boost/mpl/aux_/preprocessed/gcc/and.hpp -boost/mpl/aux_/preprocessed/gcc/apply.hpp -boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp -boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp -boost/mpl/aux_/preprocessed/gcc/arg.hpp -boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp -boost/mpl/aux_/preprocessed/gcc/bind.hpp -boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp -boost/mpl/aux_/preprocessed/gcc/bitand.hpp -boost/mpl/aux_/preprocessed/gcc/bitor.hpp -boost/mpl/aux_/preprocessed/gcc/bitxor.hpp -boost/mpl/aux_/preprocessed/gcc/deque.hpp -boost/mpl/aux_/preprocessed/gcc/divides.hpp -boost/mpl/aux_/preprocessed/gcc/equal_to.hpp -boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp -boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp -boost/mpl/aux_/preprocessed/gcc/greater.hpp -boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp -boost/mpl/aux_/preprocessed/gcc/inherit.hpp -boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp -boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp -boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp -boost/mpl/aux_/preprocessed/gcc/less.hpp -boost/mpl/aux_/preprocessed/gcc/less_equal.hpp -boost/mpl/aux_/preprocessed/gcc/list.hpp -boost/mpl/aux_/preprocessed/gcc/list_c.hpp -boost/mpl/aux_/preprocessed/gcc/map.hpp -boost/mpl/aux_/preprocessed/gcc/minus.hpp -boost/mpl/aux_/preprocessed/gcc/modulus.hpp -boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp -boost/mpl/aux_/preprocessed/gcc/or.hpp -boost/mpl/aux_/preprocessed/gcc/placeholders.hpp -boost/mpl/aux_/preprocessed/gcc/plus.hpp -boost/mpl/aux_/preprocessed/gcc/quote.hpp -boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp -boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp -boost/mpl/aux_/preprocessed/gcc/set.hpp -boost/mpl/aux_/preprocessed/gcc/set_c.hpp -boost/mpl/aux_/preprocessed/gcc/shift_left.hpp -boost/mpl/aux_/preprocessed/gcc/shift_right.hpp -boost/mpl/aux_/preprocessed/gcc/template_arity.hpp -boost/mpl/aux_/preprocessed/gcc/times.hpp -boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp -boost/mpl/aux_/preprocessed/gcc/vector.hpp -boost/mpl/aux_/preprocessed/gcc/vector_c.hpp -boost/mpl/aux_/preprocessed/msvc60/advance_backward.hpp -boost/mpl/aux_/preprocessed/msvc60/advance_forward.hpp -boost/mpl/aux_/preprocessed/msvc60/and.hpp -boost/mpl/aux_/preprocessed/msvc60/apply.hpp -boost/mpl/aux_/preprocessed/msvc60/apply_fwd.hpp -boost/mpl/aux_/preprocessed/msvc60/apply_wrap.hpp -boost/mpl/aux_/preprocessed/msvc60/arg.hpp -boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp -boost/mpl/aux_/preprocessed/msvc60/bind.hpp -boost/mpl/aux_/preprocessed/msvc60/bind_fwd.hpp -boost/mpl/aux_/preprocessed/msvc60/bitand.hpp -boost/mpl/aux_/preprocessed/msvc60/bitor.hpp -boost/mpl/aux_/preprocessed/msvc60/bitxor.hpp -boost/mpl/aux_/preprocessed/msvc60/deque.hpp -boost/mpl/aux_/preprocessed/msvc60/divides.hpp -boost/mpl/aux_/preprocessed/msvc60/equal_to.hpp -boost/mpl/aux_/preprocessed/msvc60/fold_impl.hpp -boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp -boost/mpl/aux_/preprocessed/msvc60/greater.hpp -boost/mpl/aux_/preprocessed/msvc60/greater_equal.hpp -boost/mpl/aux_/preprocessed/msvc60/inherit.hpp -boost/mpl/aux_/preprocessed/msvc60/iter_fold_if_impl.hpp -boost/mpl/aux_/preprocessed/msvc60/iter_fold_impl.hpp -boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp -boost/mpl/aux_/preprocessed/msvc60/less.hpp -boost/mpl/aux_/preprocessed/msvc60/less_equal.hpp -boost/mpl/aux_/preprocessed/msvc60/list.hpp -boost/mpl/aux_/preprocessed/msvc60/list_c.hpp -boost/mpl/aux_/preprocessed/msvc60/map.hpp -boost/mpl/aux_/preprocessed/msvc60/minus.hpp -boost/mpl/aux_/preprocessed/msvc60/modulus.hpp -boost/mpl/aux_/preprocessed/msvc60/not_equal_to.hpp -boost/mpl/aux_/preprocessed/msvc60/or.hpp -boost/mpl/aux_/preprocessed/msvc60/placeholders.hpp -boost/mpl/aux_/preprocessed/msvc60/plus.hpp -boost/mpl/aux_/preprocessed/msvc60/quote.hpp -boost/mpl/aux_/preprocessed/msvc60/reverse_fold_impl.hpp -boost/mpl/aux_/preprocessed/msvc60/reverse_iter_fold_impl.hpp -boost/mpl/aux_/preprocessed/msvc60/set.hpp -boost/mpl/aux_/preprocessed/msvc60/set_c.hpp -boost/mpl/aux_/preprocessed/msvc60/shift_left.hpp -boost/mpl/aux_/preprocessed/msvc60/shift_right.hpp -boost/mpl/aux_/preprocessed/msvc60/template_arity.hpp -boost/mpl/aux_/preprocessed/msvc60/times.hpp -boost/mpl/aux_/preprocessed/msvc60/unpack_args.hpp -boost/mpl/aux_/preprocessed/msvc60/vector.hpp -boost/mpl/aux_/preprocessed/msvc60/vector_c.hpp -boost/mpl/aux_/preprocessed/msvc70/advance_backward.hpp -boost/mpl/aux_/preprocessed/msvc70/advance_forward.hpp -boost/mpl/aux_/preprocessed/msvc70/and.hpp -boost/mpl/aux_/preprocessed/msvc70/apply.hpp -boost/mpl/aux_/preprocessed/msvc70/apply_fwd.hpp -boost/mpl/aux_/preprocessed/msvc70/apply_wrap.hpp -boost/mpl/aux_/preprocessed/msvc70/arg.hpp -boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp -boost/mpl/aux_/preprocessed/msvc70/bind.hpp -boost/mpl/aux_/preprocessed/msvc70/bind_fwd.hpp -boost/mpl/aux_/preprocessed/msvc70/bitand.hpp -boost/mpl/aux_/preprocessed/msvc70/bitor.hpp -boost/mpl/aux_/preprocessed/msvc70/bitxor.hpp -boost/mpl/aux_/preprocessed/msvc70/deque.hpp -boost/mpl/aux_/preprocessed/msvc70/divides.hpp -boost/mpl/aux_/preprocessed/msvc70/equal_to.hpp -boost/mpl/aux_/preprocessed/msvc70/fold_impl.hpp -boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp -boost/mpl/aux_/preprocessed/msvc70/greater.hpp -boost/mpl/aux_/preprocessed/msvc70/greater_equal.hpp -boost/mpl/aux_/preprocessed/msvc70/inherit.hpp -boost/mpl/aux_/preprocessed/msvc70/iter_fold_if_impl.hpp -boost/mpl/aux_/preprocessed/msvc70/iter_fold_impl.hpp -boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp -boost/mpl/aux_/preprocessed/msvc70/less.hpp -boost/mpl/aux_/preprocessed/msvc70/less_equal.hpp -boost/mpl/aux_/preprocessed/msvc70/list.hpp -boost/mpl/aux_/preprocessed/msvc70/list_c.hpp -boost/mpl/aux_/preprocessed/msvc70/map.hpp -boost/mpl/aux_/preprocessed/msvc70/minus.hpp -boost/mpl/aux_/preprocessed/msvc70/modulus.hpp -boost/mpl/aux_/preprocessed/msvc70/not_equal_to.hpp -boost/mpl/aux_/preprocessed/msvc70/or.hpp -boost/mpl/aux_/preprocessed/msvc70/placeholders.hpp -boost/mpl/aux_/preprocessed/msvc70/plus.hpp -boost/mpl/aux_/preprocessed/msvc70/quote.hpp -boost/mpl/aux_/preprocessed/msvc70/reverse_fold_impl.hpp -boost/mpl/aux_/preprocessed/msvc70/reverse_iter_fold_impl.hpp -boost/mpl/aux_/preprocessed/msvc70/set.hpp -boost/mpl/aux_/preprocessed/msvc70/set_c.hpp -boost/mpl/aux_/preprocessed/msvc70/shift_left.hpp -boost/mpl/aux_/preprocessed/msvc70/shift_right.hpp -boost/mpl/aux_/preprocessed/msvc70/template_arity.hpp -boost/mpl/aux_/preprocessed/msvc70/times.hpp -boost/mpl/aux_/preprocessed/msvc70/unpack_args.hpp -boost/mpl/aux_/preprocessed/msvc70/vector.hpp -boost/mpl/aux_/preprocessed/msvc70/vector_c.hpp -boost/mpl/aux_/preprocessed/mwcw/advance_backward.hpp -boost/mpl/aux_/preprocessed/mwcw/advance_forward.hpp -boost/mpl/aux_/preprocessed/mwcw/and.hpp -boost/mpl/aux_/preprocessed/mwcw/apply.hpp -boost/mpl/aux_/preprocessed/mwcw/apply_fwd.hpp -boost/mpl/aux_/preprocessed/mwcw/apply_wrap.hpp -boost/mpl/aux_/preprocessed/mwcw/arg.hpp -boost/mpl/aux_/preprocessed/mwcw/basic_bind.hpp -boost/mpl/aux_/preprocessed/mwcw/bind.hpp -boost/mpl/aux_/preprocessed/mwcw/bind_fwd.hpp -boost/mpl/aux_/preprocessed/mwcw/bitand.hpp -boost/mpl/aux_/preprocessed/mwcw/bitor.hpp -boost/mpl/aux_/preprocessed/mwcw/bitxor.hpp -boost/mpl/aux_/preprocessed/mwcw/deque.hpp -boost/mpl/aux_/preprocessed/mwcw/divides.hpp -boost/mpl/aux_/preprocessed/mwcw/equal_to.hpp -boost/mpl/aux_/preprocessed/mwcw/fold_impl.hpp -boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp -boost/mpl/aux_/preprocessed/mwcw/greater.hpp -boost/mpl/aux_/preprocessed/mwcw/greater_equal.hpp -boost/mpl/aux_/preprocessed/mwcw/inherit.hpp -boost/mpl/aux_/preprocessed/mwcw/iter_fold_if_impl.hpp -boost/mpl/aux_/preprocessed/mwcw/iter_fold_impl.hpp -boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp -boost/mpl/aux_/preprocessed/mwcw/less.hpp -boost/mpl/aux_/preprocessed/mwcw/less_equal.hpp -boost/mpl/aux_/preprocessed/mwcw/list.hpp -boost/mpl/aux_/preprocessed/mwcw/list_c.hpp -boost/mpl/aux_/preprocessed/mwcw/map.hpp -boost/mpl/aux_/preprocessed/mwcw/minus.hpp -boost/mpl/aux_/preprocessed/mwcw/modulus.hpp -boost/mpl/aux_/preprocessed/mwcw/not_equal_to.hpp -boost/mpl/aux_/preprocessed/mwcw/or.hpp -boost/mpl/aux_/preprocessed/mwcw/placeholders.hpp -boost/mpl/aux_/preprocessed/mwcw/plus.hpp -boost/mpl/aux_/preprocessed/mwcw/quote.hpp -boost/mpl/aux_/preprocessed/mwcw/reverse_fold_impl.hpp -boost/mpl/aux_/preprocessed/mwcw/reverse_iter_fold_impl.hpp -boost/mpl/aux_/preprocessed/mwcw/set.hpp -boost/mpl/aux_/preprocessed/mwcw/set_c.hpp -boost/mpl/aux_/preprocessed/mwcw/shift_left.hpp -boost/mpl/aux_/preprocessed/mwcw/shift_right.hpp -boost/mpl/aux_/preprocessed/mwcw/template_arity.hpp -boost/mpl/aux_/preprocessed/mwcw/times.hpp -boost/mpl/aux_/preprocessed/mwcw/unpack_args.hpp -boost/mpl/aux_/preprocessed/mwcw/vector.hpp -boost/mpl/aux_/preprocessed/mwcw/vector_c.hpp -boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp -boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp -boost/mpl/aux_/preprocessed/no_ctps/and.hpp -boost/mpl/aux_/preprocessed/no_ctps/apply.hpp -boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp -boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp -boost/mpl/aux_/preprocessed/no_ctps/arg.hpp -boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp -boost/mpl/aux_/preprocessed/no_ctps/bind.hpp -boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp -boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp -boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp -boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp -boost/mpl/aux_/preprocessed/no_ctps/deque.hpp -boost/mpl/aux_/preprocessed/no_ctps/divides.hpp -boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp -boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp -boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp -boost/mpl/aux_/preprocessed/no_ctps/greater.hpp -boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp -boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp -boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp -boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp -boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp -boost/mpl/aux_/preprocessed/no_ctps/less.hpp -boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp -boost/mpl/aux_/preprocessed/no_ctps/list.hpp -boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp -boost/mpl/aux_/preprocessed/no_ctps/map.hpp -boost/mpl/aux_/preprocessed/no_ctps/minus.hpp -boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp -boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp -boost/mpl/aux_/preprocessed/no_ctps/or.hpp -boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp -boost/mpl/aux_/preprocessed/no_ctps/plus.hpp -boost/mpl/aux_/preprocessed/no_ctps/quote.hpp -boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp -boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp -boost/mpl/aux_/preprocessed/no_ctps/set.hpp -boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp -boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp -boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp -boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp -boost/mpl/aux_/preprocessed/no_ctps/times.hpp -boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp -boost/mpl/aux_/preprocessed/no_ctps/vector.hpp -boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp -boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp -boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp -boost/mpl/aux_/preprocessed/no_ttp/and.hpp -boost/mpl/aux_/preprocessed/no_ttp/apply.hpp -boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp -boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp -boost/mpl/aux_/preprocessed/no_ttp/arg.hpp -boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp -boost/mpl/aux_/preprocessed/no_ttp/bind.hpp -boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp -boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp -boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp -boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp -boost/mpl/aux_/preprocessed/no_ttp/deque.hpp -boost/mpl/aux_/preprocessed/no_ttp/divides.hpp -boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp -boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp -boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp -boost/mpl/aux_/preprocessed/no_ttp/greater.hpp -boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp -boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp -boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp -boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp -boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp -boost/mpl/aux_/preprocessed/no_ttp/less.hpp -boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp -boost/mpl/aux_/preprocessed/no_ttp/list.hpp -boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp -boost/mpl/aux_/preprocessed/no_ttp/map.hpp -boost/mpl/aux_/preprocessed/no_ttp/minus.hpp -boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp -boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp -boost/mpl/aux_/preprocessed/no_ttp/or.hpp -boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp -boost/mpl/aux_/preprocessed/no_ttp/plus.hpp -boost/mpl/aux_/preprocessed/no_ttp/quote.hpp -boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp -boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp -boost/mpl/aux_/preprocessed/no_ttp/set.hpp -boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp -boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp -boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp -boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp -boost/mpl/aux_/preprocessed/no_ttp/times.hpp -boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp -boost/mpl/aux_/preprocessed/no_ttp/vector.hpp -boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp -boost/mpl/aux_/preprocessed/plain/advance_backward.hpp -boost/mpl/aux_/preprocessed/plain/advance_forward.hpp -boost/mpl/aux_/preprocessed/plain/and.hpp -boost/mpl/aux_/preprocessed/plain/apply.hpp -boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp -boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp -boost/mpl/aux_/preprocessed/plain/arg.hpp -boost/mpl/aux_/preprocessed/plain/basic_bind.hpp -boost/mpl/aux_/preprocessed/plain/bind.hpp -boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp -boost/mpl/aux_/preprocessed/plain/bitand.hpp -boost/mpl/aux_/preprocessed/plain/bitor.hpp -boost/mpl/aux_/preprocessed/plain/bitxor.hpp -boost/mpl/aux_/preprocessed/plain/deque.hpp -boost/mpl/aux_/preprocessed/plain/divides.hpp -boost/mpl/aux_/preprocessed/plain/equal_to.hpp -boost/mpl/aux_/preprocessed/plain/fold_impl.hpp -boost/mpl/aux_/preprocessed/plain/full_lambda.hpp -boost/mpl/aux_/preprocessed/plain/greater.hpp -boost/mpl/aux_/preprocessed/plain/greater_equal.hpp -boost/mpl/aux_/preprocessed/plain/inherit.hpp -boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp -boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp -boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp -boost/mpl/aux_/preprocessed/plain/less.hpp -boost/mpl/aux_/preprocessed/plain/less_equal.hpp -boost/mpl/aux_/preprocessed/plain/list.hpp -boost/mpl/aux_/preprocessed/plain/list_c.hpp -boost/mpl/aux_/preprocessed/plain/map.hpp -boost/mpl/aux_/preprocessed/plain/minus.hpp -boost/mpl/aux_/preprocessed/plain/modulus.hpp -boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp -boost/mpl/aux_/preprocessed/plain/or.hpp -boost/mpl/aux_/preprocessed/plain/placeholders.hpp -boost/mpl/aux_/preprocessed/plain/plus.hpp -boost/mpl/aux_/preprocessed/plain/quote.hpp -boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp -boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp -boost/mpl/aux_/preprocessed/plain/set.hpp -boost/mpl/aux_/preprocessed/plain/set_c.hpp -boost/mpl/aux_/preprocessed/plain/shift_left.hpp -boost/mpl/aux_/preprocessed/plain/shift_right.hpp -boost/mpl/aux_/preprocessed/plain/template_arity.hpp -boost/mpl/aux_/preprocessed/plain/times.hpp -boost/mpl/aux_/preprocessed/plain/unpack_args.hpp -boost/mpl/aux_/preprocessed/plain/vector.hpp -boost/mpl/aux_/preprocessed/plain/vector_c.hpp -boost/mpl/aux_/preprocessor/add.hpp -boost/mpl/aux_/preprocessor/def_params_tail.hpp -boost/mpl/aux_/preprocessor/default_params.hpp -boost/mpl/aux_/preprocessor/enum.hpp -boost/mpl/aux_/preprocessor/ext_params.hpp -boost/mpl/aux_/preprocessor/filter_params.hpp -boost/mpl/aux_/preprocessor/params.hpp -boost/mpl/aux_/preprocessor/partial_spec_params.hpp -boost/mpl/aux_/preprocessor/range.hpp -boost/mpl/aux_/preprocessor/repeat.hpp -boost/mpl/aux_/preprocessor/sub.hpp -boost/mpl/aux_/preprocessor/tuple.hpp -boost/mpl/aux_/ptr_to_ref.hpp -boost/mpl/aux_/push_back_impl.hpp -boost/mpl/aux_/push_front_impl.hpp -boost/mpl/aux_/reverse_fold_impl.hpp -boost/mpl/aux_/reverse_fold_impl_body.hpp -boost/mpl/aux_/reverse_iter_fold_impl.hpp -boost/mpl/aux_/sequence_wrapper.hpp -boost/mpl/aux_/size_impl.hpp -boost/mpl/aux_/static_cast.hpp -boost/mpl/aux_/template_arity.hpp -boost/mpl/aux_/template_arity_fwd.hpp -boost/mpl/aux_/traits_lambda_spec.hpp -boost/mpl/aux_/type_wrapper.hpp -boost/mpl/aux_/value_wknd.hpp -boost/mpl/aux_/yes_no.hpp -boost/mpl/back_fwd.hpp -boost/mpl/back_inserter.hpp -boost/mpl/base.hpp -boost/mpl/begin_end.hpp -boost/mpl/begin_end_fwd.hpp -boost/mpl/bind.hpp -boost/mpl/bind_fwd.hpp -boost/mpl/bool.hpp -boost/mpl/bool_fwd.hpp -boost/mpl/clear.hpp -boost/mpl/clear_fwd.hpp -boost/mpl/contains.hpp -boost/mpl/contains_fwd.hpp -boost/mpl/deref.hpp -boost/mpl/distance.hpp -boost/mpl/distance_fwd.hpp -boost/mpl/empty.hpp -boost/mpl/empty_fwd.hpp -boost/mpl/erase_fwd.hpp -boost/mpl/erase_key_fwd.hpp -boost/mpl/eval_if.hpp -boost/mpl/find.hpp -boost/mpl/find_if.hpp -boost/mpl/fold.hpp -boost/mpl/front_fwd.hpp -boost/mpl/front_inserter.hpp -boost/mpl/has_key.hpp -boost/mpl/has_key_fwd.hpp -boost/mpl/has_xxx.hpp -boost/mpl/identity.hpp -boost/mpl/if.hpp -boost/mpl/insert_fwd.hpp -boost/mpl/inserter.hpp -boost/mpl/int.hpp -boost/mpl/int_fwd.hpp -boost/mpl/integral_c.hpp -boost/mpl/integral_c_fwd.hpp -boost/mpl/integral_c_tag.hpp -boost/mpl/is_placeholder.hpp -boost/mpl/is_sequence.hpp -boost/mpl/iter_fold.hpp -boost/mpl/iter_fold_if.hpp -boost/mpl/iterator_category.hpp -boost/mpl/iterator_range.hpp -boost/mpl/iterator_tags.hpp -boost/mpl/key_type_fwd.hpp -boost/mpl/lambda.hpp -boost/mpl/lambda_fwd.hpp -boost/mpl/less.hpp -boost/mpl/limits/arity.hpp -boost/mpl/limits/unrolling.hpp -boost/mpl/limits/vector.hpp -boost/mpl/logical.hpp -boost/mpl/long.hpp -boost/mpl/long_fwd.hpp -boost/mpl/min_max.hpp -boost/mpl/minus.hpp -boost/mpl/negate.hpp -boost/mpl/next.hpp -boost/mpl/next_prior.hpp -boost/mpl/not.hpp -boost/mpl/numeric_cast.hpp -boost/mpl/O1_size.hpp -boost/mpl/O1_size_fwd.hpp -boost/mpl/or.hpp -boost/mpl/pair.hpp -boost/mpl/pair_view.hpp -boost/mpl/placeholders.hpp -boost/mpl/plus.hpp -boost/mpl/pop_back_fwd.hpp -boost/mpl/pop_front_fwd.hpp -boost/mpl/prior.hpp -boost/mpl/protect.hpp -boost/mpl/push_back.hpp -boost/mpl/push_back_fwd.hpp -boost/mpl/push_front.hpp -boost/mpl/push_front_fwd.hpp -boost/mpl/quote.hpp -boost/mpl/reverse_fold.hpp -boost/mpl/reverse_iter_fold.hpp -boost/mpl/same_as.hpp -boost/mpl/sequence_tag.hpp -boost/mpl/sequence_tag_fwd.hpp -boost/mpl/set/aux_/at_impl.hpp -boost/mpl/set/aux_/begin_end_impl.hpp -boost/mpl/set/aux_/clear_impl.hpp -boost/mpl/set/aux_/empty_impl.hpp -boost/mpl/set/aux_/erase_impl.hpp -boost/mpl/set/aux_/erase_key_impl.hpp -boost/mpl/set/aux_/has_key_impl.hpp -boost/mpl/set/aux_/insert_impl.hpp -boost/mpl/set/aux_/item.hpp -boost/mpl/set/aux_/iterator.hpp -boost/mpl/set/aux_/key_type_impl.hpp -boost/mpl/set/aux_/set0.hpp -boost/mpl/set/aux_/size_impl.hpp -boost/mpl/set/aux_/tag.hpp -boost/mpl/set/aux_/value_type_impl.hpp -boost/mpl/set/set0.hpp -boost/mpl/size.hpp -boost/mpl/size_fwd.hpp -boost/mpl/size_t.hpp -boost/mpl/size_t_fwd.hpp -boost/mpl/tag.hpp -boost/mpl/transform.hpp -boost/mpl/value_type_fwd.hpp -boost/mpl/vector.hpp -boost/mpl/vector/aux_/at.hpp -boost/mpl/vector/aux_/back.hpp -boost/mpl/vector/aux_/begin_end.hpp -boost/mpl/vector/aux_/clear.hpp -boost/mpl/vector/aux_/empty.hpp -boost/mpl/vector/aux_/front.hpp -boost/mpl/vector/aux_/include_preprocessed.hpp -boost/mpl/vector/aux_/item.hpp -boost/mpl/vector/aux_/iterator.hpp -boost/mpl/vector/aux_/numbered.hpp -boost/mpl/vector/aux_/numbered_c.hpp -boost/mpl/vector/aux_/O1_size.hpp -boost/mpl/vector/aux_/pop_back.hpp -boost/mpl/vector/aux_/pop_front.hpp -boost/mpl/vector/aux_/preprocessed/no_ctps/vector10.hpp -boost/mpl/vector/aux_/preprocessed/no_ctps/vector10_c.hpp -boost/mpl/vector/aux_/preprocessed/no_ctps/vector20.hpp -boost/mpl/vector/aux_/preprocessed/no_ctps/vector20_c.hpp -boost/mpl/vector/aux_/preprocessed/no_ctps/vector30.hpp -boost/mpl/vector/aux_/preprocessed/no_ctps/vector30_c.hpp -boost/mpl/vector/aux_/preprocessed/no_ctps/vector40.hpp -boost/mpl/vector/aux_/preprocessed/no_ctps/vector40_c.hpp -boost/mpl/vector/aux_/preprocessed/no_ctps/vector50.hpp -boost/mpl/vector/aux_/preprocessed/no_ctps/vector50_c.hpp -boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp -boost/mpl/vector/aux_/preprocessed/plain/vector10_c.hpp -boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp -boost/mpl/vector/aux_/preprocessed/plain/vector20_c.hpp -boost/mpl/vector/aux_/preprocessed/plain/vector30.hpp -boost/mpl/vector/aux_/preprocessed/plain/vector30_c.hpp -boost/mpl/vector/aux_/preprocessed/plain/vector40.hpp -boost/mpl/vector/aux_/preprocessed/plain/vector40_c.hpp -boost/mpl/vector/aux_/preprocessed/plain/vector50.hpp -boost/mpl/vector/aux_/preprocessed/plain/vector50_c.hpp -boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp -boost/mpl/vector/aux_/preprocessed/typeof_based/vector10_c.hpp -boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp -boost/mpl/vector/aux_/preprocessed/typeof_based/vector20_c.hpp -boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp -boost/mpl/vector/aux_/preprocessed/typeof_based/vector30_c.hpp -boost/mpl/vector/aux_/preprocessed/typeof_based/vector40.hpp -boost/mpl/vector/aux_/preprocessed/typeof_based/vector40_c.hpp -boost/mpl/vector/aux_/preprocessed/typeof_based/vector50.hpp -boost/mpl/vector/aux_/preprocessed/typeof_based/vector50_c.hpp -boost/mpl/vector/aux_/push_back.hpp -boost/mpl/vector/aux_/push_front.hpp -boost/mpl/vector/aux_/size.hpp -boost/mpl/vector/aux_/tag.hpp -boost/mpl/vector/aux_/vector0.hpp -boost/mpl/vector/vector0.hpp -boost/mpl/vector/vector0_c.hpp -boost/mpl/vector/vector10.hpp -boost/mpl/vector/vector10_c.hpp -boost/mpl/vector/vector20.hpp -boost/mpl/vector/vector20_c.hpp -boost/mpl/vector/vector30.hpp -boost/mpl/vector/vector30_c.hpp -boost/mpl/vector/vector40.hpp -boost/mpl/vector/vector40_c.hpp -boost/mpl/vector/vector50.hpp -boost/mpl/vector/vector50_c.hpp -boost/mpl/void.hpp -boost/mpl/void_fwd.hpp -boost/multi_index/detail/access_specifier.hpp -boost/multi_index/detail/adl_swap.hpp -boost/multi_index/detail/archive_constructed.hpp -boost/multi_index/detail/auto_space.hpp -boost/multi_index/detail/base_type.hpp -boost/multi_index/detail/bidir_node_iterator.hpp -boost/multi_index/detail/converter.hpp -boost/multi_index/detail/copy_map.hpp -boost/multi_index/detail/duplicates_iterator.hpp -boost/multi_index/detail/has_tag.hpp -boost/multi_index/detail/header_holder.hpp -boost/multi_index/detail/index_base.hpp -boost/multi_index/detail/index_loader.hpp -boost/multi_index/detail/index_matcher.hpp -boost/multi_index/detail/index_node_base.hpp -boost/multi_index/detail/index_saver.hpp -boost/multi_index/detail/invariant_assert.hpp -boost/multi_index/detail/is_index_list.hpp -boost/multi_index/detail/iter_adaptor.hpp -boost/multi_index/detail/modify_key_adaptor.hpp -boost/multi_index/detail/msvc_index_specifier.hpp -boost/multi_index/detail/no_duplicate_tags.hpp -boost/multi_index/detail/node_type.hpp -boost/multi_index/detail/ord_index_args.hpp -boost/multi_index/detail/ord_index_node.hpp -boost/multi_index/detail/ord_index_ops.hpp -boost/multi_index/detail/prevent_eti.hpp -boost/multi_index/detail/safe_ctr_proxy.hpp -boost/multi_index/detail/safe_mode.hpp -boost/multi_index/detail/scope_guard.hpp -boost/multi_index/detail/uintptr_type.hpp -boost/multi_index/detail/unbounded.hpp -boost/multi_index/detail/value_compare.hpp -boost/multi_index/identity.hpp -boost/multi_index/identity_fwd.hpp -boost/multi_index/indexed_by.hpp -boost/multi_index/member.hpp -boost/multi_index/ordered_index.hpp -boost/multi_index/ordered_index_fwd.hpp -boost/multi_index/safe_mode_errors.hpp -boost/multi_index/tag.hpp -boost/multi_index_container.hpp -boost/multi_index_container_fwd.hpp -boost/next_prior.hpp -boost/noncopyable.hpp -boost/operators.hpp -boost/preprocessor/arithmetic/add.hpp -boost/preprocessor/arithmetic/dec.hpp -boost/preprocessor/arithmetic/detail/div_base.hpp -boost/preprocessor/arithmetic/inc.hpp -boost/preprocessor/arithmetic/mod.hpp -boost/preprocessor/arithmetic/sub.hpp -boost/preprocessor/array/data.hpp -boost/preprocessor/array/elem.hpp -boost/preprocessor/array/size.hpp -boost/preprocessor/cat.hpp -boost/preprocessor/comma_if.hpp -boost/preprocessor/comparison/less_equal.hpp -boost/preprocessor/config/config.hpp -boost/preprocessor/control/deduce_d.hpp -boost/preprocessor/control/detail/dmc/while.hpp -boost/preprocessor/control/detail/edg/while.hpp -boost/preprocessor/control/detail/msvc/while.hpp -boost/preprocessor/control/detail/while.hpp -boost/preprocessor/control/expr_if.hpp -boost/preprocessor/control/expr_iif.hpp -boost/preprocessor/control/if.hpp -boost/preprocessor/control/iif.hpp -boost/preprocessor/control/while.hpp -boost/preprocessor/debug/error.hpp -boost/preprocessor/dec.hpp -boost/preprocessor/detail/auto_rec.hpp -boost/preprocessor/detail/check.hpp -boost/preprocessor/detail/dmc/auto_rec.hpp -boost/preprocessor/detail/is_binary.hpp -boost/preprocessor/empty.hpp -boost/preprocessor/enum.hpp -boost/preprocessor/enum_params.hpp -boost/preprocessor/enum_params_with_a_default.hpp -boost/preprocessor/enum_shifted_params.hpp -boost/preprocessor/expr_if.hpp -boost/preprocessor/facilities/empty.hpp -boost/preprocessor/facilities/identity.hpp -boost/preprocessor/facilities/intercept.hpp -boost/preprocessor/identity.hpp -boost/preprocessor/inc.hpp -boost/preprocessor/iterate.hpp -boost/preprocessor/iteration/detail/bounds/lower1.hpp -boost/preprocessor/iteration/detail/bounds/lower2.hpp -boost/preprocessor/iteration/detail/bounds/lower3.hpp -boost/preprocessor/iteration/detail/bounds/lower4.hpp -boost/preprocessor/iteration/detail/bounds/lower5.hpp -boost/preprocessor/iteration/detail/bounds/upper1.hpp -boost/preprocessor/iteration/detail/bounds/upper2.hpp -boost/preprocessor/iteration/detail/bounds/upper3.hpp -boost/preprocessor/iteration/detail/bounds/upper4.hpp -boost/preprocessor/iteration/detail/bounds/upper5.hpp -boost/preprocessor/iteration/detail/finish.hpp -boost/preprocessor/iteration/detail/iter/forward1.hpp -boost/preprocessor/iteration/detail/iter/forward2.hpp -boost/preprocessor/iteration/detail/iter/forward3.hpp -boost/preprocessor/iteration/detail/iter/forward4.hpp -boost/preprocessor/iteration/detail/iter/forward5.hpp -boost/preprocessor/iteration/detail/iter/reverse1.hpp -boost/preprocessor/iteration/detail/iter/reverse2.hpp -boost/preprocessor/iteration/detail/iter/reverse3.hpp -boost/preprocessor/iteration/detail/iter/reverse4.hpp -boost/preprocessor/iteration/detail/iter/reverse5.hpp -boost/preprocessor/iteration/detail/local.hpp -boost/preprocessor/iteration/detail/rlocal.hpp -boost/preprocessor/iteration/detail/self.hpp -boost/preprocessor/iteration/detail/start.hpp -boost/preprocessor/iteration/iterate.hpp -boost/preprocessor/iteration/local.hpp -boost/preprocessor/iteration/self.hpp -boost/preprocessor/list/adt.hpp -boost/preprocessor/list/append.hpp -boost/preprocessor/list/detail/dmc/fold_left.hpp -boost/preprocessor/list/detail/edg/fold_left.hpp -boost/preprocessor/list/detail/edg/fold_right.hpp -boost/preprocessor/list/detail/fold_left.hpp -boost/preprocessor/list/detail/fold_right.hpp -boost/preprocessor/list/fold_left.hpp -boost/preprocessor/list/fold_right.hpp -boost/preprocessor/list/for_each_i.hpp -boost/preprocessor/list/reverse.hpp -boost/preprocessor/list/transform.hpp -boost/preprocessor/logical/and.hpp -boost/preprocessor/logical/bitand.hpp -boost/preprocessor/logical/bool.hpp -boost/preprocessor/logical/compl.hpp -boost/preprocessor/logical/not.hpp -boost/preprocessor/punctuation/comma.hpp -boost/preprocessor/punctuation/comma_if.hpp -boost/preprocessor/repeat.hpp -boost/preprocessor/repetition/detail/dmc/for.hpp -boost/preprocessor/repetition/detail/edg/for.hpp -boost/preprocessor/repetition/detail/for.hpp -boost/preprocessor/repetition/detail/msvc/for.hpp -boost/preprocessor/repetition/enum.hpp -boost/preprocessor/repetition/enum_binary_params.hpp -boost/preprocessor/repetition/enum_params.hpp -boost/preprocessor/repetition/enum_params_with_a_default.hpp -boost/preprocessor/repetition/enum_shifted_params.hpp -boost/preprocessor/repetition/for.hpp -boost/preprocessor/repetition/repeat.hpp -boost/preprocessor/repetition/repeat_from_to.hpp -boost/preprocessor/seq/cat.hpp -boost/preprocessor/seq/detail/split.hpp -boost/preprocessor/seq/elem.hpp -boost/preprocessor/seq/first_n.hpp -boost/preprocessor/seq/fold_left.hpp -boost/preprocessor/seq/rest_n.hpp -boost/preprocessor/seq/seq.hpp -boost/preprocessor/seq/size.hpp -boost/preprocessor/seq/subseq.hpp -boost/preprocessor/seq/transform.hpp -boost/preprocessor/slot/detail/counter.hpp -boost/preprocessor/slot/detail/def.hpp -boost/preprocessor/slot/detail/shared.hpp -boost/preprocessor/slot/detail/slot1.hpp -boost/preprocessor/slot/detail/slot2.hpp -boost/preprocessor/slot/detail/slot3.hpp -boost/preprocessor/slot/detail/slot4.hpp -boost/preprocessor/slot/detail/slot5.hpp -boost/preprocessor/slot/slot.hpp -boost/preprocessor/stringize.hpp -boost/preprocessor/tuple/eat.hpp -boost/preprocessor/tuple/elem.hpp -boost/preprocessor/tuple/rem.hpp -boost/preprocessor/tuple/to_list.hpp -boost/ref.hpp -boost/smart_ptr/detail/lightweight_mutex.hpp -boost/smart_ptr/detail/lwm_nop.hpp -boost/smart_ptr/detail/lwm_pthreads.hpp -boost/smart_ptr/detail/lwm_win32_cs.hpp -boost/static_assert.hpp -boost/tuple/detail/tuple_basic.hpp -boost/tuple/detail/tuple_basic_no_partial_spec.hpp -boost/tuple/tuple.hpp -boost/type_traits/add_const.hpp -boost/type_traits/add_cv.hpp -boost/type_traits/add_pointer.hpp -boost/type_traits/add_reference.hpp -boost/type_traits/add_volatile.hpp -boost/type_traits/aligned_storage.hpp -boost/type_traits/alignment_of.hpp -boost/type_traits/arithmetic_traits.hpp -boost/type_traits/broken_compiler_spec.hpp -boost/type_traits/composite_traits.hpp -boost/type_traits/config.hpp -boost/type_traits/cv_traits.hpp -boost/type_traits/detail/bool_trait_def.hpp -boost/type_traits/detail/bool_trait_undef.hpp -boost/type_traits/detail/cv_traits_impl.hpp -boost/type_traits/detail/false_result.hpp -boost/type_traits/detail/ice_and.hpp -boost/type_traits/detail/ice_eq.hpp -boost/type_traits/detail/ice_not.hpp -boost/type_traits/detail/ice_or.hpp -boost/type_traits/detail/is_function_ptr_helper.hpp -boost/type_traits/detail/is_function_ptr_tester.hpp -boost/type_traits/detail/is_mem_fun_pointer_impl.hpp -boost/type_traits/detail/is_mem_fun_pointer_tester.hpp -boost/type_traits/detail/size_t_trait_def.hpp -boost/type_traits/detail/size_t_trait_undef.hpp -boost/type_traits/detail/template_arity_spec.hpp -boost/type_traits/detail/type_trait_def.hpp -boost/type_traits/detail/type_trait_undef.hpp -boost/type_traits/detail/wrap.hpp -boost/type_traits/detail/yes_no_type.hpp -boost/type_traits/function_traits.hpp -boost/type_traits/ice.hpp -boost/type_traits/integral_constant.hpp -boost/type_traits/intrinsics.hpp -boost/type_traits/is_abstract.hpp -boost/type_traits/is_arithmetic.hpp -boost/type_traits/is_array.hpp -boost/type_traits/is_base_and_derived.hpp -boost/type_traits/is_class.hpp -boost/type_traits/is_const.hpp -boost/type_traits/is_convertible.hpp -boost/type_traits/is_enum.hpp -boost/type_traits/is_float.hpp -boost/type_traits/is_function.hpp -boost/type_traits/is_fundamental.hpp -boost/type_traits/is_integral.hpp -boost/type_traits/is_member_function_pointer.hpp -boost/type_traits/is_member_pointer.hpp -boost/type_traits/is_pod.hpp -boost/type_traits/is_pointer.hpp -boost/type_traits/is_polymorphic.hpp -boost/type_traits/is_reference.hpp -boost/type_traits/is_same.hpp -boost/type_traits/is_scalar.hpp -boost/type_traits/is_union.hpp -boost/type_traits/is_void.hpp -boost/type_traits/is_volatile.hpp -boost/type_traits/msvc/remove_bounds.hpp -boost/type_traits/msvc/remove_const.hpp -boost/type_traits/msvc/remove_cv.hpp -boost/type_traits/msvc/remove_pointer.hpp -boost/type_traits/msvc/remove_reference.hpp -boost/type_traits/msvc/remove_volatile.hpp -boost/type_traits/msvc/typeof.hpp -boost/type_traits/remove_bounds.hpp -boost/type_traits/remove_const.hpp -boost/type_traits/remove_cv.hpp -boost/type_traits/remove_pointer.hpp -boost/type_traits/remove_reference.hpp -boost/type_traits/remove_volatile.hpp -boost/type_traits/type_with_alignment.hpp -boost/utility.hpp -boost/utility/addressof.hpp -boost/utility/base_from_member.hpp -boost/utility/binary.hpp -boost/utility/enable_if.hpp -boost/version.hpp \ No newline at end of file diff --git a/depends/processor.sh b/depends/processor.sh deleted file mode 100755 index e76a753ae..000000000 --- a/depends/processor.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -exec 3< cpfile -while read <&3 -do echo $REPLY | cpio -pvdm cleansed -done -exec 3>&- diff --git a/dfhack/APIPrivate.cpp b/dfhack/APIPrivate.cpp new file mode 100644 index 000000000..37b2ce8da --- /dev/null +++ b/dfhack/APIPrivate.cpp @@ -0,0 +1,50 @@ +#include "DFCommonInternal.h" +#include +#include +#include +#include +#include "private/APIPrivate.h" +#include "DFMemInfo.h" +#include "DFProcess.h" + +#include "modules/Creatures.h" +#include "modules/Maps.h" +#include "modules/Materials.h" +#include "modules/Position.h" +#include "modules/Gui.h" + +using namespace DFHack; + +APIPrivate::APIPrivate() +{ + // init modules + creatures = 0; + maps = 0; + position = 0; + gui = 0; + materials = 0; +} + +APIPrivate::~APIPrivate() +{ + if(creatures) delete creatures; + if(maps) delete maps; + if(position) delete position; + if(gui) delete gui; + if(materials) delete materials; +} + +bool APIPrivate::InitReadNames() +{ + name_firstname_offset = offset_descriptor->getOffset("name_firstname"); + name_nickname_offset = offset_descriptor->getOffset("name_nickname"); + name_words_offset = offset_descriptor->getOffset("name_words"); + return true; +} + +void APIPrivate::readName(t_name & name, uint32_t address) +{ + g_pProcess->readSTLString(address + name_firstname_offset , name.first_name, 128); + g_pProcess->readSTLString(address + name_nickname_offset , name.nickname, 128); + g_pProcess->read(address + name_words_offset ,48, (uint8_t *) name.words); +} \ No newline at end of file diff --git a/library/CMakeLists.txt b/dfhack/CMakeLists.txt similarity index 76% rename from library/CMakeLists.txt rename to dfhack/CMakeLists.txt index 27d82c973..ca851a01e 100644 --- a/library/CMakeLists.txt +++ b/dfhack/CMakeLists.txt @@ -1,49 +1,49 @@ # don't use this file directly. use the one in the root folder of the project SET(PROJECT_HDRS -DFCommonInternal.h -DFError.h -DFHackAPI.h -DFMemInfo.h -DFMemInfoManager.h -DFProcessEnumerator.h -DFProcess.h -DFTileTypes.h -DFTypes.h -DFVector.h -DFWindow.h -integers.h - -md5/md5.h -md5/md5wrapper.h - -tinyxml/tinystr.h -tinyxml/tinyxml.h - -argstream/argstream.h - -../shmserver/shms.h +include/DFCommonInternal.h +include/DFError.h +include/DFHackAPI.h +include/DFMemInfo.h +include/DFMemInfoManager.h +include/DFProcessEnumerator.h +include/DFProcess.h +include/DFTileTypes.h +include/DFTypes.h +include/DFVector.h +include/DFWindow.h +include/integers.h +shm/shms.h ) SET(PROJECT_SRCS DFMemInfo.cpp DFMemInfoManager.cpp DFHackAPI.cpp +APIPrivate.cpp DFTileTypes.cpp DFVector.cpp -md5/md5.cpp -md5/md5wrapper.cpp -tinyxml/tinystr.cpp -tinyxml/tinyxml.cpp -tinyxml/tinyxmlerror.cpp -tinyxml/tinyxmlparser.cpp + +depends/md5/md5.cpp +depends/md5/md5wrapper.cpp + +depends/tinyxml/tinystr.cpp +depends/tinyxml/tinyxml.cpp +depends/tinyxml/tinyxmlerror.cpp +depends/tinyxml/tinyxmlparser.cpp + +modules/Creatures.cpp +modules/Gui.cpp +modules/Maps.cpp +modules/Materials.cpp +modules/Position.cpp ) SET(PROJECT_HDRS_LINUX ) SET(PROJECT_HDRS_WINDOWS -stdint_win.h +include/stdint_win.h ) SET(PROJECT_SRCS_LINUX @@ -79,7 +79,7 @@ SET( MEMXML_DATA_PATH . CACHE PATH "search path for Memory.xml") #OPTION( WITH_BAR "Enable BAR component" OFF ) -CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/library/config.h.cmake ${CMAKE_SOURCE_DIR}/library/config.h ) +CONFIGURE_FILE( ${CMAKE_SOURCE_DIR}/dfhack/config.h.cmake ${CMAKE_SOURCE_DIR}/dfhack/include/config.h ) @@ -90,7 +90,7 @@ IF(UNIX) SET(CMAKE_CXX_FLAGS_DEBUG "-g -Wall -pedantic") SET(CMAKE_CXX_FLAGS "-fvisibility=hidden") - SET(PROJECT_LIBS ${X11_LIBRARY} rt) + SET(PROJECT_LIBS ${X11_LIBRARY} rt ) #dfhack-md5 dfhack-tixml ELSE(UNIX) SET(PROJECT_LIBS psapi) ENDIF(UNIX) diff --git a/dfhack/DFHackAPI.cpp b/dfhack/DFHackAPI.cpp new file mode 100644 index 000000000..44879c0f4 --- /dev/null +++ b/dfhack/DFHackAPI.cpp @@ -0,0 +1,812 @@ +/* +www.sourceforge.net/projects/dfhack +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + +#include "DFCommonInternal.h" + +#include "DFProcess.h" +#include "DFProcessEnumerator.h" +#include "DFHackAPI.h" +#include "DFError.h" + +#include +#include +#include +#include +#include "private/APIPrivate.h" + +#include "modules/Maps.h" +#include "modules/Materials.h" +#include "modules/Position.h" +#include "modules/Gui.h" +#include "modules/Creatures.h" + +using namespace DFHack; + +API::API (const string path_to_xml) + : d (new APIPrivate()) +{ + d->xml = QUOT (MEMXML_DATA_PATH); + d->xml += "/"; + d->xml += path_to_xml; + d->pm = NULL; + d->shm_start = 0; +} + +API::~API() +{ + // FIXME: call all finishread* methods here + Detach(); + delete d; +} + +bool API::Attach() +{ + // detach all processes, destroy manager + if (d->pm == 0) + { + d->pm = new ProcessEnumerator (d->xml); // FIXME: handle bad XML better + } + else + { + d->pm->purge(); + } + + // find a process (ProcessManager can find multiple when used properly) + if (!d->pm->findProcessess()) + { + throw Error::NoProcess(); + //cerr << "couldn't find a suitable process" << endl; + //return false; + } + d->p = (*d->pm) [0]; + if (!d->p->attach()) + { + throw Error::CantAttach(); + //cerr << "couldn't attach to process" << endl; + //return false; // couldn't attach to process, no go + } + d->shm_start = d->p->getSHMStart(); + d->offset_descriptor = d->p->getDescriptor(); + // process is attached, everything went just fine... hopefully + return true; +} + + +bool API::Detach() +{ + if(!d->p) + return false; + if (!d->p->detach()) + { + return false; + } + if (d->pm != NULL) + { + delete d->pm; + } + d->pm = NULL; + d->p = NULL; + d->shm_start = 0; + d->offset_descriptor = NULL; + return true; +} + +bool API::isAttached() +{ + return d->p != NULL; +} + +bool API::Suspend() +{ + return d->p->suspend(); +} +bool API::AsyncSuspend() +{ + return d->p->asyncSuspend(); +} + +bool API::Resume() +{ + return d->p->resume(); +} +bool API::ForceResume() +{ + return d->p->forceresume(); +} +bool API::isSuspended() +{ + return d->p->isSuspended(); +} + +void API::ReadRaw (const uint32_t offset, const uint32_t size, uint8_t *target) +{ + g_pProcess->read (offset, size, target); +} + +void API::WriteRaw (const uint32_t offset, const uint32_t size, uint8_t *source) +{ + g_pProcess->write (offset, size, source); +} + +memory_info *API::getMemoryInfo() +{ + return d->offset_descriptor; +} +Process * API::getProcess() +{ + return d->p; +} + +DFWindow * API::getWindow() +{ + return d->p->getWindow(); +} + +/******************************************************************************* + M O D U L E S +*******************************************************************************/ +Creatures * API::getCreatures() +{ + if(!d->creatures) + d->creatures = new Creatures(d); + return d->creatures; +} + +Maps * API::getMaps() +{ + if(!d->maps) + d->maps = new Maps(d); + return d->maps; +} + +Gui * API::getGui() +{ + if(!d->gui) + d->gui = new Gui(d); + return d->gui; +} + +Position * API::getPosition() +{ + if(!d->position) + d->position = new Position(d); + return d->position; +} + +Materials * API::getMaterials() +{ + if(!d->materials) + d->materials = new Materials(d); + return d->materials; +} + +/* +// returns number of buildings, expects v_buildingtypes that will later map t_building.type to its name +bool API::InitReadBuildings ( uint32_t& numbuildings ) +{ + int buildings = 0; + try + { + buildings = d->offset_descriptor->getAddress ("buildings"); + } + catch(Error::MissingMemoryDefinition) + { + return false; + } + d->buildingsInited = true; + d->p_bld = new DfVector (d->p,buildings, 4); + numbuildings = d->p_bld->getSize(); + return true; +} + + +// read one building +bool API::ReadBuilding (const int32_t index, t_building & building) +{ + if(!d->buildingsInited) return false; + + t_building_df40d bld_40d; + + // read pointer from vector at position + uint32_t temp = * (uint32_t *) d->p_bld->at (index); + //d->p_bld->read(index,(uint8_t *)&temp); + + //read building from memory + g_pProcess->read (temp, sizeof (t_building_df40d), (uint8_t *) &bld_40d); + + // transform + int32_t type = -1; + d->offset_descriptor->resolveObjectToClassID (temp, type); + building.origin = temp; + building.vtable = bld_40d.vtable; + building.x1 = bld_40d.x1; + building.x2 = bld_40d.x2; + building.y1 = bld_40d.y1; + building.y2 = bld_40d.y2; + building.z = bld_40d.z; + building.material = bld_40d.material; + building.type = type; + + return true; +} + + +void API::FinishReadBuildings() +{ + if(d->p_bld) + { + delete d->p_bld; + d->p_bld = NULL; + } + d->buildingsInited = false; +} + +bool API::InitReadEffects ( uint32_t & numeffects ) +{ + if(d->effectsInited) + FinishReadEffects(); + int effects = 0; + try + { + effects = d->offset_descriptor->getAddress ("effects_vector"); + } + catch(Error::MissingMemoryDefinition) + { + return false; + } + d->effectsInited = true; + d->p_effect = new DfVector (d->p, effects, 4); + numeffects = d->p_effect->getSize(); + return true; +} + +bool API::ReadEffect(const uint32_t index, t_effect_df40d & effect) +{ + if(!d->effectsInited) + return false; + if(index >= d->p_effect->getSize()) + return false; + + // read pointer from vector at position + uint32_t temp = * (uint32_t *) d->p_effect->at (index); + //read effect from memory + g_pProcess->read (temp, sizeof (t_effect_df40d), (uint8_t *) &effect); + return true; +} + +// use with care! +bool API::WriteEffect(const uint32_t index, const t_effect_df40d & effect) +{ + if(!d->effectsInited) + return false; + if(index >= d->p_effect->getSize()) + return false; + // read pointer from vector at position + uint32_t temp = * (uint32_t *) d->p_effect->at (index); + // write effect to memory + g_pProcess->write(temp,sizeof(t_effect_df40d), (uint8_t *) &effect); + return true; +} + +void API::FinishReadEffects() +{ + if(d->p_effect) + { + delete d->p_effect; + d->p_effect = NULL; + } + d->effectsInited = false; +} + + +//TODO: maybe do construction reading differently - this could go slow with many of them. +// returns number of constructions, prepares a vector, returns total number of constructions +bool API::InitReadConstructions(uint32_t & numconstructions) +{ + int constructions = 0; + try + { + constructions = d->offset_descriptor->getAddress ("constructions"); + } + catch(Error::MissingMemoryDefinition) + { + return false; + } + d->p_cons = new DfVector (d->p,constructions, 4); + d->constructionsInited = true; + numconstructions = d->p_cons->getSize(); + return true; +} + + +bool API::ReadConstruction (const int32_t index, t_construction & construction) +{ + if(!d->constructionsInited) return false; + t_construction_df40d c_40d; + + // read pointer from vector at position + uint32_t temp = * (uint32_t *) d->p_cons->at (index); + + //read construction from memory + g_pProcess->read (temp, sizeof (t_construction_df40d), (uint8_t *) &c_40d); + + // transform + construction.x = c_40d.x; + construction.y = c_40d.y; + construction.z = c_40d.z; + construction.material = c_40d.material; + + return true; +} + + +void API::FinishReadConstructions() +{ + if(d->p_cons) + { + delete d->p_cons; + d->p_cons = NULL; + } + d->constructionsInited = false; +} + + +bool API::InitReadVegetation(uint32_t & numplants) +{ + try + { + int vegetation = d->offset_descriptor->getAddress ("vegetation"); + d->tree_offset = d->offset_descriptor->getOffset ("tree_desc_offset"); + + d->vegetationInited = true; + d->p_veg = new DfVector (d->p, vegetation, 4); + numplants = d->p_veg->getSize(); + return true; + } + catch (Error::MissingMemoryDefinition&) + { + d->vegetationInited = false; + numplants = 0; + throw; + } +} + + +bool API::ReadVegetation (const int32_t index, t_tree_desc & shrubbery) +{ + if(!d->vegetationInited) + return false; + // read pointer from vector at position + uint32_t temp = * (uint32_t *) d->p_veg->at (index); + //read construction from memory + g_pProcess->read (temp + d->tree_offset, sizeof (t_tree_desc), (uint8_t *) &shrubbery); + // FIXME: this is completely wrong. type isn't just tree/shrub but also different kinds of trees. stuff that grows around ponds has its own type ID + if (shrubbery.material.type == 3) shrubbery.material.type = 2; + return true; +} + + +void API::FinishReadVegetation() +{ + if(d->p_veg) + { + delete d->p_veg; + d->p_veg = 0; + } + d->vegetationInited = false; +} +*/ +/* +bool API::InitReadNotes( uint32_t &numnotes ) +{ + try + { + memory_info * minfo = d->offset_descriptor; + int notes = minfo->getAddress ("notes"); + d->note_foreground_offset = minfo->getOffset ("note_foreground"); + d->note_background_offset = minfo->getOffset ("note_background"); + d->note_name_offset = minfo->getOffset ("note_name"); + d->note_xyz_offset = minfo->getOffset ("note_xyz"); + + d->p_notes = new DfVector (d->p, notes, 4); + d->notesInited = true; + numnotes = d->p_notes->getSize(); + return true; + } + catch (Error::MissingMemoryDefinition&) + { + d->notesInited = false; + numnotes = 0; + throw; + } +} +bool API::ReadNote (const int32_t index, t_note & note) +{ + if(!d->notesInited) return false; + // read pointer from vector at position + uint32_t temp = * (uint32_t *) d->p_notes->at (index); + note.symbol = g_pProcess->readByte(temp); + note.foreground = g_pProcess->readWord(temp + d->note_foreground_offset); + note.background = g_pProcess->readWord(temp + d->note_background_offset); + d->p->readSTLString (temp + d->note_name_offset, note.name, 128); + g_pProcess->read (temp + d->note_xyz_offset, 3*sizeof (uint16_t), (uint8_t *) ¬e.x); + return true; +} +bool API::InitReadSettlements( uint32_t & numsettlements ) +{ + if(!d->InitReadNames()) return false; + try + { + + memory_info * minfo = d->offset_descriptor; + int allSettlements = minfo->getAddress ("settlements"); + int currentSettlement = minfo->getAddress("settlement_current"); + d->settlement_name_offset = minfo->getOffset ("settlement_name"); + d->settlement_world_xy_offset = minfo->getOffset ("settlement_world_xy"); + d->settlement_local_xy_offset = minfo->getOffset ("settlement_local_xy"); + + d->p_settlements = new DfVector (d->p, allSettlements, 4); + d->p_current_settlement = new DfVector(d->p, currentSettlement,4); + d->settlementsInited = true; + numsettlements = d->p_settlements->getSize(); + return true; + } + catch (Error::MissingMemoryDefinition&) + { + d->settlementsInited = false; + numsettlements = 0; + throw; + } +} +bool API::ReadSettlement(const int32_t index, t_settlement & settlement) +{ + if(!d->settlementsInited) return false; + if(!d->p_settlements->getSize()) return false; + + // read pointer from vector at position + uint32_t temp = * (uint32_t *) d->p_settlements->at (index); + settlement.origin = temp; + d->readName(settlement.name, temp + d->settlement_name_offset); + g_pProcess->read(temp + d->settlement_world_xy_offset, 2 * sizeof(int16_t), (uint8_t *) &settlement.world_x); + g_pProcess->read(temp + d->settlement_local_xy_offset, 4 * sizeof(int16_t), (uint8_t *) &settlement.local_x1); + return true; +} + +bool API::ReadCurrentSettlement(t_settlement & settlement) +{ + if(!d->settlementsInited) return false; + if(!d->p_current_settlement->getSize()) return false; + + uint32_t temp = * (uint32_t *) d->p_current_settlement->at(0); + settlement.origin = temp; + d->readName(settlement.name, temp + d->settlement_name_offset); + g_pProcess->read(temp + d->settlement_world_xy_offset, 2 * sizeof(int16_t), (uint8_t *) &settlement.world_x); + g_pProcess->read(temp + d->settlement_local_xy_offset, 4 * sizeof(int16_t), (uint8_t *) &settlement.local_x1); + return true; +} + +void API::FinishReadSettlements() +{ + if(d->p_settlements) + { + delete d->p_settlements; + d->p_settlements = NULL; + } + if(d->p_current_settlement) + { + delete d->p_current_settlement; + d->p_current_settlement = NULL; + } + d->settlementsInited = false; +} + + +bool API::InitReadHotkeys( ) +{ + try + { + memory_info * minfo = d->offset_descriptor; + d->hotkey_start = minfo->getAddress("hotkey_start"); + d->hotkey_mode_offset = minfo->getOffset ("hotkey_mode"); + d->hotkey_xyz_offset = minfo->getOffset("hotkey_xyz"); + d->hotkey_size = minfo->getHexValue("hotkey_size"); + + d->hotkeyInited = true; + return true; + } + catch (Error::MissingMemoryDefinition&) + { + d->hotkeyInited = false; + throw; + } +} +bool API::ReadHotkeys(t_hotkey hotkeys[]) +{ + if (!d->hotkeyInited) return false; + uint32_t currHotkey = d->hotkey_start; + for(uint32_t i = 0 ; i < NUM_HOTKEYS ;i++) + { + d->p->readSTLString(currHotkey,hotkeys[i].name,10); + hotkeys[i].mode = g_pProcess->readWord(currHotkey+d->hotkey_mode_offset); + g_pProcess->read (currHotkey + d->hotkey_xyz_offset, 3*sizeof (int32_t), (uint8_t *) &hotkeys[i].x); + currHotkey+=d->hotkey_size; + } + return true; +} + + +bool API::getItemIndexesInBox(vector &indexes, + const uint16_t x1, const uint16_t y1, const uint16_t z1, + const uint16_t x2, const uint16_t y2, const uint16_t z2) +{ + if(!d->itemsInited) return false; + indexes.clear(); + uint32_t size = d->p_itm->getSize(); + struct temp2{ + uint16_t coords[3]; + uint32_t flags; + }; + temp2 temp2; + for(uint32_t i =0;ip_itm->at(i); + g_pProcess->read(temp+sizeof(uint32_t),5 * sizeof(uint16_t), (uint8_t *) &temp2); + if(temp2.flags & (1 << 0)){ + if (temp2.coords[0] >= x1 && temp2.coords[0] < x2) + { + if (temp2.coords[1] >= y1 && temp2.coords[1] < y2) + { + if (temp2.coords[2] >= z1 && temp2.coords[2] < z2) + { + indexes.push_back(i); + } + } + } + } + } + return true; +} +*/ +/* +bool API::InitReadNameTables(vector > & translations , vector > & foreign_languages) //(map< string, vector > & nameTable) +{ + try + { + int genericAddress = d->offset_descriptor->getAddress ("language_vector"); + int transAddress = d->offset_descriptor->getAddress ("translation_vector"); + int word_table_offset = d->offset_descriptor->getOffset ("word_table"); + int sizeof_string = d->offset_descriptor->getHexValue ("sizeof_string"); + + DfVector genericVec (d->p, genericAddress, 4); + DfVector transVec (d->p, transAddress, 4); + + translations.resize(10); + for (uint32_t i = 0;i < genericVec.getSize();i++) + { + uint32_t genericNamePtr = * (uint32_t *) genericVec.at (i); + for(int i=0; i<10;i++) + { + string word = d->p->readSTLString (genericNamePtr + i * sizeof_string); + translations[i].push_back (word); + } + } + + foreign_languages.resize(transVec.getSize()); + for (uint32_t i = 0; i < transVec.getSize();i++) + { + uint32_t transPtr = * (uint32_t *) transVec.at (i); + //string transName = d->p->readSTLString (transPtr); + DfVector trans_names_vec (d->p, transPtr + word_table_offset, 4); + for (uint32_t j = 0;j < trans_names_vec.getSize();j++) + { + uint32_t transNamePtr = * (uint32_t *) trans_names_vec.at (j); + string name = d->p->readSTLString (transNamePtr); + foreign_languages[i].push_back (name); + } + } + d->nameTablesInited = true; + return true; + } + catch (Error::MissingMemoryDefinition&) + { + d->nameTablesInited = false; + throw; + } +} + +string API::TranslateName(const DFHack::t_name &name,const std::vector< std::vector > & translations ,const std::vector< std::vector > & foreign_languages, bool inEnglish) +{ + string out; + assert (d->nameTablesInited); + map >::const_iterator it; + + if(!inEnglish) + { + if(name.words[0] >=0 || name.words[1] >=0) + { + if(name.words[0]>=0) out.append(foreign_languages[name.language][name.words[0]]); + if(name.words[1]>=0) out.append(foreign_languages[name.language][name.words[1]]); + out[0] = toupper(out[0]); + } + if(name.words[5] >=0) + { + string word; + for(int i=2;i<=5;i++) + if(name.words[i]>=0) word.append(foreign_languages[name.language][name.words[i]]); + word[0] = toupper(word[0]); + if(out.length() > 0) out.append(" "); + out.append(word); + } + if(name.words[6] >=0) + { + string word; + word.append(foreign_languages[name.language][name.words[6]]); + word[0] = toupper(word[0]); + if(out.length() > 0) out.append(" "); + out.append(word); + } + } + else + { + if(name.words[0] >=0 || name.words[1] >=0) + { + if(name.words[0]>=0) out.append(translations[name.parts_of_speech[0]+1][name.words[0]]); + if(name.words[1]>=0) out.append(translations[name.parts_of_speech[1]+1][name.words[1]]); + out[0] = toupper(out[0]); + } + if(name.words[5] >=0) + { + if(out.length() > 0) + out.append(" the"); + else + out.append("The"); + string word; + for(int i=2;i<=5;i++) + { + if(name.words[i]>=0) + { + word = translations[name.parts_of_speech[i]+1][name.words[i]]; + word[0] = toupper(word[0]); + out.append(" " + word); + } + } + } + if(name.words[6] >=0) + { + if(out.length() > 0) + out.append(" of"); + else + out.append("Of"); + string word; + word.append(translations[name.parts_of_speech[6]+1][name.words[6]]); + word[0] = toupper(word[0]); + out.append(" " + word); + } + } + return out; +} + +void API::FinishReadNameTables() +{ + d->nameTablesInited = false; +} + +void API::FinishReadNotes() +{ + if(d->p_notes) + { + delete d->p_notes; + d->p_notes = 0; + } + d->notesInited = false; +} +*/ + +/* +bool API::InitReadItems(uint32_t & numitems) +{ + try + { + int items = d->offset_descriptor->getAddress ("items"); + d->item_material_offset = d->offset_descriptor->getOffset ("item_materials"); + + d->p_itm = new DfVector (d->p, items, 4); + d->itemsInited = true; + numitems = d->p_itm->getSize(); + return true; + } + catch (Error::MissingMemoryDefinition&) + { + d->itemsInited = false; + numitems = 0; + throw; + } +} +bool API::ReadItem (const uint32_t index, t_item & item) +{ + if (!d->itemsInited) return false; + + t_item_df40d item_40d; + + // read pointer from vector at position + uint32_t temp = * (uint32_t *) d->p_itm->at (index); + + //read building from memory + g_pProcess->read (temp, sizeof (t_item_df40d), (uint8_t *) &item_40d); + + // transform + int32_t type = -1; + d->offset_descriptor->resolveObjectToClassID (temp, type); + item.origin = temp; + item.vtable = item_40d.vtable; + item.x = item_40d.x; + item.y = item_40d.y; + item.z = item_40d.z; + item.type = type; + item.ID = item_40d.ID; + item.flags.whole = item_40d.flags; + + //TODO certain item types (creature based, threads, seeds, bags do not have the first matType byte, instead they have the material index only located at 0x68 + g_pProcess->read (temp + d->item_material_offset, sizeof (t_matglossPair), (uint8_t *) &item.material); + //for(int i = 0; i < 0xCC; i++){ // used for item research + // uint8_t byte = MreadByte(temp+i); + // item.bytes.push_back(byte); + //} + return true; +} +void API::FinishReadItems() +{ + if(d->p_itm) + { + delete d->p_itm; + d->p_itm = NULL; + } + d->itemsInited = false; +} +*/ +/* +bool API::ReadItemTypes(vector< vector< t_itemType > > & itemTypes) +{ + memory_info * minfo = d->offset_descriptor; + int matgloss_address = minfo->getAddress("matgloss"); + int matgloss_skip = minfo->getHexValue("matgloss_skip"); + int item_type_name_offset = minfo->getOffset("item_type_name"); + for(int i = 8;i<20;i++) + { + DfVector p_temp (d->p, matgloss_address + i*matgloss_skip,4); + vector< t_itemType > typesForVec; + for(uint32_t j =0; jp->readSTLString(temp+4,currType.id,128); + d->p->readSTLString(temp+item_type_name_offset,currType.name,128); + //stringsForVec.push_back(string(name)); + typesForVec.push_back(currType); + } + itemTypes.push_back(typesForVec); + } + return true; +} +*/ \ No newline at end of file diff --git a/library/DFMemInfo.cpp b/dfhack/DFMemInfo.cpp similarity index 96% rename from library/DFMemInfo.cpp rename to dfhack/DFMemInfo.cpp index 1b3050c58..f15f88c70 100644 --- a/library/DFMemInfo.cpp +++ b/dfhack/DFMemInfo.cpp @@ -23,25 +23,10 @@ distribution. */ #include "DFCommonInternal.h" -/* -#if !defined(NDEBUG) -#define BOOST_MULTI_INDEX_ENABLE_INVARIANT_CHECKING -#define BOOST_MULTI_INDEX_ENABLE_SAFE_MODE -#endif -// really, we don't need it -#define BOOST_MULTI_INDEX_DISABLE_SERIALIZATION - -#include -#include -#include -#include -#include -#include -#include - -using boost::multi_index_container; -using namespace boost::multi_index; -*/ +#include "DFMemInfo.h" +#include "DFError.h" +#include "DFProcess.h" + using namespace DFHack; /* diff --git a/library/DFMemInfoManager.cpp b/dfhack/DFMemInfoManager.cpp similarity index 99% rename from library/DFMemInfoManager.cpp rename to dfhack/DFMemInfoManager.cpp index 68060e9ef..3059eca66 100644 --- a/library/DFMemInfoManager.cpp +++ b/dfhack/DFMemInfoManager.cpp @@ -23,6 +23,10 @@ distribution. */ #include "DFCommonInternal.h" +#include "DFMemInfo.h" +#include "DFMemInfoManager.h" +#include "DFError.h" + using namespace DFHack; MemInfoManager::~MemInfoManager() diff --git a/library/DFProcess-linux-SHM.cpp b/dfhack/DFProcess-linux-SHM.cpp similarity index 99% rename from library/DFProcess-linux-SHM.cpp rename to dfhack/DFProcess-linux-SHM.cpp index 872dcaf4f..113149a65 100644 --- a/library/DFProcess-linux-SHM.cpp +++ b/dfhack/DFProcess-linux-SHM.cpp @@ -22,13 +22,18 @@ must not be misrepresented as being the original software. distribution. */ #include "DFCommonInternal.h" +#include "DFProcess.h" +#include "DFWindow.h" +#include "DFMemInfo.h" +#include "DFError.h" + #include #include #include #include #include -#include "../shmserver/shms.h" -#include "../shmserver/mod-core.h" +#include +#include #include #include #include diff --git a/library/DFProcess-linux-wine.cpp b/dfhack/DFProcess-linux-wine.cpp similarity index 99% rename from library/DFProcess-linux-wine.cpp rename to dfhack/DFProcess-linux-wine.cpp index 89e9f3d2f..253fef3a1 100644 --- a/library/DFProcess-linux-wine.cpp +++ b/dfhack/DFProcess-linux-wine.cpp @@ -22,6 +22,10 @@ must not be misrepresented as being the original software. distribution. */ #include "DFCommonInternal.h" +#include "DFProcess.h" +#include "DFWindow.h" +#include "DFMemInfo.h" +#include "DFError.h" #include #include #include diff --git a/library/DFProcess-linux.cpp b/dfhack/DFProcess-linux.cpp similarity index 99% rename from library/DFProcess-linux.cpp rename to dfhack/DFProcess-linux.cpp index 616e3fd62..e2bf16af6 100644 --- a/library/DFProcess-linux.cpp +++ b/dfhack/DFProcess-linux.cpp @@ -22,6 +22,10 @@ must not be misrepresented as being the original software. distribution. */ #include "DFCommonInternal.h" +#include "DFProcess.h" +#include "DFWindow.h" +#include "DFMemInfo.h" +#include "DFError.h" #include #include using namespace DFHack; diff --git a/library/DFProcess-windows-SHM.cpp b/dfhack/DFProcess-windows-SHM.cpp similarity index 99% rename from library/DFProcess-windows-SHM.cpp rename to dfhack/DFProcess-windows-SHM.cpp index 983b1f83e..8e5bf0920 100644 --- a/library/DFProcess-windows-SHM.cpp +++ b/dfhack/DFProcess-windows-SHM.cpp @@ -22,8 +22,12 @@ must not be misrepresented as being the original software. distribution. */ #include "DFCommonInternal.h" -#include "../shmserver/shms.h" -#include "../shmserver/mod-core.h" +#include "DFProcess.h" +#include "DFWindow.h" +#include "DFMemInfo.h" +#include "DFError.h" +#include "shms.h" +#include "mod-core.h" using namespace DFHack; // a full memory barrier! better be safe than sorry. diff --git a/library/DFProcess-windows.cpp b/dfhack/DFProcess-windows.cpp similarity index 99% rename from library/DFProcess-windows.cpp rename to dfhack/DFProcess-windows.cpp index 6bb5acca9..ce3e0a6cf 100644 --- a/library/DFProcess-windows.cpp +++ b/dfhack/DFProcess-windows.cpp @@ -22,6 +22,10 @@ must not be misrepresented as being the original software. distribution. */ #include "DFCommonInternal.h" +#include "DFProcess.h" +#include "DFWindow.h" +#include "DFMemInfo.h" +#include "DFError.h" using namespace DFHack; class NormalProcess::Private diff --git a/library/DFProcessEnumerator-linux.cpp b/dfhack/DFProcessEnumerator-linux.cpp similarity index 96% rename from library/DFProcessEnumerator-linux.cpp rename to dfhack/DFProcessEnumerator-linux.cpp index c4eddd127..19103c1f3 100644 --- a/library/DFProcessEnumerator-linux.cpp +++ b/dfhack/DFProcessEnumerator-linux.cpp @@ -23,11 +23,15 @@ distribution. */ #include "DFCommonInternal.h" +#include "DFProcessEnumerator.h" +#include "DFProcess.h" +#include "DFMemInfo.h" +#include "DFMemInfoManager.h" #include #include #include #include -#include "../shmserver/shms.h" +#include "shms.h" using namespace DFHack; diff --git a/library/DFProcessEnumerator-windows.cpp b/dfhack/DFProcessEnumerator-windows.cpp similarity index 97% rename from library/DFProcessEnumerator-windows.cpp rename to dfhack/DFProcessEnumerator-windows.cpp index 7e3c095e8..da42ebd50 100644 --- a/library/DFProcessEnumerator-windows.cpp +++ b/dfhack/DFProcessEnumerator-windows.cpp @@ -23,6 +23,10 @@ distribution. */ #include "DFCommonInternal.h" +#include "DFProcessEnumerator.h" +#include "DFProcess.h" +#include "DFMemInfo.h" +#include "DFMemInfoManager.h" using namespace DFHack; /// HACK: global variables (only one process can be attached at the same time.) diff --git a/library/DFTileTypes.cpp b/dfhack/DFTileTypes.cpp similarity index 100% rename from library/DFTileTypes.cpp rename to dfhack/DFTileTypes.cpp diff --git a/library/DFVector.cpp b/dfhack/DFVector.cpp similarity index 92% rename from library/DFVector.cpp rename to dfhack/DFVector.cpp index d03eabacb..61c33c30c 100644 --- a/library/DFVector.cpp +++ b/dfhack/DFVector.cpp @@ -24,6 +24,9 @@ distribution. #include "Tranquility.h" #include "DFCommonInternal.h" +#include "DFVector.h" +#include "DFMemInfo.h" +#include "DFProcess.h" using namespace DFHack; @@ -33,7 +36,7 @@ DfVector::DfVector(Process * p, uint32_t address, uint32_t _item_size) uint32_t triplet[3]; item_size = _item_size; memory_info * mem = p->getDescriptor(); - uint32_t offs = mem->getOffset("hacked_vector_triplet"); + uint32_t offs = mem->getOffset("vector_triplet"); p->read(address + offs, sizeof(triplet), (uint8_t *) &triplet); start = triplet[0]; diff --git a/library/DFWindow-linux.cpp b/dfhack/DFWindow-linux.cpp similarity index 99% rename from library/DFWindow-linux.cpp rename to dfhack/DFWindow-linux.cpp index 99880da44..bffe99de6 100644 --- a/library/DFWindow-linux.cpp +++ b/dfhack/DFWindow-linux.cpp @@ -22,6 +22,7 @@ must not be misrepresented as being the original software. distribution. */ #include "DFCommonInternal.h" +#include "DFWindow.h" #include //need for X11 functions #include diff --git a/library/DFWindow-windows.cpp b/dfhack/DFWindow-windows.cpp similarity index 99% rename from library/DFWindow-windows.cpp rename to dfhack/DFWindow-windows.cpp index 1fc100555..78e4ffc62 100644 --- a/library/DFWindow-windows.cpp +++ b/dfhack/DFWindow-windows.cpp @@ -23,6 +23,8 @@ distribution. */ #include "DFCommonInternal.h" +#include "DFWindow.h" +#include "DFProcess.h" using namespace DFHack; // should always reflect the enum in DFkeys.h diff --git a/library/config.h.cmake b/dfhack/config.h.cmake similarity index 100% rename from library/config.h.cmake rename to dfhack/config.h.cmake diff --git a/library/argstream/argstream.h b/dfhack/depends/argstream/argstream.h similarity index 100% rename from library/argstream/argstream.h rename to dfhack/depends/argstream/argstream.h diff --git a/dfhack/depends/md5/CMakeLists.txt b/dfhack/depends/md5/CMakeLists.txt new file mode 100644 index 000000000..fc4845bd4 --- /dev/null +++ b/dfhack/depends/md5/CMakeLists.txt @@ -0,0 +1 @@ +ADD_LIBRARY(dfhack-md5 SHARED md5.cpp md5wrapper.cpp) diff --git a/library/md5/md5.cpp b/dfhack/depends/md5/md5.cpp similarity index 100% rename from library/md5/md5.cpp rename to dfhack/depends/md5/md5.cpp diff --git a/library/md5/md5.h b/dfhack/depends/md5/md5.h similarity index 98% rename from library/md5/md5.h rename to dfhack/depends/md5/md5.h index d1cedc9d2..91b43b861 100644 --- a/library/md5/md5.h +++ b/dfhack/depends/md5/md5.h @@ -45,7 +45,7 @@ //---------------------------------------------------------------------- //STL includes #include -#include "../integers.h" +#include //---------------------------------------------------------------------- //typedefs typedef unsigned char *POINTER; diff --git a/library/md5/md5wrapper.cpp b/dfhack/depends/md5/md5wrapper.cpp similarity index 100% rename from library/md5/md5wrapper.cpp rename to dfhack/depends/md5/md5wrapper.cpp diff --git a/library/md5/md5wrapper.h b/dfhack/depends/md5/md5wrapper.h similarity index 100% rename from library/md5/md5wrapper.h rename to dfhack/depends/md5/md5wrapper.h diff --git a/dfhack/depends/tinyxml/CMakeLists.txt b/dfhack/depends/tinyxml/CMakeLists.txt new file mode 100644 index 000000000..effdf8945 --- /dev/null +++ b/dfhack/depends/tinyxml/CMakeLists.txt @@ -0,0 +1 @@ +ADD_LIBRARY(dfhack-tixml SHARED tinystr.cpp tinyxml.cpp tinyxmlerror.cpp tinyxmlparser.cpp) \ No newline at end of file diff --git a/library/tinyxml/tinystr.cpp b/dfhack/depends/tinyxml/tinystr.cpp similarity index 100% rename from library/tinyxml/tinystr.cpp rename to dfhack/depends/tinyxml/tinystr.cpp diff --git a/library/tinyxml/tinystr.h b/dfhack/depends/tinyxml/tinystr.h similarity index 100% rename from library/tinyxml/tinystr.h rename to dfhack/depends/tinyxml/tinystr.h diff --git a/library/tinyxml/tinyxml.cpp b/dfhack/depends/tinyxml/tinyxml.cpp similarity index 100% rename from library/tinyxml/tinyxml.cpp rename to dfhack/depends/tinyxml/tinyxml.cpp diff --git a/library/tinyxml/tinyxml.h b/dfhack/depends/tinyxml/tinyxml.h similarity index 100% rename from library/tinyxml/tinyxml.h rename to dfhack/depends/tinyxml/tinyxml.h diff --git a/library/tinyxml/tinyxmlerror.cpp b/dfhack/depends/tinyxml/tinyxmlerror.cpp similarity index 100% rename from library/tinyxml/tinyxmlerror.cpp rename to dfhack/depends/tinyxml/tinyxmlerror.cpp diff --git a/library/tinyxml/tinyxmlparser.cpp b/dfhack/depends/tinyxml/tinyxmlparser.cpp similarity index 100% rename from library/tinyxml/tinyxmlparser.cpp rename to dfhack/depends/tinyxml/tinyxmlparser.cpp diff --git a/library/DFCommonInternal.h b/dfhack/include/DFCommonInternal.h similarity index 97% rename from library/DFCommonInternal.h rename to dfhack/include/DFCommonInternal.h index 2ab9b9720..255dde145 100644 --- a/library/DFCommonInternal.h +++ b/dfhack/include/DFCommonInternal.h @@ -77,6 +77,7 @@ namespace DFHack # define BUILD_DFHACK_LIB #endif +/* #include "DFTypes.h" //#include "DFDataModel.h" #include "DFProcess.h" @@ -86,13 +87,14 @@ namespace DFHack #include "DFVector.h" #include "DFMemInfo.h" #include "DFError.h" +*/ #include -#include "tinyxml/tinyxml.h" -#include "md5/md5wrapper.h" +#include +#include #include -#include "DFHackAPI.h" +//#include "DFHackAPI.h" #define _QUOTEME(x) #x #define QUOT(x) _QUOTEME(x) diff --git a/library/DFError.h b/dfhack/include/DFError.h similarity index 100% rename from library/DFError.h rename to dfhack/include/DFError.h diff --git a/dfhack/include/DFHackAPI.h b/dfhack/include/DFHackAPI.h new file mode 100644 index 000000000..6349f083d --- /dev/null +++ b/dfhack/include/DFHackAPI.h @@ -0,0 +1,188 @@ +/* +www.sourceforge.net/projects/dfhack +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + +#ifndef SIMPLEAPI_H_INCLUDED +#define SIMPLEAPI_H_INCLUDED + +#include "Tranquility.h" +#include "Export.h" +#include +#include +#include +#include "integers.h" +#include "DFTileTypes.h" +#include "DFTypes.h" +#include "DFWindow.h" + +namespace DFHack +{ + class APIPrivate; + class memory_info; + class Process; + + // modules + class Maps; + class Creatures; + class Position; + class Gui; + class Materials; + + class DFHACK_EXPORT API + { + APIPrivate * const d; + public: + API(const std::string path_to_xml); + ~API(); + + /* + * Basic control over DF's process state + */ + + bool Attach(); + bool Detach(); + bool isAttached(); + + /// stop DF from executing + bool Suspend(); + bool isSuspended(); + + /// stop DF from executing, asynchronous, use with polling + bool AsyncSuspend(); + + /// resume DF + bool Resume(); + + /// forces resume on Windows. This can be a bad thing with multiple DF tools running! + bool ForceResume(); + + memory_info *getMemoryInfo(); + Process * getProcess(); + DFWindow * getWindow(); + + /// read/write size bytes of raw data at offset. DANGEROUS, CAN SEGFAULT DF! + void ReadRaw (const uint32_t offset, const uint32_t size, uint8_t *target); + void WriteRaw (const uint32_t offset, const uint32_t size, uint8_t *source); + + Creatures * getCreatures(); + Maps * getMaps(); + Gui * getGui(); + Position * getPosition(); + Materials * getMaterials(); + + /* + * Constructions (costructed walls, floors, ramps, etc...) + */ + /* + /// start reading constructions. numconstructions is an output - total constructions present + bool InitReadConstructions( uint32_t & numconstructions ); + /// read a construiction at index + bool ReadConstruction(const int32_t index, t_construction & construction); + /// cleanup after reading constructions + void FinishReadConstructions(); +*/ + /* + * Buildings - also includes zones and stockpiles + */ + /* + bool InitReadBuildings ( uint32_t & numbuildings ); + bool ReadBuilding(const int32_t index, t_building & building); + void FinishReadBuildings(); + */ + /* + * Effects like mist, dragonfire or dust + */ + /* + bool InitReadEffects ( uint32_t & numeffects ); + bool ReadEffect(const uint32_t index, t_effect_df40d & effect); + bool WriteEffect(const uint32_t index, const t_effect_df40d & effect); + void FinishReadEffects(); + */ + /* + * Trees and shrubs + */ + /* + bool InitReadVegetation( uint32_t & numplants ); + bool ReadVegetation(const int32_t index, t_tree_desc & shrubbery); + void FinishReadVegetation(); + */ + + /* + * Notes placed by the player + */ + /* + /// start reading notes. numnotes is an output - total notes present + bool InitReadNotes( uint32_t & numnotes ); + /// read note from the note vector at index + bool ReadNote(const int32_t index, t_note & note); + /// free the note vector + void FinishReadNotes(); + */ + /* + * Settlements + */ + /* + bool InitReadSettlements( uint32_t & numsettlements ); + bool ReadSettlement(const int32_t index, t_settlement & settlement); + bool ReadCurrentSettlement(t_settlement & settlement); + void FinishReadSettlements(); + */ + /* + * Hotkeys (DF's zoom locations) + */ + /* + bool InitReadHotkeys( ); + bool ReadHotkeys(t_hotkey hotkeys[]); + */ + /* + * DF translation tables and name translation + */ + /* + bool InitReadNameTables (std::vector< std::vector > & translations , std::vector< std::vector > & foreign_languages); + void FinishReadNameTables(); + std::string TranslateName(const t_name & name,const std::vector< std::vector > & translations ,const std::vector< std::vector > & foreign_languages, bool inEnglish=true); + */ + + /* + * Item reading + */ + /* + bool InitReadItems(uint32_t & numitems); + bool getItemIndexesInBox(std::vector &indexes, + const uint16_t x1, const uint16_t y1, const uint16_t z1, + const uint16_t x2, const uint16_t y2, const uint16_t z2); + bool ReadItem(const uint32_t index, t_item & item); + void FinishReadItems(); + */ + /* + * Get the other API parts for raw access + */ + + /* + // FIXME: BAD! + bool ReadAllMatgloss(vector< vector< string > > & all); + */ + //bool ReadItemTypes(std::vector< std::vector< t_itemType > > & itemTypes); + }; +} // namespace DFHack +#endif // SIMPLEAPI_H_INCLUDED diff --git a/library/DFMemInfo.h b/dfhack/include/DFMemInfo.h similarity index 100% rename from library/DFMemInfo.h rename to dfhack/include/DFMemInfo.h diff --git a/library/DFMemInfoManager.h b/dfhack/include/DFMemInfoManager.h similarity index 100% rename from library/DFMemInfoManager.h rename to dfhack/include/DFMemInfoManager.h diff --git a/library/DFProcess.h b/dfhack/include/DFProcess.h similarity index 100% rename from library/DFProcess.h rename to dfhack/include/DFProcess.h diff --git a/library/DFProcessEnumerator.h b/dfhack/include/DFProcessEnumerator.h similarity index 100% rename from library/DFProcessEnumerator.h rename to dfhack/include/DFProcessEnumerator.h diff --git a/library/DFTileTypes.h b/dfhack/include/DFTileTypes.h similarity index 100% rename from library/DFTileTypes.h rename to dfhack/include/DFTileTypes.h diff --git a/library/DFTypes.h b/dfhack/include/DFTypes.h similarity index 96% rename from library/DFTypes.h rename to dfhack/include/DFTypes.h index 5ef92670c..f9ba70cd5 100644 --- a/library/DFTypes.h +++ b/dfhack/include/DFTypes.h @@ -53,27 +53,7 @@ struct junk_fill */ }; -struct t_matgloss -{ - char id[128]; //the id in the raws - uint8_t fore; // Annoyingly the offset for this differs between types - uint8_t back; - uint8_t bright; - char name[128]; //this is the name displayed ingame -}; - -struct t_matglossPlant -{ - char id[128]; //the id in the raws - uint8_t fore; // Annoyingly the offset for this differs between types - uint8_t back; - uint8_t bright; - char name[128]; //this is the name displayed ingame - char drink_name[128]; //the name this item becomes a drink - char food_name[128]; - char extract_name[128]; -}; - +/* struct t_vein { uint32_t vtable; @@ -83,7 +63,15 @@ struct t_vein uint32_t flags; uint32_t address_of; // this is NOT part of the DF vein, but an address of the vein as seen by DFhack. }; - +*/ +struct t_vein +{ + uint32_t vtable; + int32_t type; + int16_t assignment[16]; + uint32_t flags; + uint32_t address_of; // this is NOT part of the DF vein, but an address of the vein as seen by DFhack. +}; // stores what tiles should appear when the ice melts struct t_frozenliquidvein { @@ -540,12 +528,12 @@ CREATURE //#pragma pack(push,4) struct t_name { - char first_name[128]; - char nickname[128]; - int32_t words[7]; - uint16_t parts_of_speech[7]; - uint32_t language; - bool has_name; + char first_name[128]; + char nickname[128]; + int32_t words[7]; + uint16_t parts_of_speech[7]; + uint32_t language; + bool has_name; }; struct t_skill @@ -581,8 +569,8 @@ struct t_creature t_creaturflags1 flags1; t_creaturflags2 flags2; t_name name; - t_name squad_name; - t_name artifact_name; + t_name squad_name; + t_name artifact_name; uint8_t profession; char custom_profession[128]; // enabled labors @@ -853,7 +841,7 @@ union t_blockflags typedef int16_t tiletypes40d [16][16]; typedef DFHack::t_designation designations40d [16][16]; typedef DFHack::t_occupancy occupancies40d [16][16]; -typedef uint8_t biome_indices40d [8]; +typedef uint8_t biome_indices40d [16]; typedef struct { diff --git a/library/DFVector.h b/dfhack/include/DFVector.h similarity index 100% rename from library/DFVector.h rename to dfhack/include/DFVector.h diff --git a/library/DFWindow.h b/dfhack/include/DFWindow.h similarity index 100% rename from library/DFWindow.h rename to dfhack/include/DFWindow.h diff --git a/library/Export.h b/dfhack/include/Export.h similarity index 100% rename from library/Export.h rename to dfhack/include/Export.h diff --git a/library/Tranquility.h b/dfhack/include/Tranquility.h similarity index 100% rename from library/Tranquility.h rename to dfhack/include/Tranquility.h diff --git a/dfhack/include/config.h b/dfhack/include/config.h new file mode 100644 index 000000000..7deb6c158 --- /dev/null +++ b/dfhack/include/config.h @@ -0,0 +1,6 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#define MEMXML_DATA_PATH . + +#endif // CONFIG_H diff --git a/library/integers.h b/dfhack/include/integers.h similarity index 100% rename from library/integers.h rename to dfhack/include/integers.h diff --git a/dfhack/include/modules/Creatures.h b/dfhack/include/modules/Creatures.h new file mode 100644 index 000000000..a701eaef7 --- /dev/null +++ b/dfhack/include/modules/Creatures.h @@ -0,0 +1,33 @@ +#ifndef CL_MOD_CREATURES +#define CL_MOD_CREATURES +/* +* Creatures +*/ +#include "Export.h" +namespace DFHack +{ + class APIPrivate; + struct t_creature; + class DFHACK_EXPORT Creatures + { + public: + Creatures(DFHack::APIPrivate * d); + ~Creatures(); + bool Start( uint32_t & numCreatures); + bool Finish(); + + // Read creatures in a box, starting with index. Returns -1 if no more creatures + // found. Call repeatedly do get all creatures in a specified box (uses tile coords) + int32_t ReadCreatureInBox(const int32_t index, t_creature & furball, + const uint16_t x1, const uint16_t y1,const uint16_t z1, + const uint16_t x2, const uint16_t y2,const uint16_t z2); + bool ReadCreature(const int32_t index, t_creature & furball); + /// write labors of a creature (for Dwarf Therapist) + //bool WriteLabors(const uint32_t index, uint8_t labors[NUM_CREATURE_LABORS]); + + private: + struct Private; + Private *d; + }; +} +#endif \ No newline at end of file diff --git a/dfhack/include/modules/Gui.h b/dfhack/include/modules/Gui.h new file mode 100644 index 000000000..ab342e77a --- /dev/null +++ b/dfhack/include/modules/Gui.h @@ -0,0 +1,34 @@ +#ifndef CL_MOD_GUI +#define CL_MOD_GUI + +/* +* Gui: Query the DF's GUI state +*/ +#include "Export.h" + +namespace DFHack +{ + class APIPrivate; + struct t_viewscreen; + class DFHACK_EXPORT Gui + { + public: + + Gui(DFHack::APIPrivate * d); + ~Gui(); + bool Start(); + bool Finish(); + + ///true if paused, false if not + bool ReadPauseState(); + /// read the DF menu view state (stock screen, unit screen, other screens + bool ReadViewScreen(t_viewscreen &); + /// read the DF menu state (designation menu ect) + uint32_t ReadMenuState(); + + private: + struct Private; + Private *d; + }; +} +#endif \ No newline at end of file diff --git a/dfhack/include/modules/Maps.h b/dfhack/include/modules/Maps.h new file mode 100644 index 000000000..eb4856d32 --- /dev/null +++ b/dfhack/include/modules/Maps.h @@ -0,0 +1,109 @@ +#ifndef CL_MOD_MAPS +#define CL_MOD_MAPS + +#include "Export.h" +/* +* Maps: Read and write DF's map +*/ +namespace DFHack +{ + class APIPrivate; + struct t_viewscreen; + class DFHACK_EXPORT Maps + { + public: + + Maps(DFHack::APIPrivate * d); + ~Maps(); + bool Start(); + bool Finish(); + + // read region surroundings, get their vectors of geolayers so we can do translation (or just hand the translation table to the client) + // returns an array of 9 vectors of indices into stone matgloss + /** + Method for reading the geological surrounding of the currently loaded region. + assign is a reference to an array of nine vectors of unsigned words that are to be filled with the data + array is indexed by the BiomeOffset enum + + I omitted resolving the layer matgloss in this API, because it would + introduce overhead by calling some method for each tile. You have to do it + yourself. First get the stuff from ReadGeology and then for each block get + the RegionOffsets. For each tile get the real region from RegionOffsets and + cross-reference it with the geology stuff (region -- array of vectors, depth -- + vector). I'm thinking about turning that Geology stuff into a + two-dimensional array with static size. + + this is the algorithm for applying matgloss: + void DfMap::applyGeoMatgloss(Block * b) + { + // load layer matgloss + for(int x_b = 0; x_b < BLOCK_SIZE; x_b++) + { + for(int y_b = 0; y_b < BLOCK_SIZE; y_b++) + { + int geolayer = b->designation[x_b][y_b].bits.geolayer_index; + int biome = b->designation[x_b][y_b].bits.biome; + b->material[x_b][y_b].type = Mat_Stone; + b->material[x_b][y_b].index = v_geology[b->RegionOffsets[biome]][geolayer]; + } + } + } + */ + bool ReadGeology( std::vector < std::vector >& assign ); + + /* + * BLOCK DATA + */ + /* + /// allocate and read pointers to map blocks + bool InitMap(); + /// destroy the mapblock cache + bool DestroyMap(); + */ + /// get size of the map in tiles + void getSize(uint32_t& x, uint32_t& y, uint32_t& z); + + /** + * Return false/0 on failure, buffer allocated by client app, 256 items long + */ + bool isValidBlock(uint32_t blockx, uint32_t blocky, uint32_t blockz); + /** + * Get the address of a block or 0 if block is not valid + */ + uint32_t getBlockPtr (uint32_t blockx, uint32_t blocky, uint32_t blockz); + + /// read the whole map block at block coords (see DFTypes.h for the block structure) + bool ReadBlock40d(uint32_t blockx, uint32_t blocky, uint32_t blockz, mapblock40d * buffer); + + /// read/write block tile types + bool ReadTileTypes(uint32_t blockx, uint32_t blocky, uint32_t blockz, tiletypes40d *buffer); + bool WriteTileTypes(uint32_t blockx, uint32_t blocky, uint32_t blockz, tiletypes40d *buffer); + + /// read/write block designations + bool ReadDesignations(uint32_t blockx, uint32_t blocky, uint32_t blockz, designations40d *buffer); + bool WriteDesignations (uint32_t blockx, uint32_t blocky, uint32_t blockz, designations40d *buffer); + + /// read/write block occupancies + bool ReadOccupancy(uint32_t blockx, uint32_t blocky, uint32_t blockz, occupancies40d *buffer); + bool WriteOccupancy(uint32_t blockx, uint32_t blocky, uint32_t blockz, occupancies40d *buffer); + + /// read/write the block dirty bit - this is used to mark a map block so that DF scans it for designated jobs like digging + bool ReadDirtyBit(uint32_t blockx, uint32_t blocky, uint32_t blockz, bool &dirtybit); + bool WriteDirtyBit(uint32_t blockx, uint32_t blocky, uint32_t blockz, bool dirtybit); + + /// read/write the block flags + bool ReadBlockFlags(uint32_t blockx, uint32_t blocky, uint32_t blockz, t_blockflags &blockflags); + bool WriteBlockFlags(uint32_t blockx, uint32_t blocky, uint32_t blockz, t_blockflags blockflags); + + /// read region offsets of a block - used for determining layer stone matgloss + bool ReadRegionOffsets(uint32_t blockx, uint32_t blocky, uint32_t blockz, biome_indices40d *buffer); + + /// read aggregated veins of a block + bool ReadVeins(uint32_t blockx, uint32_t blocky, uint32_t blockz, std::vector & veins, std::vector & ices); + + private: + struct Private; + Private *d; + }; +} +#endif \ No newline at end of file diff --git a/dfhack/include/modules/Materials.h b/dfhack/include/modules/Materials.h new file mode 100644 index 000000000..cfbfb9471 --- /dev/null +++ b/dfhack/include/modules/Materials.h @@ -0,0 +1,53 @@ +#ifndef CL_MOD_MATERIALS +#define CL_MOD_MATERIALS +/* +* Creatures +*/ +#include "Export.h" +namespace DFHack +{ + struct APIPrivate; + + struct t_matgloss + { + char id[128]; //the id in the raws + uint8_t fore; // Annoyingly the offset for this differs between types + uint8_t back; + uint8_t bright; + char name[128]; //this is the name displayed ingame + }; + + struct t_matglossPlant + { + char id[128]; //the id in the raws + uint8_t fore; // Annoyingly the offset for this differs between types + uint8_t back; + uint8_t bright; + char name[128]; //this is the name displayed ingame + char drink_name[128]; //the name this item becomes a drink + char food_name[128]; + char extract_name[128]; + }; + + class DFHACK_EXPORT Materials + { + public: + + Materials(DFHack::APIPrivate * _d); + ~Materials(); + + bool ReadInorganicMaterials (std::vector & output); + bool ReadOrganicMaterials (std::vector & output); + + bool ReadWoodMaterials (std::vector & output); + bool ReadPlantMaterials (std::vector & output); + // bool ReadPlantMaterials (std::vector & output); + + // TODO: maybe move to creatures? + bool ReadCreatureTypes (std::vector & output); + private: + APIPrivate* d; + }; +} +#endif + diff --git a/dfhack/include/modules/Position.h b/dfhack/include/modules/Position.h new file mode 100644 index 000000000..1b1168dde --- /dev/null +++ b/dfhack/include/modules/Position.h @@ -0,0 +1,35 @@ +#ifndef CL_MOD_POSITION +#define CL_MOD_POSITION +/* +* View position and size and cursor position +*/ +#include "Export.h" +namespace DFHack +{ + struct APIPrivate; + class DFHACK_EXPORT Position + { + public: + + Position(APIPrivate * d); + ~Position(); + /* + * Cursor and window coords + */ + bool getViewCoords (int32_t &x, int32_t &y, int32_t &z); + bool setViewCoords (const int32_t x, const int32_t y, const int32_t z); + + bool getCursorCoords (int32_t &x, int32_t &y, int32_t &z); + bool setCursorCoords (const int32_t x, const int32_t y, const int32_t z); + + /* + * Window size in tiles + */ + bool getWindowSize(int32_t & width, int32_t & height); + + private: + struct Private; + Private *d; + }; +} +#endif diff --git a/library/stdint_win.h b/dfhack/include/stdint_win.h similarity index 100% rename from library/stdint_win.h rename to dfhack/include/stdint_win.h diff --git a/dfhack/modules/Creatures.cpp b/dfhack/modules/Creatures.cpp new file mode 100644 index 000000000..903de54c6 --- /dev/null +++ b/dfhack/modules/Creatures.cpp @@ -0,0 +1,289 @@ +/* +www.sourceforge.net/projects/dfhack +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + +#include "DFCommonInternal.h" +#include "../private/APIPrivate.h" + +// we connect to those +#include +#include +#include +#include "modules/Creatures.h" +#include "DFVector.h" +#include "DFMemInfo.h" +#include "DFProcess.h" +#include "DFError.h" +#include "DFTypes.h" + +#define SHMCREATURESHDR ((Creatures2010::shm_creature_hdr *)d->d->shm_start) +#define SHMCMD(num) ((shm_cmd *)d->d->shm_start)[num]->pingpong +#define SHMHDR ((shm_core_hdr *)d->d->shm_start) +#define SHMDATA(type) ((type *)(d->d->shm_start + SHM_HEADER)) + +using namespace DFHack; + +struct Creatures::Private +{ + bool Inited; + bool Started; + Creatures2010::creature_offsets creatures; + uint32_t creature_module; + DfVector *p_cre; + APIPrivate *d; +}; + +Creatures::Creatures(APIPrivate* _d) +{ + d = new Private; + d->d = _d; + d->Inited = false; + d->Started = false; + d->d->InitReadNames(); // throws on error + try + { + memory_info * minfo = d->d->offset_descriptor; + Creatures2010::creature_offsets &creatures = d->creatures; + creatures.creature_vector = minfo->getAddress ("creature_vector"); + creatures.creature_pos_offset = minfo->getOffset ("creature_position"); + creatures.creature_profession_offset = minfo->getOffset ("creature_profession"); + creatures.creature_race_offset = minfo->getOffset ("creature_race"); + creatures.creature_flags1_offset = minfo->getOffset ("creature_flags1"); + creatures.creature_flags2_offset = minfo->getOffset ("creature_flags2"); + creatures.creature_name_offset = minfo->getOffset ("creature_name"); + creatures.creature_sex_offset = minfo->getOffset ("creature_sex"); + creatures.creature_id_offset = minfo->getOffset ("creature_id"); + creatures.creature_labors_offset = minfo->getOffset ("creature_labors"); + creatures.creature_happiness_offset = minfo->getOffset ("creature_happiness"); + creatures.creature_artifact_name_offset = minfo->getOffset("creature_artifact_name"); + + // name offsets for the creature module + creatures.name_firstname_offset = minfo->getOffset("name_firstname"); + creatures.name_nickname_offset = minfo->getOffset("name_nickname"); + creatures.name_words_offset = minfo->getOffset("name_words"); + + // upload offsets to the SHM + if(g_pProcess->getModuleIndex("Creatures2010",1,d->creature_module)) + { + // supply the module with offsets so it can work with them + memcpy(SHMDATA(Creatures2010::creature_offsets),&creatures,sizeof(Creatures2010::creature_offsets)); + const uint32_t cmd = Creatures2010::CREATURE_INIT + (d->creature_module << 16); + g_pProcess->SetAndWait(cmd); + } + d->Inited = true; + } + catch (Error::MissingMemoryDefinition&) + { + d->Inited = false; + throw; + } +} + +Creatures::~Creatures() +{ + if(d->Started) + Finish(); +} + +bool Creatures::Start( uint32_t &numcreatures ) +{ + d->p_cre = new DfVector (d->d->p, d->creatures.creature_vector, 4); + d->Started = true; + numcreatures = d->p_cre->getSize(); + return true; +} + +bool Creatures::Finish() +{ + if(d->p_cre) + { + delete d->p_cre; + d->p_cre = 0; + } + d->Started = false; + return true; +} + +bool Creatures::ReadCreature (const int32_t index, t_creature & furball) +{ + if(!d->Started) return false; + // SHM fast path + if(d->creature_module) + { + SHMCREATURESHDR->index = index; + const uint32_t cmd = Creatures2010::CREATURE_AT_INDEX + (d->creature_module << 16); + g_pProcess->SetAndWait(cmd); + memcpy(&furball,SHMDATA(t_creature),sizeof(t_creature)); + return true; + } + + // non-SHM slow path + + // read pointer from vector at position + uint32_t temp = * (uint32_t *) d->p_cre->at (index); + furball.origin = temp; + Creatures2010::creature_offsets &offs = d->creatures; + //read creature from memory + g_pProcess->read (temp + offs.creature_pos_offset, 3 * sizeof (uint16_t), (uint8_t *) & (furball.x)); // xyz really + g_pProcess->readDWord (temp + offs.creature_race_offset, furball.type); + g_pProcess->readDWord (temp + offs.creature_flags1_offset, furball.flags1.whole); + g_pProcess->readDWord (temp + offs.creature_flags2_offset, furball.flags2.whole); + // names + d->d->readName(furball.name,temp + offs.creature_name_offset); + //d->readName(furball.squad_name, temp + offs.creature_squad_name_offset); + d->d->readName(furball.artifact_name, temp + offs.creature_artifact_name_offset); + // custom profession + //fill_char_buf (furball.custom_profession, d->p->readSTLString (temp + offs.creature_custom_profession_offset)); + + // labors + g_pProcess->read (temp + offs.creature_labors_offset, NUM_CREATURE_LABORS, furball.labors); + // traits + //g_pProcess->read (temp + offs.creature_traits_offset, sizeof (uint16_t) * NUM_CREATURE_TRAITS, (uint8_t *) &furball.traits); + // learned skills + /* + DfVector skills (d->p, temp + offs.creature_skills_offset, 4 ); + furball.numSkills = skills.getSize(); + for (uint32_t i = 0; i < furball.numSkills;i++) + { + uint32_t temp2 = * (uint32_t *) skills[i]; + //skills.read(i, (uint8_t *) &temp2); + // a byte: this gives us 256 skills maximum. + furball.skills[i].id = g_pProcess->readByte (temp2); + furball.skills[i].rating = g_pProcess->readByte (temp2 + 4); + furball.skills[i].experience = g_pProcess->readWord (temp2 + 8); + } + */ + // profession + furball.profession = g_pProcess->readByte (temp + offs.creature_profession_offset); + // current job HACK: the job object isn't cleanly represented here + /* + uint32_t jobIdAddr = g_pProcess->readDWord (temp + offs.creature_current_job_offset); + + if (jobIdAddr) + { + furball.current_job.active = true; + furball.current_job.jobId = g_pProcess->readByte (jobIdAddr + offs.creature_current_job_id_offset); + } + else + { + furball.current_job.active = false; + } +*/ + //likes + /* + DfVector likes(d->p, temp + offs.creature_likes_offset, 4); + furball.numLikes = likes.getSize(); + for(uint32_t i = 0;iread(temp2,sizeof(t_like),(uint8_t *) &furball.likes[i]); + } + + furball.mood = (int16_t) g_pProcess->readWord (temp + offs.creature_mood_offset); +*/ + + g_pProcess->readDWord (temp + offs.creature_happiness_offset, furball.happiness); + g_pProcess->readDWord (temp + offs.creature_id_offset, furball.id); + /* + g_pProcess->readDWord (temp + offs.creature_agility_offset, furball.agility); + g_pProcess->readDWord (temp + offs.creature_strength_offset, furball.strength); + g_pProcess->readDWord (temp + offs.creature_toughness_offset, furball.toughness); + g_pProcess->readDWord (temp + offs.creature_money_offset, furball.money); + furball.squad_leader_id = (int32_t) g_pProcess->readDWord (temp + offs.creature_squad_leader_id_offset); + */ + g_pProcess->readByte (temp + offs.creature_sex_offset, furball.sex); +/* + g_pProcess->readDWord(temp + offs.creature_pregnancy_offset, furball.pregnancy_timer); + furball.blood_max = (int32_t) g_pProcess->readDWord(temp + offs.creature_blood_max_offset); + furball.blood_current = (int32_t) g_pProcess->readDWord(temp + offs.creature_blood_current_offset); + g_pProcess->readDWord(temp + offs.creature_bleed_offset, furball.bleed_rate); +*/ + + return true; +} + +// returns index of creature actually read or -1 if no creature can be found +int32_t Creatures::ReadCreatureInBox (int32_t index, t_creature & furball, + const uint16_t x1, const uint16_t y1, const uint16_t z1, + const uint16_t x2, const uint16_t y2, const uint16_t z2) +{ + if (!d->Started) return -1; + if(d->creature_module) + { + // supply the module with offsets so it can work with them + SHMCREATURESHDR->index = index; + SHMCREATURESHDR->x = x1; + SHMCREATURESHDR->y = y1; + SHMCREATURESHDR->z = z1; + SHMCREATURESHDR->x2 = x2; + SHMCREATURESHDR->y2 = y2; + SHMCREATURESHDR->z2 = z2; + const uint32_t cmd = Creatures2010::CREATURE_FIND_IN_BOX + (d->creature_module << 16); + g_pProcess->SetAndWait(cmd); + if(SHMCREATURESHDR->index != -1) + memcpy(&furball,SHMDATA(void),sizeof(t_creature)); + return SHMCREATURESHDR->index; + } + else + { + uint16_t coords[3]; + uint32_t size = d->p_cre->getSize(); + while (uint32_t(index) < size) + { + // read pointer from vector at position + uint32_t temp = * (uint32_t *) d->p_cre->at (index); + g_pProcess->read (temp + d->creatures.creature_pos_offset, 3 * sizeof (uint16_t), (uint8_t *) &coords); + if (coords[0] >= x1 && coords[0] < x2) + { + if (coords[1] >= y1 && coords[1] < y2) + { + if (coords[2] >= z1 && coords[2] < z2) + { + ReadCreature (index, furball); + return index; + } + } + } + index++; + } + return -1; + } +} + + +/* +bool API::WriteLabors(const uint32_t index, uint8_t labors[NUM_CREATURE_LABORS]) +{ + if(!d->creaturesInited) return false; + uint32_t temp = * (uint32_t *) d->p_cre->at (index); + WriteRaw(temp + d->creatures.creature_labors_offset, NUM_CREATURE_LABORS, labors); +} +*/ +/* +bool API::getCurrentCursorCreature(uint32_t & creature_index) +{ + if(!d->cursorWindowInited) return false; + creature_index = g_pProcess->readDWord(d->current_cursor_creature_offset); + return true; +} +*/ \ No newline at end of file diff --git a/dfhack/modules/Gui.cpp b/dfhack/modules/Gui.cpp new file mode 100644 index 000000000..eb1d774eb --- /dev/null +++ b/dfhack/modules/Gui.cpp @@ -0,0 +1,104 @@ +/* +www.sourceforge.net/projects/dfhack +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + +#include "DFCommonInternal.h" +#include "../private/APIPrivate.h" +#include "modules/Gui.h" +#include "DFProcess.h" +#include "DFMemInfo.h" +#include "DFTypes.h" + +using namespace DFHack; + +struct Gui::Private +{ + bool Inited; + bool Started; + uint32_t pause_state_offset; + uint32_t view_screen_offset; + uint32_t current_cursor_creature_offset; + uint32_t current_menu_state_offset; + APIPrivate *d; +}; + +Gui::Gui(APIPrivate * _d) +{ + + d = new Private; + d->d = _d; + d->Inited = d->Started = true; + + memory_info * mem = d->d->offset_descriptor; + d->current_menu_state_offset = mem->getAddress("current_menu_state"); + d->pause_state_offset = mem->getAddress ("pause_state"); + d->view_screen_offset = mem->getAddress ("view_screen"); + d->Inited = d->Started = true; +} + +Gui::~Gui() +{ + delete d; +} + +bool Gui::Start() +{ + return true; +} + +bool Gui::Finish() +{ + return true; +} + +bool Gui::ReadPauseState() +{ + // replace with an exception + if(!d->Inited) return false; + + uint32_t pauseState = g_pProcess->readDWord (d->pause_state_offset); + return pauseState & 1; +} + +uint32_t Gui::ReadMenuState() +{ + if(d->Inited) + return(g_pProcess->readDWord(d->current_menu_state_offset)); + return false; +} + +bool Gui::ReadViewScreen (t_viewscreen &screen) +{ + if (!d->Inited) return false; + + uint32_t last = g_pProcess->readDWord (d->view_screen_offset); + uint32_t screenAddr = g_pProcess->readDWord (last); + uint32_t nextScreenPtr = g_pProcess->readDWord (last + 4); + while (nextScreenPtr != 0) + { + last = nextScreenPtr; + screenAddr = g_pProcess->readDWord (nextScreenPtr); + nextScreenPtr = g_pProcess->readDWord (nextScreenPtr + 4); + } + return d->d->offset_descriptor->resolveObjectToClassID (last, screen.type); +} diff --git a/dfhack/modules/Maps.cpp b/dfhack/modules/Maps.cpp new file mode 100644 index 000000000..af468510e --- /dev/null +++ b/dfhack/modules/Maps.cpp @@ -0,0 +1,536 @@ +/* +www.sourceforge.net/projects/dfhack +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + +#include "DFCommonInternal.h" +#include +#include +#include +#include "../private/APIPrivate.h" +#include "modules/Maps.h" +#include "DFError.h" +#include "DFMemInfo.h" +#include "DFProcess.h" +#include "DFVector.h" + +#define SHMMAPSHDR ((Server::Maps::shm_maps_hdr *)d->d->shm_start) +#define SHMCMD(num) ((shm_cmd *)d->d->shm_start)[num]->pingpong +#define SHMHDR ((shm_core_hdr *)d->d->shm_start) +#define SHMDATA(type) ((type *)(d->d->shm_start + SHM_HEADER)) + +using namespace DFHack; + +struct Maps::Private +{ + uint32_t * block; + uint32_t x_block_count, y_block_count, z_block_count; + uint32_t regionX, regionY, regionZ; + uint32_t worldSizeX, worldSizeY; + + uint32_t maps_module; + Server::Maps::maps_offsets offsets; + + APIPrivate *d; + bool Inited; + bool Started; + //uint32_t biome_stuffs; + vector v_geology[eBiomeCount]; +}; + +Maps::Maps(APIPrivate* _d) +{ + d = new Private; + d->d = _d; + d->Inited = d->Started = false; + + DFHack::memory_info * mem = d->d->offset_descriptor; + Server::Maps::maps_offsets &off = d->offsets; + + // get the offsets once here + off.map_offset = mem->getAddress ("map_data"); + off.x_count_offset = mem->getAddress ("x_count_block"); + off.y_count_offset = mem->getAddress ("y_count_block"); + off.z_count_offset = mem->getAddress ("z_count_block"); + off.tile_type_offset = mem->getOffset ("type"); + off.designation_offset = mem->getOffset ("designation"); + off.biome_stuffs = mem->getOffset ("biome_stuffs"); + off.veinvector = mem->getOffset ("v_vein"); + + // these can fail and will be found when looking at the actual veins later + // basically a cache + off.vein_ice_vptr = 0; + mem->resolveClassnameToVPtr("block_square_event_frozen_liquid", off.vein_ice_vptr); + off.vein_mineral_vptr = 0; + mem->resolveClassnameToVPtr("block_square_event_mineral",off.vein_mineral_vptr); + + // upload offsets to SHM server if possible + d->maps_module = 0; + if(g_pProcess->getModuleIndex("Maps2010",1,d->maps_module)) + { + // supply the module with offsets so it can work with them + Server::Maps::maps_offsets *off2 = SHMDATA(Server::Maps::maps_offsets); + memcpy(off2, &(d->offsets), sizeof(Server::Maps::maps_offsets)); + full_barrier + const uint32_t cmd = Server::Maps::MAP_INIT + (d->maps_module << 16); + g_pProcess->SetAndWait(cmd); + } + d->Inited = true; +} + +Maps::~Maps() +{ + if(d->Started) + Finish(); +} + +/*-----------------------------------* + * Init the mapblock pointer array * + *-----------------------------------*/ +bool Maps::Start() +{ + if(!d->Inited) + return false; + if(d->Started) + Finish(); + Server::Maps::maps_offsets &off = d->offsets; + // get the map pointer + uint32_t x_array_loc = g_pProcess->readDWord (off.map_offset); + if (!x_array_loc) + { + return false; + } + + // get the size + uint32_t mx, my, mz; + mx = d->x_block_count = g_pProcess->readDWord (off.x_count_offset); + my = d->y_block_count = g_pProcess->readDWord (off.y_count_offset); + mz = d->z_block_count = g_pProcess->readDWord (off.z_count_offset); + + // test for wrong map dimensions + if (mx == 0 || mx > 48 || my == 0 || my > 48 || mz == 0) + { + throw Error::BadMapDimensions(mx, my); + //return false; + } + + // alloc array for pointers to all blocks + d->block = new uint32_t[mx*my*mz]; + uint32_t *temp_x = new uint32_t[mx]; + uint32_t *temp_y = new uint32_t[my]; + uint32_t *temp_z = new uint32_t[mz]; + + g_pProcess->read (x_array_loc, mx * sizeof (uint32_t), (uint8_t *) temp_x); + for (uint32_t x = 0; x < mx; x++) + { + g_pProcess->read (temp_x[x], my * sizeof (uint32_t), (uint8_t *) temp_y); + // y -> map column + for (uint32_t y = 0; y < my; y++) + { + g_pProcess->read (temp_y[y], + mz * sizeof (uint32_t), + (uint8_t *) (d->block + x*my*mz + y*mz)); + } + } + delete [] temp_x; + delete [] temp_y; + delete [] temp_z; + return true; +} + +bool Maps::Finish() +{ + if (d->block != NULL) + { + delete [] d->block; + d->block = NULL; + } + return true; +} + +bool Maps::isValidBlock (uint32_t x, uint32_t y, uint32_t z) +{ + if ( x >= d->x_block_count || y >= d->y_block_count || z >= d->z_block_count) + return false; + return d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z] != 0; +} + +uint32_t Maps::getBlockPtr (uint32_t x, uint32_t y, uint32_t z) +{ + if ( x >= d->x_block_count || y >= d->y_block_count || z >= d->z_block_count) + return 0; + return d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z]; +} + +bool Maps::ReadBlock40d(uint32_t x, uint32_t y, uint32_t z, mapblock40d * buffer) +{ + if(d->d->shm_start && d->maps_module) // ACCELERATE! + { + SHMMAPSHDR->x = x; + SHMMAPSHDR->y = y; + SHMMAPSHDR->z = z; + volatile uint32_t cmd = Server::Maps::MAP_READ_BLOCK_BY_COORDS + (d->maps_module << 16); + if(!g_pProcess->SetAndWait(cmd)) + return false; + memcpy(buffer,SHMDATA(mapblock40d),sizeof(mapblock40d)); + return true; + } + else // plain old block read + { + uint32_t addr = d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z]; + if (addr) + { + g_pProcess->read (addr + d->offsets.tile_type_offset, sizeof (buffer->tiletypes), (uint8_t *) buffer->tiletypes); + buffer->origin = addr; + uint32_t addr_of_struct = g_pProcess->readDWord(addr); + buffer->blockflags.whole = g_pProcess->readDWord(addr_of_struct); + return true; + } + return false; + } +} + + +// 256 * sizeof(uint16_t) +bool Maps::ReadTileTypes (uint32_t x, uint32_t y, uint32_t z, tiletypes40d *buffer) +{ + uint32_t addr = d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z]; + if (addr) + { + g_pProcess->read (addr + d->offsets.tile_type_offset, sizeof (tiletypes40d), (uint8_t *) buffer); + return true; + } + return false; +} + +bool Maps::ReadDirtyBit(uint32_t x, uint32_t y, uint32_t z, bool &dirtybit) +{ + uint32_t addr = d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z]; + if(addr) + { + uint32_t addr_of_struct = g_pProcess->readDWord(addr); + dirtybit = g_pProcess->readDWord(addr_of_struct) & 1; + return true; + } + return false; +} + +bool Maps::WriteDirtyBit(uint32_t x, uint32_t y, uint32_t z, bool dirtybit) +{ + uint32_t addr = d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z]; + if (addr) + { + uint32_t addr_of_struct = g_pProcess->readDWord(addr); + uint32_t dirtydword = g_pProcess->readDWord(addr_of_struct); + dirtydword &= 0xFFFFFFFE; + dirtydword |= (uint32_t) dirtybit; + g_pProcess->writeDWord (addr_of_struct, dirtydword); + return true; + } + return false; +} + +/// read/write the block flags +bool Maps::ReadBlockFlags(uint32_t x, uint32_t y, uint32_t z, t_blockflags &blockflags) +{ + uint32_t addr = d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z]; + if(addr) + { + uint32_t addr_of_struct = g_pProcess->readDWord(addr); + blockflags.whole = g_pProcess->readDWord(addr_of_struct); + return true; + } + return false; +} +bool Maps::WriteBlockFlags(uint32_t x, uint32_t y, uint32_t z, t_blockflags blockflags) +{ + uint32_t addr = d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z]; + if (addr) + { + uint32_t addr_of_struct = g_pProcess->readDWord(addr); + g_pProcess->writeDWord (addr_of_struct, blockflags.whole); + return true; + } + return false; +} + +bool Maps::ReadDesignations (uint32_t x, uint32_t y, uint32_t z, designations40d *buffer) +{ + uint32_t addr = d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z]; + if (addr) + { + g_pProcess->read (addr + d->offsets.designation_offset, sizeof (designations40d), (uint8_t *) buffer); + return true; + } + return false; +} + +// 256 * sizeof(uint16_t) +bool Maps::WriteTileTypes (uint32_t x, uint32_t y, uint32_t z, tiletypes40d *buffer) +{ + uint32_t addr = d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z]; + if (addr) + { + g_pProcess->write (addr + d->offsets.tile_type_offset, sizeof (tiletypes40d), (uint8_t *) buffer); + return true; + } + return false; +} + + +// 256 * sizeof(uint32_t) +bool Maps::WriteDesignations (uint32_t x, uint32_t y, uint32_t z, designations40d *buffer) +{ + uint32_t addr = d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z]; + if (addr) + { + g_pProcess->write (addr + d->offsets.designation_offset, sizeof (designations40d), (uint8_t *) buffer); + return true; + } + return false; +} + +// FIXME: this is bad. determine the real size! +//16 of them? IDK... there's probably just 7. Reading more doesn't cause errors as it's an array nested inside a block +// 16 * sizeof(uint8_t) + +bool Maps::ReadRegionOffsets (uint32_t x, uint32_t y, uint32_t z, biome_indices40d *buffer) +{ + uint32_t addr = d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z]; + if (addr) + { + g_pProcess->read (addr + d->offsets.biome_stuffs, sizeof (biome_indices40d), (uint8_t *) buffer); + return true; + } + return false; +} + + +// veins of a block, expects empty vein vectors +bool Maps::ReadVeins(uint32_t x, uint32_t y, uint32_t z, vector & veins, vector & ices) +{ + uint32_t addr = d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z]; + veins.clear(); + ices.clear(); + Server::Maps::maps_offsets &off = d->offsets; + if (addr && off.veinvector) + { + // veins are stored as a vector of pointers to veins + /*pointer is 4 bytes! we work with a 32bit program here, no matter what architecture we compile khazad for*/ + DfVector p_veins (d->d->p, addr + off.veinvector, 4); + uint32_t size = p_veins.getSize(); + veins.reserve (size); + + // read all veins + for (uint32_t i = 0; i < size;i++) + { + t_vein v; + t_frozenliquidvein fv; + + // read the vein pointer from the vector + uint32_t temp = * (uint32_t *) p_veins[i]; + uint32_t type = g_pProcess->readDWord(temp); +try_again: + if(type == off.vein_mineral_vptr) + { + // read the vein data (dereference pointer) + g_pProcess->read (temp, sizeof(t_vein), (uint8_t *) &v); + v.address_of = temp; + // store it in the vector + veins.push_back (v); + } + else if(type == off.vein_ice_vptr) + { + // read the ice vein data (dereference pointer) + g_pProcess->read (temp, sizeof(t_frozenliquidvein), (uint8_t *) &fv); + // store it in the vector + ices.push_back (fv); + } + else if(g_pProcess->readClassName(type) == "block_square_event_frozen_liquid") + { + off.vein_ice_vptr = type; + goto try_again; + } + else if(g_pProcess->readClassName(type) == "block_square_event_mineral") + { + off.vein_mineral_vptr = type; + goto try_again; + } + } + return true; + } + return false; +} + + +// getter for map size +void Maps::getSize (uint32_t& x, uint32_t& y, uint32_t& z) +{ + x = d->x_block_count; + y = d->y_block_count; + z = d->z_block_count; +} + +/* +__int16 __userpurge GetGeologicalRegion(__int16 block_X, int X, __int16 block_Y, int block_addr, int Y) +{ + char bio_off; // al@1 + int tile_designation; // ecx@1 + __int64 corrected_x; // qax@1 + __int64 corrected_y; // qax@1 + int difY; // eax@9 + int difX; // edx@9 + signed __int64 bio_off_2; // qax@9 + signed __int64 bio_off_2_; // qtt@9 + __int16 result; // ax@23 + + corrected_x = reg_off_x + (block_X + (signed int)*(_WORD *)(block_addr + 0x90)) / 48; + *(_WORD *)X = ((BYTE4(corrected_x) & 0xF) + (_DWORD)corrected_x) >> 4; + corrected_y = reg_off_y + (block_Y + (signed int)*(_WORD *)(block_addr + 0x92)) / 48; + *(_WORD *)Y = ((BYTE4(corrected_y) & 0xF) + (_DWORD)corrected_y) >> 4; + tile_designation = *(_DWORD *)(block_addr + 4 * (block_Y + 16 * block_X) + 0x29C); + bio_off = 0; + if ( tile_designation & 0x20000 ) + bio_off = 1; + if ( tile_designation & 0x40000 ) + bio_off |= 2u; + if ( tile_designation & 0x80000 ) + bio_off |= 4u; + if ( tile_designation & 0x100000 ) + bio_off |= 8u; + bio_off_2 = *(_BYTE *)(bio_off + block_addr + 0x1D9C); + bio_off_2_ = bio_off_2; + difY = bio_off_2 / 3; + difX = bio_off_2_ % 3; + if ( !difX ) + --*(_WORD *)X; + if ( difX == 2 ) + ++*(_WORD *)X; + if ( !difY ) + --*(_WORD *)Y; + if ( difY == 2 ) + ++*(_WORD *)Y; + if ( *(_WORD *)X < 0 ) + *(_WORD *)X = 0; + if ( *(_WORD *)Y < 0 ) + *(_WORD *)Y = 0; + if ( *(_WORD *)X >= (_WORD)World_size ) + *(_WORD *)X = World_size - 1; + result = HIWORD(World_size); + if ( *(_WORD *)Y >= HIWORD(World_size) ) + { + result = HIWORD(World_size) - 1; + *(_WORD *)Y = HIWORD(World_size) - 1; + } + return result; +} +*/ + +//vector v_geology[eBiomeCount]; +bool Maps::ReadGeology (vector < vector >& assign) +{ + memory_info * minfo = d->d->offset_descriptor; + // get needed addresses and offsets. Now this is what I call crazy. + int region_x_offset = minfo->getAddress ("region_x"); + int region_y_offset = minfo->getAddress ("region_y"); + int region_z_offset = minfo->getAddress ("region_z"); +/*
0x16AF52C
+
0x16AF574
*/ + int world_regions = minfo->getAddress ("ptr2_region_array"); + int region_size = minfo->getHexValue ("region_size"); + int region_geo_index_offset = minfo->getOffset ("region_geo_index_off"); + int world_geoblocks_vector = minfo->getAddress ("geoblock_vector"); + int world_size_x = minfo->getAddress ("world_size_x"); + int world_size_y = minfo->getAddress ("world_size_y"); + int geolayer_geoblock_offset = minfo->getOffset ("geolayer_geoblock_offset"); + + int type_inside_geolayer = minfo->getOffset ("type_inside_geolayer"); + + uint32_t regionX, regionY, regionZ; + uint16_t worldSizeX, worldSizeY; + + // read position of the region inside DF world + g_pProcess->readDWord (region_x_offset, regionX); + g_pProcess->readDWord (region_y_offset, regionY); + g_pProcess->readDWord (region_z_offset, regionZ); + + // get world size + g_pProcess->readWord (world_size_x, worldSizeX); + g_pProcess->readWord (world_size_y, worldSizeY); + + // get pointer to first part of 2d array of regions + uint32_t regions = g_pProcess->readDWord (world_regions); + + // read the geoblock vector + DfVector geoblocks (d->d->p, world_geoblocks_vector, 4); + + // iterate over 8 surrounding regions + local region + for (int i = eNorthWest; i < eBiomeCount; i++) + { + // check against worldmap boundaries, fix if needed + int bioRX = regionX / 16 + (i % 3) - 1; + if (bioRX < 0) bioRX = 0; + if (bioRX >= worldSizeX) bioRX = worldSizeX - 1; + int bioRY = regionY / 16 + (i / 3) - 1; + if (bioRY < 0) bioRY = 0; + if (bioRY >= worldSizeY) bioRY = worldSizeY - 1; + + /// regions are a 2d array. consists of pointers to arrays of regions + /// regions are of region_size size + // get pointer to column of regions + uint32_t geoX; + g_pProcess->readDWord (regions + bioRX*4, geoX); + + // get index into geoblock vector + uint16_t geoindex; + g_pProcess->readWord (geoX + bioRY*region_size + region_geo_index_offset, geoindex); + + /// geology blocks are assigned to regions from a vector + // get the geoblock from the geoblock vector using the geoindex + // read the matgloss pointer from the vector into temp + uint32_t geoblock_off = * (uint32_t *) geoblocks[geoindex]; + + /// geology blocks have a vector of layer descriptors + // get the vector with pointer to layers + DfVector geolayers (d->d->p, geoblock_off + geolayer_geoblock_offset , 4); // let's hope + // make sure we don't load crap + assert (geolayers.getSize() > 0 && geolayers.getSize() <= 16); + + /// layer descriptor has a field that determines the type of stone/soil + d->v_geology[i].reserve (geolayers.getSize()); + // finally, read the layer matgloss + for (uint32_t j = 0;j < geolayers.getSize();j++) + { + // read pointer to a layer + uint32_t geol_offset = * (uint32_t *) geolayers[j]; + // read word at pointer + 2, store in our geology vectors + d->v_geology[i].push_back (g_pProcess->readWord (geol_offset + type_inside_geolayer)); + } + } + assign.clear(); + assign.reserve (eBiomeCount); + for (int i = 0; i < eBiomeCount;i++) + { + assign.push_back (d->v_geology[i]); + } + return true; +} diff --git a/dfhack/modules/Materials.cpp b/dfhack/modules/Materials.cpp new file mode 100644 index 000000000..265f5074c --- /dev/null +++ b/dfhack/modules/Materials.cpp @@ -0,0 +1,214 @@ +/* +www.sourceforge.net/projects/dfhack +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + +#include "DFCommonInternal.h" +#include "../private/APIPrivate.h" +#include "modules/Materials.h" +#include "DFVector.h" +#include "DFMemInfo.h" +#include "DFProcess.h" + +using namespace DFHack; + +Materials::Materials(APIPrivate * d_) +{ + d = d_; +} +Materials::~Materials(){} +/* + { +LABEL_53: + if ( a1 + || (signed int)a2 < 0 + || a2 >= (inorg_end - inorg_start) >> 2 + || (v13 = *(_DWORD *)(inorg_start + 4 * a2), !v13) ) + { + switch ( a1 ) + { + case 1: + sub_40FDD0("AMBER"); + break; + case 2: + sub_40FDD0("CORAL"); + break; + case 3: + sub_40FDD0("GLASS_GREEN"); + break; + case 4: + sub_40FDD0("GLASS_CLEAR"); + break; + case 5: + sub_40FDD0("GLASS_CRYSTAL"); + break; + case 6: + sub_40FDD0("WATER"); + break; + case 7: + sub_40FDD0("COAL"); + break; + case 8: + sub_40FDD0("POTASH"); + break; + case 9: + sub_40FDD0("ASH"); + break; + case 10: + sub_40FDD0("PEARLASH"); + break; + case 11: + sub_40FDD0("LYE"); + break; + case 12: + sub_40FDD0("MUD"); + break; + case 13: + sub_40FDD0("VOMIT"); + break; + case 14: + sub_40FDD0("SALT"); + break; + case 15: + sub_40FDD0("FILTH_B"); + break; + case 16: + sub_40FDD0("FILTH_Y"); + break; + case 17: + sub_40FDD0("UNKNOWN_SUBSTANCE"); + break; + case 18: + sub_40FDD0("GRIME"); + break; + default: + sub_40A070("NONE", 4u); + break; + } + result = sub_40A070("NONE", 4u); + if ( a1 == 7 ) + { + result = a2; + if ( a2 ) + { + if ( a2 == 1 ) + result = sub_40A070("CHARCOAL", 8u); + } + else + { + result = sub_40A070("COKE", 4u); + } + } + } + else + { + sub_40A070("INORGANIC", 9u); + result = sub_409CA0(v13, 0, -1); + } + } + +*/ + +/* +bool API::ReadInorganicMaterials (vector & inorganic) +{ + memory_info * minfo = d->offset_descriptor; + int matgloss_address = minfo->getAddress ("mat_inorganics"); + int matgloss_colors = minfo->getOffset ("material_color"); + int matgloss_stone_name_offset = minfo->getOffset("matgloss_stone_name"); + + DfVector p_matgloss (d->p, matgloss_address, 4); + + uint32_t size = p_matgloss.getSize(); + inorganic.resize (0); + inorganic.reserve (size); + for (uint32_t i = 0; i < size;i++) + { + // read the matgloss pointer from the vector into temp + uint32_t temp = * (uint32_t *) p_matgloss[i]; + // read the string pointed at by + t_matgloss mat; + //cout << temp << endl; + //fill_char_buf(mat.id, d->p->readSTLString(temp)); // reads a C string given an address + d->p->readSTLString (temp, mat.id, 128); + + d->p->readSTLString (temp+matgloss_stone_name_offset, mat.name, 128); + mat.fore = (uint8_t) g_pProcess->readWord (temp + matgloss_colors); + mat.back = (uint8_t) g_pProcess->readWord (temp + matgloss_colors + 2); + mat.bright = (uint8_t) g_pProcess->readWord (temp + matgloss_colors + 4); + + inorganic.push_back (mat); + } + return true; +} +*/ + + + +// good for now +inline bool ReadNamesOnly(Process* p, uint32_t address, vector & names) +{ + DfVector p_matgloss (p, address, 4); + uint32_t size = p_matgloss.getSize(); + names.clear(); + names.reserve (size); + for (uint32_t i = 0; i < size;i++) + { + t_matgloss mat; + p->readSTLString (*(uint32_t *) p_matgloss[i], mat.id, 128); + names.push_back(mat); + } + return true; +} + +bool Materials::ReadInorganicMaterials (vector & inorganic) +{ + return ReadNamesOnly(d->p, d->offset_descriptor->getAddress ("mat_inorganics"), inorganic ); +} + +bool Materials::ReadOrganicMaterials (vector & organic) +{ + return ReadNamesOnly(d->p, d->offset_descriptor->getAddress ("mat_organics_all"), organic ); +} + +bool Materials::ReadWoodMaterials (vector & trees) +{ + return ReadNamesOnly(d->p, d->offset_descriptor->getAddress ("mat_organics_trees"), trees ); +} + +bool Materials::ReadPlantMaterials (vector & plants) +{ + return ReadNamesOnly(d->p, d->offset_descriptor->getAddress ("mat_organics_plants"), plants ); +} +/* +Gives bad results combined with the creature race field! +bool Materials::ReadCreatureTypes (vector & creatures) +{ + return ReadNamesOnly(d->p, d->offset_descriptor->getAddress ("mat_creature_types"), creatures ); + return true; +} +*/ +bool Materials::ReadCreatureTypes (vector & creatures) +{ + return ReadNamesOnly(d->p, d->offset_descriptor->getAddress ("creature_type_vector"), creatures ); + return true; +} diff --git a/dfhack/modules/Position.cpp b/dfhack/modules/Position.cpp new file mode 100644 index 000000000..849f1013e --- /dev/null +++ b/dfhack/modules/Position.cpp @@ -0,0 +1,133 @@ +/* +www.sourceforge.net/projects/dfhack +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + +#include "DFCommonInternal.h" +#include "../private/APIPrivate.h" +#include "modules/Position.h" +#include "DFMemInfo.h" +#include "DFProcess.h" +using namespace DFHack; + + + + +struct Position::Private +{ + uint32_t window_x_offset; + uint32_t window_y_offset; + uint32_t window_z_offset; + uint32_t cursor_xyz_offset; + uint32_t window_dims_offset; + + APIPrivate *d; + bool Inited; + bool Started; + //uint32_t biome_stuffs; + //vector v_geology[eBiomeCount]; +}; + +Position::Position(APIPrivate * d_) +{ + d = new Private; + d->d = d_; + d->Inited = d->Started = false; + memory_info * mem = d->d->offset_descriptor; + d->window_x_offset = mem->getAddress ("window_x"); + d->window_y_offset = mem->getAddress ("window_y"); + d->window_z_offset = mem->getAddress ("window_z"); + d->cursor_xyz_offset = mem->getAddress ("cursor_xyz"); + d->window_dims_offset = mem->getAddress ("window_dims"); + d->Inited = d->Started = true; +} + +Position::~Position() +{ + delete d; +} +/* +bool Position::InitViewAndCursor() +{ + try + { + + d->Inited = true; + return true; + } + catch (Error::MissingMemoryDefinition&) + { + d->cursorWindowInited = false; + throw; + } +} +*/ +bool Position::getViewCoords (int32_t &x, int32_t &y, int32_t &z) +{ + if (!d->Inited) return false; + g_pProcess->readDWord (d->window_x_offset, (uint32_t &) x); + g_pProcess->readDWord (d->window_y_offset, (uint32_t &) y); + g_pProcess->readDWord (d->window_z_offset, (uint32_t &) z); + return true; +} + +//FIXME: confine writing of coords to map bounds? +bool Position::setViewCoords (const int32_t x, const int32_t y, const int32_t z) +{ + if (!d->Inited) return false; + g_pProcess->writeDWord (d->window_x_offset, (uint32_t) x); + g_pProcess->writeDWord (d->window_y_offset, (uint32_t) y); + g_pProcess->writeDWord (d->window_z_offset, (uint32_t) z); + return true; +} + +bool Position::getCursorCoords (int32_t &x, int32_t &y, int32_t &z) +{ + if(!d->Inited) return false; + int32_t coords[3]; + g_pProcess->read (d->cursor_xyz_offset, 3*sizeof (int32_t), (uint8_t *) coords); + x = coords[0]; + y = coords[1]; + z = coords[2]; + if (x == -30000) return false; + return true; +} + +//FIXME: confine writing of coords to map bounds? +bool Position::setCursorCoords (const int32_t x, const int32_t y, const int32_t z) +{ + if (!d->Inited) return false; + int32_t coords[3] = {x, y, z}; + g_pProcess->write (d->cursor_xyz_offset, 3*sizeof (int32_t), (uint8_t *) coords); + return true; +} + +bool Position::getWindowSize (int32_t &width, int32_t &height) +{ + if(!d->Inited) return false; + + int32_t coords[2]; + g_pProcess->read (d->window_dims_offset, 2*sizeof (int32_t), (uint8_t *) coords); + width = coords[0]; + height = coords[1]; + return true; +} \ No newline at end of file diff --git a/dfhack/private/APIPrivate.h b/dfhack/private/APIPrivate.h new file mode 100644 index 000000000..07bd63adc --- /dev/null +++ b/dfhack/private/APIPrivate.h @@ -0,0 +1,114 @@ +/* +www.sourceforge.net/projects/dfhack +Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + +/* +* WARNING: Only include from API modules +*/ + +#ifndef APIPRIVATE_H_INCLUDED +#define APIPRIVATE_H_INCLUDED + +namespace DFHack +{ + class Materials; + class Gui; + class Position; + class Maps; + class Creatures; + class ProcessEnumerator; + class Process; + class memory_info; + struct t_name; + class APIPrivate + { + public: + APIPrivate(); + ~APIPrivate(); + + // names, used by a few other modules. + void readName(t_name & name, uint32_t address); + // get the name offsets + bool InitReadNames(); + uint32_t name_firstname_offset; + uint32_t name_nickname_offset; + uint32_t name_words_offset; + bool namesInited; + + ProcessEnumerator* pm; + Process* p; + char * shm_start; + memory_info* offset_descriptor; + string xml; + + // Modules + Creatures * creatures; + Maps * maps; + Position * position; + Gui * gui; + Materials * materials; + + /* + uint32_t item_material_offset; + + uint32_t note_foreground_offset; + uint32_t note_background_offset; + uint32_t note_name_offset; + uint32_t note_xyz_offset; + uint32_t hotkey_start; + uint32_t hotkey_mode_offset; + uint32_t hotkey_xyz_offset; + uint32_t hotkey_size; + + uint32_t settlement_name_offset; + uint32_t settlement_world_xy_offset; + uint32_t settlement_local_xy_offset; + + uint32_t dwarf_lang_table_offset; + + bool constructionsInited; + bool buildingsInited; + bool effectsInited; + bool vegetationInited; + + + bool itemsInited; + bool notesInited; + bool hotkeyInited; + bool settlementsInited; + bool nameTablesInited; + + uint32_t tree_offset; + + DfVector *p_cons; + DfVector *p_bld; + DfVector *p_effect; + DfVector *p_veg; + DfVector *p_itm; + DfVector *p_notes; + DfVector *p_settlements; + DfVector *p_current_settlement; + */ + }; +} +#endif \ No newline at end of file diff --git a/library/pydfhack.i b/dfhack/pydfhack.i similarity index 100% rename from library/pydfhack.i rename to dfhack/pydfhack.i diff --git a/library/pydfhack/DF_API.cpp b/dfhack/python/DF_API.cpp similarity index 100% rename from library/pydfhack/DF_API.cpp rename to dfhack/python/DF_API.cpp diff --git a/library/pydfhack/UnionBase.cpp b/dfhack/python/UnionBase.cpp similarity index 100% rename from library/pydfhack/UnionBase.cpp rename to dfhack/python/UnionBase.cpp diff --git a/library/pydfhack/matgloss.cpp b/dfhack/python/matgloss.cpp similarity index 100% rename from library/pydfhack/matgloss.cpp rename to dfhack/python/matgloss.cpp diff --git a/library/pydfhack/pydfhack.cpp b/dfhack/python/pydfhack.cpp similarity index 100% rename from library/pydfhack/pydfhack.cpp rename to dfhack/python/pydfhack.cpp diff --git a/library/pydfhack/pydftypes.py b/dfhack/python/pydftypes.py similarity index 99% rename from library/pydfhack/pydftypes.py rename to dfhack/python/pydftypes.py index 998a17bbb..3061277bf 100644 --- a/library/pydfhack/pydftypes.py +++ b/dfhack/python/pydftypes.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- from pydfhack import * from ctypes import * diff --git a/library/pydfhack/setup.py b/dfhack/python/setup.py similarity index 80% rename from library/pydfhack/setup.py rename to dfhack/python/setup.py index 237e5515f..ad528a7a8 100644 --- a/library/pydfhack/setup.py +++ b/dfhack/python/setup.py @@ -1,8 +1,9 @@ +# -*- coding: utf-8 -*- from distutils.core import setup, Extension e = Extension("pydfhack", sources=["UnionBase.cpp", "pydfhack.cpp", "DF_API.cpp"], - include_dirs=["..\\"], + include_dirs=["..\\include"], library_dirs=["..\\..\\output"], libraries=["libdfhack"]) diff --git a/dfhack/python/test.py b/dfhack/python/test.py new file mode 100644 index 000000000..802c64b2b --- /dev/null +++ b/dfhack/python/test.py @@ -0,0 +1,2 @@ +# -*- coding: utf-8 -*- +import pydfhack diff --git a/shmserver/CMakeLists.txt b/dfhack/shm/CMakeLists.txt similarity index 100% rename from shmserver/CMakeLists.txt rename to dfhack/shm/CMakeLists.txt diff --git a/shmserver/mod-core.cpp b/dfhack/shm/mod-core.cpp similarity index 100% rename from shmserver/mod-core.cpp rename to dfhack/shm/mod-core.cpp diff --git a/shmserver/mod-core.h b/dfhack/shm/mod-core.h similarity index 100% rename from shmserver/mod-core.h rename to dfhack/shm/mod-core.h diff --git a/dfhack/shm/mod-creature2010.h b/dfhack/shm/mod-creature2010.h new file mode 100644 index 000000000..24795f889 --- /dev/null +++ b/dfhack/shm/mod-creature2010.h @@ -0,0 +1,87 @@ +/* +www.sourceforge.net/projects/dfhack +Copyright (c) 2009 Petr Mrázek (peterix) + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must +not claim that you wrote the original software. If you use this +software in a product, an acknowledgment in the product documentation +would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. +*/ + +#ifndef MOD_CREATURES2010_H +#define MOD_CREATURES2010_H + +namespace DFHack +{ + namespace Creatures2010 + { + +#define CREATURES2010_VERSION 1 +typedef struct +{ + // creature offsets + uint32_t creature_vector; + uint32_t creature_pos_offset; + uint32_t creature_profession_offset; + uint32_t creature_race_offset; + uint32_t creature_flags1_offset; + uint32_t creature_flags2_offset; + uint32_t creature_name_offset; + uint32_t creature_sex_offset; + uint32_t creature_id_offset; + uint32_t creature_labors_offset; + uint32_t creature_happiness_offset; + uint32_t creature_artifact_name_offset; + // name offsets (needed for reading creature names) + uint32_t name_firstname_offset; + uint32_t name_nickname_offset; + uint32_t name_words_offset; +} creature_offsets; + +typedef struct +{ + bool inited; + creature_offsets offsets; +} creature_modulestate; + +typedef struct +{ + shm_cmd cmd[SHM_MAX_CLIENTS]; // MANDATORY! + // box + uint32_t x; + uint32_t y; + uint32_t z; + uint32_t x2; + uint32_t y2; + uint32_t z2; + // starting index + int32_t index; +} shm_creature_hdr; + +enum CREATURE_COMMAND +{ + CREATURE_INIT = 0, // initialization + CREATURE_FIND_IN_BOX, + CREATURE_AT_INDEX, + NUM_CREATURE_CMDS +}; +DFPP_module Init(void); + + } +} + +#endif \ No newline at end of file diff --git a/shmserver/mod-creature40d.cpp b/dfhack/shm/mod-creature40d.cpp similarity index 100% rename from shmserver/mod-creature40d.cpp rename to dfhack/shm/mod-creature40d.cpp diff --git a/shmserver/mod-creature40d.h b/dfhack/shm/mod-creature40d.h similarity index 97% rename from shmserver/mod-creature40d.h rename to dfhack/shm/mod-creature40d.h index e2cb20567..8c7f84f54 100644 --- a/shmserver/mod-creature40d.h +++ b/dfhack/shm/mod-creature40d.h @@ -27,8 +27,10 @@ distribution. namespace DFHack { - namespace Creatures + namespace Server { + namespace Creatures + { #define CREATURES40D_VERSION 1 typedef struct @@ -100,6 +102,7 @@ enum CREATURE_COMMAND }; DFPP_module Init(void); + } } } diff --git a/shmserver/mod-maps.cpp b/dfhack/shm/mod-maps.cpp similarity index 100% rename from shmserver/mod-maps.cpp rename to dfhack/shm/mod-maps.cpp diff --git a/shmserver/mod-maps.h b/dfhack/shm/mod-maps.h similarity index 96% rename from shmserver/mod-maps.h rename to dfhack/shm/mod-maps.h index af6b8f48e..8023be8bf 100644 --- a/shmserver/mod-maps.h +++ b/dfhack/shm/mod-maps.h @@ -30,10 +30,12 @@ distribution. namespace DFHack { - namespace Maps + namespace Server { + namespace Maps + { -#define MAPS_VERSION 2 +#define MAPS_VERSION 3 typedef struct { uint32_t map_offset;// = d->offset_descriptor->getAddress ("map_data"); @@ -47,6 +49,7 @@ typedef struct uint32_t veinvector;// = d->offset_descriptor->getOffset ("v_vein"); uint32_t vein_mineral_vptr; uint32_t vein_ice_vptr; + uint32_t vein_spatter_vptr; /* GEOLOGY uint32_t region_x_offset;// = minfo->getAddress ("region_x"); @@ -94,10 +97,10 @@ enum MAPS_COMMAND MAP_READ_BLOCKS_3D, // read blocks between two coords (volumetric) MAP_READ_ALL_BLOCKS, // read the entire map MAP_REVEAL, // reveal the whole map - NUM_MAPS_CMDS, + NUM_MAPS_CMDS }; DFPP_module Init(void); - + } } } diff --git a/shmserver/readme.txt b/dfhack/shm/readme.txt similarity index 100% rename from shmserver/readme.txt rename to dfhack/shm/readme.txt diff --git a/shmserver/shms-linux.cpp b/dfhack/shm/shms-linux.cpp similarity index 100% rename from shmserver/shms-linux.cpp rename to dfhack/shm/shms-linux.cpp diff --git a/shmserver/shms-windows.cpp b/dfhack/shm/shms-windows.cpp similarity index 100% rename from shmserver/shms-windows.cpp rename to dfhack/shm/shms-windows.cpp diff --git a/shmserver/shms.h b/dfhack/shm/shms.h similarity index 98% rename from shmserver/shms.h rename to dfhack/shm/shms.h index ba818d434..ce7913383 100644 --- a/shmserver/shms.h +++ b/dfhack/shm/shms.h @@ -41,7 +41,7 @@ enum DFPP_CmdType { CANCELLATION, // we should jump out of the Act() CLIENT_WAIT, // we are waiting for the client - FUNCTION, // we call a function as a result of the command + FUNCTION // we call a function as a result of the command }; struct DFPP_command diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 71a8d6bb8..e430b94b0 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -9,6 +9,10 @@ ENDIF(UNIX) ADD_EXECUTABLE(dfattachtest attachtest.cpp) TARGET_LINK_LIBRARIES(dfattachtest dfhack) +# buildingsdump - dump buildings and their raw data filtered by type +#ADD_EXECUTABLE(dfbuildingsdump buildingsdump.cpp) +#TARGET_LINK_LIBRARIES(dfbuildingsdump dfhack) + # a benchmark program, reads the map 1000x ADD_EXECUTABLE(dfexpbench expbench.cpp) TARGET_LINK_LIBRARIES(dfexpbench dfhack) @@ -17,10 +21,6 @@ TARGET_LINK_LIBRARIES(dfexpbench dfhack) ADD_EXECUTABLE(dfcreaturedump creaturedump.cpp) TARGET_LINK_LIBRARIES(dfcreaturedump dfhack) -# buildingsdump - dump buildings and their raw data filtered by type -ADD_EXECUTABLE(dfbuildingsdump buildingsdump.cpp) -TARGET_LINK_LIBRARIES(dfbuildingsdump dfhack) - # materialtest - just list the first material of each type ADD_EXECUTABLE(dfmaterialtest materialtest.cpp) TARGET_LINK_LIBRARIES(dfmaterialtest dfhack) @@ -35,13 +35,13 @@ ADD_EXECUTABLE(dfsuspend suspendtest.cpp) TARGET_LINK_LIBRARIES(dfsuspend dfhack) # itemdump - dump the item under the cursor -ADD_EXECUTABLE(dfitemdump dfitemdump.cpp) -TARGET_LINK_LIBRARIES(dfitemdump dfhack) +# ADD_EXECUTABLE(dfitemdump dfitemdump.cpp) +# TARGET_LINK_LIBRARIES(dfitemdump dfhack) # hotkeynotedump - dumps the hotkeys and notes for the loaded map # Author: belal -ADD_EXECUTABLE(dfhotkeynotedump hotkeynotedump.cpp) -TARGET_LINK_LIBRARIES(dfhotkeynotedump dfhack) +# ADD_EXECUTABLE(dfhotkeynotedump hotkeynotedump.cpp) +# TARGET_LINK_LIBRARIES(dfhotkeynotedump dfhack) # findnameindexes # Author: belal @@ -50,17 +50,17 @@ TARGET_LINK_LIBRARIES(dfhotkeynotedump dfhack) # settlementdump - dumps the settlements on the loaded map # Author: belal -ADD_EXECUTABLE(dfsettlementdump settlementdump.cpp) -TARGET_LINK_LIBRARIES(dfsettlementdump dfhack) +# ADD_EXECUTABLE(dfsettlementdump settlementdump.cpp) +# TARGET_LINK_LIBRARIES(dfsettlementdump dfhack) # veccheck - read vector values at address -#ADD_EXECUTABLE(dfvecc veccheck.cpp) -#TARGET_LINK_LIBRARIES(dfvecc dfhack) +ADD_EXECUTABLE(dfvecc veccheck.cpp) +TARGET_LINK_LIBRARIES(dfvecc dfhack) # catsplosion - Makes every cat pregnant, and almost due... # Author: Zhentar -ADD_EXECUTABLE(dfcatsplosion catsplosion.cpp) -TARGET_LINK_LIBRARIES(dfcatsplosion dfhack) +# ADD_EXECUTABLE(dfcatsplosion catsplosion.cpp) +# TARGET_LINK_LIBRARIES(dfcatsplosion dfhack) IF(UNIX) SET(CURSES_NEED_WIDE "YES") @@ -101,25 +101,25 @@ ENDIF(UNIX) # renamer - change the custom names and professions of creatures, sends keys to # df directly # Author: belal -ADD_EXECUTABLE(dfrenamer renamer.cpp) -TARGET_LINK_LIBRARIES(dfrenamer dfhack) +#ADD_EXECUTABLE(dfrenamer renamer.cpp) +#TARGET_LINK_LIBRARIES(dfrenamer dfhack) IF(UNIX) install(TARGETS dfattachtest -dfexpbench -dfcreaturedump -dfbuildingsdump +#dfexpbench +#dfcreaturedump +#dfbuildingsdump dfmaterialtest dfposition dfsuspend -dfitemdump -dfhotkeynotedump +#dfitemdump +#dfhotkeynotedump #dffindnameindexes -dfsettlementdump -dfrenamer -#dfvecc -dfcatsplosion +#dfsettlementdump +#dfrenamer +dfvecc +#dfcatsplosion RUNTIME DESTINATION bin ) ENDIF(UNIX) \ No newline at end of file diff --git a/examples/catsplosion.cpp b/examples/catsplosion.cpp index 17a96f647..ba764d513 100644 --- a/examples/catsplosion.cpp +++ b/examples/catsplosion.cpp @@ -20,7 +20,7 @@ using namespace std; #include #include #include -#include +#include vector creaturestypes; diff --git a/examples/creaturedump.cpp b/examples/creaturedump.cpp index ebeaccd3c..60cb343be 100644 --- a/examples/creaturedump.cpp +++ b/examples/creaturedump.cpp @@ -10,6 +10,8 @@ using namespace std; #include #include #include +#include +#include template void print_bits ( T val, std::ostream& out ) @@ -43,8 +45,8 @@ vector< vector > itemTypes; DFHack::memory_info *mem; vector< vector > englishWords; vector< vector > foreignWords; - -likeType printLike(DFHack::t_like like, const matGlosses & mat,const vector< vector > & itemTypes) +/* +likeType printLike40d(DFHack::t_like like, const matGlosses & mat,const vector< vector > & itemTypes) { // The function in DF which prints out the likes is a monster, it is a huge switch statement with tons of options and calls a ton of other functions as well, //so I am not going to try and put all the possibilites here, only the low hanging fruit, with stones and metals, as well as items, //you can easily find good canidates for military duty for instance @@ -147,7 +149,7 @@ likeType printLike(DFHack::t_like like, const matGlosses & mat,const vector< vec } return(FAIL); } - +*/ void printCreature(DFHack::API & DF, const DFHack::t_creature & creature) { @@ -163,13 +165,15 @@ void printCreature(DFHack::API & DF, const DFHack::t_creature & creature) cout << ", nick name: " << creature.name.nickname; addendl = true; } + /* string transName = DF.TranslateName(creature.name,englishWords,foreignWords,false); if(!transName.empty()) { cout << ", trans name: " << transName; addendl=true; } - +*/ + /* cout << ", likes: "; for(uint32_t i = 0;igetProfession(creature.profession) << "(" << (int) creature.profession << ")"; + /* if(creature.custom_profession[0]) { cout << ", custom profession: " << creature.custom_profession; @@ -192,16 +198,18 @@ void printCreature(DFHack::API & DF, const DFHack::t_creature & creature) { cout << ", current job: " << mem->getJob(creature.current_job.jobId); } + */ cout << endl; - cout << "happiness: " << creature.happiness << ", strength: " << creature.strength << ", agility: " - << creature.agility << ", toughness: " << creature.toughness << ", money: " << creature.money << ", id: " << creature.id; + cout << "happiness: " << creature.happiness /*<< ", strength: " << creature.strength << ", agility: " + << creature.agility << ", toughness: " << creature.toughness << ", money: " << creature.money*/ << ", id: " << creature.id; + /* if(creature.squad_leader_id != -1) { cout << ", squad_leader_id: " << creature.squad_leader_id; } if(creature.mood != -1){ cout << ", mood: " << creature.mood << " "; - } + }*/ cout << ", sex: "; if(creature.sex == 0) { @@ -212,10 +220,11 @@ void printCreature(DFHack::API & DF, const DFHack::t_creature & creature) cout <<"Male"; } cout << endl; - + /* if(creature.pregnancy_timer > 0) cout << "gives birth in " << creature.pregnancy_timer/1200 << " days. "; cout << "Blood: " << creature.blood_current << "/" << creature.blood_max << " bleeding: " << creature.bleed_rate; + */ cout << endl; /* @@ -288,10 +297,12 @@ void printCreature(DFHack::API & DF, const DFHack::t_creature & creature) cout << "from the underworld, "; } cout << endl; - if(creature.flags1.bits.had_mood && (creature.mood == -1 || creature.mood == 8 ) ){ + /* + if(creature.flags1.bits.had_mood && (creature.mood == -1 || creature.mood == 8 ) ) + { string artifact_name = DF.TranslateName(creature.artifact_name,englishWords,foreignWords,false); cout << "artifact: " << artifact_name << endl; - } + }*/ cout << endl; } @@ -312,8 +323,11 @@ int main (void) return 1; } + DFHack::Creatures * Creatures = DF.getCreatures(); + DFHack::Materials * Materials = DF.getMaterials(); + uint32_t numCreatures; - if(!DF.InitReadCreatures(numCreatures)) + if(!Creatures->Start(numCreatures)) { cerr << "Can't get creatures" << endl; #ifndef LINUX_BUILD @@ -329,38 +343,40 @@ int main (void) #endif return 1; } - + /* DF.ReadItemTypes(itemTypes); DF.ReadPlantMatgloss(mat.plantMat); DF.ReadWoodMatgloss(mat.woodMat); DF.ReadStoneMatgloss(mat.stoneMat); DF.ReadMetalMatgloss(mat.metalMat); DF.ReadCreatureMatgloss(mat.creatureMat); - + */ mem = DF.getMemoryInfo(); // get stone matgloss mapping - if(!DF.ReadCreatureMatgloss(creaturestypes)) + if(!Materials->ReadCreatureTypes(creaturestypes)) { cerr << "Can't get the creature types." << endl; return 1; } - + /* if(!DF.InitReadNameTables(englishWords,foreignWords)) { cerr << "Can't get name tables" << endl; return 1; } - DF.InitViewAndCursor(); + */ + //DF.InitViewAndCursor(); for(uint32_t i = 0; i < numCreatures; i++) { DFHack::t_creature temp; - DF.ReadCreature(i,temp); - if(string(creaturestypes[temp.type].id) == "DWARF") + Creatures->ReadCreature(i,temp); + //if(string(creaturestypes[temp.type].id) == "DWARF") { cout << "index " << i << " "; printCreature(DF,temp); } } + /* uint32_t currentIdx; DFHack::t_creature currentCreature; DF.getCurrentCursorCreature(currentIdx); @@ -368,7 +384,8 @@ int main (void) DF.ReadCreature(currentIdx, currentCreature); printCreature(DF,currentCreature); - DF.FinishReadCreatures(); + */ + Creatures->Finish(); DF.Detach(); #ifndef LINUX_BUILD cout << "Done. Press any key to continue" << endl; diff --git a/examples/expbench.cpp b/examples/expbench.cpp index 7d674098b..579f7ab4a 100644 --- a/examples/expbench.cpp +++ b/examples/expbench.cpp @@ -11,6 +11,7 @@ using namespace std; #include #include +#include void print_progress (int current, int total) { @@ -48,11 +49,12 @@ int main (int numargs, char** args) uint32_t num_blocks = 0; uint64_t bytes_read = 0; DFHack::mapblock40d Block; - + DFHack::Maps *Maps = 0; DFHack::API DF("Memory.xml"); try { DF.Attach(); + Maps = DF.getMaps(); } catch (exception& e) { @@ -70,25 +72,25 @@ int main (int numargs, char** args) { print_progress (i, iterations); - if(!DF.InitMap()) + if(!Maps->Start()) break; - DF.getSize(x_max,y_max,z_max); + Maps->getSize(x_max,y_max,z_max); for(uint32_t x = 0; x< x_max;x++) { for(uint32_t y = 0; y< y_max;y++) { for(uint32_t z = 0; z< z_max;z++) { - if(DF.isValidBlock(x,y,z)) + if(Maps->isValidBlock(x,y,z)) { - DF.ReadBlock40d(x, y, z, &Block); + Maps->ReadBlock40d(x, y, z, &Block); num_blocks ++; bytes_read += sizeof(DFHack::mapblock40d); } } } } - DF.DestroyMap(); + Maps->Finish(); } DF.Detach(); time(&end); diff --git a/examples/materialtest.cpp b/examples/materialtest.cpp index 2337b3fc9..5f5acdda3 100644 --- a/examples/materialtest.cpp +++ b/examples/materialtest.cpp @@ -1,15 +1,52 @@ +// Just show some position data + #include #include #include #include +#include #include using namespace std; #include #include +#include +#include +#include +#include -int main (void) +void DumpObjStr0Vector (const char * name, DFHack::Process *p, uint32_t addr) { + cout << "----==== " << name << " ====----" << endl; + DFHack::DfVector vect(p,addr,4); + for(int i = 0; i < vect.getSize();i++) + { + uint32_t addr = *(uint32_t *) vect[i]; + cout << p->readSTLString(addr) << endl; + } + cout << endl; +} + +void DumpDWordVector (const char * name, DFHack::Process *p, uint32_t addr) +{ + cout << "----==== " << name << " ====----" << endl; + DFHack::DfVector vect(p,addr,4); + for(int i = 0; i < vect.getSize();i++) + { + uint32_t number = *(uint32_t *) vect[i]; + cout << number << endl; + } + cout << endl; +} + +int main (int numargs, const char ** args) +{ + uint32_t addr; + if (numargs == 2) + { + istringstream input (args[1],istringstream::in); + input >> std::hex >> addr; + } DFHack::API DF("Memory.xml"); try { @@ -24,48 +61,62 @@ int main (void) return 1; } - if(!DF.InitMap()) - { - cerr << "No map loaded, it would be unsafe to enumerate materials" << endl; - #ifndef LINUX_BUILD - cin.ignore(); - #endif - return 1; - } - DF.DestroyMap(); + DFHack::Process* p = DF.getProcess(); + DFHack::memory_info* mem = DF.getMemoryInfo(); + DFHack::Materials *Materials = DF.getMaterials(); - vector Woods; - DF.ReadWoodMatgloss(Woods); + //const vector * names = mem->getClassIDMapping(); + /* + DumpObjStr0Vector("Material templates",p, mem->getAddress("mat_templates")); - vector Plants; - DF.ReadPlantMatgloss(Plants); + DumpObjStr0Vector("Inorganics",p, mem->getAddress("mat_inorganics")); - vector Metals; - DF.ReadMetalMatgloss(Metals); + DumpObjStr0Vector("Organics - all",p, mem->getAddress("mat_organics_all")); - vector Stones; - DF.ReadStoneMatgloss(Stones); + DumpObjStr0Vector("Organics - plants",p, mem->getAddress("mat_organics_plants")); - vector CreatureTypes; - DF.ReadCreatureMatgloss(CreatureTypes); + DumpDWordVector("Maybe map between all organics and plants",p, mem->getAddress("mat_unk1_numbers")); - cout << "Wood: " << Woods[0].id << endl; - cout << "Plant: " << Plants[0].id << endl; - cout << "Metal: " << Metals[0].id << endl; - cout << "Stone: " << Stones[0].id << endl; - cout << "Creature: " << CreatureTypes[0].id << endl; - cout << endl; - cout << "Dumping all stones!" << endl; - for(uint32_t i = 0; i < Stones.size();i++) + DumpObjStr0Vector("Trees/wood",p, mem->getAddress("mat_organics_trees")); + + DumpDWordVector("Maybe map between all organics and trees",p, mem->getAddress("mat_unk2_numbers")); + + DumpObjStr0Vector("Body material templates",p, mem->getAddress("mat_body_material_templates")); + + DumpObjStr0Vector("Body detail plans",p, mem->getAddress("mat_body_detail_plans")); + + DumpObjStr0Vector("Bodies",p, mem->getAddress("mat_bodies")); + + DumpObjStr0Vector("Bodygloss",p, mem->getAddress("mat_bodygloss")); + + DumpObjStr0Vector("Creature variations",p, mem->getAddress("mat_creature_variations")); + */ + + cout << "----==== Inorganic ====----" << endl; + vector matgloss; + Materials->ReadInorganicMaterials (matgloss); + for(int i = 0; i < matgloss.size();i++) { - cout << Stones[i].id << "$" << endl;; + cout << matgloss[i].id << endl; } - DF.Detach(); + cout << endl << "----==== Organic ====----" << endl; + vector organic; + Materials->ReadOrganicMaterials (matgloss); + for(int i = 0; i < matgloss.size();i++) + { + cout << matgloss[i].id << endl; + } + cout << endl << "----==== Creature types ====----" << endl; + vector creature; + Materials->ReadCreatureTypes (matgloss); + for(int i = 0; i < matgloss.size();i++) + { + cout << matgloss[i].id << endl; + } #ifndef LINUX_BUILD cout << "Done. Press any key to continue" << endl; cin.ignore(); #endif - return 0; } diff --git a/examples/position.cpp b/examples/position.cpp index 05bcc4b87..4e1787477 100644 --- a/examples/position.cpp +++ b/examples/position.cpp @@ -9,13 +9,16 @@ using namespace std; #include #include +#include int main (void) { DFHack::API DF("Memory.xml"); + DFHack::Position * Position = 0; try { DF.Attach(); + Position = DF.getPosition(); } catch (exception& e) { @@ -25,31 +28,23 @@ int main (void) #endif return 1; } - - if (DF.InitViewAndCursor()) + if (Position) { int32_t x,y,z; - if(DF.getViewCoords(x,y,z)) + int32_t width,height; + + if(Position->getViewCoords(x,y,z)) cout << "view coords: " << x << "/" << y << "/" << z << endl; - if(DF.getCursorCoords(x,y,z)) + if(Position->getCursorCoords(x,y,z)) cout << "cursor coords: " << x << "/" << y << "/" << z << endl; + if(Position->getWindowSize(width,height)) + cout << "window size : " << width << " " << height << endl; } else { cerr << "cursor and window parameters are unsupported on your version of DF" << endl; } - if(DF.InitViewSize()) - { - int32_t width,height; - if(DF.getWindowSize(width,height)) - cout << "window size : " << width << " " << height << endl; - } - else - { - cerr << "view size is unsupported on your version of DF" << endl; - } - if(!DF.Detach()) { cerr << "Can't detach from DF" << endl; diff --git a/examples/veccheck.cpp b/examples/veccheck.cpp index 06244e793..ba82b2f87 100644 --- a/examples/veccheck.cpp +++ b/examples/veccheck.cpp @@ -12,6 +12,31 @@ using namespace std; #include #include #include +#include + +void DumpObjStr0Vector (const char * name, DFHack::Process *p, uint32_t addr) +{ + cout << "----==== " << name << " ====----" << endl; + DFHack::DfVector vect(p,addr,4); + for(int i = 0; i < vect.getSize();i++) + { + uint32_t addr = *(uint32_t *) vect[i]; + cout << p->readSTLString(addr) << endl; + } + cout << endl; +} + +void DumpDWordVector (const char * name, DFHack::Process *p, uint32_t addr) +{ + cout << "----==== " << name << " ====----" << endl; + DFHack::DfVector vect(p,addr,4); + for(int i = 0; i < vect.getSize();i++) + { + uint32_t number = *(uint32_t *) vect[i]; + cout << number << endl; + } + cout << endl; +} int main (int numargs, const char ** args) { @@ -37,23 +62,35 @@ int main (int numargs, const char ** args) DFHack::Process* p = DF.getProcess(); DFHack::memory_info* mem = DF.getMemoryInfo(); - const vector * names = mem->getClassIDMapping(); - for(int i = 0; i < names->size();i++) - { - cout << i << " " << names->at(i) << endl; - } - /* - #ifdef LINUX_BUILD - cout << "start 0x" << hex << p->readDWord(addr+0x0) << endl; - cout << "end 0x" << hex << p->readDWord(addr+0x4) << endl; - cout << "cap 0x" << hex << p->readDWord(addr+0x8) << endl; - #else - cout << "start 0x" << hex << p->readDWord(addr+0x4) << endl; - cout << "end 0x" << hex << p->readDWord(addr+0x8) << endl; - cout << "cap 0x" << hex << p->readDWord(addr+0xC) << endl; - #endif - */ - + //const vector * names = mem->getClassIDMapping(); + + DumpObjStr0Vector("Material templates",p, mem->getAddress("mat_templates")); + + DumpObjStr0Vector("Inorganics",p, mem->getAddress("mat_inorganics")); + + DumpObjStr0Vector("Organics - all",p, mem->getAddress("mat_organics_all")); + + DumpObjStr0Vector("Organics - plants",p, mem->getAddress("mat_organics_plants")); + + DumpDWordVector("Maybe map between all organics and plants",p, mem->getAddress("mat_unk1_numbers")); + + DumpObjStr0Vector("Trees/wood",p, mem->getAddress("mat_organics_trees")); + + DumpDWordVector("Maybe map between all organics and trees",p, mem->getAddress("mat_unk2_numbers")); + + DumpObjStr0Vector("Body material templates",p, mem->getAddress("mat_body_material_templates")); + + DumpObjStr0Vector("Body detail plans",p, mem->getAddress("mat_body_detail_plans")); + + DumpObjStr0Vector("Bodies",p, mem->getAddress("mat_bodies")); + + DumpObjStr0Vector("Bodygloss",p, mem->getAddress("mat_bodygloss")); + + DumpObjStr0Vector("Creature variations",p, mem->getAddress("mat_creature_variations")); + + DumpObjStr0Vector("Creature types",p, mem->getAddress("mat_creature_types")); + + #ifndef LINUX_BUILD cout << "Done. Press any key to continue" << endl; cin.ignore(); diff --git a/examples/veinlook.cpp b/examples/veinlook.cpp index c39dc2b65..b22723fa5 100644 --- a/examples/veinlook.cpp +++ b/examples/veinlook.cpp @@ -8,17 +8,21 @@ #include using namespace std; +#include +#include "fake-curses.h" +#include +#include +#include + #include #include #include #include #include +#include +#include using namespace DFHack; -#include -#include "fake-curses.h" -#include -#include -#include + string error; API * pDF = 0; @@ -308,10 +312,16 @@ main(int argc, char *argv[]) vector veinVector; vector IceVeinVector; + DFHack::Materials * Mats = 0; + DFHack::Maps * Maps = 0; + + DFHack::API DF("Memory.xml"); try { DF.Attach(); + Mats = DF.getMaterials(); + Maps = DF.getMaps(); pDF = &DF; } catch (exception& e) @@ -325,26 +335,26 @@ main(int argc, char *argv[]) Process* p = DF.getProcess(); // init the map - if(!DF.InitMap()) + if(!Maps->Start()) { error = "Can't find a map to look at."; pDF = 0; finish(0); } - DF.getSize(x_max_a,y_max_a,z_max_a); + Maps->getSize(x_max_a,y_max_a,z_max_a); x_max = x_max_a; y_max = y_max_a; z_max = z_max_a; // get stone matgloss mapping - if(!DF.ReadStoneMatgloss(stonetypes)) + if(!Mats->ReadInorganicMaterials(stonetypes)) { error = "Can't read stone types."; pDF = 0; finish(0); } - +/* // get region geology if(!DF.ReadGeology( layerassign )) { @@ -352,7 +362,7 @@ main(int argc, char *argv[]) pDF = 0; finish(0); } - +*/ // FIXME: could fail on small forts int cursorX = x_max/2 - 1; int cursorY = y_max/2 - 1; @@ -439,6 +449,7 @@ main(int argc, char *argv[]) // Supend, read/write data DF.Suspend(); uint32_t effectnum; + /* if(DF.InitReadEffects(effectnum)) { for(uint32_t i = 0; i < effectnum;i++) @@ -448,23 +459,24 @@ main(int argc, char *argv[]) effects.push_back(effect); } } + */ for(int i = -1; i <= 1; i++) for(int j = -1; j <= 1; j++) { mapblock40d * Block = &blocks[i+1][j+1]; - if(DF.isValidBlock(cursorX+i,cursorY+j,cursorZ)) + if(Maps->isValidBlock(cursorX+i,cursorY+j,cursorZ)) { - DF.ReadBlock40d(cursorX+i,cursorY+j,cursorZ, Block); + Maps->ReadBlock40d(cursorX+i,cursorY+j,cursorZ, Block); // extra processing of the block in the middle if(i == 0 && j == 0) { // read veins - DF.ReadVeins(cursorX+i,cursorY+j,cursorZ,veinVector,IceVeinVector); + Maps->ReadVeins(cursorX+i,cursorY+j,cursorZ,veinVector,IceVeinVector); // get pointer to block - blockaddr = DF.getBlockPtr(cursorX+i,cursorY+j,cursorZ); + blockaddr = Maps->getBlockPtr(cursorX+i,cursorY+j,cursorZ); blockaddr2 = Block->origin; // dig all veins and trees @@ -479,7 +491,7 @@ main(int argc, char *argv[]) Block->designation[x][y].bits.dig = designation_default; } } - DF.WriteDesignations(cursorX+i,cursorY+j,cursorZ, &(Block->designation)); + Maps->WriteDesignations(cursorX+i,cursorY+j,cursorZ, &(Block->designation)); } // do a dump of the block data if(dump) @@ -488,12 +500,12 @@ main(int argc, char *argv[]) filenum++; } // read/write dirty bit of the block - DF.ReadDirtyBit(cursorX+i,cursorY+j,cursorZ,dirtybit); - DF.ReadBlockFlags(cursorX+i,cursorY+j,cursorZ,bflags); + Maps->ReadDirtyBit(cursorX+i,cursorY+j,cursorZ,dirtybit); + Maps->ReadBlockFlags(cursorX+i,cursorY+j,cursorZ,bflags); if(digbit) { dirtybit = !dirtybit; - DF.WriteDirtyBit(cursorX+i,cursorY+j,cursorZ,dirtybit); + Maps->WriteDirtyBit(cursorX+i,cursorY+j,cursorZ,dirtybit); } } } @@ -507,7 +519,7 @@ main(int argc, char *argv[]) { int color = COLOR_BLACK; color = pickColor(Block->tiletypes[x][y]); - if(!Block->designation[x][y].bits.hidden) + //if(!Block->designation[x][y].bits.hidden) /*{ puttile(x+(i+1)*16,y+(j+1)*16,Block->tiletypes[x][y], color); } @@ -524,7 +536,7 @@ main(int argc, char *argv[]) { for(uint zz = 0; zz < effects.size();zz++) { - if(effects[zz].z == cursorZ && !effects[zz].isHidden) + if(effects[zz].z == cursorZ /*&& !effects[zz].isHidden*/) { // block coords to tile coords uint16_t x = effects[zz].x - (cursorX * 16); @@ -562,10 +574,14 @@ main(int argc, char *argv[]) //iterate through the bits for (uint32_t k = 0; k< 16;k++) { + /* if(tileTypeTable[blocks[1][1].tiletypes[k][j]].m != VEIN) continue; + */ + /* if(blocks[1][1].designation[k][j].bits.hidden) continue; + */ // and the bit array with a one-bit mask, check if the bit is set bool set = !!(((1 << k) & veinVector[realvein].assignment[j]) >> k); if(set) @@ -575,7 +591,7 @@ main(int argc, char *argv[]) } } gotoxy(0,51); - cprintf("Mineral: %s",stonetypes[veinVector[vein].type].name); + cprintf("Mineral: %s",stonetypes[veinVector[vein].type].id); } else { diff --git a/library/DFHackAPI.cpp b/library/DFHackAPI.cpp deleted file mode 100644 index fbd659f3c..000000000 --- a/library/DFHackAPI.cpp +++ /dev/null @@ -1,1889 +0,0 @@ -/* -www.sourceforge.net/projects/dfhack -Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any -damages arising from the use of this software. - -Permission is granted to anyone to use this software for any -purpose, including commercial applications, and to alter it and -redistribute it freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must -not claim that you wrote the original software. If you use this -software in a product, an acknowledgment in the product documentation -would be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and -must not be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source -distribution. -*/ - -#include "DFCommonInternal.h" -#include -#include -#include -#include -using namespace DFHack; - -/* -FIXME: memset to 0? -*/ -class API::Private -{ -public: - Private() - : block (NULL) - , pm (NULL), p (NULL), offset_descriptor (NULL) - , p_cons (NULL), p_bld (NULL), p_veg (NULL) - {} - - void readName(t_name & name, uint32_t address); - // get the name offsets - bool InitReadNames(); - - uint32_t * block; - uint32_t x_block_count, y_block_count, z_block_count; - uint32_t regionX, regionY, regionZ; - uint32_t worldSizeX, worldSizeY; - - uint32_t tile_type_offset; - uint32_t designation_offset; - uint32_t occupancy_offset; - uint32_t block_flags_offset; - uint32_t biome_stuffs; - uint32_t veinvector; - uint32_t veinsize; - uint32_t vein_mineral_vptr; - uint32_t vein_ice_vptr; - - uint32_t maps_module; - - uint32_t window_x_offset; - uint32_t window_y_offset; - uint32_t window_z_offset; - uint32_t cursor_xyz_offset; - uint32_t window_dims_offset; - uint32_t current_cursor_creature_offset; - uint32_t pause_state_offset; - uint32_t view_screen_offset; - uint32_t current_menu_state_offset; - - uint32_t name_firstname_offset; - uint32_t name_nickname_offset; - uint32_t name_words_offset; - - Creatures::creature_offsets creatures; - uint32_t creature_module; - - - uint32_t item_material_offset; - - uint32_t note_foreground_offset; - uint32_t note_background_offset; - uint32_t note_name_offset; - uint32_t note_xyz_offset; - uint32_t hotkey_start; - uint32_t hotkey_mode_offset; - uint32_t hotkey_xyz_offset; - uint32_t hotkey_size; - - uint32_t settlement_name_offset; - uint32_t settlement_world_xy_offset; - uint32_t settlement_local_xy_offset; - - uint32_t dwarf_lang_table_offset; - - ProcessEnumerator* pm; - Process* p; - char * shm_start; - memory_info* offset_descriptor; - vector v_geology[eBiomeCount]; - string xml; - - bool constructionsInited; - bool buildingsInited; - bool effectsInited; - bool vegetationInited; - bool creaturesInited; - bool cursorWindowInited; - bool viewSizeInited; - bool itemsInited; - bool notesInited; - bool namesInited; - bool hotkeyInited; - bool settlementsInited; - bool nameTablesInited; - - uint32_t tree_offset; - DfVector *p_cre; - DfVector *p_cons; - DfVector *p_bld; - DfVector *p_effect; - DfVector *p_veg; - DfVector *p_itm; - DfVector *p_notes; - DfVector *p_settlements; - DfVector *p_current_settlement; -}; - -bool API::Private::InitReadNames() -{ - try - { - name_firstname_offset = offset_descriptor->getOffset("name_firstname"); - name_nickname_offset = offset_descriptor->getOffset("name_nickname"); - name_words_offset = offset_descriptor->getOffset("name_words"); - } - catch(Error::MissingMemoryDefinition) - { - return false; - } - return true; -} - - -void API::Private::readName(t_name & name, uint32_t address) -{ - g_pProcess->readSTLString(address + name_firstname_offset , name.first_name, 128); - g_pProcess->readSTLString(address + name_nickname_offset , name.nickname, 128); - g_pProcess->read(address + name_words_offset ,48, (uint8_t *) name.words); -} - -API::API (const string path_to_xml) - : d (new Private()) -{ - d->xml = QUOT (MEMXML_DATA_PATH); - d->xml += "/"; - d->xml += path_to_xml; - d->constructionsInited = false; - d->creaturesInited = false; - d->buildingsInited = false; - d->effectsInited = false; - d->vegetationInited = false; - d->cursorWindowInited = false; - d->viewSizeInited = false; - d->itemsInited = false; - d->notesInited = false; - d->hotkeyInited = false; - d->namesInited = false; - d->nameTablesInited = false; - d->pm = NULL; - d->shm_start = 0; - - d->maps_module = 0; - d->creature_module = 0; -} - -API::~API() -{ - // FIXME: call all finishread* methods here - Detach(); - delete d; -} - -#define SHMCMD(num) ((shm_cmd *)d->shm_start)[num]->pingpong -#define SHMHDR ((shm_core_hdr *)d->shm_start) -#define SHMMAPSHDR ((Maps::shm_maps_hdr *)d->shm_start) -#define SHMCREATURESHDR ((Creatures::shm_creature_hdr *)d->shm_start) -#define SHMDATA(type) ((type *)(d->shm_start + SHM_HEADER)) - -/*-----------------------------------* - * Init the mapblock pointer array * - *-----------------------------------*/ -bool API::InitMap() -{ - uint32_t map_offset = d->offset_descriptor->getAddress ("map_data"); - uint32_t x_count_offset = d->offset_descriptor->getAddress ("x_count"); - uint32_t y_count_offset = d->offset_descriptor->getAddress ("y_count"); - uint32_t z_count_offset = d->offset_descriptor->getAddress ("z_count"); - - // get the offsets once here - d->tile_type_offset = d->offset_descriptor->getOffset ("type"); - d->designation_offset = d->offset_descriptor->getOffset ("designation"); - d->occupancy_offset = d->offset_descriptor->getOffset ("occupancy"); - d->biome_stuffs = d->offset_descriptor->getOffset ("biome_stuffs"); - - d->veinvector = d->offset_descriptor->getOffset ("v_vein"); - d->veinsize = d->offset_descriptor->getHexValue ("v_vein_size"); - - // these can fail and will be found when looking at the actual veins later - // basically a cache - d->vein_ice_vptr = 0; - d->offset_descriptor->resolveClassnameToVPtr("block_square_event_frozen_liquid", d->vein_ice_vptr); - d->vein_mineral_vptr = 0; - d->offset_descriptor->resolveClassnameToVPtr("block_square_event_mineral",d->vein_mineral_vptr); - - /* - * --> SHM initialization (if possible) <-- - */ - g_pProcess->getModuleIndex("Maps",2,d->maps_module); - - if(d->maps_module) - { - // supply the module with offsets so it can work with them - Maps::maps_offsets *off = SHMDATA(Maps::maps_offsets); - off->biome_stuffs = d->biome_stuffs; - off->designation_offset = d->designation_offset; - off->map_offset = map_offset; - off->occupancy_offset = d->occupancy_offset; - off->tile_type_offset = d->tile_type_offset; - off->vein_ice_vptr = d->vein_ice_vptr; // FIXME: not necessarily true, the shm server side needs a class lookup >_< - off->vein_mineral_vptr = d->vein_mineral_vptr; // FIXME: not necessarily true, the shm server side needs a class lookup >_< - off->veinvector = d->veinvector; - off->x_count_offset = x_count_offset; - off->y_count_offset = y_count_offset; - off->z_count_offset = z_count_offset; - full_barrier - const uint32_t cmd = Maps::MAP_INIT + (d->maps_module << 16); - g_pProcess->SetAndWait(cmd); - //cerr << "Map acceleration enabled!" << endl; - } - - // get the map pointer - uint32_t x_array_loc = g_pProcess->readDWord (map_offset); - if (!x_array_loc) - { - return false; - // FIXME: only throw this due to programmer error, in the other map functions - //throw Error::NoMapLoaded(); - } - - // get the size - uint32_t mx, my, mz; - mx = d->x_block_count = g_pProcess->readDWord (x_count_offset); - my = d->y_block_count = g_pProcess->readDWord (y_count_offset); - mz = d->z_block_count = g_pProcess->readDWord (z_count_offset); - - // test for wrong map dimensions - if (mx == 0 || mx > 48 || my == 0 || my > 48 || mz == 0) - { - throw Error::BadMapDimensions(mx, my); - //return false; - } - - // alloc array for pointers to all blocks - d->block = new uint32_t[mx*my*mz]; - uint32_t *temp_x = new uint32_t[mx]; - uint32_t *temp_y = new uint32_t[my]; - uint32_t *temp_z = new uint32_t[mz]; - - g_pProcess->read (x_array_loc, mx * sizeof (uint32_t), (uint8_t *) temp_x); - for (uint32_t x = 0; x < mx; x++) - { - g_pProcess->read (temp_x[x], my * sizeof (uint32_t), (uint8_t *) temp_y); - // y -> map column - for (uint32_t y = 0; y < my; y++) - { - g_pProcess->read (temp_y[y], - mz * sizeof (uint32_t), - (uint8_t *) (d->block + x*my*mz + y*mz)); - } - } - delete [] temp_x; - delete [] temp_y; - delete [] temp_z; - return true; -} - -bool API::DestroyMap() -{ - if (d->block != NULL) - { - delete [] d->block; - d->block = NULL; - } - return true; -} - -bool API::isValidBlock (uint32_t x, uint32_t y, uint32_t z) -{ - if ( x >= d->x_block_count || y >= d->y_block_count || z >= d->z_block_count) - return false; - return d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z] != 0; -} - -uint32_t API::getBlockPtr (uint32_t x, uint32_t y, uint32_t z) -{ - if ( x >= d->x_block_count || y >= d->y_block_count || z >= d->z_block_count) - return 0; - return d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z]; -} - -bool API::ReadBlock40d(uint32_t x, uint32_t y, uint32_t z, mapblock40d * buffer) -{ - if(d->shm_start && d->maps_module) // ACCELERATE! - { - SHMMAPSHDR->x = x; - SHMMAPSHDR->y = y; - SHMMAPSHDR->z = z; - volatile uint32_t cmd = Maps::MAP_READ_BLOCK_BY_COORDS + (d->maps_module << 16); - if(!g_pProcess->SetAndWait(cmd)) - return false; - memcpy(buffer,SHMDATA(mapblock40d),sizeof(mapblock40d)); - return true; - } - else // plain old block read - { - uint32_t addr = d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z]; - if (addr) - { - g_pProcess->read (addr + d->tile_type_offset, sizeof (buffer->tiletypes), (uint8_t *) buffer->tiletypes); - g_pProcess->read (addr + d->occupancy_offset, sizeof (buffer->occupancy), (uint8_t *) buffer->occupancy); - g_pProcess->read (addr + d->designation_offset, sizeof (buffer->designation), (uint8_t *) buffer->designation); - g_pProcess->read (addr + d->biome_stuffs, sizeof (buffer->biome_indices), (uint8_t *) buffer->biome_indices); - buffer->origin = addr; - uint32_t addr_of_struct = g_pProcess->readDWord(addr); - buffer->blockflags.whole = g_pProcess->readDWord(addr_of_struct); - return true; - } - return false; - } -} - - -// 256 * sizeof(uint16_t) -bool API::ReadTileTypes (uint32_t x, uint32_t y, uint32_t z, tiletypes40d *buffer) -{ - uint32_t addr = d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z]; - if (addr) - { - g_pProcess->read (addr + d->tile_type_offset, 256 * sizeof (uint16_t), (uint8_t *) buffer); - return true; - } - return false; -} - -bool API::ReadDirtyBit(uint32_t x, uint32_t y, uint32_t z, bool &dirtybit) -{ - uint32_t addr = d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z]; - if(addr) - { - uint32_t addr_of_struct = g_pProcess->readDWord(addr); - dirtybit = g_pProcess->readDWord(addr_of_struct) & 1; - return true; - } - return false; -} - -bool API::WriteDirtyBit(uint32_t x, uint32_t y, uint32_t z, bool dirtybit) -{ - uint32_t addr = d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z]; - if (addr) - { - uint32_t addr_of_struct = g_pProcess->readDWord(addr); - uint32_t dirtydword = g_pProcess->readDWord(addr_of_struct); - dirtydword &= 0xFFFFFFFE; - dirtydword |= (uint32_t) dirtybit; - g_pProcess->writeDWord (addr_of_struct, dirtydword); - return true; - } - return false; -} - -/// read/write the block flags -bool API::ReadBlockFlags(uint32_t x, uint32_t y, uint32_t z, t_blockflags &blockflags) -{ - uint32_t addr = d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z]; - if(addr) - { - uint32_t addr_of_struct = g_pProcess->readDWord(addr); - blockflags.whole = g_pProcess->readDWord(addr_of_struct); - return true; - } - return false; -} -bool API::WriteBlockFlags(uint32_t x, uint32_t y, uint32_t z, t_blockflags blockflags) -{ - uint32_t addr = d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z]; - if (addr) - { - uint32_t addr_of_struct = g_pProcess->readDWord(addr); - g_pProcess->writeDWord (addr_of_struct, blockflags.whole); - return true; - } - return false; -} - -bool API::ReadDesignations (uint32_t x, uint32_t y, uint32_t z, designations40d *buffer) -{ - uint32_t addr = d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z]; - if (addr) - { - g_pProcess->read (addr + d->designation_offset, 256 * sizeof (uint32_t), (uint8_t *) buffer); - return true; - } - return false; -} - - -// 256 * sizeof(uint32_t) -bool API::ReadOccupancy (uint32_t x, uint32_t y, uint32_t z, occupancies40d *buffer) -{ - uint32_t addr = d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z]; - if (addr) - { - g_pProcess->read (addr + d->occupancy_offset, 256 * sizeof (uint32_t), (uint8_t *) buffer); - return true; - } - return false; -} - - -// 256 * sizeof(uint16_t) -bool API::WriteTileTypes (uint32_t x, uint32_t y, uint32_t z, tiletypes40d *buffer) -{ - uint32_t addr = d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z]; - if (addr) - { - g_pProcess->write (addr + d->tile_type_offset, 256 * sizeof (uint16_t), (uint8_t *) buffer); - return true; - } - return false; -} - -bool API::getCurrentCursorCreature(uint32_t & creature_index) -{ - if(!d->cursorWindowInited) return false; - creature_index = g_pProcess->readDWord(d->current_cursor_creature_offset); - return true; -} -// 256 * sizeof(uint32_t) -bool API::WriteDesignations (uint32_t x, uint32_t y, uint32_t z, designations40d *buffer) -{ - uint32_t addr = d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z]; - if (addr) - { - g_pProcess->write (addr + d->designation_offset, 256 * sizeof (uint32_t), (uint8_t *) buffer); - return true; - } - return false; -} - -// 256 * sizeof(uint32_t) -bool API::WriteOccupancy (uint32_t x, uint32_t y, uint32_t z, occupancies40d *buffer) -{ - uint32_t addr = d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z]; - if (addr) - { - g_pProcess->write (addr + d->occupancy_offset, 256 * sizeof (uint32_t), (uint8_t *) buffer); - return true; - } - return false; -} - -// FIXME: this is bad. determine the real size! -//16 of them? IDK... there's probably just 7. Reading more doesn't cause errors as it's an array nested inside a block -// 16 * sizeof(uint8_t) -bool API::ReadRegionOffsets (uint32_t x, uint32_t y, uint32_t z, biome_indices40d *buffer) -{ - uint32_t addr = d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z]; - if (addr) - { - g_pProcess->read (addr + d->biome_stuffs, 16 * sizeof (uint8_t), (uint8_t *) buffer); - return true; - } - return false; -} - -// veins of a block, expects empty vein vectors -bool API::ReadVeins(uint32_t x, uint32_t y, uint32_t z, vector & veins, vector & ices) -{ - uint32_t addr = d->block[x*d->y_block_count*d->z_block_count + y*d->z_block_count + z]; - veins.clear(); - ices.clear(); - if (addr && d->veinvector && d->veinsize) - { - // veins are stored as a vector of pointers to veins - /*pointer is 4 bytes! we work with a 32bit program here, no matter what architecture we compile khazad for*/ - DfVector p_veins (d->p, addr + d->veinvector, 4); - uint32_t size = p_veins.getSize(); - veins.reserve (size); - - // read all veins - for (uint32_t i = 0; i < size;i++) - { - t_vein v; - t_frozenliquidvein fv; - - // read the vein pointer from the vector - uint32_t temp = * (uint32_t *) p_veins[i]; - uint32_t type = g_pProcess->readDWord(temp); -try_again: - if(type == d->vein_mineral_vptr) - { - // read the vein data (dereference pointer) - g_pProcess->read (temp, sizeof(t_vein), (uint8_t *) &v); - v.address_of = temp; - // store it in the vector - veins.push_back (v); - } - else if(type == d->vein_ice_vptr) - { - // read the ice vein data (dereference pointer) - g_pProcess->read (temp, sizeof(t_frozenliquidvein), (uint8_t *) &fv); - // store it in the vector - ices.push_back (fv); - } - else if(g_pProcess->readClassName(type) == "block_square_event_frozen_liquid") - { - d->vein_ice_vptr = type; - goto try_again; - } - else if(g_pProcess->readClassName(type) == "block_square_event_mineral") - { - d->vein_mineral_vptr = type; - goto try_again; - } - } - return true; - } - return false; -} - - -// getter for map size -void API::getSize (uint32_t& x, uint32_t& y, uint32_t& z) -{ - x = d->x_block_count; - y = d->y_block_count; - z = d->z_block_count; -} - -bool API::ReadWoodMatgloss (vector & woods) -{ - - int matgloss_address = d->offset_descriptor->getAddress ("matgloss"); - int matgloss_wood_name_offset = d->offset_descriptor->getOffset("matgloss_wood_name"); - // TODO: find flag for autumnal coloring? - DfVector p_matgloss(d->p, matgloss_address, 4); - - woods.clear(); - - t_matgloss mat; - // TODO: use brown? - mat.fore = 7; - mat.back = 0; - mat.bright = 0; - uint32_t size = p_matgloss.getSize(); - for (uint32_t i = 0; i < size ;i++) - { - // read the matgloss pointer from the vector into temp - uint32_t temp = * (uint32_t *) p_matgloss[i]; - // read the string pointed at by - /* - fill_char_buf(mat.id, d->p->readSTLString(temp)); // reads a C string given an address - */ - d->p->readSTLString (temp, mat.id, 128); - d->p->readSTLString (temp+matgloss_wood_name_offset, mat.name, 128); - woods.push_back (mat); - } - return true; -} - -bool API::ReadStoneMatgloss (vector & stones) -{ - memory_info * minfo = d->offset_descriptor; - int matgloss_address = minfo->getAddress ("matgloss"); - int matgloss_offset = minfo->getHexValue ("matgloss_skip"); - int matgloss_colors = minfo->getOffset ("matgloss_stone_color"); - int matgloss_stone_name_offset = minfo->getOffset("matgloss_stone_name"); - - DfVector p_matgloss (d->p, matgloss_address + matgloss_offset, 4); - - uint32_t size = p_matgloss.getSize(); - stones.resize (0); - stones.reserve (size); - for (uint32_t i = 0; i < size;i++) - { - // read the matgloss pointer from the vector into temp - uint32_t temp = * (uint32_t *) p_matgloss[i]; - // read the string pointed at by - t_matgloss mat; - //fill_char_buf(mat.id, d->p->readSTLString(temp)); // reads a C string given an address - d->p->readSTLString (temp, mat.id, 128); - d->p->readSTLString (temp+matgloss_stone_name_offset, mat.name, 128); - mat.fore = (uint8_t) g_pProcess->readWord (temp + matgloss_colors); - mat.back = (uint8_t) g_pProcess->readWord (temp + matgloss_colors + 2); - mat.bright = (uint8_t) g_pProcess->readWord (temp + matgloss_colors + 4); - stones.push_back (mat); - } - return true; -} - - -bool API::ReadMetalMatgloss (vector & metals) -{ - memory_info * minfo = d->offset_descriptor; - int matgloss_address = minfo->getAddress ("matgloss"); - int matgloss_offset = minfo->getHexValue ("matgloss_skip"); - int matgloss_colors = minfo->getOffset ("matgloss_metal_color"); - int matgloss_metal_name_offset = minfo->getOffset("matgloss_metal_name"); - DfVector p_matgloss(d->p, matgloss_address + matgloss_offset * 3, 4); - - metals.clear(); - - for (uint32_t i = 0; i < p_matgloss.getSize();i++) - { - // read the matgloss pointer from the vector into temp - uint32_t temp = * (uint32_t *) p_matgloss[i]; - // read the string pointed at by - t_matgloss mat; - //fill_char_buf(mat.id, d->p->readSTLString(temp)); // reads a C string given an address - d->p->readSTLString (temp, mat.id, 128); - d->p->readSTLString (temp+matgloss_metal_name_offset, mat.name, 128); - mat.fore = (uint8_t) g_pProcess->readWord (temp + matgloss_colors); - mat.back = (uint8_t) g_pProcess->readWord (temp + matgloss_colors + 2); - mat.bright = (uint8_t) g_pProcess->readWord (temp + matgloss_colors + 4); - metals.push_back (mat); - } - return true; -} - -bool API::ReadPlantMatgloss (vector & plants) -{ - memory_info * minfo = d->offset_descriptor; - int matgloss_address = minfo->getAddress ("matgloss"); - int matgloss_offset = minfo->getHexValue ("matgloss_skip"); - int matgloss_plant_name_offset = minfo->getOffset("matgloss_plant_name"); - DfVector p_matgloss(d->p, matgloss_address + matgloss_offset * 2, 4); - - plants.clear(); - - // TODO: use green? - t_matgloss mat; - mat.fore = 7; - mat.back = 0; - mat.bright = 0; - for (uint32_t i = 0; i < p_matgloss.getSize();i++) - { - // read the matgloss pointer from the vector into temp - uint32_t temp = * (uint32_t *) p_matgloss[i]; - // read the string pointed at by - //fill_char_buf(mat.id, d->p->readSTLString(temp)); // reads a C string given an address - d->p->readSTLString (temp, mat.id, 128); - d->p->readSTLString (temp+matgloss_plant_name_offset, mat.name, 128); - plants.push_back (mat); - } - return true; -} - -bool API::ReadPlantMatgloss (vector & plants) -{ - memory_info * minfo = d->offset_descriptor; - int matgloss_address = minfo->getAddress ("matgloss"); - int matgloss_offset = minfo->getHexValue ("matgloss_skip"); - int matgloss_plant_name_offset = minfo->getOffset("matgloss_plant_name"); - int matgloss_plant_drink_offset = minfo->getOffset("matgloss_plant_drink"); - int matgloss_plant_food_offset = minfo->getOffset("matgloss_plant_food"); - int matgloss_plant_extract_offset = minfo->getOffset("matgloss_plant_extract"); - DfVector p_matgloss(d->p, matgloss_address + matgloss_offset * 2, 4); - - plants.clear(); - - // TODO: use green? - t_matglossPlant mat; - mat.fore = 7; - mat.back = 0; - mat.bright = 0; - for (uint32_t i = 0; i < p_matgloss.getSize();i++) - { - // read the matgloss pointer from the vector into temp - uint32_t temp = * (uint32_t *) p_matgloss[i]; - // read the string pointed at by - //fill_char_buf(mat.id, d->p->readSTLString(temp)); // reads a C string given an address - d->p->readSTLString (temp, mat.id, 128); - d->p->readSTLString (temp+matgloss_plant_name_offset, mat.name, 128); - d->p->readSTLString (temp+matgloss_plant_drink_offset, mat.drink_name, 128); - d->p->readSTLString (temp+matgloss_plant_food_offset, mat.food_name, 128); - d->p->readSTLString (temp+matgloss_plant_extract_offset, mat.extract_name, 128); - - //d->p->readSTLString (temp - plants.push_back (mat); - } - return true; -} - -bool API::ReadCreatureMatgloss (vector & creatures) -{ - memory_info * minfo = d->offset_descriptor; - int matgloss_address = minfo->getAddress ("matgloss"); - int matgloss_offset = minfo->getHexValue ("matgloss_skip"); - int matgloss_creature_name_offset = minfo->getOffset("matgloss_creature_name"); - DfVector p_matgloss (d->p, matgloss_address + matgloss_offset * 6, 4); - - creatures.clear(); - - // TODO: use green? - t_matgloss mat; - mat.fore = 7; - mat.back = 0; - mat.bright = 0; - for (uint32_t i = 0; i < p_matgloss.getSize();i++) - { - // read the matgloss pointer from the vector into temp - uint32_t temp = * (uint32_t *) p_matgloss[i]; - // read the string pointed at by - //fill_char_buf(mat.id, d->p->readSTLString(temp)); // reads a C string given an address - d->p->readSTLString (temp, mat.id, 128); - d->p->readSTLString (temp+matgloss_creature_name_offset, mat.name, 128); - creatures.push_back (mat); - } - return true; -} - - -//vector v_geology[eBiomeCount]; -bool API::ReadGeology (vector < vector >& assign) -{ - memory_info * minfo = d->offset_descriptor; - // get needed addresses and offsets. Now this is what I call crazy. - int region_x_offset = minfo->getAddress ("region_x"); - int region_y_offset = minfo->getAddress ("region_y"); - int region_z_offset = minfo->getAddress ("region_z"); - int world_offset = minfo->getAddress ("world"); - int world_regions_offset = minfo->getOffset ("w_regions_arr"); - int region_size = minfo->getHexValue ("region_size"); - int region_geo_index_offset = minfo->getOffset ("region_geo_index_off"); - int world_geoblocks_offset = minfo->getOffset ("w_geoblocks"); - int world_size_x = minfo->getOffset ("world_size_x"); - int world_size_y = minfo->getOffset ("world_size_y"); - int geolayer_geoblock_offset = minfo->getOffset ("geolayer_geoblock_offset"); - - uint32_t regionX, regionY, regionZ; - uint16_t worldSizeX, worldSizeY; - - // read position of the region inside DF world - g_pProcess->readDWord (region_x_offset, regionX); - g_pProcess->readDWord (region_y_offset, regionY); - g_pProcess->readDWord (region_z_offset, regionZ); - - // get world size - g_pProcess->readWord (world_offset + world_size_x, worldSizeX); - g_pProcess->readWord (world_offset + world_size_y, worldSizeY); - - // get pointer to first part of 2d array of regions - uint32_t regions = g_pProcess->readDWord (world_offset + world_regions_offset); - - // read the geoblock vector - DfVector geoblocks (d->p, world_offset + world_geoblocks_offset, 4); - - // iterate over 8 surrounding regions + local region - for (int i = eNorthWest; i < eBiomeCount; i++) - { - // check bounds, fix them if needed - int bioRX = regionX / 16 + (i % 3) - 1; - if (bioRX < 0) bioRX = 0; - if (bioRX >= worldSizeX) bioRX = worldSizeX - 1; - int bioRY = regionY / 16 + (i / 3) - 1; - if (bioRY < 0) bioRY = 0; - if (bioRY >= worldSizeY) bioRY = worldSizeY - 1; - - // get pointer to column of regions - uint32_t geoX; - g_pProcess->readDWord (regions + bioRX*4, geoX); - - // get index into geoblock vector - uint16_t geoindex; - g_pProcess->readWord (geoX + bioRY*region_size + region_geo_index_offset, geoindex); - - // get the geoblock from the geoblock vector using the geoindex - // read the matgloss pointer from the vector into temp - uint32_t geoblock_off = * (uint32_t *) geoblocks[geoindex]; - - // get the vector with pointer to layers - DfVector geolayers (d->p, geoblock_off + geolayer_geoblock_offset , 4); // let's hope - // make sure we don't load crap - assert (geolayers.getSize() > 0 && geolayers.getSize() <= 16); - - d->v_geology[i].reserve (geolayers.getSize()); - // finally, read the layer matgloss - for (uint32_t j = 0;j < geolayers.getSize();j++) - { - // read pointer to a layer - uint32_t geol_offset = * (uint32_t *) geolayers[j]; - // read word at pointer + 2, store in our geology vectors - d->v_geology[i].push_back (g_pProcess->readWord (geol_offset + 2)); - } - } - assign.clear(); - assign.reserve (eBiomeCount); -// // TODO: clean this up - for (int i = 0; i < eBiomeCount;i++) - { - assign.push_back (d->v_geology[i]); - } - return true; -} - - -// returns number of buildings, expects v_buildingtypes that will later map t_building.type to its name -bool API::InitReadBuildings ( uint32_t& numbuildings ) -{ - int buildings = 0; - try - { - buildings = d->offset_descriptor->getAddress ("buildings"); - } - catch(Error::MissingMemoryDefinition) - { - return false; - } - d->buildingsInited = true; - d->p_bld = new DfVector (d->p,buildings, 4); - numbuildings = d->p_bld->getSize(); - return true; -} - - -// read one building -bool API::ReadBuilding (const int32_t index, t_building & building) -{ - if(!d->buildingsInited) return false; - - t_building_df40d bld_40d; - - // read pointer from vector at position - uint32_t temp = * (uint32_t *) d->p_bld->at (index); - //d->p_bld->read(index,(uint8_t *)&temp); - - //read building from memory - g_pProcess->read (temp, sizeof (t_building_df40d), (uint8_t *) &bld_40d); - - // transform - int32_t type = -1; - d->offset_descriptor->resolveObjectToClassID (temp, type); - building.origin = temp; - building.vtable = bld_40d.vtable; - building.x1 = bld_40d.x1; - building.x2 = bld_40d.x2; - building.y1 = bld_40d.y1; - building.y2 = bld_40d.y2; - building.z = bld_40d.z; - building.material = bld_40d.material; - building.type = type; - - return true; -} - - -void API::FinishReadBuildings() -{ - if(d->p_bld) - { - delete d->p_bld; - d->p_bld = NULL; - } - d->buildingsInited = false; -} - -bool API::InitReadEffects ( uint32_t & numeffects ) -{ - if(d->effectsInited) - FinishReadEffects(); - int effects = 0; - try - { - effects = d->offset_descriptor->getAddress ("effects_vector"); - } - catch(Error::MissingMemoryDefinition) - { - return false; - } - d->effectsInited = true; - d->p_effect = new DfVector (d->p, effects, 4); - numeffects = d->p_effect->getSize(); - return true; -} - -bool API::ReadEffect(const uint32_t index, t_effect_df40d & effect) -{ - if(!d->effectsInited) - return false; - if(index >= d->p_effect->getSize()) - return false; - - // read pointer from vector at position - uint32_t temp = * (uint32_t *) d->p_effect->at (index); - //read effect from memory - g_pProcess->read (temp, sizeof (t_effect_df40d), (uint8_t *) &effect); - return true; -} - -// use with care! -bool API::WriteEffect(const uint32_t index, const t_effect_df40d & effect) -{ - if(!d->effectsInited) - return false; - if(index >= d->p_effect->getSize()) - return false; - // read pointer from vector at position - uint32_t temp = * (uint32_t *) d->p_effect->at (index); - // write effect to memory - g_pProcess->write(temp,sizeof(t_effect_df40d), (uint8_t *) &effect); - return true; -} - -void API::FinishReadEffects() -{ - if(d->p_effect) - { - delete d->p_effect; - d->p_effect = NULL; - } - d->effectsInited = false; -} - - -//TODO: maybe do construction reading differently - this could go slow with many of them. -// returns number of constructions, prepares a vector, returns total number of constructions -bool API::InitReadConstructions(uint32_t & numconstructions) -{ - int constructions = 0; - try - { - constructions = d->offset_descriptor->getAddress ("constructions"); - } - catch(Error::MissingMemoryDefinition) - { - return false; - } - d->p_cons = new DfVector (d->p,constructions, 4); - d->constructionsInited = true; - numconstructions = d->p_cons->getSize(); - return true; -} - - -bool API::ReadConstruction (const int32_t index, t_construction & construction) -{ - if(!d->constructionsInited) return false; - t_construction_df40d c_40d; - - // read pointer from vector at position - uint32_t temp = * (uint32_t *) d->p_cons->at (index); - - //read construction from memory - g_pProcess->read (temp, sizeof (t_construction_df40d), (uint8_t *) &c_40d); - - // transform - construction.x = c_40d.x; - construction.y = c_40d.y; - construction.z = c_40d.z; - construction.material = c_40d.material; - - return true; -} - - -void API::FinishReadConstructions() -{ - if(d->p_cons) - { - delete d->p_cons; - d->p_cons = NULL; - } - d->constructionsInited = false; -} - - -bool API::InitReadVegetation(uint32_t & numplants) -{ - try - { - int vegetation = d->offset_descriptor->getAddress ("vegetation"); - d->tree_offset = d->offset_descriptor->getOffset ("tree_desc_offset"); - - d->vegetationInited = true; - d->p_veg = new DfVector (d->p, vegetation, 4); - numplants = d->p_veg->getSize(); - return true; - } - catch (Error::MissingMemoryDefinition&) - { - d->vegetationInited = false; - numplants = 0; - throw; - } -} - - -bool API::ReadVegetation (const int32_t index, t_tree_desc & shrubbery) -{ - if(!d->vegetationInited) - return false; - // read pointer from vector at position - uint32_t temp = * (uint32_t *) d->p_veg->at (index); - //read construction from memory - g_pProcess->read (temp + d->tree_offset, sizeof (t_tree_desc), (uint8_t *) &shrubbery); - // FIXME: this is completely wrong. type isn't just tree/shrub but also different kinds of trees. stuff that grows around ponds has its own type ID - if (shrubbery.material.type == 3) shrubbery.material.type = 2; - return true; -} - - -void API::FinishReadVegetation() -{ - if(d->p_veg) - { - delete d->p_veg; - d->p_veg = 0; - } - d->vegetationInited = false; -} - - -bool API::InitReadCreatures( uint32_t &numcreatures ) -{ - if(!d->InitReadNames()) return false; - try - { - memory_info * minfo = d->offset_descriptor; - Creatures::creature_offsets & off = d->creatures; - off.creature_vector = minfo->getAddress ("creatures"); - off.creature_pos_offset = minfo->getOffset ("creature_position"); - off.creature_type_offset = minfo->getOffset ("creature_race"); - off.creature_flags1_offset = minfo->getOffset ("creature_flags1"); - off.creature_flags2_offset = minfo->getOffset ("creature_flags2"); - off.creature_name_offset = minfo->getOffset ("creature_name"); - off.creature_custom_profession_offset = minfo->getOffset ("creature_custom_profession"); - off.creature_profession_offset = minfo->getOffset ("creature_profession"); - off.creature_sex_offset = minfo->getOffset ("creature_sex"); - off.creature_id_offset = minfo->getOffset ("creature_id"); - off.creature_squad_name_offset = minfo->getOffset ("creature_squad_name"); - off.creature_squad_leader_id_offset = minfo->getOffset ("creature_squad_leader_id"); - off.creature_money_offset = minfo->getOffset ("creature_money"); - off.creature_current_job_offset = minfo->getOffset ("creature_current_job"); - off.creature_current_job_id_offset = minfo->getOffset ("current_job_id"); - off.creature_strength_offset = minfo->getOffset ("creature_strength"); - off.creature_agility_offset = minfo->getOffset ("creature_agility"); - off.creature_toughness_offset = minfo->getOffset ("creature_toughness"); - off.creature_skills_offset = minfo->getOffset ("creature_skills"); - off.creature_labors_offset = minfo->getOffset ("creature_labors"); - off.creature_happiness_offset = minfo->getOffset ("creature_happiness"); - off.creature_traits_offset = minfo->getOffset ("creature_traits"); - off.creature_likes_offset = minfo->getOffset("creature_likes"); - off.creature_artifact_name_offset = minfo->getOffset("creature_artifact_name"); - off.creature_mood_offset = minfo->getOffset("creature_mood"); - - off.creature_pregnancy_offset = minfo->getOffset("creature_pregnancy"); - off.creature_blood_max_offset = minfo->getOffset("creature_blood_max"); - off.creature_blood_current_offset = minfo->getOffset("creature_blood_current"); - off.creature_bleed_offset = minfo->getOffset("creature_bleed"); - - // name offsets for the creature module - off.name_firstname_offset = minfo->getOffset("name_firstname"); - off.name_nickname_offset = minfo->getOffset("name_nickname"); - off.name_words_offset = minfo->getOffset("name_words"); - - // HACK: vector correction - off.vector_correct = minfo->getOffset("hacked_vector_start"); - - d->p_cre = new DfVector (d->p, off.creature_vector, 4); - d->creaturesInited = true; - numcreatures = d->p_cre->getSize(); - - /* - * --> SHM initialization (if possible) <-- - */ - g_pProcess->getModuleIndex("Creatures40d",1,d->creature_module); - - if(d->creature_module) - { - // supply the module with offsets so it can work with them - memcpy(SHMDATA(Creatures::creature_offsets),&d->creatures,sizeof(Creatures::creature_offsets)); - const uint32_t cmd = Creatures::CREATURE_INIT + (d->creature_module << 16); - g_pProcess->SetAndWait(cmd); - //cerr << "Creature acceleration enabled!" << endl; - } - /* - else - { - cerr << "Creature acceleration NOT enabled!" << endl; - } - */ - return true; - } - catch (Error::MissingMemoryDefinition&) - { - d->creaturesInited = false; - numcreatures = 0; - throw; - } -} -bool API::InitReadNotes( uint32_t &numnotes ) -{ - try - { - memory_info * minfo = d->offset_descriptor; - int notes = minfo->getAddress ("notes"); - d->note_foreground_offset = minfo->getOffset ("note_foreground"); - d->note_background_offset = minfo->getOffset ("note_background"); - d->note_name_offset = minfo->getOffset ("note_name"); - d->note_xyz_offset = minfo->getOffset ("note_xyz"); - - d->p_notes = new DfVector (d->p, notes, 4); - d->notesInited = true; - numnotes = d->p_notes->getSize(); - return true; - } - catch (Error::MissingMemoryDefinition&) - { - d->notesInited = false; - numnotes = 0; - throw; - } -} -bool API::ReadNote (const int32_t index, t_note & note) -{ - if(!d->notesInited) return false; - // read pointer from vector at position - uint32_t temp = * (uint32_t *) d->p_notes->at (index); - note.symbol = g_pProcess->readByte(temp); - note.foreground = g_pProcess->readWord(temp + d->note_foreground_offset); - note.background = g_pProcess->readWord(temp + d->note_background_offset); - d->p->readSTLString (temp + d->note_name_offset, note.name, 128); - g_pProcess->read (temp + d->note_xyz_offset, 3*sizeof (uint16_t), (uint8_t *) ¬e.x); - return true; -} -bool API::InitReadSettlements( uint32_t & numsettlements ) -{ - if(!d->InitReadNames()) return false; - try - { - - memory_info * minfo = d->offset_descriptor; - int allSettlements = minfo->getAddress ("settlements"); - int currentSettlement = minfo->getAddress("settlement_current"); - d->settlement_name_offset = minfo->getOffset ("settlement_name"); - d->settlement_world_xy_offset = minfo->getOffset ("settlement_world_xy"); - d->settlement_local_xy_offset = minfo->getOffset ("settlement_local_xy"); - - d->p_settlements = new DfVector (d->p, allSettlements, 4); - d->p_current_settlement = new DfVector(d->p, currentSettlement,4); - d->settlementsInited = true; - numsettlements = d->p_settlements->getSize(); - return true; - } - catch (Error::MissingMemoryDefinition&) - { - d->settlementsInited = false; - numsettlements = 0; - throw; - } -} -bool API::ReadSettlement(const int32_t index, t_settlement & settlement) -{ - if(!d->settlementsInited) return false; - if(!d->p_settlements->getSize()) return false; - - // read pointer from vector at position - uint32_t temp = * (uint32_t *) d->p_settlements->at (index); - settlement.origin = temp; - d->readName(settlement.name, temp + d->settlement_name_offset); - g_pProcess->read(temp + d->settlement_world_xy_offset, 2 * sizeof(int16_t), (uint8_t *) &settlement.world_x); - g_pProcess->read(temp + d->settlement_local_xy_offset, 4 * sizeof(int16_t), (uint8_t *) &settlement.local_x1); - return true; -} - -bool API::ReadCurrentSettlement(t_settlement & settlement) -{ - if(!d->settlementsInited) return false; - if(!d->p_current_settlement->getSize()) return false; - - uint32_t temp = * (uint32_t *) d->p_current_settlement->at(0); - settlement.origin = temp; - d->readName(settlement.name, temp + d->settlement_name_offset); - g_pProcess->read(temp + d->settlement_world_xy_offset, 2 * sizeof(int16_t), (uint8_t *) &settlement.world_x); - g_pProcess->read(temp + d->settlement_local_xy_offset, 4 * sizeof(int16_t), (uint8_t *) &settlement.local_x1); - return true; -} - -void API::FinishReadSettlements() -{ - if(d->p_settlements) - { - delete d->p_settlements; - d->p_settlements = NULL; - } - if(d->p_current_settlement) - { - delete d->p_current_settlement; - d->p_current_settlement = NULL; - } - d->settlementsInited = false; -} - - -bool API::InitReadHotkeys( ) -{ - try - { - memory_info * minfo = d->offset_descriptor; - d->hotkey_start = minfo->getAddress("hotkey_start"); - d->hotkey_mode_offset = minfo->getOffset ("hotkey_mode"); - d->hotkey_xyz_offset = minfo->getOffset("hotkey_xyz"); - d->hotkey_size = minfo->getHexValue("hotkey_size"); - - d->hotkeyInited = true; - return true; - } - catch (Error::MissingMemoryDefinition&) - { - d->hotkeyInited = false; - throw; - } -} -bool API::ReadHotkeys(t_hotkey hotkeys[]) -{ - if (!d->hotkeyInited) return false; - uint32_t currHotkey = d->hotkey_start; - for(uint32_t i = 0 ; i < NUM_HOTKEYS ;i++) - { - d->p->readSTLString(currHotkey,hotkeys[i].name,10); - hotkeys[i].mode = g_pProcess->readWord(currHotkey+d->hotkey_mode_offset); - g_pProcess->read (currHotkey + d->hotkey_xyz_offset, 3*sizeof (int32_t), (uint8_t *) &hotkeys[i].x); - currHotkey+=d->hotkey_size; - } - return true; -} -// returns index of creature actually read or -1 if no creature can be found -int32_t API::ReadCreatureInBox (int32_t index, t_creature & furball, - const uint16_t x1, const uint16_t y1, const uint16_t z1, - const uint16_t x2, const uint16_t y2, const uint16_t z2) -{ - if (!d->creaturesInited) return -1; - if(d->creature_module) - { - // supply the module with offsets so it can work with them - SHMCREATURESHDR->index = index; - SHMCREATURESHDR->x = x1; - SHMCREATURESHDR->y = y1; - SHMCREATURESHDR->z = z1; - SHMCREATURESHDR->x2 = x2; - SHMCREATURESHDR->y2 = y2; - SHMCREATURESHDR->z2 = z2; - const uint32_t cmd = Creatures::CREATURE_FIND_IN_BOX + (d->creature_module << 16); - g_pProcess->SetAndWait(cmd); - if(SHMCREATURESHDR->index != -1) - memcpy(&furball,SHMDATA(void),sizeof(t_creature)); - return SHMCREATURESHDR->index; - } - else - { - uint16_t coords[3]; - uint32_t size = d->p_cre->getSize(); - while (uint32_t(index) < size) - { - // read pointer from vector at position - uint32_t temp = * (uint32_t *) d->p_cre->at (index); - g_pProcess->read (temp + d->creatures.creature_pos_offset, 3 * sizeof (uint16_t), (uint8_t *) &coords); - if (coords[0] >= x1 && coords[0] < x2) - { - if (coords[1] >= y1 && coords[1] < y2) - { - if (coords[2] >= z1 && coords[2] < z2) - { - ReadCreature (index, furball); - return index; - } - } - } - index++; - } - return -1; - } -} - -bool API::getItemIndexesInBox(vector &indexes, - const uint16_t x1, const uint16_t y1, const uint16_t z1, - const uint16_t x2, const uint16_t y2, const uint16_t z2) -{ - if(!d->itemsInited) return false; - indexes.clear(); - uint32_t size = d->p_itm->getSize(); - struct temp2{ - uint16_t coords[3]; - uint32_t flags; - }; - temp2 temp2; - for(uint32_t i =0;ip_itm->at(i); - g_pProcess->read(temp+sizeof(uint32_t),5 * sizeof(uint16_t), (uint8_t *) &temp2); - if(temp2.flags & (1 << 0)){ - if (temp2.coords[0] >= x1 && temp2.coords[0] < x2) - { - if (temp2.coords[1] >= y1 && temp2.coords[1] < y2) - { - if (temp2.coords[2] >= z1 && temp2.coords[2] < z2) - { - indexes.push_back(i); - } - } - } - } - } - return true; -} - -bool API::ReadCreature (const int32_t index, t_creature & furball) -{ - if(!d->creaturesInited) return false; - if(d->creature_module) - { - // supply the module with offsets so it can work with them - SHMCREATURESHDR->index = index; - const uint32_t cmd = Creatures::CREATURE_AT_INDEX + (d->creature_module << 16); - g_pProcess->SetAndWait(cmd); - memcpy(&furball,SHMDATA(t_creature),sizeof(t_creature)); - // cerr << "creature read from SHM!" << endl; - return true; - } - // read pointer from vector at position - uint32_t temp = * (uint32_t *) d->p_cre->at (index); - furball.origin = temp; - Creatures::creature_offsets &offs = d->creatures; - //read creature from memory - g_pProcess->read (temp + offs.creature_pos_offset, 3 * sizeof (uint16_t), (uint8_t *) & (furball.x)); // xyz really - g_pProcess->readDWord (temp + offs.creature_type_offset, furball.type); - g_pProcess->readDWord (temp + offs.creature_flags1_offset, furball.flags1.whole); - g_pProcess->readDWord (temp + offs.creature_flags2_offset, furball.flags2.whole); - // names - d->readName(furball.name,temp + offs.creature_name_offset); - d->readName(furball.squad_name, temp + offs.creature_squad_name_offset); - d->readName(furball.artifact_name, temp + offs.creature_artifact_name_offset); - // custom profession - fill_char_buf (furball.custom_profession, d->p->readSTLString (temp + offs.creature_custom_profession_offset)); - - // labors - g_pProcess->read (temp + offs.creature_labors_offset, NUM_CREATURE_LABORS, furball.labors); - // traits - g_pProcess->read (temp + offs.creature_traits_offset, sizeof (uint16_t) * NUM_CREATURE_TRAITS, (uint8_t *) &furball.traits); - // learned skills - DfVector skills (d->p, temp + offs.creature_skills_offset, 4 ); - furball.numSkills = skills.getSize(); - for (uint32_t i = 0; i < furball.numSkills;i++) - { - uint32_t temp2 = * (uint32_t *) skills[i]; - //skills.read(i, (uint8_t *) &temp2); - // a byte: this gives us 256 skills maximum. - furball.skills[i].id = g_pProcess->readByte (temp2); - furball.skills[i].rating = g_pProcess->readByte (temp2 + 4); - furball.skills[i].experience = g_pProcess->readWord (temp2 + 8); - } - // profession - furball.profession = g_pProcess->readByte (temp + offs.creature_profession_offset); - // current job HACK: the job object isn't cleanly represented here - uint32_t jobIdAddr = g_pProcess->readDWord (temp + offs.creature_current_job_offset); - - if (jobIdAddr) - { - furball.current_job.active = true; - furball.current_job.jobId = g_pProcess->readByte (jobIdAddr + offs.creature_current_job_id_offset); - } - else - { - furball.current_job.active = false; - } - - //likes - DfVector likes(d->p, temp + offs.creature_likes_offset, 4); - furball.numLikes = likes.getSize(); - for(uint32_t i = 0;iread(temp2,sizeof(t_like),(uint8_t *) &furball.likes[i]); - } - - furball.mood = (int16_t) g_pProcess->readWord (temp + offs.creature_mood_offset); - - - g_pProcess->readDWord (temp + offs.creature_happiness_offset, furball.happiness); - g_pProcess->readDWord (temp + offs.creature_id_offset, furball.id); - g_pProcess->readDWord (temp + offs.creature_agility_offset, furball.agility); - g_pProcess->readDWord (temp + offs.creature_strength_offset, furball.strength); - g_pProcess->readDWord (temp + offs.creature_toughness_offset, furball.toughness); - g_pProcess->readDWord (temp + offs.creature_money_offset, furball.money); - furball.squad_leader_id = (int32_t) g_pProcess->readDWord (temp + offs.creature_squad_leader_id_offset); - g_pProcess->readByte (temp + offs.creature_sex_offset, furball.sex); - - g_pProcess->readDWord(temp + offs.creature_pregnancy_offset, furball.pregnancy_timer); - furball.blood_max = (int32_t) g_pProcess->readDWord(temp + offs.creature_blood_max_offset); - furball.blood_current = (int32_t) g_pProcess->readDWord(temp + offs.creature_blood_current_offset); - g_pProcess->readDWord(temp + offs.creature_bleed_offset, furball.bleed_rate); - - - return true; -} - -bool API::WriteLabors(const uint32_t index, uint8_t labors[NUM_CREATURE_LABORS]) -{ - if(!d->creaturesInited) return false; - uint32_t temp = * (uint32_t *) d->p_cre->at (index); - WriteRaw(temp + d->creatures.creature_labors_offset, NUM_CREATURE_LABORS, labors); -} - -bool API::InitReadNameTables(vector > & translations , vector > & foreign_languages) //(map< string, vector > & nameTable) -{ - try - { - int genericAddress = d->offset_descriptor->getAddress ("language_vector"); - int transAddress = d->offset_descriptor->getAddress ("translation_vector"); - int word_table_offset = d->offset_descriptor->getOffset ("word_table"); - int sizeof_string = d->offset_descriptor->getHexValue ("sizeof_string"); - - DfVector genericVec (d->p, genericAddress, 4); - DfVector transVec (d->p, transAddress, 4); - - translations.resize(10); - for (uint32_t i = 0;i < genericVec.getSize();i++) - { - uint32_t genericNamePtr = * (uint32_t *) genericVec.at (i); - for(int i=0; i<10;i++) - { - string word = d->p->readSTLString (genericNamePtr + i * sizeof_string); - translations[i].push_back (word); - } - } - - foreign_languages.resize(transVec.getSize()); - for (uint32_t i = 0; i < transVec.getSize();i++) - { - uint32_t transPtr = * (uint32_t *) transVec.at (i); - //string transName = d->p->readSTLString (transPtr); - DfVector trans_names_vec (d->p, transPtr + word_table_offset, 4); - for (uint32_t j = 0;j < trans_names_vec.getSize();j++) - { - uint32_t transNamePtr = * (uint32_t *) trans_names_vec.at (j); - string name = d->p->readSTLString (transNamePtr); - foreign_languages[i].push_back (name); - } - } - d->nameTablesInited = true; - return true; - } - catch (Error::MissingMemoryDefinition&) - { - d->nameTablesInited = false; - throw; - } -} - -string API::TranslateName(const DFHack::t_name &name,const std::vector< std::vector > & translations ,const std::vector< std::vector > & foreign_languages, bool inEnglish) -{ - string out; - assert (d->nameTablesInited); - map >::const_iterator it; - - if(!inEnglish) - { - if(name.words[0] >=0 || name.words[1] >=0) - { - if(name.words[0]>=0) out.append(foreign_languages[name.language][name.words[0]]); - if(name.words[1]>=0) out.append(foreign_languages[name.language][name.words[1]]); - out[0] = toupper(out[0]); - } - if(name.words[5] >=0) - { - string word; - for(int i=2;i<=5;i++) - if(name.words[i]>=0) word.append(foreign_languages[name.language][name.words[i]]); - word[0] = toupper(word[0]); - if(out.length() > 0) out.append(" "); - out.append(word); - } - if(name.words[6] >=0) - { - string word; - word.append(foreign_languages[name.language][name.words[6]]); - word[0] = toupper(word[0]); - if(out.length() > 0) out.append(" "); - out.append(word); - } - } - else - { - if(name.words[0] >=0 || name.words[1] >=0) - { - if(name.words[0]>=0) out.append(translations[name.parts_of_speech[0]+1][name.words[0]]); - if(name.words[1]>=0) out.append(translations[name.parts_of_speech[1]+1][name.words[1]]); - out[0] = toupper(out[0]); - } - if(name.words[5] >=0) - { - if(out.length() > 0) - out.append(" the"); - else - out.append("The"); - string word; - for(int i=2;i<=5;i++) - { - if(name.words[i]>=0) - { - word = translations[name.parts_of_speech[i]+1][name.words[i]]; - word[0] = toupper(word[0]); - out.append(" " + word); - } - } - } - if(name.words[6] >=0) - { - if(out.length() > 0) - out.append(" of"); - else - out.append("Of"); - string word; - word.append(translations[name.parts_of_speech[6]+1][name.words[6]]); - word[0] = toupper(word[0]); - out.append(" " + word); - } - } - return out; -} - -void API::FinishReadNameTables() -{ - d->nameTablesInited = false; -} - -void API::FinishReadCreatures() -{ - if(d->p_cre) - { - delete d->p_cre; - d->p_cre = 0; - } - d->creaturesInited = false; - //FinishReadNameTables(); -} -void API::FinishReadNotes() -{ - if(d->p_notes) - { - delete d->p_notes; - d->p_notes = 0; - } - d->notesInited = false; -} - -bool API::Attach() -{ - // detach all processes, destroy manager - if (d->pm == 0) - { - d->pm = new ProcessEnumerator (d->xml); // FIXME: handle bad XML better - } - else - { - d->pm->purge(); - } - - // find a process (ProcessManager can find multiple when used properly) - if (!d->pm->findProcessess()) - { - throw Error::NoProcess(); - //cerr << "couldn't find a suitable process" << endl; - //return false; - } - d->p = (*d->pm) [0]; - if (!d->p->attach()) - { - throw Error::CantAttach(); - //cerr << "couldn't attach to process" << endl; - //return false; // couldn't attach to process, no go - } - d->shm_start = d->p->getSHMStart(); - d->offset_descriptor = d->p->getDescriptor(); - // process is attached, everything went just fine... hopefully - return true; -} - - -bool API::Detach() -{ - if(!d->p) - return false; - if (!d->p->detach()) - { - return false; - } - if (d->pm != NULL) - { - delete d->pm; - } - d->pm = NULL; - d->p = NULL; - d->shm_start = 0; - d->offset_descriptor = NULL; - return true; -} - -bool API::isAttached() -{ - return d->p != NULL; -} - -bool API::Suspend() -{ - return d->p->suspend(); -} -bool API::AsyncSuspend() -{ - return d->p->asyncSuspend(); -} - -bool API::Resume() -{ - return d->p->resume(); -} -bool API::ForceResume() -{ - return d->p->forceresume(); -} -bool API::isSuspended() -{ - return d->p->isSuspended(); -} - -void API::ReadRaw (const uint32_t offset, const uint32_t size, uint8_t *target) -{ - g_pProcess->read (offset, size, target); -} - -void API::WriteRaw (const uint32_t offset, const uint32_t size, uint8_t *source) -{ - g_pProcess->write (offset, size, source); -} - -bool API::InitViewAndCursor() -{ - try - { - d->window_x_offset = d->offset_descriptor->getAddress ("window_x"); - d->window_y_offset = d->offset_descriptor->getAddress ("window_y"); - d->window_z_offset = d->offset_descriptor->getAddress ("window_z"); - d->cursor_xyz_offset = d->offset_descriptor->getAddress ("cursor_xyz"); - d->current_cursor_creature_offset = d->offset_descriptor->getAddress ("current_cursor_creature"); - - d->current_menu_state_offset = d->offset_descriptor->getAddress("current_menu_state"); - d->pause_state_offset = d->offset_descriptor->getAddress ("pause_state"); - d->view_screen_offset = d->offset_descriptor->getAddress ("view_screen"); - - d->cursorWindowInited = true; - return true; - } - catch (Error::MissingMemoryDefinition&) - { - d->cursorWindowInited = false; - throw; - } -} - -bool API::InitViewSize() -{ - try - { - d->window_dims_offset = d->offset_descriptor->getAddress ("window_dims"); - - d->viewSizeInited = true; - return true; - } - catch (Error::MissingMemoryDefinition&) - { - d->viewSizeInited = false; - throw; - } -} - -bool API::getViewCoords (int32_t &x, int32_t &y, int32_t &z) -{ - if (!d->cursorWindowInited) return false; - g_pProcess->readDWord (d->window_x_offset, (uint32_t &) x); - g_pProcess->readDWord (d->window_y_offset, (uint32_t &) y); - g_pProcess->readDWord (d->window_z_offset, (uint32_t &) z); - return true; -} -//FIXME: confine writing of coords to map bounds? -bool API::setViewCoords (const int32_t x, const int32_t y, const int32_t z) -{ - if (!d->cursorWindowInited) return false; - g_pProcess->writeDWord (d->window_x_offset, (uint32_t) x); - g_pProcess->writeDWord (d->window_y_offset, (uint32_t) y); - g_pProcess->writeDWord (d->window_z_offset, (uint32_t) z); - return true; -} - -bool API::getCursorCoords (int32_t &x, int32_t &y, int32_t &z) -{ - if(!d->cursorWindowInited) return false; - int32_t coords[3]; - g_pProcess->read (d->cursor_xyz_offset, 3*sizeof (int32_t), (uint8_t *) coords); - x = coords[0]; - y = coords[1]; - z = coords[2]; - if (x == -30000) return false; - return true; -} -//FIXME: confine writing of coords to map bounds? -bool API::setCursorCoords (const int32_t x, const int32_t y, const int32_t z) -{ - if (!d->cursorWindowInited) return false; - int32_t coords[3] = {x, y, z}; - g_pProcess->write (d->cursor_xyz_offset, 3*sizeof (int32_t), (uint8_t *) coords); - return true; -} -bool API::getWindowSize (int32_t &width, int32_t &height) -{ - if(! d->viewSizeInited) return false; - - int32_t coords[2]; - g_pProcess->read (d->window_dims_offset, 2*sizeof (int32_t), (uint8_t *) coords); - width = coords[0]; - height = coords[1]; - return true; -} -/* -bool API::getClassIDMapping (vector & objecttypes) -{ - if(isAttached()) - { - d->offset_descriptor->getClassIDMapping(objecttypes); - return true; - } - return false; -} -*/ -memory_info *API::getMemoryInfo() -{ - return d->offset_descriptor; -} -Process * API::getProcess() -{ - return d->p; -} - -DFWindow * API::getWindow() -{ - return d->p->getWindow(); -} - -bool API::InitReadItems(uint32_t & numitems) -{ - try - { - int items = d->offset_descriptor->getAddress ("items"); - d->item_material_offset = d->offset_descriptor->getOffset ("item_materials"); - - d->p_itm = new DfVector (d->p, items, 4); - d->itemsInited = true; - numitems = d->p_itm->getSize(); - return true; - } - catch (Error::MissingMemoryDefinition&) - { - d->itemsInited = false; - numitems = 0; - throw; - } -} -bool API::ReadItem (const uint32_t index, t_item & item) -{ - if (!d->itemsInited) return false; - - t_item_df40d item_40d; - - // read pointer from vector at position - uint32_t temp = * (uint32_t *) d->p_itm->at (index); - - //read building from memory - g_pProcess->read (temp, sizeof (t_item_df40d), (uint8_t *) &item_40d); - - // transform - int32_t type = -1; - d->offset_descriptor->resolveObjectToClassID (temp, type); - item.origin = temp; - item.vtable = item_40d.vtable; - item.x = item_40d.x; - item.y = item_40d.y; - item.z = item_40d.z; - item.type = type; - item.ID = item_40d.ID; - item.flags.whole = item_40d.flags; - - //TODO certain item types (creature based, threads, seeds, bags do not have the first matType byte, instead they have the material index only located at 0x68 - g_pProcess->read (temp + d->item_material_offset, sizeof (t_matglossPair), (uint8_t *) &item.material); - //for(int i = 0; i < 0xCC; i++){ // used for item research - // uint8_t byte = MreadByte(temp+i); - // item.bytes.push_back(byte); - //} - return true; -} -void API::FinishReadItems() -{ - if(d->p_itm) - { - delete d->p_itm; - d->p_itm = NULL; - } - d->itemsInited = false; -} - -bool API::ReadPauseState() -{ - // replace with an exception - if(!d->cursorWindowInited) return false; - - uint32_t pauseState = g_pProcess->readDWord (d->pause_state_offset); - return pauseState & 1; -} - -uint32_t API::ReadMenuState() -{ - if(d->cursorWindowInited) - return(g_pProcess->readDWord(d->current_menu_state_offset)); - return false; -} - -bool API::ReadViewScreen (t_viewscreen &screen) -{ - if (!d->cursorWindowInited) return false; - - uint32_t last = g_pProcess->readDWord (d->view_screen_offset); - uint32_t screenAddr = g_pProcess->readDWord (last); - uint32_t nextScreenPtr = g_pProcess->readDWord (last + 4); - while (nextScreenPtr != 0) - { - last = nextScreenPtr; - screenAddr = g_pProcess->readDWord (nextScreenPtr); - nextScreenPtr = g_pProcess->readDWord (nextScreenPtr + 4); - } - return d->offset_descriptor->resolveObjectToClassID (last, screen.type); -} - -bool API::ReadItemTypes(vector< vector< t_itemType > > & itemTypes) -{ - memory_info * minfo = d->offset_descriptor; - int matgloss_address = minfo->getAddress("matgloss"); - int matgloss_skip = minfo->getHexValue("matgloss_skip"); - int item_type_name_offset = minfo->getOffset("item_type_name"); - for(int i = 8;i<20;i++) - { - DfVector p_temp (d->p, matgloss_address + i*matgloss_skip,4); - vector< t_itemType > typesForVec; - for(uint32_t j =0; jp->readSTLString(temp+4,currType.id,128); - d->p->readSTLString(temp+item_type_name_offset,currType.name,128); - //stringsForVec.push_back(string(name)); - typesForVec.push_back(currType); - } - itemTypes.push_back(typesForVec); - } - return true; -} \ No newline at end of file diff --git a/library/DFHackAPI.h b/library/DFHackAPI.h deleted file mode 100644 index 7896cf9b4..000000000 --- a/library/DFHackAPI.h +++ /dev/null @@ -1,301 +0,0 @@ -/* -www.sourceforge.net/projects/dfhack -Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any -damages arising from the use of this software. - -Permission is granted to anyone to use this software for any -purpose, including commercial applications, and to alter it and -redistribute it freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must -not claim that you wrote the original software. If you use this -software in a product, an acknowledgment in the product documentation -would be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and -must not be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source -distribution. -*/ - -#ifndef SIMPLEAPI_H_INCLUDED -#define SIMPLEAPI_H_INCLUDED - -#include "Tranquility.h" -#include "Export.h" -#include -#include -#include -#include "integers.h" -#include "DFTileTypes.h" -#include "DFTypes.h" -#include "DFWindow.h" - -namespace DFHack -{ - class memory_info; - class Process; - class DFHACK_EXPORT API - { - class Private; - Private * const d; - public: - API(const std::string path_to_xml); - ~API(); - /* - * Basic control over DF's process state - */ - - bool Attach(); - bool Detach(); - bool isAttached(); - - /// stop DF from executing - bool Suspend(); - bool isSuspended(); - - /// stop DF from executing, asynchronous, use with polling - bool AsyncSuspend(); - - /// resume DF - bool Resume(); - - /// forces resume on Windows. This can be a bad thing with multiple DF tools running! - bool ForceResume(); - - /* - * Query the DF's GUI state - */ - ///true if paused, false if not - bool ReadPauseState(); - /// read the DF menu view state (stock screen, unit screen, other screens - bool ReadViewScreen(t_viewscreen &); - /// read the DF menu state (designation menu ect) - uint32_t ReadMenuState(); - - - /* - * Matgloss. next four methods look very similar. I could use two and move the processing one level up... - * I'll keep it like this, even with the code duplication as it will hopefully get more features and separate data types later. - * Yay for nebulous plans for a rock survey tool that tracks how much of which metal could be smelted from available resorces - */ - bool ReadStoneMatgloss(std::vector & output); - bool ReadWoodMatgloss (std::vector & output); - bool ReadMetalMatgloss(std::vector & output); - bool ReadPlantMatgloss(std::vector & output); - bool ReadPlantMatgloss (std::vector & plants); - bool ReadCreatureMatgloss(std::vector & output); - - // read region surroundings, get their vectors of geolayers so we can do translation (or just hand the translation table to the client) - // returns an array of 9 vectors of indices into stone matgloss - /** - Method for reading the geological surrounding of the currently loaded region. - assign is a reference to an array of nine vectors of unsigned words that are to be filled with the data - array is indexed by the BiomeOffset enum - - I omitted resolving the layer matgloss in this API, because it would - introduce overhead by calling some method for each tile. You have to do it - yourself. First get the stuff from ReadGeology and then for each block get - the RegionOffsets. For each tile get the real region from RegionOffsets and - cross-reference it with the geology stuff (region -- array of vectors, depth -- - vector). I'm thinking about turning that Geology stuff into a - two-dimensional array with static size. - - this is the algorithm for applying matgloss: - void DfMap::applyGeoMatgloss(Block * b) - { - // load layer matgloss - for(int x_b = 0; x_b < BLOCK_SIZE; x_b++) - { - for(int y_b = 0; y_b < BLOCK_SIZE; y_b++) - { - int geolayer = b->designation[x_b][y_b].bits.geolayer_index; - int biome = b->designation[x_b][y_b].bits.biome; - b->material[x_b][y_b].type = Mat_Stone; - b->material[x_b][y_b].index = v_geology[b->RegionOffsets[biome]][geolayer]; - } - } - } - */ - bool ReadGeology( std::vector < std::vector >& assign ); - - /* - * BLOCK DATA - */ - /// allocate and read pointers to map blocks - bool InitMap(); - /// destroy the mapblock cache - bool DestroyMap(); - /// get size of the map in tiles - void getSize(uint32_t& x, uint32_t& y, uint32_t& z); - - /** - * Return false/0 on failure, buffer allocated by client app, 256 items long - */ - bool isValidBlock(uint32_t blockx, uint32_t blocky, uint32_t blockz); - /** - * Get the address of a block or 0 if block is not valid - */ - uint32_t getBlockPtr (uint32_t blockx, uint32_t blocky, uint32_t blockz); - - /// read the whole map block at block coords (see DFTypes.h for the block structure) - bool ReadBlock40d(uint32_t blockx, uint32_t blocky, uint32_t blockz, mapblock40d * buffer); - - /// read/write block tile types - bool ReadTileTypes(uint32_t blockx, uint32_t blocky, uint32_t blockz, tiletypes40d *buffer); - bool WriteTileTypes(uint32_t blockx, uint32_t blocky, uint32_t blockz, tiletypes40d *buffer); - - /// read/write block designations - bool ReadDesignations(uint32_t blockx, uint32_t blocky, uint32_t blockz, designations40d *buffer); - bool WriteDesignations (uint32_t blockx, uint32_t blocky, uint32_t blockz, designations40d *buffer); - - /// read/write block occupancies - bool ReadOccupancy(uint32_t blockx, uint32_t blocky, uint32_t blockz, occupancies40d *buffer); - bool WriteOccupancy(uint32_t blockx, uint32_t blocky, uint32_t blockz, occupancies40d *buffer); - - /// read/write the block dirty bit - this is used to mark a map block so that DF scans it for designated jobs like digging - bool ReadDirtyBit(uint32_t blockx, uint32_t blocky, uint32_t blockz, bool &dirtybit); - bool WriteDirtyBit(uint32_t blockx, uint32_t blocky, uint32_t blockz, bool dirtybit); - - /// read/write the block flags - bool ReadBlockFlags(uint32_t blockx, uint32_t blocky, uint32_t blockz, t_blockflags &blockflags); - bool WriteBlockFlags(uint32_t blockx, uint32_t blocky, uint32_t blockz, t_blockflags blockflags); - - /// read region offsets of a block - used for determining layer stone matgloss - bool ReadRegionOffsets(uint32_t blockx, uint32_t blocky, uint32_t blockz, biome_indices40d *buffer); - - /// read aggregated veins of a block - bool ReadVeins(uint32_t blockx, uint32_t blocky, uint32_t blockz, std::vector & veins, std::vector & ices); - - /* - * Constructions (costructed walls, floors, ramps, etc...) - */ - /// start reading constructions. numconstructions is an output - total constructions present - bool InitReadConstructions( uint32_t & numconstructions ); - /// read a construiction at index - bool ReadConstruction(const int32_t index, t_construction & construction); - /// cleanup after reading constructions - void FinishReadConstructions(); - - /* - * Buildings - also includes zones and stockpiles - */ - bool InitReadBuildings ( uint32_t & numbuildings ); - bool ReadBuilding(const int32_t index, t_building & building); - void FinishReadBuildings(); - - /* - * Effects like mist, dragonfire or dust - */ - bool InitReadEffects ( uint32_t & numeffects ); - bool ReadEffect(const uint32_t index, t_effect_df40d & effect); - bool WriteEffect(const uint32_t index, const t_effect_df40d & effect); - void FinishReadEffects(); - - /* - * Trees and shrubs - */ - bool InitReadVegetation( uint32_t & numplants ); - bool ReadVegetation(const int32_t index, t_tree_desc & shrubbery); - void FinishReadVegetation(); - - /* - * Creatures - */ - bool InitReadCreatures( uint32_t & numcreatures ); - /** - * Read creatures in a box, starting with index. Returns -1 if no more creatures - * found. Call repeatedly do get all creatures in a specified box (uses tile coords) - */ - int32_t ReadCreatureInBox(const int32_t index, t_creature & furball, - const uint16_t x1, const uint16_t y1,const uint16_t z1, - const uint16_t x2, const uint16_t y2,const uint16_t z2); - bool ReadCreature(const int32_t index, t_creature & furball); - void FinishReadCreatures(); - - /// read/write size bytes of raw data at offset. DANGEROUS, CAN SEGFAULT DF! - void ReadRaw (const uint32_t offset, const uint32_t size, uint8_t *target); - void WriteRaw (const uint32_t offset, const uint32_t size, uint8_t *source); - /// write labors of a creature (for Dwarf Therapist) - bool WriteLabors(const uint32_t index, uint8_t labors[NUM_CREATURE_LABORS]); - - /* - * Notes placed by the player - */ - - /// start reading notes. numnotes is an output - total notes present - bool InitReadNotes( uint32_t & numnotes ); - /// read note from the note vector at index - bool ReadNote(const int32_t index, t_note & note); - /// free the note vector - void FinishReadNotes(); - - /* - * Settlements - */ - bool InitReadSettlements( uint32_t & numsettlements ); - bool ReadSettlement(const int32_t index, t_settlement & settlement); - bool ReadCurrentSettlement(t_settlement & settlement); - void FinishReadSettlements(); - - /* - * Hotkeys (DF's zoom locations) - */ - bool InitReadHotkeys( ); - bool ReadHotkeys(t_hotkey hotkeys[]); - - /* - * Cursor, and view coords - */ - bool InitViewAndCursor(); - bool getViewCoords (int32_t &x, int32_t &y, int32_t &z); - bool setViewCoords (const int32_t x, const int32_t y, const int32_t z); - - bool getCursorCoords (int32_t &x, int32_t &y, int32_t &z); - bool setCursorCoords (const int32_t x, const int32_t y, const int32_t z); - - /// get the creature vector index of the creature currently under DF' cursor - bool getCurrentCursorCreature (uint32_t & creature_index); - - /* - * Window size in tiles - */ - bool InitViewSize(); - bool getWindowSize(int32_t & width, int32_t & height); - - /* - * DF translation tables and name translation - */ - bool InitReadNameTables (std::vector< std::vector > & translations , std::vector< std::vector > & foreign_languages); - void FinishReadNameTables(); - std::string TranslateName(const t_name & name,const std::vector< std::vector > & translations ,const std::vector< std::vector > & foreign_languages, bool inEnglish=true); - - - /* - * Item reading - */ - bool InitReadItems(uint32_t & numitems); - bool getItemIndexesInBox(std::vector &indexes, - const uint16_t x1, const uint16_t y1, const uint16_t z1, - const uint16_t x2, const uint16_t y2, const uint16_t z2); - bool ReadItem(const uint32_t index, t_item & item); - void FinishReadItems(); - - /* - * Get the other API parts for raw access - */ - memory_info *getMemoryInfo(); - Process * getProcess(); - DFWindow * getWindow(); - /* - // FIXME: BAD! - bool ReadAllMatgloss(vector< vector< string > > & all); - */ - bool ReadItemTypes(std::vector< std::vector< t_itemType > > & itemTypes); - }; -} // namespace DFHack -#endif // SIMPLEAPI_H_INCLUDED diff --git a/library/pydfhack/test.py b/library/pydfhack/test.py deleted file mode 100644 index c6a7218c7..000000000 --- a/library/pydfhack/test.py +++ /dev/null @@ -1 +0,0 @@ -import pydfhack diff --git a/library/unmaintained/DFHackAPIc.cpp b/library/unmaintained/DFHackAPIc.cpp deleted file mode 100644 index 5d8509cc5..000000000 --- a/library/unmaintained/DFHackAPIc.cpp +++ /dev/null @@ -1,361 +0,0 @@ -/* -www.sourceforge.net/projects/dfhack -Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any -damages arising from the use of this software. - -Permission is granted to anyone to use this software for any -purpose, including commercial applications, and to alter it and -redistribute it freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must -not claim that you wrote the original software. If you use this -software in a product, an acknowledgment in the product documentation -would be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and -must not be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source -distribution. -*/ - -#ifndef BUILD_DFHACK_LIB -# define BUILD_DFHACK_LIB -#endif - -#include "DFCommon.h" -#include "DFHackAPI.h" -#include "DFHackAPIc.h" - -#ifdef LINUX_BUILD -# ifndef secure_strcpy -# define secure_strcpy(dst, size, buf) strcpy((dst), (buf)) -# endif -#else -# if defined(_MSC_VER) && _MSC_VER >= 1400 -# ifndef secure_strcpy -# define secure_strcpy(dst, size, buf) strcpy_s((dst), (size), (buf)) -# endif -# else -# ifndef secure_strcpy -# define secure_strcpy(dst, size, buf) strcpy((dst), (buf)) -# endif -# endif -#endif - -#ifdef __cplusplus -extern "C" -{ -#endif - -// The C interface for vector management - DFHACKAPI void DFHackAPIVector_free (DFHackAPIVectorC *vector) - { - uint32_t i; - switch (vector->type) - { - case DFHackAPIVectorTypeC_Normal: - delete [] (vector->data); - break; - case DFHackAPIVectorTypeC_Matgloss: - delete [] ( (t_matgloss *) vector->data); - break; - case DFHackAPIVectorTypeC_Uint16: - delete [] ( (uint16_t *) vector->data); - break; - case DFHackAPIVectorTypeC_Vein: - delete [] ( (t_vein *) vector->data); - break; - case DFHackAPIVectorTypeC_String: - for (i = 0; i < vector->length; i++) - delete [] ( (char **) vector->data) [i]; - delete [] ( (char **) vector->data); - break; - case DFHackAPIVectorTypeC_Recursive: - for (i = 0; i < vector->length; i++) - DFHackAPIVector_free (& ( (DFHackAPIVectorC *) vector->data) [i]); - delete [] ( (DFHackAPIVectorC *) vector->data); - break; - } - - vector->type = DFHackAPIVectorTypeC_Normal; - vector->length = 0; - vector->data = 0; - } - -// The C interface to DFHackAPI (for multiple language support) - DFHACKAPI DFHackAPIHandle CreateDFHackAPI (const char *path_to_xml) - { - return new DFHackAPIImpl (path_to_xml); - } - - DFHACKAPI void DestroyDFHackAPI (DFHackAPIHandle self) - { - if (self != NULL) - delete self; - } - - DFHACKAPI bool DFHackAPI_Attach (DFHackAPIHandle self) - { - return self->Attach(); - } - - DFHACKAPI bool DFHackAPI_Detach (DFHackAPIHandle self) - { - return self->Detach(); - } - - DFHACKAPI bool DFHackAPI_isAttached (DFHackAPIHandle self) - { - return self->isAttached(); - } - - DFHACKAPI bool DFHackAPI_ReadStoneMatgloss (DFHackAPIHandle self, DFHackAPIVectorC *output) - { - vector result; - uint32_t i; - bool retn = self->ReadStoneMatgloss (result); - - output->type = DFHackAPIVectorTypeC_Matgloss; - output->length = result.size(); - output->data = new t_matgloss[output->length]; - for (i = 0; i < output->length; i++) - ( (t_matgloss *) output->data) [i] = result[i]; - - return retn; - } - - DFHACKAPI bool DFHackAPI_ReadWoodMatgloss (DFHackAPIHandle self, DFHackAPIVectorC *output) - { - vector result; - uint32_t i; - bool retn = self->ReadWoodMatgloss (result); - - output->type = DFHackAPIVectorTypeC_Matgloss; - output->length = result.size(); - output->data = new t_matgloss[output->length]; - for (i = 0; i < output->length; i++) - ( (t_matgloss *) output->data) [i] = result[i]; - - return retn; - } - - DFHACKAPI bool DFHackAPI_ReadMetalMatgloss (DFHackAPIHandle self, DFHackAPIVectorC *output) - { - vector result; - uint32_t i; - bool retn = self->ReadMetalMatgloss (result); - - output->type = DFHackAPIVectorTypeC_Matgloss; - output->length = result.size(); - output->data = new t_matgloss[output->length]; - for (i = 0; i < output->length; i++) - ( (t_matgloss *) output->data) [i] = result[i]; - - return retn; - } - - DFHACKAPI bool DFHackAPI_ReadPlantMatgloss (DFHackAPIHandle self, DFHackAPIVectorC *output) - { - vector result; - uint32_t i; - bool retn = self->ReadPlantMatgloss (result); - - output->type = DFHackAPIVectorTypeC_Matgloss; - output->length = result.size(); - output->data = new t_matgloss[output->length]; - for (i = 0; i < output->length; i++) - ( (t_matgloss *) output->data) [i] = result[i]; - - return retn; - } - - DFHACKAPI bool DFHackAPI_ReadCreatureMatgloss (DFHackAPIHandle self, DFHackAPIVectorC *output) - { - vector result; - uint32_t i; - bool retn = self->ReadCreatureMatgloss (result); - - output->type = DFHackAPIVectorTypeC_Matgloss; - output->length = result.size(); - output->data = new t_matgloss[output->length]; - for (i = 0; i < output->length; i++) - ( (t_matgloss *) output->data) [i] = result[i]; - - return retn; - } - DFHACKAPI bool DFHackAPI_ReadGeology (DFHackAPIHandle self, DFHackAPIVectorC *assign) - { - vector< vector > result; - uint32_t i, j; - bool retn = self->ReadGeology (result); - - assign->type = DFHackAPIVectorTypeC_Recursive; - assign->length = result.size(); - assign->data = new DFHackAPIVectorC[assign->length]; - for (i = 0; i < assign->length; i++) - { - DFHackAPIVectorC ¤t = ( (DFHackAPIVectorC *) assign->data) [i]; - current.type = DFHackAPIVectorTypeC_Uint16; - current.length = result[i].size(); - current.data = new uint16_t[current.length]; - for (j = 0; j < current.length; j++) - ( (uint16_t *) current.data) [j] = result[i][j]; - } - - return retn; - } - - DFHACKAPI bool DFHackAPI_InitMap (DFHackAPIHandle self) - { - return self->InitMap(); - } - - DFHACKAPI bool DFHackAPI_DestroyMap (DFHackAPIHandle self) - { - return self->DestroyMap(); - } - - DFHACKAPI void DFHackAPI_getSize (DFHackAPIHandle self, uint32_t* x, uint32_t* y, uint32_t* z) - { - return self->getSize (*x, *y, *z); - } - - DFHACKAPI bool DFHackAPI_isValidBlock (DFHackAPIHandle self, uint32_t blockx, uint32_t blocky, uint32_t blockz) - { - return self->isValidBlock (blockx, blocky, blockz); - } - - DFHACKAPI bool DFHackAPI_ReadTileTypes (DFHackAPIHandle self, uint32_t blockx, uint32_t blocky, uint32_t blockz, uint16_t *buffer) - { - return self->ReadTileTypes (blockx, blocky, blockz, buffer); - } - - DFHACKAPI bool DFHackAPI_WriteTileTypes (DFHackAPIHandle self, uint32_t blockx, uint32_t blocky, uint32_t blockz, uint16_t *buffer) - { - return self->WriteTileTypes (blockx, blocky, blockz, buffer); - } - - DFHACKAPI bool DFHackAPI_ReadDesignations (DFHackAPIHandle self, uint32_t blockx, uint32_t blocky, uint32_t blockz, uint32_t *buffer) - { - return self->ReadDesignations (blockx, blocky, blockz, buffer); - } - - DFHACKAPI bool DFHackAPI_WriteDesignations (DFHackAPIHandle self, uint32_t blockx, uint32_t blocky, uint32_t blockz, uint32_t *buffer) - { - return self->WriteDesignations (blockx, blocky, blockz, buffer); - } - - DFHACKAPI bool DFHackAPI_ReadOccupancy (DFHackAPIHandle self, uint32_t blockx, uint32_t blocky, uint32_t blockz, uint32_t *buffer) - { - return self->ReadOccupancy (blockx, blocky, blockz, buffer); - } - - DFHACKAPI bool DFHackAPI_WriteOccupancy (DFHackAPIHandle self, uint32_t blockx, uint32_t blocky, uint32_t blockz, uint32_t *buffer) - { - return self->WriteOccupancy (blockx, blocky, blockz, buffer); - } - - DFHACKAPI bool DFHackAPI_ReadRegionOffsets (DFHackAPIHandle self, uint32_t blockx, uint32_t blocky, uint32_t blockz, uint8_t *buffer) - { - return self->ReadRegionOffsets (blockx, blocky, blockz, buffer); - } - - DFHACKAPI bool DFHackAPI_ReadVeins (DFHackAPIHandle self, uint32_t blockx, uint32_t blocky, uint32_t blockz, DFHackAPIVectorC * veins) - { - vector result; - uint32_t i; - bool retn = self->ReadVeins (blockx, blocky, blockz, result); - - veins->type = DFHackAPIVectorTypeC_Vein; - veins->length = result.size(); - veins->data = new t_vein[veins->length]; - for (i = 0; i < veins->length; i++) - ( (t_vein *) veins->data) [i] = result[i]; - - return retn; - } - - DFHACKAPI uint32_t DFHackAPI_InitReadConstructions (DFHackAPIHandle self) - { - return self->InitReadConstructions(); - } - - DFHACKAPI bool DFHackAPI_ReadConstruction (DFHackAPIHandle self, const uint32_t *index, t_construction * construction) - { - return self->ReadConstruction (*index, *construction); - } - - DFHACKAPI void DFHackAPI_FinishReadConstructions (DFHackAPIHandle self) - { - self->FinishReadConstructions(); - } - - DFHACKAPI uint32_t DFHackAPI_InitReadBuildings (DFHackAPIHandle self, DFHackAPIVectorC *v_buildingtypes) - { - vector result; - uint32_t i; - uint32_t retn = self->InitReadBuildings (result); - - v_buildingtypes->type = DFHackAPIVectorTypeC_String; - v_buildingtypes->length = result.size(); - v_buildingtypes->data = new char *[v_buildingtypes->length]; - for (i = 0; i < v_buildingtypes->length; i++) - { - char *str = new char[result[i].size() + 1]; - secure_strcpy (str, result[i].size() + 1, result[i].c_str()); - ( (char **) v_buildingtypes->data) [i] = str; - } - - return retn; - } - - DFHACKAPI bool DFHackAPI_ReadBuilding (DFHackAPIHandle self, const uint32_t *index, t_building * building) - { - return self->ReadBuilding (*index, *building); - } - - DFHACKAPI void DFHackAPI_FinishReadBuildings (DFHackAPIHandle self) - { - self->FinishReadBuildings(); - } - - DFHACKAPI uint32_t DFHackAPI_InitReadVegetation (DFHackAPIHandle self) - { - return self->InitReadVegetation(); - } - - DFHACKAPI bool DFHackAPI_ReadVegetation (DFHackAPIHandle self, const uint32_t *index, t_tree_desc * shrubbery) - { - return self->ReadVegetation (*index, *shrubbery); - } - - DFHACKAPI void DFHackAPI_FinishReadVegetation (DFHackAPIHandle self) - { - self->FinishReadVegetation(); - } - - DFHACKAPI uint32_t DFHackAPI_InitReadCreatures (DFHackAPIHandle self) - { - return self->InitReadCreatures(); - } - - DFHACKAPI bool DFHackAPI_ReadCreature (DFHackAPIHandle self, const uint32_t *index, t_creature * furball) - { - return self->ReadCreature (*index, *furball); - } - - DFHACKAPI void DFHackAPI_FinishReadCreatures (DFHackAPIHandle self) - { - self->FinishReadCreatures(); - } - DFHACKAPI void DFHackAPI_ReadRaw (DFHackAPIHandle self, const uint32_t &offset, const uint32_t &size, uint8_t *target) - { - self->ReadRaw(offset, size, target); - } -#ifdef __cplusplus -} -#endif diff --git a/library/unmaintained/DFHackAPIc.h b/library/unmaintained/DFHackAPIc.h deleted file mode 100644 index 41e76391c..000000000 --- a/library/unmaintained/DFHackAPIc.h +++ /dev/null @@ -1,483 +0,0 @@ -/* -www.sourceforge.net/projects/dfhack -Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any -damages arising from the use of this software. - -Permission is granted to anyone to use this software for any -purpose, including commercial applications, and to alter it and -redistribute it freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must -not claim that you wrote the original software. If you use this -software in a product, an acknowledgment in the product documentation -would be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and -must not be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source -distribution. -*/ - -#ifndef SIMPLEAPIC_H_INCLUDED -#define SIMPLEAPIC_H_INCLUDED - -#ifdef LINUX_BUILD -# ifndef DFHACKAPI -# define DFHACKAPI extern "C" -# endif -#else -# ifdef BUILD_DFHACK_LIB -# ifndef DFHACKAPI -# define DFHACKAPI extern "C" __declspec(dllexport) -# endif -# else -# ifndef DFHACKAPI -# define DFHACKAPI extern "C" __declspec(dllimport) -# endif -# endif -#endif - -#include "integers.h" - -#ifdef __cplusplus -# include -# include -using namespace std; -#endif - -typedef enum DFHackAPIVectorTypeC -{ - DFHackAPIVectorTypeC_Normal, // array of struct's - DFHackAPIVectorTypeC_Matgloss, // array of t_matgloss's - DFHackAPIVectorTypeC_Uint16, // array of uint16_t's - DFHackAPIVectorTypeC_Vein, // array of t_vein's - DFHackAPIVectorTypeC_String, // array of const char *'s - DFHackAPIVectorTypeC_Recursive, // array of DFHackAPIVectorC struct's - DFHackAPIVectorTypeC_DWord = 0xffffffff // Unused -} DFHackAPIVectorTypeC; - -typedef struct DFHackAPIVectorC -{ - void *data; - uint32_t length; - DFHackAPIVectorTypeC type; -} DFHackAPIVector; - -#ifdef __cplusplus -typedef class DFHackAPIImpl *DFHackAPIHandle; -#else -typedef struct DFHackAPIImpl *DFHackAPIHandle; -typedef char bool; -#endif - -#ifdef __cplusplus -extern "C" -{ -#endif // __cplusplus - -// The C interface for vector management - DFHACKAPI void DFHackAPIVector_free (DFHackAPIVectorC *vector); - -// The C interface to DFHackAPI (for multiple language support) - DFHACKAPI DFHackAPIHandle CreateDFHackAPI (const char *path_to_xml); - DFHACKAPI void DestroyDFHackAPI (DFHackAPIHandle self); - - DFHACKAPI bool DFHackAPI_Attach (DFHackAPIHandle self); - DFHACKAPI bool DFHackAPI_Detach (DFHackAPIHandle self); - DFHACKAPI bool DFHackAPI_isAttached (DFHackAPIHandle self); - - DFHACKAPI bool DFHackAPI_ReadStoneMatgloss (DFHackAPIHandle self, DFHackAPIVectorC *output); - DFHACKAPI bool DFHackAPI_ReadWoodMatgloss (DFHackAPIHandle self, DFHackAPIVectorC *output); - DFHACKAPI bool DFHackAPI_ReadMetalMatgloss (DFHackAPIHandle self, DFHackAPIVectorC *output); - DFHACKAPI bool DFHackAPI_ReadPlantMatgloss (DFHackAPIHandle self, DFHackAPIVectorC *output); - DFHACKAPI bool DFHackAPI_ReadCreatureMatgloss (DFHackAPIHandle self, DFHackAPIVectorC *output); - - DFHACKAPI bool DFHackAPI_ReadGeology (DFHackAPIHandle self, DFHackAPIVectorC *assign); - - DFHACKAPI bool DFHackAPI_InitMap (DFHackAPIHandle self); - DFHACKAPI bool DFHackAPI_DestroyMap (DFHackAPIHandle self); - DFHACKAPI void DFHackAPI_getSize (DFHackAPIHandle self, uint32_t* x, uint32_t* y, uint32_t* z); - - DFHACKAPI bool DFHackAPI_isValidBlock (DFHackAPIHandle self, uint32_t blockx, uint32_t blocky, uint32_t blockz); - - DFHACKAPI bool DFHackAPI_ReadTileTypes (DFHackAPIHandle self, uint32_t blockx, uint32_t blocky, uint32_t blockz, uint16_t *buffer); - DFHACKAPI bool DFHackAPI_WriteTileTypes (DFHackAPIHandle self, uint32_t blockx, uint32_t blocky, uint32_t blockz, uint16_t *buffer); - - DFHACKAPI bool DFHackAPI_ReadDesignations (DFHackAPIHandle self, uint32_t blockx, uint32_t blocky, uint32_t blockz, uint32_t *buffer); - DFHACKAPI bool DFHackAPI_WriteDesignations (DFHackAPIHandle self, uint32_t blockx, uint32_t blocky, uint32_t blockz, uint32_t *buffer); - - DFHACKAPI bool DFHackAPI_ReadOccupancy (DFHackAPIHandle self, uint32_t blockx, uint32_t blocky, uint32_t blockz, uint32_t *buffer); - DFHACKAPI bool DFHackAPI_WriteOccupancy (DFHackAPIHandle self, uint32_t blockx, uint32_t blocky, uint32_t blockz, uint32_t *buffer); - - DFHACKAPI bool DFHackAPI_ReadRegionOffsets (DFHackAPIHandle self, uint32_t blockx, uint32_t blocky, uint32_t blockz, uint8_t *buffer); - - DFHACKAPI bool DFHackAPI_ReadVeins (DFHackAPIHandle self, uint32_t blockx, uint32_t blocky, uint32_t blockz, DFHackAPIVectorC * veins); - - - DFHACKAPI uint32_t DFHackAPI_InitReadConstructions (DFHackAPIHandle self); - DFHACKAPI bool DFHackAPI_ReadConstruction (DFHackAPIHandle self, const uint32_t *index, t_construction * construction); - DFHACKAPI void DFHackAPI_FinishReadConstructions (DFHackAPIHandle self); - - DFHACKAPI uint32_t DFHackAPI_InitReadBuildings (DFHackAPIHandle self, DFHackAPIVectorC *v_buildingtypes); - DFHACKAPI bool DFHackAPI_ReadBuilding (DFHackAPIHandle self, const uint32_t *index, t_building * building); - DFHACKAPI void DFHackAPI_FinishReadBuildings (DFHackAPIHandle self); - - DFHACKAPI uint32_t DFHackAPI_InitReadVegetation (DFHackAPIHandle self); - DFHACKAPI bool DFHackAPI_ReadVegetation (DFHackAPIHandle self, const uint32_t *index, t_tree_desc * shrubbery); - DFHACKAPI void DFHackAPI_FinishReadVegetation (DFHackAPIHandle self); - - DFHACKAPI uint32_t DFHackAPI_InitReadCreatures (DFHackAPIHandle self); - DFHACKAPI bool DFHackAPI_ReadCreature (DFHackAPIHandle self, const uint32_t *index, t_creature * furball); - DFHACKAPI void DFHackAPI_FinishReadCreatures (DFHackAPIHandle self); - - DFHACKAPI void DFHackAPI_ReadRaw (DFHackAPIHandle self, const uint32_t &offset, const uint32_t &size, uint8_t *target); -#ifdef __cplusplus -} -#endif // __cplusplus - -// C++ wrappers for C API that use vectors -#ifdef __cplusplus -inline bool DFHackAPI_ReadStoneMatgloss (DFHackAPIHandle self, vector & output) -{ - DFHackAPIVectorC vector; - bool result = DFHackAPI_ReadStoneMatgloss (self, &vector); - uint32_t i; - for (i = 0; i < vector.length; i++) - output.push_back ( ( (t_matgloss *) vector.data) [i]); - DFHackAPIVector_free (&vector); - return result; -} - -inline bool DFHackAPI_ReadWoodMatgloss (DFHackAPIHandle self, vector & output) -{ - DFHackAPIVectorC vector; - bool result = DFHackAPI_ReadWoodMatgloss (self, &vector); - uint32_t i; - for (i = 0; i < vector.length; i++) - output.push_back ( ( (t_matgloss *) vector.data) [i]); - DFHackAPIVector_free (&vector); - return result; -} - -inline bool DFHackAPI_ReadMetalMatgloss (DFHackAPIHandle self, vector & output) -{ - DFHackAPIVectorC vector; - bool result = DFHackAPI_ReadMetalMatgloss (self, &vector); - uint32_t i; - for (i = 0; i < vector.length; i++) - output.push_back ( ( (t_matgloss *) vector.data) [i]); - DFHackAPIVector_free (&vector); - return result; -} - -inline bool DFHackAPI_ReadPlantMatgloss (DFHackAPIHandle self, vector & output) -{ - DFHackAPIVectorC vector; - bool result = DFHackAPI_ReadPlantMatgloss (self, &vector); - uint32_t i; - for (i = 0; i < vector.length; i++) - output.push_back ( ( (t_matgloss *) vector.data) [i]); - DFHackAPIVector_free (&vector); - return result; -} - -inline bool DFHackAPI_ReadCreatureMatgloss (DFHackAPIHandle self, vector & output) -{ - DFHackAPIVectorC vector; - bool result = DFHackAPI_ReadCreatureMatgloss (self, &vector); - uint32_t i; - for (i = 0; i < vector.length; i++) - output.push_back ( ( (t_matgloss *) vector.data) [i]); - DFHackAPIVector_free (&vector); - return result; -} - -inline bool DFHackAPI_ReadGeology (DFHackAPIHandle self, vector< vector > &assign) -{ - DFHackAPIVectorC vec; - bool result = DFHackAPI_ReadGeology (self, &vec); - uint32_t i; - for (i = 0; i < vec.length; i++) - { - DFHackAPIVectorC ¤t = ( (DFHackAPIVectorC *) vec.data) [i]; - vector fill; - uint32_t j; - for (j = 0; j < current.length; j++) - fill.push_back ( ( (uint16_t *) current.data) [j]); - assign.push_back (fill); - } - DFHackAPIVector_free (&vec); - return result; -} - -inline bool DFHackAPI_ReadVeins (DFHackAPIHandle self, uint32_t blockx, uint32_t blocky, uint32_t blockz, vector & veins) -{ - DFHackAPIVectorC vector; - bool result = DFHackAPI_ReadVeins (self, blockx, blocky, blockz, &vector); - uint32_t i; - for (i = 0; i < vector.length; i++) - veins.push_back ( ( (t_vein *) vector.data) [i]); - DFHackAPIVector_free (&vector); - return result; -} - -inline uint32_t DFHackAPI_InitReadBuildings (DFHackAPIHandle self, vector &v_buildingtypes) -{ - DFHackAPIVectorC vector; - uint32_t result = DFHackAPI_InitReadBuildings (self, &vector); - uint32_t i; - for (i = 0; i < vector.length; i++) - v_buildingtypes.push_back ( ( (const char **) vector.data) [i]); - DFHackAPIVector_free (&vector); - return result; -} -#endif // __cplusplus - -// C++ class wrapper for C DFHackAPI -#ifdef __cplusplus -class CDFHackAPI -{ - DFHackAPIHandle handle; -public: - CDFHackAPI (const string &path_to_xml) - : handle (CreateDFHackAPI (path_to_xml.c_str())) - { - if (handle == NULL) - { - // TODO: handle failure - } - } - - inline ~CDFHackAPI() - { - DestroyDFHackAPI (handle); - handle = NULL; - } - - inline bool Attach() - { - return DFHackAPI_Attach (handle); - } - - inline bool Detach() - { - return DFHackAPI_Detach (handle); - } - - inline bool isAttached() - { - return DFHackAPI_isAttached (handle); - } - - /** - * Matgloss. next four methods look very similar. I could use two and move the processing one level up... - * I'll keep it like this, even with the code duplication as it will hopefully get more features and separate data types later. - * Yay for nebulous plans for a rock survey tool that tracks how much of which metal could be smelted from available resorces - */ - inline bool ReadStoneMatgloss (vector & output) - { - return DFHackAPI_ReadStoneMatgloss (handle, output); - } - - inline bool ReadWoodMatgloss (vector & output) - { - return DFHackAPI_ReadWoodMatgloss (handle, output); - } - - inline bool ReadMetalMatgloss (vector & output) - { - return DFHackAPI_ReadMetalMatgloss (handle, output); - } - - inline bool ReadPlantMatgloss (vector & output) - { - return DFHackAPI_ReadPlantMatgloss (handle, output); - } - - inline bool ReadCreatureMatgloss (vector & output) - { - return DFHackAPI_ReadCreatureMatgloss (handle, output); - } - - // read region surroundings, get their vectors of geolayers so we can do translation (or just hand the translation table to the client) - // returns an array of 9 vectors of indices into stone matgloss - /** - Method for reading the geological surrounding of the currently loaded region. - assign is a reference to an array of nine vectors of unsigned words that are to be filled with the data - array is indexed by the BiomeOffset enum - - I omitted resolving the layer matgloss in this API, because it would - introduce overhead by calling some method for each tile. You have to do it - yourself. First get the stuff from ReadGeology and then for each block get - the RegionOffsets. For each tile get the real region from RegionOffsets and - cross-reference it with the geology stuff (region -- array of vectors, depth -- - vector). I'm thinking about turning that Geology stuff into a - two-dimensional array with static size. - - this is the algorithm for applying matgloss: - void DfMap::applyGeoMatgloss(Block * b) - { - // load layer matgloss - for(int x_b = 0; x_b < BLOCK_SIZE; x_b++) - { - for(int y_b = 0; y_b < BLOCK_SIZE; y_b++) - { - int geolayer = b->designation[x_b][y_b].bits.geolayer_index; - int biome = b->designation[x_b][y_b].bits.biome; - b->material[x_b][y_b].type = Mat_Stone; - b->material[x_b][y_b].index = v_geology[b->RegionOffsets[biome]][geolayer]; - } - } - } - */ - inline bool ReadGeology (vector < vector >& assign) - { - return DFHackAPI_ReadGeology (handle, assign); - } - - /* - * BLOCK DATA - */ - /// allocate and read pointers to map blocks - inline bool InitMap() - { - return DFHackAPI_InitMap (handle); - } - - /// destroy the mapblock cache - inline bool DestroyMap() - { - return DFHackAPI_DestroyMap (handle); - } - - /// get size of the map in tiles - inline void getSize (uint32_t& x, uint32_t& y, uint32_t& z) - { - DFHackAPI_getSize (handle, &x, &y, &z); - } - - /** - * Return false/0 on failure, buffer allocated by client app, 256 items long - */ - inline bool isValidBlock (uint32_t blockx, uint32_t blocky, uint32_t blockz) - { - return DFHackAPI_isValidBlock (handle, blockx, blocky, blockz); - } - - inline bool ReadTileTypes (uint32_t blockx, uint32_t blocky, uint32_t blockz, uint16_t *buffer) // 256 * sizeof(uint16_t) - { - return DFHackAPI_ReadTileTypes (handle, blockx, blocky, blockz, buffer); - } - - inline bool WriteTileTypes (uint32_t blockx, uint32_t blocky, uint32_t blockz, uint16_t *buffer) // 256 * sizeof(uint16_t) - { - return DFHackAPI_WriteTileTypes (handle, blockx, blocky, blockz, buffer); - } - - inline bool ReadDesignations (uint32_t blockx, uint32_t blocky, uint32_t blockz, uint32_t *buffer) // 256 * sizeof(uint32_t) - { - return DFHackAPI_ReadDesignations (handle, blockx, blocky, blockz, buffer); - } - - inline bool WriteDesignations (uint32_t blockx, uint32_t blocky, uint32_t blockz, uint32_t *buffer) - { - return DFHackAPI_WriteDesignations (handle, blockx, blocky, blockz, buffer); - } - - inline bool ReadOccupancy (uint32_t blockx, uint32_t blocky, uint32_t blockz, uint32_t *buffer) // 256 * sizeof(uint32_t) - { - return DFHackAPI_ReadOccupancy (handle, blockx, blocky, blockz, buffer); - } - - inline bool WriteOccupancy (uint32_t blockx, uint32_t blocky, uint32_t blockz, uint32_t *buffer) // 256 * sizeof(uint32_t) - { - return DFHackAPI_WriteOccupancy (handle, blockx, blocky, blockz, buffer); - } - - /// read region offsets of a block - inline bool ReadRegionOffsets (uint32_t blockx, uint32_t blocky, uint32_t blockz, uint8_t *buffer) // 16 * sizeof(uint8_t) - { - return DFHackAPI_ReadRegionOffsets (handle, blockx, blocky, blockz, buffer); - } - - /// read aggregated veins of a block - inline bool ReadVeins (uint32_t blockx, uint32_t blocky, uint32_t blockz, vector & veins) - { - return DFHackAPI_ReadVeins (handle, blockx, blocky, blockz, veins); - } - - /** - * Buildings, constructions, plants, all pretty straighforward. InitReadBuildings returns all the building types as a mapping between a numeric values and strings - */ - inline uint32_t InitReadConstructions() - { - return DFHackAPI_InitReadConstructions (handle); - } - - inline bool ReadConstruction (const uint32_t &index, t_construction & construction) - { - return DFHackAPI_ReadConstruction (handle, &index, & construction); - } - - inline void FinishReadConstructions() - { - DFHackAPI_FinishReadConstructions (handle); - } - - inline uint32_t InitReadBuildings (vector &v_buildingtypes) - { - return DFHackAPI_InitReadBuildings (handle, v_buildingtypes); - } - - inline bool ReadBuilding (const uint32_t &index, t_building & building) - { - return DFHackAPI_ReadBuilding (handle, &index, &building); - } - - inline void FinishReadBuildings() - { - DFHackAPI_FinishReadBuildings (handle); - } - - inline uint32_t InitReadVegetation() - { - return DFHackAPI_InitReadVegetation (handle); - } - - inline bool ReadVegetation (const uint32_t &index, t_tree_desc & shrubbery) - { - return DFHackAPI_ReadVegetation (handle, &index, &shrubbery); - } - - inline void FinishReadVegetation() - { - DFHackAPI_FinishReadVegetation (handle); - } - - inline uint32_t InitReadCreatures() - { - return DFHackAPI_InitReadCreatures (handle); - } - - inline bool ReadCreature (const uint32_t &index, t_creature & furball) - { - return DFHackAPI_ReadCreature (handle, &index, &furball); - } - - inline void FinishReadCreatures() - { - DFHackAPI_FinishReadCreatures (handle); - } - - inline void ReadRaw(const uint32_t &offset, const uint32_t &size, uint8_t *target) - { - DFHackAPI_ReadRaw(handle, offset, size, target); - } -}; -#endif // __cplusplus - -#endif // SIMPLEAPIC_H_INCLUDED diff --git a/library/unmaintained/LinuxMemAccess-ptrace.h b/library/unmaintained/LinuxMemAccess-ptrace.h deleted file mode 100644 index 55335c34b..000000000 --- a/library/unmaintained/LinuxMemAccess-ptrace.h +++ /dev/null @@ -1,182 +0,0 @@ -/* -www.sourceforge.net/projects/dfhack -Copyright (c) 2009 Petr Mrázek (peterix), Kenneth Ferland (Impaler[WrG]), dorf - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any -damages arising from the use of this software. - -Permission is granted to anyone to use this software for any -purpose, including commercial applications, and to alter it and -redistribute it freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must -not claim that you wrote the original software. If you use this -software in a product, an acknowledgment in the product documentation -would be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and -must not be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source -distribution. -*/ - -/** - * DO NOT USE THIS FILE DIRECTLY! USE MemAccess.h INSTEAD! - */ -#include "integers.h" - -inline -uint8_t MreadByte (const uint32_t &offset) -{ - return ptrace(PTRACE_PEEKDATA,g_ProcessHandle, offset, NULL); -} - -inline -void MreadByte (const uint32_t &offset, uint8_t &val ) -{ - val = ptrace(PTRACE_PEEKDATA,g_ProcessHandle, offset, NULL); -} - -inline -uint16_t MreadWord (const uint32_t &offset) -{ - return ptrace(PTRACE_PEEKDATA,g_ProcessHandle, offset, NULL); -} - -inline -void MreadWord (const uint32_t &offset, uint16_t &val) -{ - val = ptrace(PTRACE_PEEKDATA,g_ProcessHandle, offset, NULL); -} - -inline -uint32_t MreadDWord (const uint32_t &offset) -{ - return ptrace(PTRACE_PEEKDATA,g_ProcessHandle, offset, NULL); -} -inline -void MreadDWord (const uint32_t &offset, uint32_t &val) -{ - val = ptrace(PTRACE_PEEKDATA,g_ProcessHandle, offset, NULL); -} - -// extremely terrible braindamage -inline -bool Mread ( uint32_t offset, uint32_t size, uint8_t *target) -{ - uint8_t *mover = target; - while (size) - { - if(size >= 4) - { - * (uint32_t *)mover = MreadDWord(offset); - mover+=4; - offset +=4; - size -=4; - } - else if(size >= 2) - { - * (uint16_t *)mover = MreadWord(offset); - mover+=2; - offset +=2; - size -=2; - } - else if(size == 1) - { - * (uint8_t *)mover = MreadByte(offset); - mover+=1; - offset ++; - size --; - } - } - return true; -} - -/* -* WRITING -*/ - -inline -void MwriteDWord (uint32_t offset, uint32_t data) -{ - ptrace(PTRACE_POKEDATA,g_ProcessHandle, offset, data); -} - -// using these is expensive. -inline -void MwriteWord (uint32_t offset, uint16_t data) -{ - uint32_t orig = MreadDWord(offset); - orig &= 0xFFFF0000; - orig |= data; - /* - orig |= 0x0000FFFF; - orig &= data; - */ - ptrace(PTRACE_POKEDATA,g_ProcessHandle, offset, orig); -} - -inline -void MwriteByte (uint32_t offset, uint8_t data) -{ - uint32_t orig = MreadDWord(offset); - orig &= 0xFFFFFF00; - orig |= data; - /* - orig |= 0x000000FF; - orig &= data; - */ - ptrace(PTRACE_POKEDATA,g_ProcessHandle, offset, orig); -} - -// blah. I hate the kernel devs for crippling /proc/PID/mem. THIS IS RIDICULOUS -inline -bool Mwrite (uint32_t offset, uint32_t size, uint8_t *source) -{ - uint32_t indexptr = 0; - while (size > 0) - { - // default: we push 4 bytes - if(size >= 4) - { - MwriteDWord(offset, *(uint32_t *) (source + indexptr)); - offset +=4; - indexptr +=4; - size -=4; - } - // last is either three or 2 bytes - else if(size >= 2) - { - MwriteWord(offset, *(uint16_t *) (source + indexptr)); - offset +=2; - indexptr +=2; - size -=2; - } - // finishing move - else if(size == 1) - { - MwriteByte(offset, *(uint8_t *) (source + indexptr)); - return true; - } - } -} - -inline -const std::string MreadCString (uint32_t offset) -{ - std::string temp; - char temp_c[256]; - int counter = 0; - char r; - do - { - r = MreadByte(offset+counter); - temp_c[counter] = r; - counter++; - } while (r && counter < 255); - temp_c[counter] = 0; - temp = temp_c; - return temp; -} \ No newline at end of file diff --git a/library/unmaintained/TileTypeLeftovers.cpp b/library/unmaintained/TileTypeLeftovers.cpp deleted file mode 100644 index 70a02d405..000000000 --- a/library/unmaintained/TileTypeLeftovers.cpp +++ /dev/null @@ -1,1044 +0,0 @@ -bool DFHack::isWallTerrain(int in) -{ - switch (in) - { - case 65: //stone fortification - case 79: //stone pillar - case 80: //lavastone pillar - case 81: //featstone pillar - case 82: //minstone pillar - case 83: //frozen liquid pillar - case 176: //stone wall worn1 (most worn) - case 177: //stone wall worn2 (sorta worn) - case 178: //stone wall worn3 (least worn) - case 219: //stone wall (not worn) - case 265: //soil wall - case 269: //lavastone wall rd2 - case 270: //lavastone wall r2d - case 271: //lavastone wall r2u - case 272: //lavastone wall ru2 - case 273: //lavastone wall l2u - case 274: //lavastone wall lu2 - case 275: //lavastone wall l2d - case 276: //lavastone wall ld2 - case 277: //lavastone wall lrud - case 278: //lavastone wall rud - case 279: //lavastone wall lrd - case 280: //lavastone wall lru - case 281: //lavastone wall lud - case 282: //lavastone wall rd - case 283: //lavastone wall ru - case 284: //lavastone wall lu - case 285: //lavastone wall ld - case 286: //lavastone wall ud - case 287: //lavastone wall lr - case 288: //featstone wall rd2 - case 289: //featstone wall r2d - case 290: //featstone wall r2u - case 291: //featstone wall ru2 - case 292: //featstone wall l2u - case 293: //featstone wall lu2 - case 294: //featstone wall l2d - case 295: //featstone wall ld2 - case 296: //featstone wall lrud - case 297: //featstone wall rud - case 298: //featstone wall lrd - case 299: //featstone wall lru - case 300: //featstone wall lud - case 301: //featstone wall rd - case 382: //featstone wall ru - case 303: //featstone wall lu - case 304: //featstone wall ld - case 305: //featstone wall ud - case 306: //featstone wall lr - case 307: //stone wall rd2 - case 308: //stone wall r2d - case 309: //stone wall r2u - case 310: //stone wall ru2 - case 311: //stone wall l2u - case 312: //stone wall lu2 - case 313: //stone wall l2d - case 314: //stone wall ld2 - case 315: //stone wall lrud - case 316: //stone wall rud - case 317: //stone wall lrd - case 318: //stone wall lru - case 319: //stone wall lud - case 320: //stone wall rd - case 321: //stone wall ru - case 322: //stone wall lu - case 323: //stone wall ld - case 324: //stone wall ud - case 325: //stone wall lr - case 326: //lavastone fortification - case 327: //featstone fortification - case 328: //lavastone wall worn1 (most worn) - case 329: //lavastone wall worn2 (middle worn) - case 330: //lavastone wall worn3 (least worn) - case 331: //lavastone wall - case 332: //featstone wall worn1 (most worn) - case 333: //featstone wall worn2 (middle worn) - case 334: //featstone wall worn3 (least worn) - case 335: //featstone wall - case 360: //frozen liquid fortification - case 361: //frozen liquid wall worn1 (most worn) - case 362: //frozen liquid wall worn2 (middle worn) - case 363: //frozen liquid wall worn3 (least worn) - case 364: //frozen liquid wall - case 417: //minstone wall rd2 - case 418: //minstone wall r2d - case 419: //minstone wall r2u - case 420: //minstone wall ru2 - case 421: //minstone wall l2u - case 422: //minstone wall lu2 - case 423: //minstone wall l2d - case 424: //minstone wall ld2 - case 425: //minstone wall lrud - case 426: //minstone wall rud - case 427: //minstone wall lrd - case 428: //minstone wall lru - case 429: //minstone wall lud - case 430: //minstone wall rd - case 431: //minstone wall ru - case 432: //minstone wall lu - case 433: //minstone wall ld - case 434: //minstone wall ud - case 435: //minstone wall lr - case 436: //minstone fortification - case 437: //minstone wall worn1 - case 438: //minstone wall worn2 - case 439: //minstone wall worn3 - case 440: //minstone wall worn4 - case 450: //frozen liquid wall rd2 - case 451: //frozen liquid wall r2d - case 452: //frozen liquid wall r2u - case 453: //frozen liquid wall ru2 - case 454: //frozen liquid wall l2u - case 455: //frozen liquid wall lu2 - case 456: //frozen liquid wall l2d - case 457: //frozen liquid wall ld2 - case 458: //frozen liquid wall lrud - case 459: //frozen liquid wall rud - case 460: //frozen liquid wall lrd - case 461: //frozen liquid wall lru - case 462: //frozen liquid wall lud - case 463: //frozen liquid wall rd - case 464: //frozen liquid wall ru - case 465: //frozen liquid wall lu - case 466: //frozen liquid wall ld - case 467: //frozen liquid wall ud - case 468: //frozen liquid wall lr - case 494: //constructed fortification - case 495: //constructed pillar - case 496: //constructed wall rd2 - case 497: //constructed wall r2d - case 498: //constructed wall r2u - case 499: //constructed wall ru2 - case 500: //constructed wall l2u - case 501: //constructed wall lu2 - case 502: //constructed wall l2d - case 503: //constructed wall ld2 - case 504: //constructed wall lrud - case 505: //constructed wall rud - case 506: //constructed wall lrd - case 507: //constructed wall lru - case 508: //constructed wall lud - case 509: //constructed wall rd - case 510: //constructed wall ru - case 511: //constructed wall lu - case 512: //constructed wall ld - case 513: //constructed wall ud - case 514: //constructed wall lr - return true; - break; - } - - return false; -} - -bool DFHack::isFloorTerrain(int in) -{ - switch (in) - { - case 2: //murky pool - - case 19: //driftwood stack - case 24: //tree - // case 27: //up stair frozen liquid - case 34: //shrub - case 35: //Chasm - // case 38: //up stair lavastone - // case 41: //up stair soil - case 42: //eerie pit - case 43: //stone floor detailed - case 44: //lavastone floor detailed - case 45: //featstone? floor detailed - case 46: //minstone? floor detailed [calcite] - case 47: //frozen liquid floor detailed - /* - case 51: //up stair grass1 [muddy?] - case 54: //up stair grass2 - case 57: //up stair stone - case 60: //up stair minstone - case 63: //up stair featstone - */ - case 67: //campfire - case 70: //fire - /* - case 79: //stone pillar - case 80: //lavastone pillar - case 81: //featstone pillar - case 82: //minstone pillar - case 83: //frozen liquid pillar - */ - case 89: //waterfall landing - case 90: //river source - - case 231: //sapling - /* - case 233: //ramp grass dry - case 234: //ramp grass dead - case 235: //ramp grass1 [muddy?] - case 236: //ramp grass2 - case 237: //ramp stone - case 238: //ramp lavastone - case 239: //ramp featstone - case 240: //ramp minstone - case 241: //ramp soil - */ - case 242: //ash1 - case 243: //ash2 - case 244: //ash3 - // frozen floors / ramps - case 245: //ramp frozen liquid - case 258: //frozen liquid 1 - case 259: //frozen liquid 2 - case 260: //frozen liquid 3 - case 262: //frozen liquid 0 - case 261: //furrowed soil [road?] -// case 262: //Ice floor - case 264: //Lava bottom of map - case 336: //stone floor 1 (raw stone) - case 337: //stone floor 2 (raw stone) - case 338: //stone floor 3 (raw stone) - case 339: //stone floor 4 (raw stone) - case 340: //lavastone floor 1 (raw stone) - case 341: //lavastone floor 2 (raw stone) - case 342: //lavastone floor 3 (raw stone) - case 343: //lavastone floor 4 (raw stone) - case 344: //featstone floor 1 (raw stone) - case 345: //featstone floor 2 (raw stone) - case 346: //featstone floor 3 (raw stone) - case 347: //featstone floor 4 (raw stone) - case 348: //grass floor 1 (raw) - case 349: //grass floor 2 (raw) - case 350: //grass floor 3 (raw) - case 351: //grass floor 4 (raw) - case 352: //soil floor 1 (raw) - case 353: //soil floor 2 (raw) - case 354: //soil floor 3 (raw) - case 355: //soil floor 4 (raw) - case 356: //soil floor 1 wet (raw) [red sand?] - case 357: //soil floor 2 wet (raw) [red sand?] - case 358: //soil floor 3 wet (raw) [red sand?] - case 359: //soil floor 4 wet (raw) [red sand?] - - case 365: //river n - case 366: //river s - case 367: //river e - case 368: //river w - case 369: //river nw - case 370: //river ne - case 371: //river sw - case 372: //river se - - case 373: //stream wall n (below) - case 374: //stream wall s (below) - case 375: //stream wall e (below) - case 376: //stream wall w (below) - case 377: //stream wall nw (below) - case 378: //stream wall ne (below) - case 379: //stream wall sw (below) - case 380: //stream wall se (below) - - case 387: //dry grass floor1 - case 388: //dry grass floor2 - case 389: //dry grass floor3 - case 390: //dry grass floor4 - case 391: //dead tree - case 392: //dead sapling - case 393: //dead shrub - case 394: //dead grass floor1 - case 395: //dead grass floor2 - case 396: //dead grass floor3 - case 397: //dead grass floor4 - case 398: //grass floor1b - case 399: //grass floor2b - case 400: //grass floor3b - case 401: //grass floor4b - case 402: //stone boulder - case 403: //lavastone boulder - case 404: //featstone boulder - - case 405: //stone pebbles 1 - case 406: //stone pebbles 2 - case 407: //stone pebbles 3 - case 408: //stone pebbles 4 - - case 409: //lavastone pebbles 1 - case 410: //lavastone pebbles 2 - case 411: //lavastone pebbles 3 - case 412: //lavastone pebbles 4 - - case 413: //featstone pebbles 1 - case 414: //featstone pebbles 2 - case 415: //featstone pebbles 3 - case 416: //featstone pebbles 4 - - case 441: //minstone floor 1 (cavern raw) - case 442: //minstone floor 2 (cavern raw) - case 443: //minstone floor 3 (cavern raw) - case 444: //minstone floor 4 (cavern raw) - case 445: //minstone boulder - case 446: //minstone pebbles 1 - case 447: //minstone pebbles 2 - case 448: //minstone pebbles 3 - case 449: //minstone pebbles 4 - case 493: //constructed floor detailed - //case 495: //constructed pillar - case 517: //stair up constructed - //case 518: //ramp constructed - return true; - break; - } - - return false; -} - -bool DFHack::isRampTerrain(int in) -{ - switch (in) - { - case 233: //ramp grass dry - case 234: //ramp grass dead - case 235: //ramp grass1 [muddy?] - case 236: //ramp grass2 - case 237: //ramp stone - case 238: //ramp lavastone - case 239: //ramp featstone - case 240: //ramp minstone - case 241: //ramp soil - case 245: //ramp frozen liquid - case 518: //ramp constructed - return true; - break; - } - - return false; -} - -bool DFHack::isStairTerrain(int in) -{ - switch (in) - { - case 25: //up-down stair frozen liquid - case 26: //down stair frozen liquid - case 27: //up stair frozen liquid - - - case 36: //up-down stair lavastone - case 37: //down stair lavastone - case 38: //up stair lavastone - - case 39: //up-down stair soil - case 40: //down stair soil - case 41: //up stair soil - - case 49: //up-down stair grass1 [muddy?] - case 50: //down stair grass1 [muddy?] - case 51: //up stair grass1 [muddy?] - - - case 52: //up-down stair grass2 - case 53: //down stair grass2 - case 54: //up stair grass2 - - case 55: //up-down stair stone - case 56: //down stair stone - case 57: //up stair stone - - case 58: //up-down stair minstone - case 59: //down stair minstone - case 60: //up stair minstone - - case 61: //up-down stair featstone - case 62: //down stair featstone - case 63: //up stair featstone - - case 515: //stair up-down constructed - case 516: //stair down constructed - case 517: //stair up constructed - return true; - break; - } - - return false; -} -bool DFHack::isOpenTerrain(int in) -{ - switch (in) - { - case 1: // slope down - case 32: //open space - return true; - } - return false; -} -/* -bool isOpenTerrain(int in) -{ - switch (in) - { - //case -1: //uninitialized tile - case 1: //slope down - case 19: //driftwood stack - case 24: //tree - case 25: //up-down stair frozen liquid - case 26: //down stair frozen liquid - case 27: //up stair frozen liquid - case 32: //open space - case 34: //shrub - case 35: //chasm - case 36: //up-down stair lavastone - case 37: //down stair lavastone - case 38: //up stair lavastone - case 39: //up-down stair soil - case 40: //down stair soil - case 41: //up stair soil - case 42: //eerie pit - - case 43: //stone floor detailed - case 44: //lavastone floor detailed - case 45: //featstone? floor detailed - case 46: //minstone? floor detailed [calcite] - case 47: //frozen liquid floor detailed - - case 49: //up-down stair grass1 [muddy?] - case 50: //down stair grass1 [muddy?] - case 51: //up stair grass1 [muddy?] - case 52: //up-down stair grass2 - case 53: //down stair grass2 - case 54: //up stair grass2 - case 55: //up-down stair stone - case 56: //down stair stone - case 57: //up stair stone - case 58: //up-down stair minstone - case 59: //down stair minstone - case 60: //up stair minstone - case 61: //up-down stair featstone - case 62: //down stair featstone - case 63: //up stair featstone - case 67: //campfire - case 70: //fire - /* - case 79: //stone pillar - case 80: //lavastone pillar - case 81: //featstone pillar - case 82: //minstone pillar - case 83: //frozen liquid pillar - *//* - case 231: //sapling - case 233: //ramp grass dry - case 234: //ramp grass dead - case 235: //ramp grass1 [muddy?] - case 236: //ramp grass2 - case 237: //ramp stone - case 238: //ramp lavastone - case 239: //ramp featstone - case 240: //ramp minstone - case 241: //ramp soil - case 242: //ash1 - case 243: //ash2 - case 244: //ash3 - case 245: //ramp frozen liquid - case 261: //furrowed soil [road?] - case 262: //Ice floor - case 336: //stone floor 1 (raw stone) - case 337: //stone floor 2 (raw stone) - case 338: //stone floor 3 (raw stone) - case 339: //stone floor 4 (raw stone) - case 340: //lavastone floor 1 (raw stone) - case 341: //lavastone floor 2 (raw stone) - case 342: //lavastone floor 3 (raw stone) - case 343: //lavastone floor 4 (raw stone) - case 344: //featstone floor 1 (raw stone) - case 345: //featstone floor 2 (raw stone) - case 346: //featstone floor 3 (raw stone) - case 347: //featstone floor 4 (raw stone) - case 348: //grass floor 1 (raw) - case 349: //grass floor 2 (raw) - case 350: //grass floor 3 (raw) - case 351: //grass floor 4 (raw) - case 352: //soil floor 1 (raw) - case 353: //soil floor 2 (raw) - case 354: //soil floor 3 (raw) - case 355: //soil floor 4 (raw) - case 356: //soil floor 1 wet (raw) [red sand?] - case 357: //soil floor 2 wet (raw) [red sand?] - case 358: //soil floor 3 wet (raw) [red sand?] - case 359: //soil floor 4 wet (raw) [red sand?] - case 381: //stream top (above) - case 387: //dry grass floor1 - case 388: //dry grass floor2 - case 389: //dry grass floor3 - case 390: //dry grass floor4 - case 391: //dead tree - case 392: //dead sapling - case 393: //dead shrub - case 394: //dead grass floor1 - case 395: //dead grass floor2 - case 396: //dead grass floor3 - case 397: //dead grass floor4 - case 398: //grass floor1b - case 399: //grass floor2b - case 400: //grass floor3b - case 401: //grass floor4b - case 402: //stone boulder - case 403: //lavastone boulder - case 404: //featstone boulder - case 405: //stone pebbles 1 - case 406: //stone pebbles 2 - case 407: //stone pebbles 3 - case 408: //stone pebbles 4 - case 409: //lavastone pebbles 1 - case 410: //lavastone pebbles 2 - case 411: //lavastone pebbles 3 - case 412: //lavastone pebbles 4 - case 413: //featstone pebbles 1 - case 414: //featstone pebbles 2 - case 415: //featstone pebbles 3 - case 416: //featstone pebbles 4 - case 441: //minstone floor 1 (cavern raw) - case 442: //minstone floor 2 (cavern raw) - case 443: //minstone floor 3 (cavern raw) - case 444: //minstone floor 4 (cavern raw) - case 445: //minstone boulder - case 446: //minstone pebbles 1 - case 447: //minstone pebbles 2 - case 448: //minstone pebbles 3 - case 449: //minstone pebbles 4 - case 493: //constructed floor detailed - //case 495: //constructed pillar - case 515: //stair up-down constructed - case 516: //stair down constructed - case 517: //stair up constructed - case 518: //ramp constructed - - return true; - break; - } - - return false; -}*/ -/* -int picktexture(int in) -{ - switch ( in ) - { - case 1: //slope down - return 3; - - case 2: //murky pool - return 20; - - case 19: //driftwood stack - return 8; - - case 24: //tree - //return 3; - return 15; - - case 25: //up-down stair frozen liquid - case 26: //down stair frozen liquid - case 27: //up stair frozen liquid - return 25; - - case 32: //open space - return 5; - - case 34: //shrub - return 14; - - case 35: //chasm - return 31; - - case 36: //up-down stair lavastone - case 37: //down stair lavastone - case 38: //up stair lavastone - return 32; - - case 39: //up-down stair soil - case 40: //down stair soil - case 41: //up stair soil - return 10; - - case 42: //eerie pit - return 31; - - case 43: //stone floor detailed - return 7; - - case 44: //lavastone floor detailed - return 32; - - case 45: //featstone? floor detailed - return 18; - - case 46: //minstone? floor detailed [calcite] - return 9; - - case 47: //frozen liquid floor detailed - return 27; - - case 49: //up-down stair grass1 [muddy?] - case 50: //down stair grass1 [muddy?] - case 51: //up stair grass1 [muddy?] - return 0; - - case 52: //up-down stair grass2 - case 53: //down stair grass2 - case 54: //up stair grass2 - return 0; //16; - - case 55: //up-down stair stone - case 56: //down stair stone - case 57: //up stair stone - return 1; - - case 58: //up-down stair minstone - case 59: //down stair minstone - case 60: //up stair minstone - return 9; - - case 61: //up-down stair featstone - case 62: //down stair featstone - case 63: //up stair featstone - return 18; - - case 65: //stone fortification - return 22; - - case 67: //campfire - return 3; - - case 70: //fire - return 3; - - case 79: //stone pillar - return 1; - - case 80: //lavastone pillar - return 32; - - case 81: //featstone pillar - return 18; - - case 82: //minstone pillar - return 9; - - case 83: //frozen liquid pillar - return 27; - - case 89: //waterfall landing - return 20; - - case 90: //river source - return 20; - - case 176: //stone wall worn1 (most worn) - case 177: //stone wall worn2 (sorta worn) - case 178: //stone wall worn3 (least worn) - case 219: //stone wall (not worn) - return 1; - - case 231: //sapling - return 15; - - case 233: //ramp grass dry - return 33; - - case 234: //ramp grass dead - return 33; - - case 235: //ramp grass1 [muddy?] - return 0; - - case 236: //ramp grass2 - return 0; //16; - - case 237: //ramp stone - return 1; - - case 238: //ramp lavastone - return 32; - - case 239: //ramp featstone - return 18; - - case 240: //ramp minstone - return 9; - - case 241: //ramp soil - return 10; - - case 242: //ash1 - case 243: //ash2 - case 244: //ash3 - return 32; - - case 245: //ramp frozen liquid - return 27; - - case 258: //frozen liquid 1 - case 259: //frozen liquid 2 - case 260: //frozen liquid 3 - return 25; - - case 261: //furrowed soil [road?] - return 21; - - case 262: //frozen liquid 0 - return 25; - - case 264: //lava - return 24; - - case 265: //soil wall - return 10; - - case 269: //lavastone wall rd2 - case 270: //lavastone wall r2d - case 271: //lavastone wall r2u - case 272: //lavastone wall ru2 - case 273: //lavastone wall l2u - case 274: //lavastone wall lu2 - case 275: //lavastone wall l2d - case 276: //lavastone wall ld2 - case 277: //lavastone wall lrud - case 278: //lavastone wall rud - case 279: //lavastone wall lrd - case 280: //lavastone wall lru - case 281: //lavastone wall lud - case 282: //lavastone wall rd - case 283: //lavastone wall ru - case 284: //lavastone wall lu - case 285: //lavastone wall ld - case 286: //lavastone wall ud - case 287: //lavastone wall lr - return 32; - - case 288: //featstone wall rd2 - case 289: //featstone wall r2d - case 290: //featstone wall r2u - case 291: //featstone wall ru2 - case 292: //featstone wall l2u - case 293: //featstone wall lu2 - case 294: //featstone wall l2d - case 295: //featstone wall ld2 - case 296: //featstone wall lrud - case 297: //featstone wall rud - case 298: //featstone wall lrd - case 299: //featstone wall lru - case 300: //featstone wall lud - case 301: //featstone wall rd - case 382: //featstone wall ru - case 303: //featstone wall lu - case 304: //featstone wall ld - case 305: //featstone wall ud - case 306: //featstone wall lr - return 18; - - case 307: //stone wall rd2 - case 308: //stone wall r2d - case 309: //stone wall r2u - case 310: //stone wall ru2 - case 311: //stone wall l2u - case 312: //stone wall lu2 - case 313: //stone wall l2d - case 314: //stone wall ld2 - case 315: //stone wall lrud - case 316: //stone wall rud - case 317: //stone wall lrd - case 318: //stone wall lru - case 319: //stone wall lud - case 320: //stone wall rd - case 321: //stone wall ru - case 322: //stone wall lu - case 323: //stone wall ld - case 324: //stone wall ud - case 325: //stone wall lr - return 1; - - case 326: //lavastone fortification - return 32; - - case 327: //featstone fortification - return 18; - - case 328: //lavastone wall worn1 (most worn) - case 329: //lavastone wall worn2 (middle worn) - case 330: //lavastone wall worn3 (least worn) - case 331: //lavastone wall - return 32; - - case 332: //featstone wall worn1 (most worn) - case 333: //featstone wall worn2 (middle worn) - case 334: //featstone wall worn3 (least worn) - case 335: //featstone wall - return 18; - - case 336: //stone floor 1 (raw stone) - case 337: //stone floor 2 (raw stone) - case 338: //stone floor 3 (raw stone) - case 339: //stone floor 4 (raw stone) - return 17; - - case 340: //lavastone floor 1 (raw stone) - case 341: //lavastone floor 2 (raw stone) - case 342: //lavastone floor 3 (raw stone) - case 343: //lavastone floor 4 (raw stone) - return 32; - - case 344: //featstone floor 1 (raw stone) - case 345: //featstone floor 2 (raw stone) - case 346: //featstone floor 3 (raw stone) - case 347: //featstone floor 4 (raw stone) - return 18; - - case 348: //grass floor 1 (raw) - case 349: //grass floor 2 (raw) - case 350: //grass floor 3 (raw) - case 351: //grass floor 4 (raw) - return 0; - - case 352: //soil floor 1 (raw) - case 353: //soil floor 2 (raw) - case 354: //soil floor 3 (raw) - case 355: //soil floor 4 (raw) - return 10; - - case 356: //soil floor 1 wet (raw) [red sand?] - case 357: //soil floor 2 wet (raw) [red sand?] - case 358: //soil floor 3 wet (raw) [red sand?] - case 359: //soil floor 4 wet (raw) [red sand?] - return 10; - - case 360: //frozen liquid fortification - return 27; - - case 361: //frozen liquid wall worn1 (most worn) - case 362: //frozen liquid wall worn2 (middle worn) - case 363: //frozen liquid wall worn3 (least worn) - case 364: //frozen liquid wall - return 25; - - case 365: //river n - case 366: //river s - case 367: //river e - case 368: //river w - case 369: //river nw - case 370: //river ne - case 371: //river sw - case 372: //river se - return 19; - - case 373: //stream wall n (below) - case 374: //stream wall s (below) - case 375: //stream wall e (below) - case 376: //stream wall w (below) - case 377: //stream wall nw (below) - case 378: //stream wall ne (below) - case 379: //stream wall sw (below) - case 380: //stream wall se (below) - case 381: //stream top (above) - return 19; - - case 387: //dry grass floor1 - case 388: //dry grass floor2 - case 389: //dry grass floor3 - case 390: //dry grass floor4 - return 33; - - case 391: //dead tree - case 392: //dead sapling - case 393: //dead shrub - return 13; - - case 394: //dead grass floor1 - case 395: //dead grass floor2 - case 396: //dead grass floor3 - case 397: //dead grass floor4 - return 33; - - case 398: //grass floor1b - case 399: //grass floor2b - case 400: //grass floor3b - case 401: //grass floor4b - return 0; //16; - - case 402: //stone boulder - case 403: //lavastone boulder - case 404: //featstone boulder - return 18; - - case 405: //stone pebbles 1 - case 406: //stone pebbles 2 - case 407: //stone pebbles 3 - case 408: //stone pebbles 4 - return 12; - - case 409: //lavastone pebbles 1 - case 410: //lavastone pebbles 2 - case 411: //lavastone pebbles 3 - case 412: //lavastone pebbles 4 - return 12; - - case 413: //featstone pebbles 1 - case 414: //featstone pebbles 2 - case 415: //featstone pebbles 3 - case 416: //featstone pebbles 4 - return 12; - - case 417: //minstone wall rd2 - case 418: //minstone wall r2d - case 419: //minstone wall r2u - case 420: //minstone wall ru2 - case 421: //minstone wall l2u - case 422: //minstone wall lu2 - case 423: //minstone wall l2d - case 424: //minstone wall ld2 - case 425: //minstone wall lrud - case 426: //minstone wall rud - case 427: //minstone wall lrd - case 428: //minstone wall lru - case 429: //minstone wall lud - case 430: //minstone wall rd - case 431: //minstone wall ru - case 432: //minstone wall lu - case 433: //minstone wall ld - case 434: //minstone wall ud - case 435: //minstone wall lr - return 9; - - case 436: //minstone fortification - return 21; - - case 437: //minstone wall worn1 - case 438: //minstone wall worn2 - case 439: //minstone wall worn3 - case 440: //minstone wall worn4 - return 21; - - case 441: //minstone floor 1 (cavern raw) - case 442: //minstone floor 2 (cavern raw) - case 443: //minstone floor 3 (cavern raw) - case 444: //minstone floor 4 (cavern raw) - return 9; - - case 445: //minstone boulder - return 18; - - case 446: //minstone pebbles 1 - case 447: //minstone pebbles 2 - case 448: //minstone pebbles 3 - case 449: //minstone pebbles 4 - return 12; - - case 450: //frozen liquid wall rd2 - case 451: //frozen liquid wall r2d - case 452: //frozen liquid wall r2u - case 453: //frozen liquid wall ru2 - case 454: //frozen liquid wall l2u - case 455: //frozen liquid wall lu2 - case 456: //frozen liquid wall l2d - case 457: //frozen liquid wall ld2 - case 458: //frozen liquid wall lrud - case 459: //frozen liquid wall rud - case 460: //frozen liquid wall lrd - case 461: //frozen liquid wall lru - case 462: //frozen liquid wall lud - case 463: //frozen liquid wall rd - case 464: //frozen liquid wall ru - case 465: //frozen liquid wall lu - case 466: //frozen liquid wall ld - case 467: //frozen liquid wall ud - case 468: //frozen liquid wall lr - return 25; - - case 493: //constructed floor detailed - return 7; - - case 494: //constructed fortification - return 7; - - case 495: //constructed pillar - return 7; - - case 496: //constructed wall rd2 - case 497: //constructed wall r2d - case 498: //constructed wall r2u - case 499: //constructed wall ru2 - case 500: //constructed wall l2u - case 501: //constructed wall lu2 - case 502: //constructed wall l2d - case 503: //constructed wall ld2 - case 504: //constructed wall lrud - case 505: //constructed wall rud - case 506: //constructed wall lrd - case 507: //constructed wall lru - case 508: //constructed wall lud - case 509: //constructed wall rd - case 510: //constructed wall ru - case 511: //constructed wall lu - case 512: //constructed wall ld - case 513: //constructed wall ud - case 514: //constructed wall lr - return 22; - - case 515: //stair up-down constructed - case 516: //stair down constructed - case 517: //stair up constructed - return 4; - - case 518: //ramp constructed - return 4; - - case -1: //not assigned memory - return 6; - - default: //none of the above - return -1; - } - - return 6; -}*/ -int DFHack::getVegetationType(int in) -{ - switch(in) - { - case 391: //dead tree - return DFHack::TREE_DEAD; - case 392: //dead sapling - return DFHack::SAPLING_DEAD; - case 393: //dead shrub - return DFHack::SHRUB_DEAD; - case 24: //tree - return DFHack::TREE_OK; - case 231: //sapling - return DFHack::SAPLING_OK; - case 34: //shrub - return DFHack::SHRUB_OK; - } - // ???? - return -1; -} diff --git a/output/Memory-40d.xml b/output/Memory-40d.xml new file mode 100644 index 000000000..b6d5ce1f5 --- /dev/null +++ b/output/Memory-40d.xml @@ -0,0 +1,2129 @@ + + + + + + + + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 110 + 111 + 112 + 113 + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 105 + 106 + 107 + 108 + 109 + 110 + 111 + 112 + 113 + 114 + 115 + 116 + 117 + 118 + 119 + 120 + 121 + 122 + 123 + 124 + 125 + 126 + 127 + 128 + 129 + 130 + 131 + 132 + 133 + 134 + 135 + 136 + 137 + 138 + 139 + 140 + 141 + 142 + 143 + 144 + 145 + 146 + 147 + 148 + 149 + 150 + 151 + 152 + 153 + 154 + 155 + 156 + 157 + 158 + 159 + 160 + 161 + 162 + 163 + 164 + 165 + 166 + 167 + 168 + 169 + 170 + 171 + 172 + 173 + 174 + 175 + 176 + 177 + 178 + 179 + 180 + 181 + 182 + 183 + 184 + 185 + 186 + 187 + 188 + 189 + 190 + 191 + 192 + 193 + 194 + 195 + 196 + 197 + 198 + 199 + 200 + 201 + 202 + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + 66 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 0 + 66 + 11 + 10 + 13 + 12 + 14 + 15 + 16 + 20 + 38 + 19 + 41 + 39 + 43 + 42 + 40 + 44 + 45 + 48 + 27 + 49 + 21 + 47 + 26 + 46 + 50 + 23 + 18 + 30 + 32 + 71 + 33 + 34 + 70 + 31 + 28 + 69 + 25 + 22 + 29 + 72 + 35 + 36 + 37 + 67 + 73 + 64 + 65 + 17 + 8 + 2 + 6 + 4 + 1 + 5 + 7 + 9 + 3 + 24 + 51 + 52 + 53 + 54 + 55 + 57 + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .,:rsr, + :2;,;r2A@@5 + @2::s5A#@@@ @r. . + sd;:riXA#@@ :@@@Gir;;AS9 + Bs::sS3A#@2 @@#AhXirsS#; + iHrLr5d#@@@ .@#95sr;;rie + i*' `*@3 @@A2sr;:;r#5 + :..:rll: @@A5sr::r3@ + @Hr;iZ#@@@@ `:rr;;;;: + S@r.;i2#@@@ @s. .. + @2::ri2A@@# B@G2ir:...5i + :@r,r3X##@@ @G5sr:..,:A + .@Ar;;rSB@@# H#2sr;,..,is + .' `* ,@ASs;:..,:B + ;rr;:,..,:. + `''' + W I N D O W S + and + W I N E + + + 0x47b6fac2 + 48c831b6f3950913b8e1aeada563d2db + 0x0 + 0x4 +
0x014639f4
+
0x01463288
+
0x01463388
+
0x00c7bc00
+
0x01287d14
+
0x00941288
+
0x01287a9c
+
0x01463358
+
0x014a6994
+
0x014a4eac
+
0x014a6834
+
0xffffffff
+
0x8b010127
+
0x014a4edc
+
0x014a4ee0
+
0x014a4ee4
+
0x014a6680
+
0x014a671c
+
0x014a69b4
+
0x01467b78
+
0x01295d58
+
0x01284184
+
0x00941288
+
0x00c2358c
+
0x00c68350
+
0x014a64dc
+
0x014a4ec4
+
0x014a4ec8
+
0x014a4ecc
+ + 0x08 + + 0x08 + 0x2C + 0x0062 + 0x0264 + 0x0664 + 0x1D64 + + 0x0 + 0x1C + 0x38 + 0x1C + + 0x00 + 0x6c + 0x88 + 0x8C + 0x94 + 0xE4 + 0xE8 + 0xF2 + 0xF4 + 0x158 + 0x1F8 + 0x1FC + 0x228 + 0x2F8 + 0x2AC + 0x328 + 0x32C + 0x330 + 0x3CC + 0x438 + 0x43C + 0x440 + 0x444 + 0x454 + 0x474 + 0x520 + 0x5D0 + + 0x70 + + 0x84 + 0x86 + 0x684 + 0x6B4 + + 0x5C + 0x58 + + 0x4 + + 0x10 + + 0x84 + 0x60 + 0x08 + 0x2C + 0x0062 + 0x0264 + 0x0664 + 0x1D64 + 0x3C + 0x2 + 0x4 + 0x8 + 0x24 + 0x1C + 0x20 + 0x00 + 0x7a + 0xD8 + 0x68 + 0x24 + 0x1C + 0x28 + 0x24 + 0x24 + 0x24 + 0x5C + 0x94 + 0xB0 +
+ + 0x47c12f36 + 8bd90fb6db8388f129fde224a35459de +
0x01463bec
+
0x01463480
+
0x01463580
+
0x00c7bc04
+
0x01287d14
+
0x0094128c
+
0x01287a9c
+
0x01463550
+
0x014a6c60
+
0x014a50a4
+
0x014a6b00
+
0xffffffff
+
0x8b010127
+
0x014a50d4
+
0x014a50d8
+
0x014a50dc
+
0x014a694c
+
0x014a69e8
+
0x014a6c80
+
0x01467d70
+
0x01295d58
+
0x01284184
+
0x00c3fb40
+
0x00c23594
+
0x00c68354
+
0x014a66d4
+
0x014a50bc
+
0x014a50c0
+
0x014a50c4
+
+ + 0x47c29583 + 9147b5e922a30873fd1a742b1dea1724 +
0xffffffff
+
0x8b010127
+
+ + 0x487b4e8b + 4b3857a05590b9d9488900e575079e9d +
0x01512b70
+
0x014feb80
+
0x01512504
+
0x00d16c20
+
0x01322d58
+
0x009d6284
+
0x01322adc
+
0x014fec50
+
0x01555f88
+
0x01554028
+
0x01555e28
+
0xffffffff
+
0x8b010131
+
0x01554058
+
0x0155405c
+
0x01554060
+
0x01555ce8
+
0x01555c6c
+
0x01555fa8
+
0x01516cf4
+
0x01330d98
+
0x0131f1b4
+
0x00cd5398
+
0x00cb8dec
+
0x00d03370
+
0x01555658
+
0x01554040
+
0x01554044
+
0x01554048
+
+ + 0x487c9338 + 52155dea390c2080fc16e4bbeb077164 +
0xffffffff
+
0x8b010131
+
+ + 0x487f2f30 + 8f8cf06b1cd5ea102881a7cced767d4f +
0x01513b90
+
0x014ffba0
+
0x01513524
+
0x00d17c44
+
0x01323d78
+
0x009d7284
+
0xffffffff
+ +
0x014ffc70
+
0x01556fa8
+
0x01555048
+
0x01556e48
+
0xffffffff
+ +
0x8b010131
+
0x01555078
+
0x0155507c
+
0x01555080
+
0x01556d08
+
0x01556c8c
+
0x01556fc8
+
0x01517d14
+
0x01331db8
+
0x013201d4
+
0x00cd63bc
+
0x00cb9dec
+
0x00d04394
+
0x01556678
+
0x01555060
+
0x01555064
+
0x01555068
+
+ + 0x48873bc3 + 8614a01593baef6e4a341e2f1a92ba06 +
0x0151ffb8
+
0x0150bfc8
+
0x0151f94c
+
0x00d23c4c
+
0x0132fdb0
+
0x009e3284
+
0x0132fb34
+
0x0150c098
+
0x015635cc
+
0x01561470
+
0x0156346c
+
0x0132faac
+
0x8b010131
+
0x015614a0
+
0x015614a4
+
0x015614a8
+
0x01563154
+
0x015630d8
+
0x015635ec
+
0x0152413c
+
0x0133ddf0
+
0x0132c1dc
+
0x00ce23c4
+
0x00cc5df4
+
0x00d1039c
+
0x01562aa0
+
0x01561488
+
0x0156148c
+
0x01561490
+
+ + 0x4888672c + 32f68422f5b4d938549eed0565bcfb92 + + + 0x489d8c7f + 33db0401081058fb54252210bf371344 +
0x01576468
+
0x01562478
+
0x01575dfc
+
0x00d7a0fc
+
0x01386260
+
0x009ef294
+
0x01385fe4
+
0x01562548
+
0x015b9a7c
+
0x015b7920
+
0x015b991c
+
0x01385f5c
+
0x5f010137
+
0x015b7950
+
0x015b7954
+
0x015b7958
+
0x015b9604
+
0x015b9588
+
0x015b9a9c
+
0x0157a5ec
+
0x013942a0
+
0x0138268c
+
0x00d387fc
+
0x00d66870
+
0x00d6684c
+
0x015b8f50
+
0x015b7938
+
0x015b793c
+
0x015b7940
+
+ + 0x48a9727f + 441c76f45cfffc6abc6548e41c7e2218 +
0x015828a8
+
0x0156e8b8
+
0x0158223c
+
0x00d860fc
+
0x01392268
+
0x009fb294
+
0x01391fc0
+
0x0156e988
+
0x015c5ecc
+
0x015c3d60
+
0x015c5d6c
+
0x01391f64
+
0x5f010138
+
0x015c3d90
+
0x015c3d94
+
0x015c3d98
+
0x015c5a54
+
0x015c59c8
+
0x015c5eec
+
0x01586a2c
+
0x013a02a8
+
0x0138e694
+
0x00d447fc
+
0x00d72870
+
0x00d7284c
+
0x015c5390
+
0x015c3d78
+
0x015c3d7c
+
0x015c3d80
+
+ + 0x48ad547a + 65b4fa339d4081e934c1297d2a22234a + + + 0x48ad802b + 15e95727019e76aa653538618c7e0cfd + + + 0x48c330df + 2c686c26307dcccd7c36cc79737ebe4f +
0x015838a0
+
0x0156f8b0
+
0x01583234
+
0x00D870F4
+
0x01393260
+
0x009fc294
+
0x1583234
+
0x01392fb8
+
0x0156f980
+
0x015c6ed0
+
0x015c4d58
+
0x015c6d70
+
0x01392f5c
+
0x0138147f
+
0x015c4d88
+
0x015c4d8c
+
0x015c4d90
+
0x015c6a58
+
0x015c69cc
+
0x015c6ef0
+
0x01587a24
+
0x013a12a0
+
0x0138f68c
+
0x00d457f4
+
0x00d73868
+
0x00d73844
+
0x015c6388
+
0x015c4d70
+
0x015c4d74
+
0x015c4d78
+
+ + + 0x4953556c + b1a8ca1f91734eb492b7f54f6823cddb + -0x8 + 0x4 +
0x014d1db0
+
0x014bda18
+
0x014D141C
+
0x00cd4c3c
+
0x0165b5a8
+
0x0094b27c
+
0x165b410
+
0x012e101c
+
0x014d14f8
+
0x01517678
+
0x015152f8
+
0x01517468
+
0x012e0fe4
+
0x012cefbf
+
0x01515330
+
0x01515334
+
0x01515338
+
0x015170f8
+
0x0151702c
+
0x015176a8
+
0x014d7f84
+
0x012ef340
+
0x0165a34c
+
0x00c9333c
+
0x00cc13b0
+
0x00cc138c
+
0x01516930
+
0x01515318
+
0x0151531c
+
0x01515320
+ 0x54 + + 0x0 + 0x1C + 0x38 + 0x1C + + + 0xFC + 0x100 + 0x10A + 0x10C + 0x198 + 0x238 + 0x23C + 0x268 + 0x2F8 + 0x314 + 0x3C0 + 0x3C4 + 0x3C8 + 0x484 + 0x4F0 + 0x4F4 + 0x4F8 + 0x504 + 0x51C + 0x544 + 0x610 + 0x700 + + 0x70 + + 0x10 + 0x2C + 0x0082 + 0x0284 + 0x0684 + 0x1D84 + 0x84 + 0x86 + 0x75C + 0x79C + + 0x64 + 0x60 + + 0xC + 0x2 + 0x4 + 0x8 + 0x24 + 0x1C + 0x20 + 0x2C + 0x0 + 0x7a + 0x100 + 0x68 + 0x24 + + 0x18 + 0x1C + 0x28 + 0x24 + 0x24 + 0x24 + 0x5C + 0x94 + 0xB0 + + + + + + + +
+ + 0x4957716f + 9b6da355562a4cdd345ea3046290499b +
0x00cd6c3c
+
0x0094d27c
+
0x012d0fbf
+
0x00c9533c
+
0x00cc33b0
+
0x00cc338c
+
+ + 0x4957a0a2 + b77759db7a6dd787bf98953fc5749d81 + + + 0x495991c3 + a0792b81e5b8ec1dbdd627643e93b40d +
0xcd8c34
+
0x0094f27c
+
0x012d2fbb
+
0x00c97334
+
0x00cc53a8
+
0x00cc5384
+
+ + 0x495cafd2 + d09e88a32fe57de5973f78ef213271b6 +
0xcefc68
+
0x009662a4
+
0x012e9fef
+
0x00cae368
+
0x00cdc3dc
+
0x00cdc3b8
+
+ + 0x495fcfef + 8e8e2a83d421e356a8047dc8830a7426 +
0xcefc68
+
0x009662a4
+
0x012e9fef
+
0x00cae368
+
0x00cdc3dc
+
0x00cdc3b8
+
+ + 0x4963c928 + 32253bee114dd25ebbaa50d90b5c0a2a + + + 0x4967c2e0 + aea5a207b8b1cda942502f97a429f6c3 + + + 0x49c59b94 + 193193d8624f2f3f6d9d556fab09b122 +
0x0151bd00
+
0x01507968
+
0x0151b36c
+
0x00d20ed8
+
0x016a54f8
+
0x009652a4
+
0x16a5360
+
0x0132e574
+
0x0151b448
+
0x015615c8
+
0x0155f248
+
0x015613b8
+
0x0132e53c
+
0x0131b25f
+
0x0155f280
+
0x0155f284
+
0x0155f288
+
0x01561048
+
0x01560f7c
+
0x015615f8
+
0x01521ed4
+
0x0133c898
+
0x016a429c
+
0x00cdf5a0
+
0x00d0d64c
+
0x00d0d628
+
0x01560880
+
0x0155f268
+
0x0155f26c
+
0x0155f270
+
+ + 0x49c82d3f + 6f81231b845e9c9dc29aaf57705ccc7c + + + 0x4a3ccb7f + 6ea1de36af8e1666bd6478736e298c4c +
0x015b7750
+
0x015a33b8
+
0x015b6dbc
+
0x00ddaed8
+
0x0095f410
+
0x0095f2b4
+
0x1740e60
+
0x013e8574
+
0x015b6e98
+
0x015fd04c
+
0x015faccc
+
0x015fce3c
+
0x013e853c
+
0x013d525f
+
0x015fad04
+
0x015fad08
+
0x015fad0c
+
0x015fcacc
+
0x015fca00
+
0x015fd07c
+
0x015bd924
+
0x015b6dc4
+
0x0173fde0
+
0x00d995a0
+
0x00dc764c
+
0x00dc7628
+
0x015fc304
+
0x015facec
+
0x015facf0
+
0x015facf4
+
+ + 0x4a51c26e + 04a8d8ce311d8ac75e4241bef68d3147 +
0x00ddff38
+
0x00964430
+
0x009642b4
+
0x013da2bf
+
0x00d9e600
+
0x00dcc6ac
+
0x00dcc688
+
+ + 0x4a8623d2 + 781a2e51be4056a7320108f8f0df8a13 +
0x00de1f44
+
0x00966430
+
0x009662b4
+
0x013dc2c7
+
0x00da060c
+
0x00dce6b8
+
0x00dce694
+
+ + 0x4a9a6090 + 12cc4a3dbb6e6dfd7bc7aee458b9471a +
0x015be808
+
0x015aa470
+
0x015bde74
+
0x00de1f54
+
0x00966430
+
0x009662b4
+
0x1747f20
+
0x013ef62c
+
0x015bdf50
+
0x01604104
+
0x01601d84
+
0x01603ef4
+
0x013ef5f4
+
0x013dc2eb
+
0x01601dbc
+
0x01601dc0
+
0x01601dc4
+
0x01603b84
+
0x01603ab8
+
0x01604134
+
0x015c49dc
+
0x015bde7c
+
0x01746e98
+
0x00da061c
+
0x00dce6c8
+
0x00dce6a4
+
0x016033bc
+
0x01601da4
+
0x01601da8
+
0x01601dac
+
+ + 0x4a9b1a72 + 59ab29021aca9f3c66b1ab102fb3ceea + + + 0x4b6b7879 + de66405f54d98297303d439b3b7aa30e +
0x015f3260
+
0x015deec8
+
0x015f28cc
+
0x00e16924
+
0x0099ae08
+
0x0099ac88
+
0x177c978
+
0x014240dc
+
0x015f29a8
+
0x01638b5c
+
0x016367dc
+
0x0163894c
+
0x014240a4
+
0x01410cc1
+
0x01636814
+
0x01636818
+
0x0163681c
+
0x016385dc
+
0x01638510
+
0x01638b8c
+
0x015f9434
+
0x014243c4
+
0x0177b8f0
+
0x00dd4fec
+
0x00e03098
+
0x00e03074
+
0x01637e14
+
0x016367fc
+
0x01636800
+
0x01636804
+
0x0177c978
+
+ + + + 0x4b81b00d + 5cdc6f4804809f4d5cacdb66785e8cda + +
0x00df2ebc
+
0x00977438
+
0x009772b8
+
0x014ad278
+
0x00db1584
+
0x00ddf630
+
0x00ddf60c
+
+ + 0x4b90268a + 13640a273d90af39425b798ae9823757 +
0x01512898
+
0x014fe500
+
0x01511f04
+
0x00d35b68
+
0x016ac1a0
+
0x0097a2b8
+
0x169bfb0
+
0x01343714
+
0x01511fe0
+
0x01558194
+
0x01555e14
+
0x01557f84
+
0x013436dc
+
0x0132ff1e
+
0x01555e4c
+
0x01555e50
+
0x01555e54
+
0x01557c14
+
0x01557b48
+
0x015581c4
+
0x01518a6c
+
0x013439fc
+
0x0169af28
+
0x00cf4230
+
0x00d222dc
+
0x00d222b8
+
0x0155744c
+
0x01555e34
+
0x01555e38
+
0x01555e3c
+
+ + 0x4B918BB9 + af29004e1763bb3460faa11907c3ac90 + + .-"""-. + ' \ + |,. ,-. | + |()L( ()| | + |,' `".| | + |.___.',| ` + .j `--"' ` `. + / ' ' \ + / / ` `. + / / ` . + / / l | + . , L I N U X | | + ,"`. .| | + _.' ``. | `..-'l + | `.`, | `. + | `. __.j ) + |__ |--""___| ,-' + `"--...,+"""" `._,.-' + + + + 7a0859795e972574e80fa3cebc9fcf85 + 0x0 + 0x0 +
0x093154e0
+
0x093016b8
+
0x09355940
+
0x09314ffc
+
0x09301560
+
0x08859fc0
+
0x08cfa060
+
0x0930140c
+
0x09356fd0
+
0x09314ffc
+
0x09355964
+
0x09357808
+
0x093013e4
+
0x092f0580
+
0x0935596c
+
0x09355970
+
0x09355974
+
0x0935754c
+
0x093574e0
+
0x09357928
+
0x09318630
+
0x08b36c80
+
0x09355968
+
0x08b36c84
+
0x08cfa978
+
0x08cfa97c
+
0x09356f6c
+
0x09355954
+
0x09355958
+
0x0935595c
+ 0x1C + + 0x0 + 0x4 + 0x8 + 0x4 + + 0x08 + + 0x00 + 0x4C + 0x44 + 0x90 + 0x94 + 0x003c + 0x0040 + 0x009E + 0x00A0 + 0x00F0 + 0x160 + 0x164 + 0x190 + 0x02F8 + 0x0200 + 0x264 + 0x268 + 0x26C + 0x02F8 + 0x0334 + 0x0338 + 0x033C + 0x0340 + 0x034C + 0x0364 + 0x0400 + 0x0490 + + 0x40 + + 0x08 + 0x2C + 0x0052 + 0x0254 + 0x0654 + 0x1D54 + + 0x54 + 0x56 + 0x5A4 + 0x5C8 + + 0x58 + 0x54 + + 0x4 + + 0xC + 0x24 + 0x18 + 0x2 + 0x4 + 0x8 + 0xC + 0x4 + 0x8 + 0x14 + 0x00 + 0x4a + 0x94 + 0x50 + 0x0C + + 0x20 + + 0xC + 0x4 + 0x10 + 0xC + 0xC + 0xC + 0x14 + 0x1C + 0x20 + + + + + + +
+ + 51c73ff46b2688aafaee0204efe91a94 +
0x09315f00
+
0x093020d8
+
0x09356360
+
0x09315a1c
+
0x09301f80
+
0x0885a9e4
+
0x08cfaa80
+
0x09301e2c
+
0x093579f0
+
0x09315a1c
+
0x09356384
+
0x09358228
+
0x09301e04
+
0x092f0fa0
+
0x0935638c
+
0x09356390
+
0x09356394
+
0x09357f6c
+
0x09357f00
+
0x09358348
+
0x09319050
+
0x08b376a0
+
0x09356388
+
0x08b376a4
+
0x08cfb398
+
0x08cfb39c
+
0x0935798c
+
0x09356374
+
0x09356378
+
0x0935637c
+
+ + c1eb408868c80fd1c726d2a917cd1b9a +
0x0885ad54
+
+ + 59d497bfc3a523f0f40f34283ad59796 +
0x0885bbf0
+
+ + f756194db073f05b98fc6ce872c8757d +
0x09333e00
+
0x0931ffd8
+
0x09374260
+
0x0933391c
+
0x0931fe80
+
0x088788e4
+
0x08d18980
+
0x0931fd2c
+
0x093758f0
+
0x0933391c
+
0x09374284
+
0x09376128
+
0x0931fd04
+
0x0930eea0
+
0x0937428c
+
0x09374290
+
0x09374294
+
0x09375e6c
+
0x09375e00
+
0x09376248
+
0x09336f50
+
0x08b555a0
+
0x09374288
+
0x08b555a4
+
0x08d19298
+
0x08d1929c
+
0x0937588c
+
0x09374274
+
0x09374278
+
0x0937427c
+
+ + b004b3876193633875956af752663f26 + + + c8616fc74d79b3c8c40bbc1182fbd61c +
0x088786a0
+
+ + 992afd73855e787860277f53d18afcbb +
0x08877630
+
+ + cba6354000ec54865a161627605c3837 +
0x092bf340
+
0x092ab518
+
0x092bee5c
+
0x0929a3c8
+
0x092ab3c0
+
0x088073d4
+
0x08ca3eb8
+
0x092ab26c
+
0x092beecc
+
0x09301770
+
0x092ff7a0
+
0x09301668
+
0x092ab244
+
0x0929a3e0
+
0x092ff7cc
+
0x092ff7d0
+
0x092ff7d4
+
0x093013ac
+
0x09301340
+
0x09301788
+
0x092c2490
+
0x08ae40a0
+
0x09510050
+
0x08ca47d4
+
0x08ca47d8
+
0x08ca47dc
+
0x09300dcc
+
0x092ff7b4
+
0x092ff7b8
+
0x092ff7bc
+
+ + fb8ecac8a12af5d0d7b1707078985d0d + + + 4367c59934cbcf14f43fd3af6444c455 +
0x08f55740
+
0x08f41918
+
0x08f5525c
+
0x08f307c8
+
0x08f417c0
+
0x0877b33c
+
0x0893a2ac
+
0x08f4166c
+
0x08f552cc
+
0x08f97b8c
+
0x08f95bbc
+
0x08f97a84
+
0x08f41644
+
0x08f307e0
+
0x08f95be8
+
0x08f95bec
+
0x08f95bf0
+
0x08f977c8
+
0x08f9775c
+
0x08f97ba4
+
0x08f58890
+
0x0877f8e0
+
0x091a647c
+
0x0893abd4
+
0x0893abd8
+
0x0893abdc
+
0x08f971e8
+
0x08f95bd0
+
0x08f95bd4
+
0x08f95bd8
+
+ + 2f3cb9d720e9fe8844c02c72a2b20bbd +
0x08780344
+
0x0893f2d0
+
+ + dab3ce6bc074529706a1e5fe1273108c +
0x08f5a760
+
0x08f46938
+
0x08f5a27c
+
0x08f357e8
+
0x08f467e0
+
0x08780354
+
0x0893f2d0
+
0x08f4668c
+
0x08f5a2ec
+
0x08f9cbac
+
0x08f9abdc
+
0x08f9caa4
+
0x08f46664
+
0x08f35800
+
0x08f9ac08
+
0x08f9ac0c
+
0x08f9ac10
+
0x08f9c7e8
+
0x08f9c77c
+
0x08f9cbc4
+
0x08f5d8b0
+
0x08784900
+
0x091ab49c
+
0x0893fbf4
+
0x0893fbf8
+
0x0893fbfc
+
0x08f9c208
+
0x08f9abf0
+
0x08f9abf4
+
0x08f9abf8
+
+ + 4f55a1dcc326786271f221de23c425b5 + + + 022b933926e08da49c6df8649295f2b7 + + + 8f55a6250f2550e28535b79db43d5f1a +
0x08f628c0
+
0x08f4ea98
+
0x08f623dc
+
0x08f3d948
+
0x08f4e940
+
0x0878c340
+
0x08947438
+
0x08f4e7ec
+
0x08f6244c
+
0x08fa4d0c
+
0x08fa2d3c
+
0x08fa4c04
+
0x08f4e7c4
+
0x660008f3
+
0x08fa2d68
+
0x08fa2d6c
+
0x08fa2d70
+
0x08fa4948
+
0x08fa48dc
+
0x08fa4d24
+
0x08f65a10
+
0x0878caa0
+
0x091b35fc
+
0x08947d54
+
0x08947d58
+
0x08947d5c
+
0x08fa4368
+
0x08fa2d50
+
0x08fa2d54
+
0x08fa2d58
+
+ + 777e7d674d8908042307994cb75250ff +
0x09009860
+
0x08ff5a38
+
0x0900937C
+
0x08fe48e8
+
0x08ff58e0
+
0x08833324
+
0x089ee3d8
+
0x08FF578C
+
0x090093ec
+
0x0904bcac
+
0x09049cdc
+
0x0904bba4
+
0x08ff5764
+
0x08fe4900
+
0x09049d08
+
0x09049d0c
+
0x09049d10
+
0x0904b8e8
+
0x0904b87c
+
0x0904bcc4
+
0x0900c9b0
+
0x08833a40
+
0x0925a59c
+
0x089eecf4
+
0x089eecf8
+
0x089eecfc
+
0x0904b308
+
0x09049cf0
+
0x09049cf4
+
0x09049cf8
+
+ + 04c3ad13c657f59ba6fc135e156d721d +
0x09008880
+
0x08ff4a58
+
0x0900839C
+
0x08fe3908
+
0x08ff4900
+
0x08832328
+
0x089ed3f8
+
0x08ff47ac
+
0x0900840c
+
0x0904accc
+
0x09048cfc
+
0x0904abc4
+
0x08ff4784
+
0xc60008fe
+
0x09048d28
+
0x09048d2c
+
0x09048d30
+
0x0904a908
+
0x0904a89c
+
0x0904ace4
+
0x0900b9d0
+
0x08832a60
+
0x091995fc
+
0x089edd14
+
0x089edd18
+
0x089edd1c
+
0x0904a328
+
0x09048d10
+
0x09048d14
+
0x09048d18
+
+ + + 851c1190b6a7b42f2463967623d18575 + 0x4BB45F99 + + + 0x18 + 0x0 + 0xC + 0x1C + + +
0xe32798
+
0xe60838
+
0xe60814
+
0xae82cc
+ +
0x17f5ab8
+ Found addresses: (next to each other!) + 0x17f5ab8 + 0x17f5ac0 + 0x17f5ac8 + 0x17f5ad0 + +
0x146e45f
+ Found addresses: + 0x146e45f + 0x185b677 + + Bogus:
0xae82cc
+ +
0x017f6f38
+ + Bogus:
0xae82cc
+ + + +
0x016ad738
+
0x016ad73C
+
0x016ad740
+ +
0x016ad744
+
0x016ad748
+
0x016ad74C
+ +
0x016ad750
+
0x016ad754
+
0x016ad758
+ +
0x016AD718
+ 0x10 + 0x0092 + 0x029C + + + 0x0 + 0x1C + 0x38 + + + 0x0 + 0x90 + 0xF8 + 0xFC + 0x110 + 0x114 + 0x6D0 + 0x770 + + + + +
+
+
diff --git a/output/Memory.xml b/output/Memory.xml index 6675cceb7..f4d5a751d 100644 --- a/output/Memory.xml +++ b/output/Memory.xml @@ -1,766 +1,2831 @@ - + - - - - - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - 29 - 30 - 31 - 32 - 33 - 34 - 35 - 36 - 37 - 38 - 39 - 40 - 41 - 42 - 43 - 44 - 45 - 46 - 47 - 48 - 49 - 50 - 51 - 52 - 53 - 54 - 55 - 56 - 57 - 58 - 59 - 60 - 61 - 62 - 63 - 64 - 65 - 66 - 67 - 68 - 69 - 70 - 71 - 72 - 73 - 74 - 75 - 76 - 77 - 78 - 79 - 80 - 81 - 82 - 83 - 84 - 85 - 86 - 87 - 88 - 89 - 90 - 91 - 92 - 93 - 94 - 95 - 96 - 97 - 98 - 99 - 100 - 101 - 102 - 103 - 104 - 105 - 106 - 107 - 108 - 109 - 110 - 111 - 112 - 113 - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - 29 - 30 - 31 - 32 - 33 - 34 - 35 - 36 - 37 - 38 - 39 - 40 - 41 - 42 - 43 - 44 - 45 - 46 - 47 - 48 - 49 - 50 - 51 - 52 - 53 - 54 - 55 - 56 - 57 - 58 - 59 - 60 - 61 - 62 - 63 - 64 - 65 - 66 - 67 - 68 - 69 - 70 - 71 - 72 - 73 - 74 - 75 - 76 - 77 - 78 - 79 - 80 - 81 - 82 - 83 - 84 - 85 - 86 - 87 - 88 - 89 - 90 - 91 - 92 - 93 - 94 - 95 - 96 - 97 - 98 - 99 - 100 - 101 - 102 - 103 - 104 - 105 - 106 - 107 - 108 - 109 - 110 - 111 - 112 - 113 - 114 - 115 - 116 - 117 - 118 - 119 - 120 - 121 - 122 - 123 - 124 - 125 - 126 - 127 - 128 - 129 - 130 - 131 - 132 - 133 - 134 - 135 - 136 - 137 - 138 - 139 - 140 - 141 - 142 - 143 - 144 - 145 - 146 - 147 - 148 - 149 - 150 - 151 - 152 - 153 - 154 - 155 - 156 - 157 - 158 - 159 - 160 - 161 - 162 - 163 - 164 - 165 - 166 - 167 - 168 - 169 - 170 - 171 - 172 - 173 - 174 - 175 - 176 - 177 - 178 - 179 - 180 - 181 - 182 - 183 - 184 - 185 - 186 - 187 - 188 - 189 - 190 - 191 - 192 - 193 - 194 - 195 - 196 - 197 - 198 - 199 - 200 - 201 - 202 - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - 29 - 30 - 31 - 32 - 33 - 34 - 35 - 36 - 37 - 38 - 39 - 40 - 41 - 42 - 43 - 44 - 45 - 46 - 47 - 48 - 49 - 50 - 51 - 52 - 53 - 54 - 55 - 56 - 57 - 58 - 59 - 60 - 61 - 62 - 63 - 64 - 65 - 66 - 67 - 68 - 69 - 70 - 71 - 72 - 73 - 74 - 75 - 76 - 77 - 78 - 79 - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - 29 - 0 - 66 - 11 - 10 - 13 - 12 - 14 - 15 - 16 - 20 - 38 - 19 - 41 - 39 - 43 - 42 - 40 - 44 - 45 - 48 - 27 - 49 - 21 - 47 - 26 - 46 - 50 - 23 - 18 - 30 - 32 - 71 - 33 - 34 - 70 - 31 - 28 - 69 - 25 - 22 - 29 - 72 - 35 - 36 - 37 - 67 - 73 - 64 - 65 - 17 - 8 - 2 - 6 - 4 - 1 - 5 - 7 - 9 - 3 - 24 - 51 - 52 - 53 - 54 - 55 - 57 - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + 0x0 + ==================================================================== + T R A I T S + ==================================================================== + + TODO: parse this, turn into Trait tags. Maybe most of it will be same as 40d. + + ==================================================================== + P R O F E S S I O N S + ==================================================================== + TODO: Parse this and turn it into Profession tags. + Cross-reference with Memory-40d.xml + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 60 + 62 + 63 + 64 + 65 + 66 + 58 + 59 + 61 + 67 + 68 + 69 + 70 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 86 + 87 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 88 + 89 + 90 + ==================================================================== + J O B S + ==================================================================== + TODO: Parse this and turn it into Job tags + + ==================================================================== + S K I L L S + ==================================================================== + 0 + 1 + 2 + 49 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 22 + 23 + 57 + 71 + 72 + 73 + 74 + 75 + 76 + 77 + 78 + 79 + 80 + 81 + 82 + 83 + 84 + 85 + 24 + 25 + 26 + 67 + 68 + 66 + 65 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 86 + 87 + 88 + 89 + 90 + 91 + 92 + 93 + 94 + 95 + 96 + 97 + 98 + 99 + 100 + 101 + 102 + 103 + 104 + 105 + 38 + 39 + 41 + 42 + 43 + 44 + 50 + 52 + 45 + 46 + 47 + 48 + 70 + 36 + 12 + 69 + 37 + 13 + 14 + 16 + 17 + 18 + 53 + 54 + 55 + 56 + 40 + 51 + 21 + 15 + 58 + 19 + 20 + 106 + 59 + 60 + 61 + 62 + 63 + 64 + ==================================================================== + L A B O R S + ==================================================================== + 0 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18 + 19 + 20 + 21 + 22 + 23 + 24 + 25 + 26 + 27 + 28 + 29 + 30 + 31 + 32 + 33 + 34 + 35 + 36 + 37 + 38 + 39 + 40 + 41 + 42 + 43 + 44 + 45 + 46 + 47 + 48 + 49 + 50 + 51 + 52 + 53 + 54 + 55 + 56 + 57 + 58 + 59 + 60 + 61 + 62 + 63 + 64 + 65 + + * Labor groups * + 4294967294 + 4294967293 + 4294967292 + 4294967291 + 4294967290 + 4294967289 + 4294967288 + 4294967287 + 4294967286 + 4294967285 + 4294967284 + 4294967283 + ==================================================================== + V -- T A B L E S + (for stonesense) + ==================================================================== + + + + + + + + .,:rsr, :2;,;r2A@@5 @2::s5A#@@@ @r. . @@ -780,776 +2845,247 @@ W I N D O W S and W I N E - - - 0x47b6fac2 - 48c831b6f3950913b8e1aeada563d2db - 0x0 - 0x4 -
0x014639f4
-
0x01463288
-
0x01463388
-
0x00c7bc00
-
0x01287d14
-
0x00941288
-
0x01287a9c
-
0x01463358
-
0x014a6994
-
0x014a4eac
-
0x014a6834
-
0xffffffff
-
0x8b010127
-
0x014a4edc
-
0x014a4ee0
-
0x014a4ee4
-
0x014a6680
-
0x014a671c
-
0x014a69b4
-
0x01467b78
-
0x01295d58
-
0x01284184
-
0x00941288
-
0x00c2358c
-
0x00c68350
-
0x014a64dc
-
0x014a4ec4
-
0x014a4ec8
-
0x014a4ecc
- - 0x08 - - 0x08 - 0x2C - 0x0062 - 0x0264 - 0x0664 - 0x1D64 - - 0x0 - 0x1C - 0x38 - 0x1C - - 0x00 - 0x6c - 0x88 - 0x8C - 0x94 - 0xE4 - 0xE8 - 0xF2 - 0xF4 - 0x158 - 0x1F8 - 0x1FC - 0x228 - 0x2F8 - 0x2AC - 0x328 - 0x32C - 0x330 - 0x3CC - 0x438 - 0x43C - 0x440 - 0x444 - 0x454 - 0x474 - 0x520 - 0x5D0 - - 0x70 - - 0x84 - 0x86 - 0x684 - 0x6B4 - - 0x5C - 0x58 - - 0x4 - - 0x10 - - 0x84 - 0x60 - 0x08 - 0x2C - 0x0062 - 0x0264 - 0x0664 - 0x1D64 - 0x3C - 0x2 - 0x4 - 0x8 - 0x24 - 0x1C - 0x20 - 0x00 - 0x7a - 0xD8 - 0x68 - 0x24 - 0x1C - 0x28 - 0x24 - 0x24 - 0x24 - 0x5C - 0x94 - 0xB0 -
- - 0x47c12f36 - 8bd90fb6db8388f129fde224a35459de -
0x01463bec
-
0x01463480
-
0x01463580
-
0x00c7bc04
-
0x01287d14
-
0x0094128c
-
0x01287a9c
-
0x01463550
-
0x014a6c60
-
0x014a50a4
-
0x014a6b00
-
0xffffffff
-
0x8b010127
-
0x014a50d4
-
0x014a50d8
-
0x014a50dc
-
0x014a694c
-
0x014a69e8
-
0x014a6c80
-
0x01467d70
-
0x01295d58
-
0x01284184
-
0x00c3fb40
-
0x00c23594
-
0x00c68354
-
0x014a66d4
-
0x014a50bc
-
0x014a50c0
-
0x014a50c4
-
- - 0x47c29583 - 9147b5e922a30873fd1a742b1dea1724 -
0xffffffff
-
0x8b010127
-
- - 0x487b4e8b - 4b3857a05590b9d9488900e575079e9d -
0x01512b70
-
0x014feb80
-
0x01512504
-
0x00d16c20
-
0x01322d58
-
0x009d6284
-
0x01322adc
-
0x014fec50
-
0x01555f88
-
0x01554028
-
0x01555e28
-
0xffffffff
-
0x8b010131
-
0x01554058
-
0x0155405c
-
0x01554060
-
0x01555ce8
-
0x01555c6c
-
0x01555fa8
-
0x01516cf4
-
0x01330d98
-
0x0131f1b4
-
0x00cd5398
-
0x00cb8dec
-
0x00d03370
-
0x01555658
-
0x01554040
-
0x01554044
-
0x01554048
-
- - 0x487c9338 - 52155dea390c2080fc16e4bbeb077164 -
0xffffffff
-
0x8b010131
-
- - 0x487f2f30 - 8f8cf06b1cd5ea102881a7cced767d4f -
0x01513b90
-
0x014ffba0
-
0x01513524
-
0x00d17c44
-
0x01323d78
-
0x009d7284
-
0xffffffff
- -
0x014ffc70
-
0x01556fa8
-
0x01555048
-
0x01556e48
-
0xffffffff
- -
0x8b010131
-
0x01555078
-
0x0155507c
-
0x01555080
-
0x01556d08
-
0x01556c8c
-
0x01556fc8
-
0x01517d14
-
0x01331db8
-
0x013201d4
-
0x00cd63bc
-
0x00cb9dec
-
0x00d04394
-
0x01556678
-
0x01555060
-
0x01555064
-
0x01555068
-
- - 0x48873bc3 - 8614a01593baef6e4a341e2f1a92ba06 -
0x0151ffb8
-
0x0150bfc8
-
0x0151f94c
-
0x00d23c4c
-
0x0132fdb0
-
0x009e3284
-
0x0132fb34
-
0x0150c098
-
0x015635cc
-
0x01561470
-
0x0156346c
-
0x0132faac
-
0x8b010131
-
0x015614a0
-
0x015614a4
-
0x015614a8
-
0x01563154
-
0x015630d8
-
0x015635ec
-
0x0152413c
-
0x0133ddf0
-
0x0132c1dc
-
0x00ce23c4
-
0x00cc5df4
-
0x00d1039c
-
0x01562aa0
-
0x01561488
-
0x0156148c
-
0x01561490
-
- - 0x4888672c - 32f68422f5b4d938549eed0565bcfb92 - - - 0x489d8c7f - 33db0401081058fb54252210bf371344 -
0x01576468
-
0x01562478
-
0x01575dfc
-
0x00d7a0fc
-
0x01386260
-
0x009ef294
-
0x01385fe4
-
0x01562548
-
0x015b9a7c
-
0x015b7920
-
0x015b991c
-
0x01385f5c
-
0x5f010137
-
0x015b7950
-
0x015b7954
-
0x015b7958
-
0x015b9604
-
0x015b9588
-
0x015b9a9c
-
0x0157a5ec
-
0x013942a0
-
0x0138268c
-
0x00d387fc
-
0x00d66870
-
0x00d6684c
-
0x015b8f50
-
0x015b7938
-
0x015b793c
-
0x015b7940
-
- - 0x48a9727f - 441c76f45cfffc6abc6548e41c7e2218 -
0x015828a8
-
0x0156e8b8
-
0x0158223c
-
0x00d860fc
-
0x01392268
-
0x009fb294
-
0x01391fc0
-
0x0156e988
-
0x015c5ecc
-
0x015c3d60
-
0x015c5d6c
-
0x01391f64
-
0x5f010138
-
0x015c3d90
-
0x015c3d94
-
0x015c3d98
-
0x015c5a54
-
0x015c59c8
-
0x015c5eec
-
0x01586a2c
-
0x013a02a8
-
0x0138e694
-
0x00d447fc
-
0x00d72870
-
0x00d7284c
-
0x015c5390
-
0x015c3d78
-
0x015c3d7c
-
0x015c3d80
-
- - 0x48ad547a - 65b4fa339d4081e934c1297d2a22234a - - - 0x48ad802b - 15e95727019e76aa653538618c7e0cfd - - - 0x48c330df - 2c686c26307dcccd7c36cc79737ebe4f -
0x015838a0
-
0x0156f8b0
-
0x01583234
-
0x00D870F4
-
0x01393260
-
0x009fc294
-
0x1583234
-
0x01392fb8
-
0x0156f980
-
0x015c6ed0
-
0x015c4d58
-
0x015c6d70
-
0x01392f5c
-
0x0138147f
-
0x015c4d88
-
0x015c4d8c
-
0x015c4d90
-
0x015c6a58
-
0x015c69cc
-
0x015c6ef0
-
0x01587a24
-
0x013a12a0
-
0x0138f68c
-
0x00d457f4
-
0x00d73868
-
0x00d73844
-
0x015c6388
-
0x015c4d70
-
0x015c4d74
-
0x015c4d78
-
- - - 0x4953556c - b1a8ca1f91734eb492b7f54f6823cddb - -0x8 - 0x4 -
0x014d1db0
-
0x014bda18
-
0x014D141C
-
0x00cd4c3c
-
0x0165b5a8
-
0x0094b27c
-
0x165b410
-
0x012e101c
-
0x014d14f8
-
0x01517678
-
0x015152f8
-
0x01517468
-
0x012e0fe4
-
0x012cefbf
-
0x01515330
-
0x01515334
-
0x01515338
-
0x015170f8
-
0x0151702c
-
0x015176a8
-
0x014d7f84
-
0x012ef340
-
0x0165a34c
-
0x00c9333c
-
0x00cc13b0
-
0x00cc138c
-
0x01516930
-
0x01515318
-
0x0151531c
-
0x01515320
- 0x54 - - 0x0 - 0x1C - 0x38 - 0x1C - - - 0xFC - 0x100 - 0x10A - 0x10C - 0x198 - 0x238 - 0x23C - 0x268 - 0x2F8 - 0x314 - 0x3C0 - 0x3C4 - 0x3C8 - 0x484 - 0x4F0 - 0x4F4 - 0x4F8 - 0x504 - 0x51C - 0x544 - 0x610 - 0x700 - - 0x70 - - 0x10 - 0x2C - 0x0082 - 0x0284 - 0x0684 - 0x1D84 - 0x84 - 0x86 - 0x75C - 0x79C - - 0x64 - 0x60 - - 0xC - 0x2 - 0x4 - 0x8 - 0x24 - 0x1C - 0x20 - 0x2C - 0x0 - 0x7a - 0x100 - 0x68 - 0x24 - - 0x18 - 0x1C - 0x28 - 0x24 - 0x24 - 0x24 - 0x5C - 0x94 - 0xB0 - - - - - - - -
- - 0x4957716f - 9b6da355562a4cdd345ea3046290499b -
0x00cd6c3c
-
0x0094d27c
-
0x012d0fbf
-
0x00c9533c
-
0x00cc33b0
-
0x00cc338c
-
- - 0x4957a0a2 - b77759db7a6dd787bf98953fc5749d81 - - - 0x495991c3 - a0792b81e5b8ec1dbdd627643e93b40d -
0xcd8c34
-
0x0094f27c
-
0x012d2fbb
-
0x00c97334
-
0x00cc53a8
-
0x00cc5384
-
- - 0x495cafd2 - d09e88a32fe57de5973f78ef213271b6 -
0xcefc68
-
0x009662a4
-
0x012e9fef
-
0x00cae368
-
0x00cdc3dc
-
0x00cdc3b8
-
- - 0x495fcfef - 8e8e2a83d421e356a8047dc8830a7426 -
0xcefc68
-
0x009662a4
-
0x012e9fef
-
0x00cae368
-
0x00cdc3dc
-
0x00cdc3b8
-
- - 0x4963c928 - 32253bee114dd25ebbaa50d90b5c0a2a - - - 0x4967c2e0 - aea5a207b8b1cda942502f97a429f6c3 - - - 0x49c59b94 - 193193d8624f2f3f6d9d556fab09b122 -
0x0151bd00
-
0x01507968
-
0x0151b36c
-
0x00d20ed8
-
0x016a54f8
-
0x009652a4
-
0x16a5360
-
0x0132e574
-
0x0151b448
-
0x015615c8
-
0x0155f248
-
0x015613b8
-
0x0132e53c
-
0x0131b25f
-
0x0155f280
-
0x0155f284
-
0x0155f288
-
0x01561048
-
0x01560f7c
-
0x015615f8
-
0x01521ed4
-
0x0133c898
-
0x016a429c
-
0x00cdf5a0
-
0x00d0d64c
-
0x00d0d628
-
0x01560880
-
0x0155f268
-
0x0155f26c
-
0x0155f270
-
- - 0x49c82d3f - 6f81231b845e9c9dc29aaf57705ccc7c - - - 0x4a3ccb7f - 6ea1de36af8e1666bd6478736e298c4c -
0x015b7750
-
0x015a33b8
-
0x015b6dbc
-
0x00ddaed8
-
0x0095f410
-
0x0095f2b4
-
0x1740e60
-
0x013e8574
-
0x015b6e98
-
0x015fd04c
-
0x015faccc
-
0x015fce3c
-
0x013e853c
-
0x013d525f
-
0x015fad04
-
0x015fad08
-
0x015fad0c
-
0x015fcacc
-
0x015fca00
-
0x015fd07c
-
0x015bd924
-
0x015b6dc4
-
0x0173fde0
-
0x00d995a0
-
0x00dc764c
-
0x00dc7628
-
0x015fc304
-
0x015facec
-
0x015facf0
-
0x015facf4
-
- - 0x4a51c26e - 04a8d8ce311d8ac75e4241bef68d3147 -
0x00ddff38
-
0x00964430
-
0x009642b4
-
0x013da2bf
-
0x00d9e600
-
0x00dcc6ac
-
0x00dcc688
-
- - 0x4a8623d2 - 781a2e51be4056a7320108f8f0df8a13 -
0x00de1f44
-
0x00966430
-
0x009662b4
-
0x013dc2c7
-
0x00da060c
-
0x00dce6b8
-
0x00dce694
-
- - 0x4a9a6090 - 12cc4a3dbb6e6dfd7bc7aee458b9471a -
0x015be808
-
0x015aa470
-
0x015bde74
-
0x00de1f54
-
0x00966430
-
0x009662b4
-
0x1747f20
-
0x013ef62c
-
0x015bdf50
-
0x01604104
-
0x01601d84
-
0x01603ef4
-
0x013ef5f4
-
0x013dc2eb
-
0x01601dbc
-
0x01601dc0
-
0x01601dc4
-
0x01603b84
-
0x01603ab8
-
0x01604134
-
0x015c49dc
-
0x015bde7c
-
0x01746e98
-
0x00da061c
-
0x00dce6c8
-
0x00dce6a4
-
0x016033bc
-
0x01601da4
-
0x01601da8
-
0x01601dac
-
- - 0x4a9b1a72 - 59ab29021aca9f3c66b1ab102fb3ceea - - - 0x4b6b7879 - de66405f54d98297303d439b3b7aa30e -
0x015f3260
-
0x015deec8
-
0x015f28cc
-
0x00e16924
-
0x0099ae08
-
0x0099ac88
-
0x177c978
-
0x014240dc
-
0x015f29a8
-
0x01638b5c
-
0x016367dc
-
0x0163894c
-
0x014240a4
-
0x01410cc1
-
0x01636814
-
0x01636818
-
0x0163681c
-
0x016385dc
-
0x01638510
-
0x01638b8c
-
0x015f9434
-
0x014243c4
-
0x0177b8f0
-
0x00dd4fec
-
0x00e03098
-
0x00e03074
-
0x01637e14
-
0x016367fc
-
0x01636800
-
0x01636804
-
0x0177c978
-
- - - - 0x4b81b00d - 5cdc6f4804809f4d5cacdb66785e8cda - -
0x00df2ebc
-
0x00977438
-
0x009772b8
-
0x014ad278
-
0x00db1584
-
0x00ddf630
-
0x00ddf60c
-
- - 0x4b90268a - 13640a273d90af39425b798ae9823757 -
0x01512898
-
0x014fe500
-
0x01511f04
-
0x00d35b68
-
0x016ac1a0
-
0x0097a2b8
-
0x169bfb0
-
0x01343714
-
0x01511fe0
-
0x01558194
-
0x01555e14
-
0x01557f84
-
0x013436dc
-
0x0132ff1e
-
0x01555e4c
-
0x01555e50
-
0x01555e54
-
0x01557c14
-
0x01557b48
-
0x015581c4
-
0x01518a6c
-
0x013439fc
-
0x0169af28
-
0x00cf4230
-
0x00d222dc
-
0x00d222b8
-
0x0155744c
-
0x01555e34
-
0x01555e38
-
0x01555e3c
-
- - 0x4B918BB9 - af29004e1763bb3460faa11907c3ac90 + + + + + 851c1190b6a7b42f2463967623d18575 + 0x4BB45F99 + + Basic things + ============ + 0x18 + 0xC + Vector layout in MSVC 9: + DWORD Allocator + DWORD ? + DWORD ? + DWORD Start + DWORD End + DWORD AllocationEnd + + 0x1C + + Position and window dimensions + ============================== +
0xe32798
+
0xe60838
+
0xe60814
+
0xae82cc
+ +
0x17f5ab8
+ Found addresses: (next to each other!) + 0x17f5ab8 + 0x17f5ac0 + 0x17f5ac8 + 0x17f5ad0 + + GUI State + ========= +
0x146e45f
+ Found addresses: + 0x146e45f + 0x185b677 + + Bogus:
0xae82cc
+ +
0x017f6f38
+ + Bogus:
0xae82cc
+ + Map stuff + ========= +
0x016AD718
+ 0x08 + 0x009A + 0x029C + + 0x1D9C + + + * map size in blocks * +
0x016ad738
+
0x016ad73C
+
0x016ad740
+ + * map size in tiles * +
0x016ad744
+
0x016ad748
+
0x016ad74C
+ + * Suspected region coords * +
0x016ad750
+
0x016ad754
+
0x016ad758
+ + * World size * (WORDs) +
0x016AEDD4
+
0x016AEDD6
+ +
0x16AF52C
+
0x16AF574
+ + + + 0x64 + 0x60 + + 0x4 vector + 0x4 vector + + Name struct + =========== + 0x0 + 0x1C + 0x38 + + Creatures + ========= +
0x0166ecc4
+ 0x0 + 0x88 + 0x8C + 0x90 + 0xF8 + 0xFC + 0x110 + 0x114 + 0x6D0 + 0x770 + 0x830 + + Materials + ========= + + + +
0x16afcec
+
0x16afcec
+ + +
0x16afd04
+ + +
0x16afd1C
+ + +
0x16afd34
+ + +
0x16afd4C
+ + +
0x16afd64
+ + +
0x16afd7C
+ + +
0x16AFD94
+
0x16AFDAC
+
0x16AFDC4
+
0x16AFDDC
+
0x16AFDF4
+ + +
0x16AFE0C
+ +
0x016AFE58
+ + + + +
+ .-"""-. ' \ - |,. ,-. | - |()L( ()| | - |,' `".| | - |.___.',| ` + |,. ,-. | _________________________ + |()L( ()| | \ \ + |,' `".| | /_ Nothing here yet :( \ + |.___.',| ` \________________________\ .j `--"' ` `. / ' ' \ / / ` `. @@ -1562,429 +3098,11 @@ | `. __.j ) |__ |--""___| ,-' `"--...,+"""" `._,.-' - - - 7a0859795e972574e80fa3cebc9fcf85 - 0x0 - 0x0 -
0x093154e0
-
0x093016b8
-
0x09355940
-
0x09314ffc
-
0x09301560
-
0x08859fc0
-
0x08cfa060
-
0x0930140c
-
0x09356fd0
-
0x09314ffc
-
0x09355964
-
0x09357808
-
0x093013e4
-
0x092f0580
-
0x0935596c
-
0x09355970
-
0x09355974
-
0x0935754c
-
0x093574e0
-
0x09357928
-
0x09318630
-
0x08b36c80
-
0x09355968
-
0x08b36c84
-
0x08cfa978
-
0x08cfa97c
-
0x09356f6c
-
0x09355954
-
0x09355958
-
0x0935595c
- 0x1C - - 0x0 - 0x4 - 0x8 - 0x4 - - 0x08 - - 0x00 - 0x4C - 0x44 - 0x90 - 0x94 - 0x003c - 0x0040 - 0x009E - 0x00A0 - 0x00F0 - 0x160 - 0x164 - 0x190 - 0x02F8 - 0x0200 - 0x264 - 0x268 - 0x26C - 0x02F8 - 0x0334 - 0x0338 - 0x033C - 0x0340 - 0x034C - 0x0364 - 0x0400 - 0x0490 - - 0x40 - - 0x08 - 0x2C - 0x0052 - 0x0254 - 0x0654 - 0x1D54 - - 0x54 - 0x56 - 0x5A4 - 0x5C8 - - 0x58 - 0x54 - - 0x4 - - 0xC - 0x24 - 0x18 - 0x2 - 0x4 - 0x8 - 0xC - 0x4 - 0x8 - 0x14 - 0x00 - 0x4a - 0x94 - 0x50 - 0x0C - - 0x20 - - 0xC - 0x4 - 0x10 - 0xC - 0xC - 0xC - 0x14 - 0x1C - 0x20 - - - - - - -
- - 51c73ff46b2688aafaee0204efe91a94 -
0x09315f00
-
0x093020d8
-
0x09356360
-
0x09315a1c
-
0x09301f80
-
0x0885a9e4
-
0x08cfaa80
-
0x09301e2c
-
0x093579f0
-
0x09315a1c
-
0x09356384
-
0x09358228
-
0x09301e04
-
0x092f0fa0
-
0x0935638c
-
0x09356390
-
0x09356394
-
0x09357f6c
-
0x09357f00
-
0x09358348
-
0x09319050
-
0x08b376a0
-
0x09356388
-
0x08b376a4
-
0x08cfb398
-
0x08cfb39c
-
0x0935798c
-
0x09356374
-
0x09356378
-
0x0935637c
-
- - c1eb408868c80fd1c726d2a917cd1b9a -
0x0885ad54
-
- - 59d497bfc3a523f0f40f34283ad59796 -
0x0885bbf0
-
- - f756194db073f05b98fc6ce872c8757d -
0x09333e00
-
0x0931ffd8
-
0x09374260
-
0x0933391c
-
0x0931fe80
-
0x088788e4
-
0x08d18980
-
0x0931fd2c
-
0x093758f0
-
0x0933391c
-
0x09374284
-
0x09376128
-
0x0931fd04
-
0x0930eea0
-
0x0937428c
-
0x09374290
-
0x09374294
-
0x09375e6c
-
0x09375e00
-
0x09376248
-
0x09336f50
-
0x08b555a0
-
0x09374288
-
0x08b555a4
-
0x08d19298
-
0x08d1929c
-
0x0937588c
-
0x09374274
-
0x09374278
-
0x0937427c
-
- - b004b3876193633875956af752663f26 - - - c8616fc74d79b3c8c40bbc1182fbd61c -
0x088786a0
-
- - 992afd73855e787860277f53d18afcbb -
0x08877630
-
- - cba6354000ec54865a161627605c3837 -
0x092bf340
-
0x092ab518
-
0x092bee5c
-
0x0929a3c8
-
0x092ab3c0
-
0x088073d4
-
0x08ca3eb8
-
0x092ab26c
-
0x092beecc
-
0x09301770
-
0x092ff7a0
-
0x09301668
-
0x092ab244
-
0x0929a3e0
-
0x092ff7cc
-
0x092ff7d0
-
0x092ff7d4
-
0x093013ac
-
0x09301340
-
0x09301788
-
0x092c2490
-
0x08ae40a0
-
0x09510050
-
0x08ca47d4
-
0x08ca47d8
-
0x08ca47dc
-
0x09300dcc
-
0x092ff7b4
-
0x092ff7b8
-
0x092ff7bc
-
- - fb8ecac8a12af5d0d7b1707078985d0d - - - 4367c59934cbcf14f43fd3af6444c455 -
0x08f55740
-
0x08f41918
-
0x08f5525c
-
0x08f307c8
-
0x08f417c0
-
0x0877b33c
-
0x0893a2ac
-
0x08f4166c
-
0x08f552cc
-
0x08f97b8c
-
0x08f95bbc
-
0x08f97a84
-
0x08f41644
-
0x08f307e0
-
0x08f95be8
-
0x08f95bec
-
0x08f95bf0
-
0x08f977c8
-
0x08f9775c
-
0x08f97ba4
-
0x08f58890
-
0x0877f8e0
-
0x091a647c
-
0x0893abd4
-
0x0893abd8
-
0x0893abdc
-
0x08f971e8
-
0x08f95bd0
-
0x08f95bd4
-
0x08f95bd8
-
- - 2f3cb9d720e9fe8844c02c72a2b20bbd -
0x08780344
-
0x0893f2d0
-
- - dab3ce6bc074529706a1e5fe1273108c -
0x08f5a760
-
0x08f46938
-
0x08f5a27c
-
0x08f357e8
-
0x08f467e0
-
0x08780354
-
0x0893f2d0
-
0x08f4668c
-
0x08f5a2ec
-
0x08f9cbac
-
0x08f9abdc
-
0x08f9caa4
-
0x08f46664
-
0x08f35800
-
0x08f9ac08
-
0x08f9ac0c
-
0x08f9ac10
-
0x08f9c7e8
-
0x08f9c77c
-
0x08f9cbc4
-
0x08f5d8b0
-
0x08784900
-
0x091ab49c
-
0x0893fbf4
-
0x0893fbf8
-
0x0893fbfc
-
0x08f9c208
-
0x08f9abf0
-
0x08f9abf4
-
0x08f9abf8
-
- - 4f55a1dcc326786271f221de23c425b5 - - - 022b933926e08da49c6df8649295f2b7 - - - 8f55a6250f2550e28535b79db43d5f1a -
0x08f628c0
-
0x08f4ea98
-
0x08f623dc
-
0x08f3d948
-
0x08f4e940
-
0x0878c340
-
0x08947438
-
0x08f4e7ec
-
0x08f6244c
-
0x08fa4d0c
-
0x08fa2d3c
-
0x08fa4c04
-
0x08f4e7c4
-
0x660008f3
-
0x08fa2d68
-
0x08fa2d6c
-
0x08fa2d70
-
0x08fa4948
-
0x08fa48dc
-
0x08fa4d24
-
0x08f65a10
-
0x0878caa0
-
0x091b35fc
-
0x08947d54
-
0x08947d58
-
0x08947d5c
-
0x08fa4368
-
0x08fa2d50
-
0x08fa2d54
-
0x08fa2d58
-
- - 777e7d674d8908042307994cb75250ff -
0x09009860
-
0x08ff5a38
-
0x0900937C
-
0x08fe48e8
-
0x08ff58e0
-
0x08833324
-
0x089ee3d8
-
0x08FF578C
-
0x090093ec
-
0x0904bcac
-
0x09049cdc
-
0x0904bba4
-
0x08ff5764
-
0x08fe4900
-
0x09049d08
-
0x09049d0c
-
0x09049d10
-
0x0904b8e8
-
0x0904b87c
-
0x0904bcc4
-
0x0900c9b0
-
0x08833a40
-
0x0925a59c
-
0x089eecf4
-
0x089eecf8
-
0x089eecfc
-
0x0904b308
-
0x09049cf0
-
0x09049cf4
-
0x09049cf8
-
- - 04c3ad13c657f59ba6fc135e156d721d -
0x09008880
-
0x08ff4a58
-
0x0900839C
-
0x08fe3908
-
0x08ff4900
-
0x08832328
-
0x089ed3f8
-
0x08ff47ac
-
0x0900840c
-
0x0904accc
-
0x09048cfc
-
0x0904abc4
-
0x08ff4784
-
0xc60008fe
-
0x09048d28
-
0x09048d2c
-
0x09048d30
-
0x0904a908
-
0x0904a89c
-
0x0904ace4
-
0x0900b9d0
-
0x08832a60
-
0x091995fc
-
0x089edd14
-
0x089edd18
-
0x089edd1c
-
0x0904a328
-
0x09048d10
-
0x09048d14
-
0x09048d18
-
- -
+ + + +
+ + diff --git a/output/stones.py b/output/stones.py index 5feb53210..de90f8e7e 100644 --- a/output/stones.py +++ b/output/stones.py @@ -1,12 +1,11 @@ # -*- coding: utf-8 -*- import pydfhack -x = pydfhack.API("Memory.xml") -y = pydfhack.MatglossVector() +DF = pydfhack.API("Memory.xml") -if x.Attach(): - success,stones = x.ReadStoneMatgloss() +if DF.Attach(): + success,stones = DF.ReadStoneMatgloss() if success: print "Dumping all stone" for matgloss in stones: print "ID %s, name %s" % (matgloss.id, matgloss.name) - x.Detach() + DF.Detach() diff --git a/precompiled/linux/libdfconnect.so b/precompiled/linux/libdfconnect.so index 98aaad1d0..633f5c5e5 100755 Binary files a/precompiled/linux/libdfconnect.so and b/precompiled/linux/libdfconnect.so differ diff --git a/precompiled/windows/SDL.dll b/precompiled/windows/SDL.dll index 61db5a270..4b9815255 100644 Binary files a/precompiled/windows/SDL.dll and b/precompiled/windows/SDL.dll differ diff --git a/reversing/buildings_d19_lin.txt b/reversing/buildings_d19_lin.txt new file mode 100644 index 000000000..6148196ea --- /dev/null +++ b/reversing/buildings_d19_lin.txt @@ -0,0 +1,75 @@ +.rodata:08773064 t_building_templest +.rodata:08772FE4 t_building_dark_towerst +.rodata:08772EE4 t_building_home_apartment_roomst +.rodata:08772F24 t_building_home_apartmentst +.rodata:08772F64 t_building_home_singlest +.rodata:08773024 t_building_keepst +.rodata:08772FA4 t_building_mead_hallst +.rodata:087730A4 t_building_storest +.rodata:08776784 23building_constructionst +.rodata:087771E4 21building_road_pavedst +.rodata:08777064 20building_road_dirtst +.rodata:08777AC4 15building_roadst +.rodata:08779424 16building_wagonst +.rodata:087792A4 21building_tradedepotst +.rodata:087789C4 19building_workshopst +.rodata:08778E44 18building_furnacest +.rodata:08778244 21building_animaltrapst +.rodata:08778FC4 19building_farmplotst +.rodata:08777644 17building_windowst +.rodata:087777C4 17building_statuest +.rodata:08777944 15building_wellst +.rodata:08777364 17building_coffinst +.rodata:087795A4 15building_shopst +.rodata:087783C4 16building_chairst +.rodata:08777C44 16building_tablest +.rodata:08777C44 14building_bedst +.rodata:08778B44 22building_siegeenginest +.rodata:08776D64 15building_cagest +.rodata:08776EE4 16building_chainst +.rodata:08776184 19building_windmillst +.rodata:08776304 22building_water_wheelst +.rodata:08776004 21building_screw_pumpst +.rodata:08778844 24building_archerytargetst +.rodata:08778544 17building_weaponst +.rodata:087786C4 18building_supportst +.rodata:08776604 24building_axle_verticalst +.rodata:08776484 26building_axle_horizontalst +.rodata:08776BE4 24building_gear_assemblyst +.rodata:08778CC4 15building_trapst +.rodata:08779EA4 21building_bars_floorst +.rodata:0877A024 24building_bars_verticalst +.rodata:0877A324 22building_grate_floorst +.rodata:0877A1A4 21building_grate_wallst +.rodata:0877A4A4 20building_floodgatest +.rodata:08779D24 17building_bridgest +.rodata:08779A24 16building_hatchst +.rodata:08779BA4 15building_doorst +.rodata:08777DC4 21building_armorstandst +.rodata:08777F44 21building_weaponrackst +.rodata:087798A4 18building_cabinetst +.rodata:08779724 14building_boxst +.rodata:08776A64 17building_actualst +.rodata:08779144 18building_civzonest +.rodata:087774E4 20building_stockpilest +0:FFFFFFFF 21building_window_gemst +0:FFFFFFFF 23building_window_glassst +.rodata:08787664 t_building_interactst +.rodata:08788DE4 n_building_selectorst +.rodata:08788E44 n_building_permit_foreign_armorst +.rodata:08788E24 n_building_permit_itemst +.rodata:08788E64 n_building_permit_foreign_siegeammost +.rodata:08788E84 n_building_permit_foreign_weaponst +.rodata:08788EA4 n_building_permit_trapcompst +.rodata:08788F04 n_building_new_jobst +.rodata:08788EC4 n_building_category_selectorst +.rodata:08788EE4 n_building_material_selectorst +0:FFFFFFFF f_building_well_tagst +0:FFFFFFFF E_BUILDING_TEMPLE +0:FFFFFFFF E_BUILDING_KEEP +0:FFFFFFFF f_building_civzone_assignedst +0:FFFFFFFF f_building_triggerst +0:FFFFFFFF f_building_triggertargetst +0:FFFFFFFF f_building_chainst +0:FFFFFFFF f_building_cagedst +0:FFFFFFFF f_building_holderst diff --git a/doc/building-facing/bridge/facings.txt b/reversing/doc/building-facing/bridge/facings.txt similarity index 100% rename from doc/building-facing/bridge/facings.txt rename to reversing/doc/building-facing/bridge/facings.txt diff --git a/doc/building-facing/bridge/linux1.png b/reversing/doc/building-facing/bridge/linux1.png similarity index 100% rename from doc/building-facing/bridge/linux1.png rename to reversing/doc/building-facing/bridge/linux1.png diff --git a/doc/building-facing/bridge/windows.png b/reversing/doc/building-facing/bridge/windows.png similarity index 100% rename from doc/building-facing/bridge/windows.png rename to reversing/doc/building-facing/bridge/windows.png diff --git a/doc/building-facing/horizontal_axle/1.png b/reversing/doc/building-facing/horizontal_axle/1.png similarity index 100% rename from doc/building-facing/horizontal_axle/1.png rename to reversing/doc/building-facing/horizontal_axle/1.png diff --git a/doc/building-facing/horizontal_axle/2-windows.png b/reversing/doc/building-facing/horizontal_axle/2-windows.png similarity index 100% rename from doc/building-facing/horizontal_axle/2-windows.png rename to reversing/doc/building-facing/horizontal_axle/2-windows.png diff --git a/doc/building-facing/horizontal_axle/2.png b/reversing/doc/building-facing/horizontal_axle/2.png similarity index 100% rename from doc/building-facing/horizontal_axle/2.png rename to reversing/doc/building-facing/horizontal_axle/2.png diff --git a/doc/building-facing/screw/1.png b/reversing/doc/building-facing/screw/1.png similarity index 100% rename from doc/building-facing/screw/1.png rename to reversing/doc/building-facing/screw/1.png diff --git a/doc/building-facing/screw/2-windows.png b/reversing/doc/building-facing/screw/2-windows.png similarity index 100% rename from doc/building-facing/screw/2-windows.png rename to reversing/doc/building-facing/screw/2-windows.png diff --git a/doc/building-facing/screw/2.png b/reversing/doc/building-facing/screw/2.png similarity index 100% rename from doc/building-facing/screw/2.png rename to reversing/doc/building-facing/screw/2.png diff --git a/doc/building-facing/screw/3.png b/reversing/doc/building-facing/screw/3.png similarity index 100% rename from doc/building-facing/screw/3.png rename to reversing/doc/building-facing/screw/3.png diff --git a/doc/building-facing/screw/4.png b/reversing/doc/building-facing/screw/4.png similarity index 100% rename from doc/building-facing/screw/4.png rename to reversing/doc/building-facing/screw/4.png diff --git a/doc/building-facing/waterwheel/linux.png b/reversing/doc/building-facing/waterwheel/linux.png similarity index 100% rename from doc/building-facing/waterwheel/linux.png rename to reversing/doc/building-facing/waterwheel/linux.png diff --git a/doc/building-facing/waterwheel/windows.png b/reversing/doc/building-facing/waterwheel/windows.png similarity index 100% rename from doc/building-facing/waterwheel/windows.png rename to reversing/doc/building-facing/waterwheel/windows.png diff --git a/doc/state/lever/linux/lever_off b/reversing/doc/state/lever/linux/lever_off similarity index 100% rename from doc/state/lever/linux/lever_off rename to reversing/doc/state/lever/linux/lever_off diff --git a/doc/state/lever/linux/lever_on b/reversing/doc/state/lever/linux/lever_on similarity index 100% rename from doc/state/lever/linux/lever_on rename to reversing/doc/state/lever/linux/lever_on diff --git a/doc/state/lever/windows-d16/diff b/reversing/doc/state/lever/windows-d16/diff similarity index 100% rename from doc/state/lever/windows-d16/diff rename to reversing/doc/state/lever/windows-d16/diff diff --git a/reversing/doc/vtables-win-40d19.txt b/reversing/doc/vtables-win-40d19.txt new file mode 100644 index 000000000..5d1e24235 --- /dev/null +++ b/reversing/doc/vtables-win-40d19.txt @@ -0,0 +1,5702 @@ +008F8594h: possible vtable (1 methods) +(SI) +0000: type_info + type_info::`vftable' + referencing functions: + +008F8644h: possible vtable (2 methods) +(SI) +0000: std::bad_alloc +0000: std::exception + std::bad_alloc::`vftable' + referencing functions: + .text:00401000 + .text:00401010 + .text:004045D0 + .text:00404620 + .text:00450A70 + .text:005368F0 + .text:00536950 + .text:00536A20 + .text:00536AC0 + .text:00536B70 + .text:00536BC0 + .text:00536C10 + .text:00536C60 + .text:005408C0 + .text:00540970 + .text:00658770 + .text:006687F0 + .text:006E3790 + .text:006E37E0 + +008F8650h: possible vtable (2 methods) +(SI) +0000: std::logic_error +0000: std::exception + std::logic_error::`vftable' + referencing functions: + .text:00401040 + .text:004010B0 + .text:00529550 + .text:00529570 + +008F865Ch: possible vtable (2 methods) +(SI) +0000: std::length_error +0000: std::logic_error +0000: std::exception + std::length_error::`vftable' + referencing functions: + .text:004044E0 + .text:00418040 + .text:0046B9C0 + .text:0052FBE0 + .text:00530030 + .text:00531210 + .text:00531930 + .text:00531C90 + .text:00531FB0 + .text:005328D0 + .text:00532CF0 + .text:00533090 + .text:00533570 + .text:005337E0 + .text:005343B0 + .text:00534520 + .text:005347D0 + .text:00534F60 + .text:0053F770 + .text:00540690 + .text:006585C0 + .text:00668250 + .text:006DC3A0 + .text:006E21E0 + .text:006E2780 + .text:006E2A30 + +008F8668h: possible vtable (11 methods) +(SI) +0000: abstract_buildingst + abstract_buildingst::`vftable' + referencing functions: + .text:00401610 (abstract_building_home_apartment_roomst::~abstract_building_home_apartment_roomst) + .text:004016C0 (abstract_buildingst::abstract_buildingst) + scalar deleting destructor: 00401750h + destructor: 00401610h + constructor: 004016C0h + +008F8698h: possible vtable (11 methods) +(SI) +0000: abstract_building_storest +0000: abstract_buildingst + abstract_building_storest::`vftable' + referencing functions: + .text:004017E0 + +008F86C8h: possible vtable (11 methods) +(SI) +0000: abstract_building_mead_hallst +0000: abstract_buildingst + abstract_building_mead_hallst::`vftable' + referencing functions: + .text:004018C0 + +008F86F8h: possible vtable (11 methods) +(SI) +0000: abstract_building_keepst +0000: abstract_buildingst + abstract_building_keepst::`vftable' + referencing functions: + .text:00401990 + +008F8728h: possible vtable (11 methods) +(SI) +0000: abstract_building_home_singlest +0000: abstract_buildingst + abstract_building_home_singlest::`vftable' + referencing functions: + .text:00401D70 + .text:004ABBE0 + .text:00544770 + scalar deleting destructor: 00401750h + destructor: 00401610h + +008F8758h: possible vtable (11 methods) +(SI) +0000: abstract_building_home_apartmentst +0000: abstract_buildingst + abstract_building_home_apartmentst::`vftable' + referencing functions: + .text:00401D70 + .text:004ABBE0 + .text:005447D0 + scalar deleting destructor: 00401750h + destructor: 00401610h + +008F8788h: possible vtable (11 methods) +(SI) +0000: abstract_building_home_apartment_roomst +0000: abstract_buildingst + abstract_building_home_apartment_roomst::`vftable' + referencing functions: + .text:00401D70 + .text:004ABBE0 + .text:0056E0B0 + scalar deleting destructor: 00401750h + destructor: 00401610h + +008F87B8h: possible vtable (11 methods) +(SI) +0000: abstract_building_dark_towerst +0000: abstract_buildingst + abstract_building_dark_towerst::`vftable' + referencing functions: + .text:00401A10 + +008F87E8h: possible vtable (11 methods) +(SI) +0000: abstract_building_templest +0000: abstract_buildingst + abstract_building_templest::`vftable' + referencing functions: + .text:00401A70 + +008F8D48h: possible vtable (10 methods) +(SI) +0000: art_image_elementst + art_image_elementst::`vftable' + referencing functions: + .text:00406CE0 (art_image_element_shapest::`scalar deleting destructor') + scalar deleting destructor: 00406CE0h + +008F8D74h: possible vtable (10 methods) +(SI) +0000: art_image_element_creaturest +0000: art_image_elementst + art_image_element_creaturest::`vftable' + referencing functions: + .text:00406A00 + .text:00407B60 + .text:00407C40 + .text:00409DE0 (4 times) + .text:00681F40 + .text:00682060 + .text:00682180 + .text:00682320 + .text:00682440 + .text:00682560 + .text:006826D0 (2 times) + .text:00682890 (2 times) + .text:00682A50 + .text:00682B80 (2 times) + .text:00682D50 (2 times) + .text:00682F60 (2 times) + .text:00683130 + .text:00683290 + .text:006833B0 + .text:006834D0 + .text:00683630 + .text:00683770 (2 times) + .text:00683970 (2 times) + .text:00683B30 + .text:00683CA0 + .text:00683E60 (2 times) + .text:00684070 (2 times) + .text:006842F0 (2 times) + .text:006844B0 (2 times) + .text:00684660 (2 times) + .text:00684820 (2 times) + .text:006849E0 (2 times) + .text:00684BA0 (2 times) + .text:00684D70 (2 times) + .text:00684F40 (3 times) + .text:00685470 (2 times) + .text:00685640 (2 times) + .text:00685800 (2 times) + .text:00685BF0 + .text:00685DD0 + .text:00685FC0 + .text:00686300 + .text:006864C0 + .text:006866A0 + .text:006867D0 (2 times) + .text:00686990 + .text:00686AB0 (2 times) + .text:00686CA0 (2 times) + .text:00686F70 + .text:00687110 + .text:0068746F (2 times) + .text:00687580 (2 times) + .text:006877D0 + .text:00687930 (6 times) + .text:00687D80 (6 times) + .text:00688890 (2 times) + .text:00688BD0 (2 times) + .text:0085FDA0 (3 times) + .text:00887180 + scalar deleting destructor: 00406CE0h + +008F8DA0h: possible vtable (10 methods) +(SI) +0000: art_image_element_itemst +0000: art_image_elementst + art_image_element_itemst::`vftable' + referencing functions: + .text:00406BA0 + .text:00406C10 + .text:00682180 + .text:006861A0 + .text:00686300 + .text:00887180 + scalar deleting destructor: 00406CE0h + +008F8DCCh: possible vtable (10 methods) +(SI) +0000: art_image_element_plantst +0000: art_image_elementst + art_image_element_plantst::`vftable' + referencing functions: + .text:00406C80 + .text:00407B60 + .text:00407C40 + .text:0085FDA0 (2 times) + scalar deleting destructor: 00406CE0h + +008F8DF8h: possible vtable (10 methods) +(SI) +0000: art_image_element_treest +0000: art_image_elementst + art_image_element_treest::`vftable' + referencing functions: + .text:00406CB0 + .text:00407B60 + .text:00407C40 + .text:00684F40 + .text:0085FDA0 + scalar deleting destructor: 00406CE0h + +008F8E24h: possible vtable (10 methods) +(SI) +0000: art_image_element_shapest +0000: art_image_elementst + art_image_element_shapest::`vftable' + referencing functions: + .text:00406DB0 + .text:00407B60 + .text:00407C40 + .text:00887180 + scalar deleting destructor: 00406CE0h + +008F8E50h: possible vtable (6 methods) +(SI) +0000: art_image_propertyst + art_image_propertyst::`vftable' + referencing functions: + .text:00406E00 + .text:00407000 + +008F8E6Ch: possible vtable (6 methods) +(SI) +0000: art_image_property_transitive_verbst +0000: art_image_propertyst + art_image_property_transitive_verbst::`vftable' + referencing functions: + .text:00406F70 + .text:00407D00 + .text:00409DE0 + .text:00682180 + .text:006826D0 + .text:00682890 + .text:00682B80 + .text:00682D50 + .text:00682F60 + .text:00683770 + .text:00683970 + .text:00683E60 + .text:00684070 + .text:006842F0 + .text:006844B0 + .text:00684660 + .text:00684820 + .text:006849E0 + .text:00684BA0 + .text:00684D70 + .text:00684F40 (4 times) + .text:00685470 + .text:00685640 + .text:00685800 + .text:00685BF0 + .text:00685DD0 + .text:00685FC0 + .text:00686300 + .text:006864C0 + .text:006867D0 + .text:00686AB0 + .text:00686CA0 + .text:0068746F + .text:00687930 + .text:00687D80 (3 times) + .text:00688890 + .text:00688BD0 + .text:0085FDA0 (9 times) + +008F8E88h: possible vtable (6 methods) +(SI) +0000: art_image_property_intransitive_verbst +0000: art_image_propertyst + art_image_property_intransitive_verbst::`vftable' + referencing functions: + .text:004070D0 + .text:00407D00 + .text:00409DE0 (3 times) + .text:00681F40 + .text:00682060 + .text:00682320 + .text:00682440 + .text:00682560 + .text:00682A50 + .text:00683130 + .text:00683290 + .text:006833B0 + .text:006834D0 + .text:00683630 + .text:00683B30 + .text:00683CA0 + .text:00684070 + .text:00684F40 (3 times) + .text:00685800 (6 times) + .text:006861A0 + .text:006866A0 + .text:00686990 + .text:00686CA0 (3 times) + .text:00686F70 (2 times) + .text:00687110 + .text:00687580 (2 times) + .text:006877D0 + .text:00687930 (2 times) + .text:00687D80 (16 times) + .text:00688890 (2 times) + .text:0085FDA0 + +008F8EF4h: possible vtable (1 methods) + referencing functions: + .text:0040BC50 + +008F9198h: possible vtable (5 methods) +(SI) +0000: block_square_eventst + block_square_eventst::`vftable' + referencing functions: + .text:0040CCA0 (block_square_event_world_constructionst::`scalar deleting destructor') + scalar deleting destructor: 0040CCA0h + +008F91B0h: possible vtable (5 methods) +(SI) +0000: block_square_event_mineralst +0000: block_square_eventst + block_square_event_mineralst::`vftable' + referencing functions: + .text:00417430 + .text:007CC3C0 (4 times) + .text:0087CC60 + scalar deleting destructor: 0040CCA0h + +008F91C8h: possible vtable (5 methods) +(SI) +0000: block_square_event_frozen_liquidst +0000: block_square_eventst + block_square_event_frozen_liquidst::`vftable' + referencing functions: + .text:0040CB00 + .text:0087CC60 + scalar deleting destructor: 0040CCA0h + +008F91E0h: possible vtable (5 methods) +(SI) +0000: block_square_event_world_constructionst +0000: block_square_eventst + block_square_event_world_constructionst::`vftable' + referencing functions: + .text:004175A0 + .text:0087CC60 + scalar deleting destructor: 0040CCA0h + +008F91F8h: possible vtable (2 methods) +(SI) +0000: cave_columnst + cave_columnst::`vftable' + referencing functions: + .text:00415B20 (2 times) + .text:0087D4C0 + +008F9204h: possible vtable (3 methods) +(SI) +0000: cave_column_rectanglest + cave_column_rectanglest::`vftable' + referencing functions: + .text:0040CE70 + +008F9214h: possible vtable (31 methods) +(SI) +0000: history_event_masterpiece_lostst +0000: history_eventst + history_event_masterpiece_lostst::`vftable' + referencing functions: + .text:0040D340 + .text:0066EF80 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +008F9BA8h: possible vtable (8 methods) +(SI) +0000: projst + projst::`vftable' + referencing functions: + .text:004190B0 + .text:004191A0 (proj_itemst::~proj_itemst) + .text:0042E450 + .text:0042EEB0 (2 times) + .text:00451AC0 + .text:007707D0 + .text:00770890 + .text:00770950 + .text:00770A10 + +008F9BCCh: possible vtable (85 methods) +(SI) +0000: buildingst + buildingst::`vftable' + referencing functions: + .text:004202D0 (buildingst::buildingst) + .text:0043A790 (buildingst::~buildingst) + scalar deleting destructor: 004203C0h + destructor: 0043A790h + constructor: 004202D0h + +008F9D24h: possible vtable (89 methods) +(SI) +0000: building_actualst +0000: buildingst + building_actualst::`vftable' + referencing functions: + .text:0041B510 (building_actualst::building_actualst) + .text:0043A680 (building_constructionst::~building_constructionst) + scalar deleting destructor: 0041E150h + destructor: 0043A680h + constructor: 0041B510h + +008F9E8Ch: possible vtable (85 methods) +(SI) +0000: building_civzonest +0000: buildingst + building_civzonest::`vftable' + referencing functions: + .text:0041B2E0 + scalar deleting destructor: 0041B380h + destructor: 0041B3A0h + +008F9FE4h: possible vtable (89 methods) +(SI) +0000: building_wellst +0000: building_actualst +0000: buildingst + building_wellst::`vftable' + referencing functions: + .text:0041E6A0 + .text:0041E740 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FA14Ch: possible vtable (85 methods) +(SI) +0000: building_stockpilest +0000: buildingst + building_stockpilest::`vftable' + referencing functions: + .text:0041AF20 + +008FA2A4h: possible vtable (181 methods) +(SI) +0000: item_actualst +0000: itemst + item_actualst::`vftable' + referencing functions: + .text:006A78C0 (item_cheesest::~item_cheesest) + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +008FA57Ch: possible vtable (181 methods) +(SI) +0000: item_liquid_miscst +0000: item_liquidst +0000: item_liquipowderst +0000: item_actualst +0000: itemst + item_liquid_miscst::`vftable' + referencing functions: + .text:00418A70 + .text:0070A800 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +008FA854h: possible vtable (181 methods) +(SI) +0000: item_remainsst +0000: item_actualst +0000: itemst + item_remainsst::`vftable' + referencing functions: + .text:00418BE0 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +008FAB2Ch: possible vtable (181 methods) +(SI) +0000: item_verminst +0000: item_critterst +0000: item_actualst +0000: itemst + item_verminst::`vftable' + referencing functions: + .text:00418D40 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +008FAE04h: possible vtable (180 methods) +(SI) +0000: item_plantst +0000: item_actualst +0000: itemst + item_plantst::`vftable' + referencing functions: + .text:00418E40 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +008FB0D8h: possible vtable (8 methods) +(SI) +0000: proj_itemst +0000: projst + proj_itemst::`vftable' + referencing functions: + .text:00419140 + .text:004191A0 (proj_itemst::~proj_itemst) + .text:0042E450 + .text:0042EEB0 (2 times) + .text:007707D0 + scalar deleting destructor: 00419240h + destructor: 004191A0h + +008FB0FCh: possible vtable (89 methods) +(SI) +0000: building_boxst +0000: building_actualst +0000: buildingst + building_boxst::`vftable' + referencing functions: + .text:0041B580 + .text:0041B5F0 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FB264h: possible vtable (89 methods) +(SI) +0000: building_cabinetst +0000: building_actualst +0000: buildingst + building_cabinetst::`vftable' + referencing functions: + .text:0041B670 + .text:0041B6E0 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FB3CCh: possible vtable (89 methods) +(SI) +0000: building_weaponrackst +0000: building_actualst +0000: buildingst + building_weaponrackst::`vftable' + referencing functions: + .text:0043B5E0 + +008FB534h: possible vtable (89 methods) +(SI) +0000: building_armorstandst +0000: building_actualst +0000: buildingst + building_armorstandst::`vftable' + referencing functions: + .text:0043B720 + +008FB69Ch: possible vtable (89 methods) +(SI) +0000: building_doorst +0000: building_actualst +0000: buildingst + building_doorst::`vftable' + referencing functions: + .text:0041BBD0 + .text:0041BC50 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FB804h: possible vtable (89 methods) +(SI) +0000: building_hatchst +0000: building_actualst +0000: buildingst + building_hatchst::`vftable' + referencing functions: + .text:0041BCE0 + .text:0041BD60 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FB96Ch: possible vtable (89 methods) +(SI) +0000: building_bridgest +0000: building_actualst +0000: buildingst + building_bridgest::`vftable' + referencing functions: + .text:0041BDE0 + .text:0041BE70 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FBAD4h: possible vtable (89 methods) +(SI) +0000: building_floodgatest +0000: building_actualst +0000: buildingst + building_floodgatest::`vftable' + referencing functions: + .text:0041C040 + .text:0041C0D0 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FBC3Ch: possible vtable (89 methods) +(SI) +0000: building_grate_wallst +0000: building_actualst +0000: buildingst + building_grate_wallst::`vftable' + referencing functions: + .text:0041C160 + .text:0041C1F0 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FBDA4h: possible vtable (89 methods) +(SI) +0000: building_grate_floorst +0000: building_actualst +0000: buildingst + building_grate_floorst::`vftable' + referencing functions: + .text:0041C280 + .text:0041C310 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FBF0Ch: possible vtable (89 methods) +(SI) +0000: building_bars_verticalst +0000: building_actualst +0000: buildingst + building_bars_verticalst::`vftable' + referencing functions: + .text:0041C3F0 + .text:0041C480 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FC074h: possible vtable (89 methods) +(SI) +0000: building_bars_floorst +0000: building_actualst +0000: buildingst + building_bars_floorst::`vftable' + referencing functions: + .text:0041C510 + .text:0041C5A0 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FC1DCh: possible vtable (89 methods) +(SI) +0000: building_trapst +0000: building_actualst +0000: buildingst + building_trapst::`vftable' + referencing functions: + .text:0041C760 + scalar deleting destructor: 0041C850h + destructor: 0041C870h + +008FC344h: possible vtable (89 methods) +(SI) +0000: building_gear_assemblyst +0000: building_actualst +0000: buildingst + building_gear_assemblyst::`vftable' + referencing functions: + .text:0041C920 + .text:0041C9C0 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FC4ACh: possible vtable (89 methods) +(SI) +0000: building_axle_horizontalst +0000: building_actualst +0000: buildingst + building_axle_horizontalst::`vftable' + referencing functions: + .text:0041CB50 + .text:0041CBE0 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FC614h: possible vtable (89 methods) +(SI) +0000: building_axle_verticalst +0000: building_actualst +0000: buildingst + building_axle_verticalst::`vftable' + referencing functions: + .text:0041CD80 + .text:0041CE10 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FC77Ch: possible vtable (89 methods) +(SI) +0000: building_supportst +0000: building_actualst +0000: buildingst + building_supportst::`vftable' + referencing functions: + .text:0041CF50 + .text:0041CFC0 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FC8E4h: possible vtable (89 methods) +(SI) +0000: building_weaponst +0000: building_actualst +0000: buildingst + building_weaponst::`vftable' + referencing functions: + .text:0041D030 + .text:0041D0C0 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FCA4Ch: possible vtable (89 methods) +(SI) +0000: building_archerytargetst +0000: building_actualst +0000: buildingst + building_archerytargetst::`vftable' + referencing functions: + .text:0041D1A0 + .text:0041D210 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FCBB4h: possible vtable (89 methods) +(SI) +0000: building_screw_pumpst +0000: building_actualst +0000: buildingst + building_screw_pumpst::`vftable' + referencing functions: + .text:0041D2F0 + .text:0041D390 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FCD1Ch: possible vtable (89 methods) +(SI) +0000: building_water_wheelst +0000: building_actualst +0000: buildingst + building_water_wheelst::`vftable' + referencing functions: + .text:0041D5D0 + .text:0041D670 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FCE84h: possible vtable (89 methods) +(SI) +0000: building_windmillst +0000: building_actualst +0000: buildingst + building_windmillst::`vftable' + referencing functions: + .text:0041DAD0 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FCFECh: possible vtable (89 methods) +(SI) +0000: building_chainst +0000: building_actualst +0000: buildingst + building_chainst::`vftable' + referencing functions: + .text:0041DB30 + .text:0041DBD0 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FD154h: possible vtable (89 methods) +(SI) +0000: building_cagest +0000: building_actualst +0000: buildingst + building_cagest::`vftable' + referencing functions: + .text:0041DD90 + scalar deleting destructor: 0041DE20h + destructor: 0041DE40h + +008FD2BCh: possible vtable (89 methods) +(SI) +0000: building_siegeenginest +0000: building_actualst +0000: buildingst + building_siegeenginest::`vftable' + referencing functions: + .text:0041DEC0 + .text:0041DF50 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FD424h: possible vtable (89 methods) +(SI) +0000: building_bedst +0000: building_actualst +0000: buildingst + building_bedst::`vftable' + referencing functions: + .text:0041E170 + .text:0041E1E0 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FD58Ch: possible vtable (89 methods) +(SI) +0000: building_tablest +0000: building_actualst +0000: buildingst + building_tablest::`vftable' + referencing functions: + .text:0041E250 + .text:0041E2C0 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FD6F4h: possible vtable (89 methods) +(SI) +0000: building_chairst +0000: building_actualst +0000: buildingst + building_chairst::`vftable' + referencing functions: + .text:0041E330 + .text:0041E3A0 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FD85Ch: possible vtable (89 methods) +(SI) +0000: building_shopst +0000: building_actualst +0000: buildingst + building_shopst::`vftable' + referencing functions: + .text:0041E410 + .text:0041E4B0 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FD9C4h: possible vtable (89 methods) +(SI) +0000: building_coffinst +0000: building_actualst +0000: buildingst + building_coffinst::`vftable' + referencing functions: + .text:0041E570 + .text:0041E5E0 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FDB2Ch: possible vtable (89 methods) +(SI) +0000: building_statuest +0000: building_actualst +0000: buildingst + building_statuest::`vftable' + referencing functions: + .text:0041E920 + .text:0041E990 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FDC94h: possible vtable (89 methods) +(SI) +0000: building_window_gemst +0000: building_windowst +0000: building_actualst +0000: buildingst + building_window_gemst::`vftable' + referencing functions: + .text:0041EA40 + .text:0041EAB0 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FDDFCh: possible vtable (89 methods) +(SI) +0000: building_window_glassst +0000: building_windowst +0000: building_actualst +0000: buildingst + building_window_glassst::`vftable' + referencing functions: + .text:0041EB20 + .text:0041EB90 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FDF64h: possible vtable (89 methods) +(SI) +0000: building_farmplotst +0000: building_actualst +0000: buildingst + building_farmplotst::`vftable' + referencing functions: + .text:0041EC00 + .text:0041ECA0 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FE0CCh: possible vtable (89 methods) +(SI) +0000: building_animaltrapst +0000: building_actualst +0000: buildingst + building_animaltrapst::`vftable' + referencing functions: + .text:0041EF00 + .text:0041EF80 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FE234h: possible vtable (89 methods) +(SI) +0000: building_furnacest +0000: building_actualst +0000: buildingst + building_furnacest::`vftable' + referencing functions: + .text:0041F2E0 + scalar deleting destructor: 0041F380h + destructor: 0041F3A0h + +008FE39Ch: possible vtable (89 methods) +(SI) +0000: building_workshopst +0000: building_actualst +0000: buildingst + building_workshopst::`vftable' + referencing functions: + .text:0041F6A0 + scalar deleting destructor: 0041F730h + destructor: 0041F750h + +008FE504h: possible vtable (89 methods) +(SI) +0000: building_tradedepotst +0000: building_actualst +0000: buildingst + building_tradedepotst::`vftable' + referencing functions: + .text:0041F7A0 + .text:0041F830 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FE66Ch: possible vtable (89 methods) +(SI) +0000: building_wagonst +0000: building_actualst +0000: buildingst + building_wagonst::`vftable' + referencing functions: + .text:0041F8C0 + .text:0041F930 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FE7D4h: possible vtable (89 methods) +(SI) +0000: building_road_dirtst +0000: building_roadst +0000: building_actualst +0000: buildingst + building_road_dirtst::`vftable' + referencing functions: + .text:0041FA90 + .text:0041FB00 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FE93Ch: possible vtable (89 methods) +(SI) +0000: building_road_pavedst +0000: building_roadst +0000: building_actualst +0000: buildingst + building_road_pavedst::`vftable' + referencing functions: + .text:0041FB70 + .text:0041FBE0 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FEAA4h: possible vtable (89 methods) +(SI) +0000: building_constructionst +0000: building_actualst +0000: buildingst + building_constructionst::`vftable' + referencing functions: + .text:0041FCE0 + .text:0041FD50 + scalar deleting destructor: 0041E150h + destructor: 0043A680h + +008FEC0Ch: possible vtable (31 methods) +(SI) +0000: history_event_masterpiece_created_arch_designst +0000: history_event_masterpiece_createdst +0000: history_eventst + history_event_masterpiece_created_arch_designst::`vftable' + referencing functions: + .text:00420080 + .text:0066E5B0 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +008FEC8Ch: possible vtable (31 methods) +(SI) +0000: history_event_masterpiece_created_arch_constructst +0000: history_event_masterpiece_createdst +0000: history_eventst + history_event_masterpiece_created_arch_constructst::`vftable' + referencing functions: + .text:004201C0 + .text:0066E640 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +008FF520h: possible vtable (8 methods) +(SI) +0000: proj_unitst +0000: projst + proj_unitst::`vftable' + referencing functions: + .text:00451A50 + .text:00770890 + +00900620h: possible vtable (8 methods) +(SI) +0000: viewscreenst + viewscreenst::`vftable' + referencing functions: + .text:0045D3A0 + .text:004647A0 (viewscreen_requestagreementst::`scalar deleting destructor') + .text:00491BF0 (viewscreen_customize_unitst::~viewscreen_customize_unitst) + .text:00491C80 + .text:004A43E0 + .text:004AABF0 (viewscreen_loadgamest::~viewscreen_loadgamest) + .text:004B9E90 (viewscreen_layerst::~viewscreen_layerst) + .text:004C6AE0 (viewscreen_dungeon_wrestlest::~viewscreen_dungeon_wrestlest) + .text:004C6BD0 (viewscreen_dungeon_monsterstatusst::~viewscreen_dungeon_monsterstatusst) + .text:004D7B30 (viewscreen_adventure_logst::~viewscreen_adventure_logst) + .text:004EF8D0 + .text:005086E0 (viewscreen_selectitemst::~viewscreen_selectitemst) + .text:005088A0 (viewscreen_dwarfmodest::~viewscreen_dwarfmodest) + .text:005DC660 (viewscreen_titlest::~viewscreen_titlest) + .text:005F1520 + .text:005F1550 (viewscreen_export_graphical_mapst::~viewscreen_export_graphical_mapst) + .text:005F1B60 (viewscreen_new_regionst::~viewscreen_new_regionst) + .text:005F1F20 (viewscreen_legendsst::~viewscreen_legendsst) + .text:00611950 + .text:00613450 + .text:00619490 (viewscreen_createquotast::~viewscreen_createquotast) + .text:0061AE00 (viewscreen_unitjobsst::~viewscreen_unitjobsst) + .text:0061CDA0 + .text:0061F4F0 + .text:00621230 (viewscreen_commandchainst::~viewscreen_commandchainst) + .text:00636C40 (viewscreen_buildinglistst::~viewscreen_buildinglistst) + .text:0064F240 + .text:00652820 + .text:00699A50 (viewscreen_movieplayerst::~viewscreen_movieplayerst) + .text:0069A680 + .text:0069A730 + .text:006DD4F0 + .text:006DEA40 + .text:006DED20 + .text:007122B0 (viewscreen_textviewerst::~viewscreen_textviewerst) + .text:0071F270 + .text:0071F810 + .text:00724020 + .text:0072DF00 + .text:0072E560 + .text:0072E7C0 (viewscreen_topicmeeting_takerequestsst::~viewscreen_topicmeeting_takerequestsst) + .text:00808B70 (viewscreen_choose_start_sitest::~viewscreen_choose_start_sitest) + .text:00808DB0 (viewscreen_setupdwarfgamest::~viewscreen_setupdwarfgamest) + scalar deleting destructor: 004647A0h + +00900644h: possible vtable (8 methods) +(SI) +0000: viewscreen_conversationst +0000: viewscreenst + viewscreen_conversationst::`vftable' + referencing functions: + .text:00464700 + scalar deleting destructor: 004647A0h + +00900668h: possible vtable (9 methods) +(SI) +0000: taskst + taskst::`vftable' + referencing functions: + .text:0045DD10 + .text:0080D940 + .text:0080DA10 + +00900690h: possible vtable (9 methods) +(SI) +0000: task_kill_nemesisst +0000: taskst + task_kill_nemesisst::`vftable' + referencing functions: + .text:0045DD60 + .text:0080D940 + +00901DB8h: possible vtable (1 methods) + referencing functions: + .text:0047AE60 + +0090216Ch: possible vtable (1 methods) + referencing functions: + .text:0047AE60 + +0090438Ch: possible vtable (1 methods) + referencing functions: + .text:00483BB0 + .text:006CF980 + +009044F8h: possible vtable (1 methods) + referencing functions: + .text:00487C20 + +00904940h: possible vtable (1 methods) + referencing functions: + .text:00487C20 + .text:00814140 + +0090516Ch: possible vtable (1 methods) + referencing functions: + .text:00489CB0 + .text:00850E60 + +00906108h: possible vtable (1 methods) + referencing functions: + .text:004A4970 (2 times) + +009078BCh: possible vtable (7 methods) +(SI) +0000: active_script_varst + active_script_varst::`vftable' + referencing functions: + .text:0048FB10 + .text:0048FBC0 + .text:007EB8A0 + .text:007EB980 + +009078DCh: possible vtable (7 methods) +(SI) +0000: active_script_var_unitst +0000: active_script_varst + active_script_var_unitst::`vftable' + referencing functions: + .text:0048FB10 + .text:007EB8A0 + +009078FCh: possible vtable (7 methods) +(SI) +0000: active_script_var_longst +0000: active_script_varst + active_script_var_longst::`vftable' + referencing functions: + .text:0048FBC0 + .text:007EB980 + +0090791Ch: possible vtable (5 methods) +(SI) +0000: interface_buttonst + interface_buttonst::`vftable' + referencing functions: + .text:004915C0 + .text:004919D0 + .text:004AC780 (interface_button_building_permit_foreign_armorst::`scalar deleting destructor') + .text:004C3250 + .text:00508570 + scalar deleting destructor: 004AC780h + +00907934h: possible vtable (5 methods) +(SI) +0000: interface_button_buildingst +0000: interface_buttonst + interface_button_buildingst::`vftable' + referencing functions: + .text:004AC680 + scalar deleting destructor: 004AC780h + +0090794Ch: possible vtable (5 methods) +(SI) +0000: interface_button_constructionst +0000: interface_buttonst + interface_button_constructionst::`vftable' + referencing functions: + .text:004AC700 + scalar deleting destructor: 004AC780h + +00907964h: possible vtable (5 methods) +(SI) +0000: interface_button_construction_category_selectorst +0000: interface_button_constructionst +0000: interface_buttonst + interface_button_construction_category_selectorst::`vftable' + referencing functions: + .text:004916E0 + scalar deleting destructor: 004AC780h + +0090797Ch: possible vtable (5 methods) +(SI) +0000: interface_button_construction_building_selectorst +0000: interface_button_constructionst +0000: interface_buttonst + interface_button_construction_building_selectorst::`vftable' + referencing functions: + .text:00491740 + scalar deleting destructor: 004AC780h + +00907994h: possible vtable (5 methods) +(SI) +0000: interface_button_construction_donest +0000: interface_button_constructionst +0000: interface_buttonst + interface_button_construction_donest::`vftable' + referencing functions: + .text:004917D0 + scalar deleting destructor: 004AC780h + +009079ACh: possible vtable (5 methods) +(SI) +0000: interface_button_buttonst +0000: interface_buttonst + interface_button_buttonst::`vftable' + referencing functions: + .text:004AC7A0 + scalar deleting destructor: 004AC780h + +009079C4h: possible vtable (5 methods) +(SI) +0000: interface_button_button_designate_selectst +0000: interface_button_buttonst +0000: interface_buttonst + interface_button_button_designate_selectst::`vftable' + referencing functions: + .text:004919D0 + scalar deleting destructor: 004AC780h + +009079DCh: possible vtable (5 methods) +(SI) +0000: interface_button_button_donest +0000: interface_button_buttonst +0000: interface_buttonst + interface_button_button_donest::`vftable' + referencing functions: + .text:00491A40 + scalar deleting destructor: 004AC780h + +009079F4h: possible vtable (5 methods) +(SI) +0000: interface_button_button_open_bitem_designationst +0000: interface_button_buttonst +0000: interface_buttonst + interface_button_button_open_bitem_designationst::`vftable' + referencing functions: + .text:00491AA0 + scalar deleting destructor: 004AC780h + +00907A0Ch: possible vtable (5 methods) +(SI) +0000: interface_button_button_open_traffic_designationst +0000: interface_button_buttonst +0000: interface_buttonst + interface_button_button_open_traffic_designationst::`vftable' + referencing functions: + .text:00491B20 + scalar deleting destructor: 004AC780h + +00907A24h: possible vtable (8 methods) +(SI) +0000: viewscreen_optionst +0000: viewscreenst + viewscreen_optionst::`vftable' + referencing functions: + .text:00492540 + scalar deleting destructor: 004647A0h + +00907A48h: possible vtable (8 methods) +(SI) +0000: viewscreen_loadgamest +0000: viewscreenst + viewscreen_loadgamest::`vftable' + referencing functions: + .text:004AAB50 (viewscreen_loadgamest::viewscreen_loadgamest) + .text:004AABF0 (viewscreen_loadgamest::~viewscreen_loadgamest) + scalar deleting destructor: 004AABD0h + destructor: 004AABF0h + constructor: 004AAB50h + +00907A6Ch: possible vtable (8 methods) +(SI) +0000: viewscreen_savegamest +0000: viewscreenst + viewscreen_savegamest::`vftable' + referencing functions: + .text:004A4340 + +00907A90h: possible vtable (8 methods) +(SI) +0000: viewscreen_customize_unitst +0000: viewscreenst + viewscreen_customize_unitst::`vftable' + referencing functions: + .text:00491BF0 (viewscreen_customize_unitst::~viewscreen_customize_unitst) + .text:004A48E0 (viewscreen_customize_unitst::viewscreen_customize_unitst) + scalar deleting destructor: 00491C60h + destructor: 00491BF0h + constructor: 004A48E0h + +00907AB4h: possible vtable (9 methods) +(SI) +0000: viewscreen_unitst +0000: viewscreenst + viewscreen_unitst::`vftable' + referencing functions: + .text:00491C80 + .text:004A47F0 + +00907ADCh: possible vtable (23 methods) +(SI) +0000: layer_object_buttonst +0000: layer_objectst + layer_object_buttonst::`vftable' + referencing functions: + .text:004AD980 (8 times) (viewscreen_layer_stockpilest::viewscreen_layer_stockpilest) + .text:004B3660 (5 times) (viewscreen_layer_unit_relationshipst::viewscreen_layer_unit_relationshipst) + .text:004B4D50 (3 times) + .text:004B51B0 (3 times) + .text:004B53B0 (7 times) (viewscreen_layer_world_gen_param_presetst::viewscreen_layer_world_gen_param_presetst) + .text:004B5A40 (8 times) (viewscreen_layer_world_gen_paramst::viewscreen_layer_world_gen_paramst) + .text:004B9540 (7 times) (viewscreen_layer_export_play_mapst::viewscreen_layer_export_play_mapst) + .text:006389A0 (4 times) (viewscreen_layer_stone_restrictionst::viewscreen_layer_stone_restrictionst) + .text:00639070 (6 times) + .text:00639400 (2 times) (viewscreen_layer_currencyst::viewscreen_layer_currencyst) + .text:00639B80 (6 times) (viewscreen_layer_noblelistst::viewscreen_layer_noblelistst) + .text:0071B2F0 (9 times) (viewscreen_layer_assigntradest::viewscreen_layer_assigntradest) + .text:00804260 (7 times) (viewscreen_layer_choose_language_namest::viewscreen_layer_choose_language_namest) + +00907B3Ch: possible vtable (23 methods) +(SI) +0000: layer_object_listst +0000: layer_objectst + layer_object_listst::`vftable' + referencing functions: + .text:004AD980 (3 times) (viewscreen_layer_stockpilest::viewscreen_layer_stockpilest) + .text:004B3660 (viewscreen_layer_unit_relationshipst::viewscreen_layer_unit_relationshipst) + .text:004B4D50 + .text:004B5A40 (viewscreen_layer_world_gen_paramst::viewscreen_layer_world_gen_paramst) + .text:004B9540 (viewscreen_layer_export_play_mapst::viewscreen_layer_export_play_mapst) + .text:006389A0 (2 times) (viewscreen_layer_stone_restrictionst::viewscreen_layer_stone_restrictionst) + .text:00639070 (2 times) + .text:00639400 (viewscreen_layer_currencyst::viewscreen_layer_currencyst) + .text:00639B80 (3 times) (viewscreen_layer_noblelistst::viewscreen_layer_noblelistst) + .text:0071B2F0 (2 times) (viewscreen_layer_assigntradest::viewscreen_layer_assigntradest) + .text:00804260 (2 times) (viewscreen_layer_choose_language_namest::viewscreen_layer_choose_language_namest) + +00907B9Ch: possible vtable (8 methods) +(SI) +0000: viewscreen_layerst +0000: viewscreenst + viewscreen_layerst::`vftable' + referencing functions: + .text:00491EF0 (viewscreen_layerst::viewscreen_layerst) + .text:004B9E90 (viewscreen_layerst::~viewscreen_layerst) + scalar deleting destructor: 00491F50h + destructor: 004B9E90h + constructor: 00491EF0h + +00907BC0h: possible vtable (8 methods) +(SI) +0000: viewscreen_layer_workshop_profilest +0000: viewscreen_layerst +0000: viewscreenst + viewscreen_layer_workshop_profilest::`vftable' + referencing functions: + .text:00491F70 + .text:004B4D50 + +00907BE4h: possible vtable (8 methods) +(SI) +0000: viewscreen_layer_unit_relationshipst +0000: viewscreen_layerst +0000: viewscreenst + viewscreen_layer_unit_relationshipst::`vftable' + referencing functions: + .text:00491FD0 (viewscreen_layer_unit_relationshipst::~viewscreen_layer_unit_relationshipst) + .text:004B3660 (viewscreen_layer_unit_relationshipst::viewscreen_layer_unit_relationshipst) + scalar deleting destructor: 00492110h + destructor: 00491FD0h + constructor: 004B3660h + +00907C08h: possible vtable (8 methods) +(SI) +0000: viewscreen_layer_musicsoundst +0000: viewscreen_layerst +0000: viewscreenst + viewscreen_layer_musicsoundst::`vftable' + referencing functions: + .text:00492130 (viewscreen_layer_musicsoundst::`scalar deleting destructor') + .text:004B51B0 + scalar deleting destructor: 00492130h + +00907C2Ch: possible vtable (8 methods) +(SI) +0000: viewscreen_layer_export_play_mapst +0000: viewscreen_layerst +0000: viewscreenst + viewscreen_layer_export_play_mapst::`vftable' + referencing functions: + .text:00492160 (viewscreen_layer_export_play_mapst::~viewscreen_layer_export_play_mapst) + .text:004B9540 (viewscreen_layer_export_play_mapst::viewscreen_layer_export_play_mapst) + scalar deleting destructor: 00492230h + destructor: 00492160h + constructor: 004B9540h + +00907C50h: possible vtable (9 methods) +(SI) +0000: world_gen_param_basest + world_gen_param_basest::`vftable' + referencing functions: + .text:004B5A40 (3 times) (viewscreen_layer_world_gen_paramst::viewscreen_layer_world_gen_paramst) + .text:004B93F0 + +00907C78h: possible vtable (9 methods) +(SI) +0000: world_gen_param_valuest +0000: world_gen_param_basest + world_gen_param_valuest::`vftable' + referencing functions: + .text:004B93F0 + +00907CA0h: possible vtable (9 methods) +(SI) +0000: world_gen_param_memberst +0000: world_gen_param_valuest +0000: world_gen_param_basest + world_gen_param_memberst::`vftable' + referencing functions: + .text:004B9390 + +00907CC8h: possible vtable (9 methods) +(SI) +0000: world_gen_param_charst +0000: world_gen_param_valuest +0000: world_gen_param_basest + world_gen_param_charst::`vftable' + referencing functions: + .text:004B9330 + +00907CF0h: possible vtable (9 methods) +(SI) +0000: world_gen_param_seedst +0000: world_gen_param_basest + world_gen_param_seedst::`vftable' + referencing functions: + .text:004B5A40 (3 times) (viewscreen_layer_world_gen_paramst::viewscreen_layer_world_gen_paramst) + +00907D18h: possible vtable (8 methods) +(SI) +0000: viewscreen_layer_world_gen_paramst +0000: viewscreen_layerst +0000: viewscreenst + viewscreen_layer_world_gen_paramst::`vftable' + referencing functions: + .text:004922E0 (viewscreen_layer_world_gen_paramst::~viewscreen_layer_world_gen_paramst) + .text:004B5A40 (viewscreen_layer_world_gen_paramst::viewscreen_layer_world_gen_paramst) + scalar deleting destructor: 00492380h + destructor: 004922E0h + constructor: 004B5A40h + +00907D3Ch: possible vtable (8 methods) +(SI) +0000: viewscreen_layer_world_gen_param_presetst +0000: viewscreen_layerst +0000: viewscreenst + viewscreen_layer_world_gen_param_presetst::`vftable' + referencing functions: + .text:004923A0 (viewscreen_layer_world_gen_param_presetst::~viewscreen_layer_world_gen_param_presetst) + .text:004B53B0 (viewscreen_layer_world_gen_param_presetst::viewscreen_layer_world_gen_param_presetst) + scalar deleting destructor: 00492400h + destructor: 004923A0h + constructor: 004B53B0h + +00907D60h: possible vtable (8 methods) +(SI) +0000: viewscreen_layer_stockpilest +0000: viewscreen_layerst +0000: viewscreenst + viewscreen_layer_stockpilest::`vftable' + referencing functions: + .text:00492420 (viewscreen_layer_stockpilest::~viewscreen_layer_stockpilest) + .text:004AD980 (viewscreen_layer_stockpilest::viewscreen_layer_stockpilest) + scalar deleting destructor: 00492520h + destructor: 00492420h + constructor: 004AD980h + +00907D84h: possible vtable (5 methods) +(SI) +0000: interface_button_button_light_up_selectorst +0000: interface_button_buttonst +0000: interface_buttonst + interface_button_button_light_up_selectorst::`vftable' + referencing functions: + .text:004C31D0 + +00909E00h: possible vtable (1 methods) + referencing functions: + .text:004EDBF0 + .text:007FDD50 + +0090A0B4h: possible vtable (1 methods) + referencing functions: + .text:00504F80 + +0090A0BCh: possible vtable (1 methods) + referencing functions: + .text:00504F80 + +0090A0D8h: possible vtable (1 methods) + referencing functions: + .text:00504F80 + .text:0074A9A0 + +0090A0FCh: possible vtable (181 methods) +(SI) +0000: item_globst +0000: item_actualst +0000: itemst + item_globst::`vftable' + referencing functions: + .text:004C5EC0 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +0090A3D4h: possible vtable (31 methods) +(SI) +0000: history_event_hist_figure_reach_summitst +0000: history_eventst + history_event_hist_figure_reach_summitst::`vftable' + referencing functions: + .text:004C64A0 + +0090A454h: possible vtable (3 methods) +(SI) +0000: adventure_item_interact_choicest + adventure_item_interact_choicest::`vftable' + referencing functions: + .text:004E5880 (adventure_item_interact_fill_with_slimest::`scalar deleting destructor') + scalar deleting destructor: 004E5880h + +0090A464h: possible vtable (3 methods) +(SI) +0000: adventure_item_interact_strugglest +0000: adventure_item_interact_choicest + adventure_item_interact_strugglest::`vftable' + referencing functions: + .text:004E06B0 + scalar deleting destructor: 004E5880h + +0090A474h: possible vtable (3 methods) +(SI) +0000: adventure_item_interact_pull_outst +0000: adventure_item_interact_choicest + adventure_item_interact_pull_outst::`vftable' + referencing functions: + .text:004E06B0 + scalar deleting destructor: 004E5880h + +0090A484h: possible vtable (3 methods) +(SI) +0000: adventure_item_interact_fill_with_waterst +0000: adventure_item_interact_fillst +0000: adventure_item_interact_choicest + adventure_item_interact_fill_with_waterst::`vftable' + referencing functions: + .text:004E06B0 (2 times) + scalar deleting destructor: 004E5880h + +0090A494h: possible vtable (3 methods) +(SI) +0000: adventure_item_interact_fill_with_bloodst +0000: adventure_item_interact_fillst +0000: adventure_item_interact_choicest + adventure_item_interact_fill_with_bloodst::`vftable' + referencing functions: + .text:004E06B0 + scalar deleting destructor: 004E5880h + +0090A4A4h: possible vtable (3 methods) +(SI) +0000: adventure_item_interact_fill_with_vomitst +0000: adventure_item_interact_fillst +0000: adventure_item_interact_choicest + adventure_item_interact_fill_with_vomitst::`vftable' + referencing functions: + .text:004E06B0 + scalar deleting destructor: 004E5880h + +0090A4B4h: possible vtable (3 methods) +(SI) +0000: adventure_item_interact_fill_with_mudst +0000: adventure_item_interact_fillst +0000: adventure_item_interact_choicest + adventure_item_interact_fill_with_mudst::`vftable' + referencing functions: + .text:004E06B0 + scalar deleting destructor: 004E5880h + +0090A4C4h: possible vtable (3 methods) +(SI) +0000: adventure_item_interact_fill_with_slimest +0000: adventure_item_interact_fillst +0000: adventure_item_interact_choicest + adventure_item_interact_fill_with_slimest::`vftable' + referencing functions: + .text:004E06B0 + scalar deleting destructor: 004E5880h + +0090A4D4h: possible vtable (11 methods) +(SI) +0000: adventure_optionst + adventure_optionst::`vftable' + referencing functions: + .text:004C6A60 (adventure_environment_pickup_ignite_vegst::`scalar deleting destructor') + scalar deleting destructor: 004C6A60h + +0090A504h: possible vtable (11 methods) +(SI) +0000: adventure_option_eat_unit_contaminantst +0000: adventure_optionst + adventure_option_eat_unit_contaminantst::`vftable' + referencing functions: + .text:004E5920 + scalar deleting destructor: 004C6A60h + +0090A534h: possible vtable (11 methods) +(SI) +0000: adventure_option_eat_item_contaminantst +0000: adventure_optionst + adventure_option_eat_item_contaminantst::`vftable' + referencing functions: + .text:004E5920 + scalar deleting destructor: 004C6A60h + +0090A564h: possible vtable (11 methods) +(SI) +0000: adventure_option_view_contaminantst +0000: adventure_optionst + adventure_option_view_contaminantst::`vftable' + referencing functions: + .text:004E5920 + scalar deleting destructor: 004C6A60h + +0090A594h: possible vtable (11 methods) +(SI) +0000: adventure_environment_eat_mudst +0000: adventure_environment_optionst +0000: adventure_optionst + adventure_environment_eat_mudst::`vftable' + referencing functions: + .text:004E5920 + scalar deleting destructor: 004C6A60h + +0090A5C4h: possible vtable (11 methods) +(SI) +0000: adventure_environment_drink_waterst +0000: adventure_environment_optionst +0000: adventure_optionst + adventure_environment_drink_waterst::`vftable' + referencing functions: + .text:004E5920 (2 times) + scalar deleting destructor: 004C6A60h + +0090A5F4h: possible vtable (11 methods) +(SI) +0000: adventure_environment_eat_slimest +0000: adventure_environment_optionst +0000: adventure_optionst + adventure_environment_eat_slimest::`vftable' + referencing functions: + .text:004E5920 + scalar deleting destructor: 004C6A60h + +0090A624h: possible vtable (11 methods) +(SI) +0000: adventure_environment_drink_bloodst +0000: adventure_environment_optionst +0000: adventure_optionst + adventure_environment_drink_bloodst::`vftable' + referencing functions: + .text:004E5920 + scalar deleting destructor: 004C6A60h + +0090A654h: possible vtable (11 methods) +(SI) +0000: adventure_environment_eat_vomitst +0000: adventure_environment_optionst +0000: adventure_optionst + adventure_environment_eat_vomitst::`vftable' + referencing functions: + .text:004E5920 + scalar deleting destructor: 004C6A60h + +0090A684h: possible vtable (11 methods) +(SI) +0000: adventure_environment_pickup_vermin_eventst +0000: adventure_environment_optionst +0000: adventure_optionst + adventure_environment_pickup_vermin_eventst::`vftable' + referencing functions: + .text:004E9B50 + scalar deleting destructor: 004C6A60h + +0090A6B4h: possible vtable (11 methods) +(SI) +0000: adventure_environment_pickup_ignite_vegst +0000: adventure_environment_optionst +0000: adventure_optionst + adventure_environment_pickup_ignite_vegst::`vftable' + referencing functions: + .text:004E9B50 + scalar deleting destructor: 004C6A60h + +0090A6E4h: possible vtable (2 methods) +(SI) +0000: adventure_movement_attack_creaturest +0000: adventure_movement_optionst + adventure_movement_attack_creaturest::`vftable' + referencing functions: + .text:00503070 + +0090A6F0h: possible vtable (2 methods) +(SI) +0000: adventure_movement_building_interactst +0000: adventure_movement_optionst + adventure_movement_building_interactst::`vftable' + referencing functions: + .text:00503070 + +0090A6FCh: possible vtable (2 methods) +(SI) +0000: adventure_movement_movest +0000: adventure_movement_optionst + adventure_movement_movest::`vftable' + referencing functions: + .text:00503070 (2 times) + +0090A708h: possible vtable (8 methods) +(SI) +0000: viewscreen_dungeonmodest +0000: viewscreenst + viewscreen_dungeonmodest::`vftable' + referencing functions: + .text:004C7020 + scalar deleting destructor: 004647A0h + +0090A72Ch: possible vtable (8 methods) +(SI) +0000: viewscreen_adventure_travelst +0000: viewscreenst + viewscreen_adventure_travelst::`vftable' + referencing functions: + .text:004C6D80 + scalar deleting destructor: 0061ADE0h + destructor: 0061AE00h + +0090A750h: possible vtable (8 methods) +(SI) +0000: viewscreen_adventure_logst +0000: viewscreenst + viewscreen_adventure_logst::`vftable' + referencing functions: + .text:004D7710 + scalar deleting destructor: 004D7B10h + destructor: 004D7B30h + +0090A774h: possible vtable (8 methods) +(SI) +0000: viewscreen_dungeon_wrestlest +0000: viewscreenst + viewscreen_dungeon_wrestlest::`vftable' + referencing functions: + .text:004C6AE0 (viewscreen_dungeon_wrestlest::~viewscreen_dungeon_wrestlest) + .text:004D8100 (viewscreen_dungeon_wrestlest::viewscreen_dungeon_wrestlest) + scalar deleting destructor: 004C6BB0h + destructor: 004C6AE0h + constructor: 004D8100h + +0090A798h: possible vtable (8 methods) +(SI) +0000: viewscreen_dungeon_monsterstatusst +0000: viewscreenst + viewscreen_dungeon_monsterstatusst::`vftable' + referencing functions: + .text:004C6BD0 (viewscreen_dungeon_monsterstatusst::~viewscreen_dungeon_monsterstatusst) + .text:00504930 (viewscreen_dungeon_monsterstatusst::viewscreen_dungeon_monsterstatusst) + scalar deleting destructor: 004C6C70h + destructor: 004C6BD0h + constructor: 00504930h + +0090A7BCh: possible vtable (8 methods) +(SI) +0000: viewscreen_dungeon_announcest +0000: viewscreenst + viewscreen_dungeon_announcest::`vftable' + referencing functions: + .text:004D6550 + scalar deleting destructor: 004647A0h + +0090A7E0h: possible vtable (8 methods) +(SI) +0000: viewscreen_setupadventurest +0000: viewscreenst + viewscreen_setupadventurest::`vftable' + referencing functions: + .text:004EF320 + +0090A9F8h: possible vtable (8 methods) +(SI) +0000: build_req_choice_genst +0000: build_req_choicest + build_req_choice_genst::`vftable' + referencing functions: + .text:00507FD0 + +0090AA1Ch: possible vtable (9 methods) +(SI) +0000: build_req_choice_specst +0000: build_req_choicest + build_req_choice_specst::`vftable' + referencing functions: + .text:00524F50 (2 times) + +0090AA44h: possible vtable (21 methods) +(SI) +0000: history_event_hist_figure_diedst +0000: history_eventst + history_event_hist_figure_diedst::`vftable' + referencing functions: + .text:00508180 + .text:0066C150 + +0090AAC4h: possible vtable (5 methods) +(SI) +0000: interface_button_building_material_selectorst +0000: interface_button_buildingst +0000: interface_buttonst + interface_button_building_material_selectorst::`vftable' + referencing functions: + .text:00508350 + scalar deleting destructor: 004AC780h + +0090AADCh: possible vtable (5 methods) +(SI) +0000: interface_button_building_category_selectorst +0000: interface_button_buildingst +0000: interface_buttonst + interface_button_building_category_selectorst::`vftable' + referencing functions: + .text:005083E0 + scalar deleting destructor: 004AC780h + +0090AAF4h: possible vtable (5 methods) +(SI) +0000: interface_button_building_new_jobst +0000: interface_button_buildingst +0000: interface_buttonst + interface_button_building_new_jobst::`vftable' + referencing functions: + .text:005084D0 + +0090AB0Ch: possible vtable (5 methods) +(SI) +0000: interface_button_building_permit_trapcompst +0000: interface_button_buildingst +0000: interface_buttonst + interface_button_building_permit_trapcompst::`vftable' + referencing functions: + .text:0051CAE0 + scalar deleting destructor: 004AC780h + +0090AB24h: possible vtable (5 methods) +(SI) +0000: interface_button_building_permit_foreign_weaponst +0000: interface_button_buildingst +0000: interface_buttonst + interface_button_building_permit_foreign_weaponst::`vftable' + referencing functions: + .text:0051CAE0 + scalar deleting destructor: 004AC780h + +0090AB3Ch: possible vtable (5 methods) +(SI) +0000: interface_button_building_permit_foreign_siegeammost +0000: interface_button_buildingst +0000: interface_buttonst + interface_button_building_permit_foreign_siegeammost::`vftable' + referencing functions: + .text:0051CAE0 + scalar deleting destructor: 004AC780h + +0090AB54h: possible vtable (5 methods) +(SI) +0000: interface_button_building_permit_itemst +0000: interface_button_buildingst +0000: interface_buttonst + interface_button_building_permit_itemst::`vftable' + referencing functions: + .text:005085C0 + .text:0051CAE0 (2 times) + .text:0051CE90 (5 times) + scalar deleting destructor: 004AC780h + +0090AB6Ch: possible vtable (5 methods) +(SI) +0000: interface_button_building_permit_foreign_armorst +0000: interface_button_buildingst +0000: interface_buttonst + interface_button_building_permit_foreign_armorst::`vftable' + referencing functions: + .text:0051CE90 + scalar deleting destructor: 004AC780h + +0090AB84h: possible vtable (9 methods) +(SI) +0000: viewscreen_dwarfmodest +0000: viewscreenst + viewscreen_dwarfmodest::`vftable' + referencing functions: + .text:005087A0 + scalar deleting destructor: 00508880h + destructor: 005088A0h + +0090ABACh: possible vtable (8 methods) +(SI) +0000: viewscreen_selectitemst +0000: viewscreenst + viewscreen_selectitemst::`vftable' + referencing functions: + .text:005086E0 (viewscreen_selectitemst::~viewscreen_selectitemst) + .text:0051A520 (viewscreen_selectitemst::viewscreen_selectitemst) + scalar deleting destructor: 00508780h + destructor: 005086E0h + constructor: 0051A520h + +0090AED4h: possible vtable (2 methods) +(SI) +0000: std::out_of_range +0000: std::logic_error +0000: std::exception + std::out_of_range::`vftable' + referencing functions: + .text:005295A0 + .text:0052DB70 + .text:0052E0C0 + .text:0052EA10 + .text:005322B0 + .text:00533920 + .text:005348D0 + .text:005352B0 + .text:005356F0 + .text:00535D90 + .text:00540320 + .text:006683B0 + .text:006DC620 + .text:006DC940 + .text:006DCC30 + .text:006E0DE0 + .text:006E2490 + .text:006E2BE0 + +0090B74Ch: possible vtable (3 methods) +(SI) +0000: text_info_elementst + text_info_elementst::`vftable' + referencing functions: + .text:00537380 + .text:00537730 + .text:00537780 (text_info_element_longst::`scalar deleting destructor') + scalar deleting destructor: 00537780h + +0090B75Ch: possible vtable (3 methods) +(SI) +0000: text_info_element_stringst +0000: text_info_elementst + text_info_element_stringst::`vftable' + referencing functions: + .text:005376A0 + +0090B76Ch: possible vtable (3 methods) +(SI) +0000: text_info_element_longst +0000: text_info_elementst + text_info_element_longst::`vftable' + referencing functions: + .text:0053CB50 + scalar deleting destructor: 00537780h + +0090BD64h: possible vtable (1 methods) + referencing functions: + .text:00561740 (3 times) + +0090BDF4h: possible vtable (1 methods) + referencing functions: + .text:00565650 + +0090BE00h: possible vtable (1 methods) + referencing functions: + .text:00565650 + +0090BE18h: possible vtable (1 methods) + referencing functions: + .text:00565650 + +0090BE1Ch: possible vtable (1 methods) + referencing functions: + .text:00565650 + +0090BE24h: possible vtable (1 methods) + referencing functions: + .text:00565650 + +0090C038h: possible vtable (12 methods) +(SI) +0000: history_event_collection_warst +0000: history_event_collectionst + history_event_collection_warst::`vftable' + referencing functions: + .text:00545A80 + +0090C06Ch: possible vtable (12 methods) +(SI) +0000: history_event_collection_abductionst +0000: history_event_collectionst + history_event_collection_abductionst::`vftable' + referencing functions: + .text:00546080 + scalar deleting destructor: 00546130h + destructor: 00546150h + +0090C0A0h: possible vtable (12 methods) +(SI) +0000: history_event_collection_theftst +0000: history_event_collectionst + history_event_collection_theftst::`vftable' + referencing functions: + .text:00546530 + scalar deleting destructor: 00546680h + destructor: 005466A0h + +0090C0D4h: possible vtable (14 methods) +(SI) +0000: general_refst + general_refst::`vftable' + referencing functions: + .text:00777450 (general_ref_entity_itemownerst::`scalar deleting destructor') + scalar deleting destructor: 00777450h + +0090C110h: possible vtable (14 methods) +(SI) +0000: general_ref_mapsquarest +0000: general_refst + general_ref_mapsquarest::`vftable' + referencing functions: + .text:00541470 + .text:0056C640 + .text:00777A20 + .text:00777EB0 + .text:0089D9C0 + .text:008BA570 + scalar deleting destructor: 00777450h + +0090C14Ch: possible vtable (15 methods) +(SI) +0000: general_ref_entity_art_imagest +0000: general_refst + general_ref_entity_art_imagest::`vftable' + referencing functions: + .text:005414E0 + .text:00577AC0 + .text:00777A20 + .text:00777EB0 + scalar deleting destructor: 00777450h + +0090C18Ch: possible vtable (181 methods) +(SI) +0000: item_meatst +0000: item_actualst +0000: itemst + item_meatst::`vftable' + referencing functions: + .text:005427B0 + .text:0056FCB0 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +0090C464h: possible vtable (181 methods) +(SI) +0000: item_fishst +0000: item_actualst +0000: itemst + item_fishst::`vftable' + referencing functions: + .text:005428C0 + .text:0056FCB0 + .text:00709E20 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +0090C73Ch: possible vtable (181 methods) +(SI) +0000: item_craftedst +0000: item_actualst +0000: itemst + item_craftedst::`vftable' + referencing functions: + .text:005429B0 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +0090CA14h: possible vtable (181 methods) +(SI) +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_constructedst::`vftable' + referencing functions: + .text:00542C70 (item_constructedst::item_constructedst) + .text:006A7710 (item_trapcompst::~item_trapcompst) + scalar deleting destructor: 00543D40h + destructor: 006A7710h + constructor: 00542C70h + +0090CCECh: possible vtable (181 methods) +(SI) +0000: item_doorst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_doorst::`vftable' + referencing functions: + .text:00542CD0 + .text:006A1320 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +0090CFC4h: possible vtable (181 methods) +(SI) +0000: item_bedst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_bedst::`vftable' + referencing functions: + .text:00542D70 + .text:006A16E0 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +0090D29Ch: possible vtable (181 methods) +(SI) +0000: item_chairst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_chairst::`vftable' + referencing functions: + .text:00542E10 + .text:006A1750 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +0090D574h: possible vtable (181 methods) +(SI) +0000: item_flaskst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_flaskst::`vftable' + referencing functions: + .text:00542EC0 + .text:006A1830 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +0090D84Ch: possible vtable (181 methods) +(SI) +0000: item_barrelst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_barrelst::`vftable' + referencing functions: + .text:00542F60 + .text:006A1DE0 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +0090DB24h: possible vtable (181 methods) +(SI) +0000: item_tablest +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_tablest::`vftable' + referencing functions: + .text:00543050 + .text:006A2090 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +0090DDFCh: possible vtable (181 methods) +(SI) +0000: item_weaponst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_weaponst::`vftable' + referencing functions: + .text:005430F0 + .text:006A2580 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +0090E0D4h: possible vtable (181 methods) +(SI) +0000: item_armorst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_armorst::`vftable' + referencing functions: + .text:00543290 + .text:006A2610 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +0090E3ACh: possible vtable (181 methods) +(SI) +0000: item_shoesst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_shoesst::`vftable' + referencing functions: + .text:00543370 + .text:006A26A0 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +0090E684h: possible vtable (181 methods) +(SI) +0000: item_shieldst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_shieldst::`vftable' + referencing functions: + .text:00543440 + .text:006A2730 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +0090E95Ch: possible vtable (181 methods) +(SI) +0000: item_helmst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_helmst::`vftable' + referencing functions: + .text:00543520 + .text:006A27C0 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +0090EC34h: possible vtable (181 methods) +(SI) +0000: item_glovesst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_glovesst::`vftable' + referencing functions: + .text:005437A0 + .text:006A2850 + +0090EF0Ch: possible vtable (181 methods) +(SI) +0000: item_boxst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_boxst::`vftable' + referencing functions: + .text:00543890 + .text:006A28E0 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +0090F1E4h: possible vtable (181 methods) +(SI) +0000: item_ammost +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_ammost::`vftable' + referencing functions: + .text:00543950 + .text:006A3150 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +0090F4BCh: possible vtable (181 methods) +(SI) +0000: item_pantsst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_pantsst::`vftable' + referencing functions: + .text:00543AB0 + .text:006A3980 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +0090F794h: possible vtable (181 methods) +(SI) +0000: item_backpackst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_backpackst::`vftable' + referencing functions: + .text:00543BE0 + .text:006A3A10 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +0090FA6Ch: possible vtable (181 methods) +(SI) +0000: item_quiverst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_quiverst::`vftable' + referencing functions: + .text:00543C90 + .text:006A3A80 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +0090FD44h: possible vtable (181 methods) +(SI) +0000: item_coinst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_coinst::`vftable' + referencing functions: + .text:00543D60 + .text:006A4320 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +0091001Ch: possible vtable (31 methods) +(SI) +0000: history_event_created_sitest +0000: history_eventst + history_event_created_sitest::`vftable' + referencing functions: + .text:00544F20 + .text:0066B1B0 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0091009Ch: possible vtable (31 methods) +(SI) +0000: history_event_created_buildingst +0000: history_eventst + history_event_created_buildingst::`vftable' + referencing functions: + .text:00544F90 + .text:0066B230 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0091011Ch: possible vtable (31 methods) +(SI) +0000: history_event_replaced_buildingst +0000: history_eventst + history_event_replaced_buildingst::`vftable' + referencing functions: + .text:00545060 + .text:0066B2B0 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0091019Ch: possible vtable (11 methods) +(SI) +0000: history_event_entity_razed_buildingst +0000: history_eventst + history_event_entity_razed_buildingst::`vftable' + referencing functions: + .text:005451D0 + .text:0066B330 + +0091021Ch: possible vtable (27 methods) +(SI) +0000: history_event_created_world_constructionst +0000: history_eventst + history_event_created_world_constructionst::`vftable' + referencing functions: + .text:005452A0 + .text:0066B440 + +0091029Ch: possible vtable (31 methods) +(SI) +0000: history_event_reclaim_sitest +0000: history_eventst + history_event_reclaim_sitest::`vftable' + referencing functions: + .text:00545470 + .text:0066B4C0 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0091031Ch: possible vtable (31 methods) +(SI) +0000: history_event_war_peace_acceptedst +0000: history_eventst + history_event_war_peace_acceptedst::`vftable' + referencing functions: + .text:00545530 + .text:0066D080 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0091039Ch: possible vtable (31 methods) +(SI) +0000: history_event_war_peace_rejectedst +0000: history_eventst + history_event_war_peace_rejectedst::`vftable' + referencing functions: + .text:00545620 + .text:0066D100 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0091041Ch: possible vtable (31 methods) +(SI) +0000: history_event_entity_createdst +0000: history_eventst + history_event_entity_createdst::`vftable' + referencing functions: + .text:00545770 + .text:0066E4B0 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0091049Ch: possible vtable (31 methods) +(SI) +0000: history_event_entity_incorporatedst +0000: history_eventst + history_event_entity_incorporatedst::`vftable' + referencing functions: + .text:00545800 + .text:0066E530 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +00910930h: possible vtable (14 methods) +(SI) +0000: general_ref_buildingst +0000: general_refst + general_ref_buildingst::`vftable' + referencing functions: + .text:00596CF0 + .text:00777A20 + .text:00777EB0 + scalar deleting destructor: 00777450h + +0091096Ch: possible vtable (15 methods) +(SI) +0000: general_ref_building_well_tagst +0000: general_ref_buildingst +0000: general_refst + general_ref_building_well_tagst::`vftable' + referencing functions: + .text:00596DA0 + .text:005BE6E0 + .text:00777A20 + .text:00777EB0 + .text:00847D30 + scalar deleting destructor: 00777450h + +009109ACh: possible vtable (180 methods) +(SI) +0000: item_powder_miscst +0000: item_powderst +0000: item_liquipowderst +0000: item_actualst +0000: itemst + item_powder_miscst::`vftable' + referencing functions: + .text:00596ED0 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +00910C84h: possible vtable (1 methods) + referencing functions: + .text:005C4010 + +00910CC4h: possible vtable (181 methods) +(SI) +0000: item_corpsest +0000: item_actualst +0000: itemst + item_corpsest::`vftable' + referencing functions: + .text:005C5AE0 + .text:005FDFC0 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +00910F9Ch: possible vtable (181 methods) +(SI) +0000: item_corpsepiecest +0000: item_actualst +0000: itemst + item_corpsepiecest::`vftable' + referencing functions: + .text:005C5E00 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +00911274h: possible vtable (181 methods) +(SI) +0000: item_chainst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_chainst::`vftable' + referencing functions: + .text:005C5E60 + .text:006A17C0 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +0091154Ch: possible vtable (180 methods) +(SI) +0000: item_cagest +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_cagest::`vftable' + referencing functions: + .text:005C5F00 + .text:006A1D70 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +00911820h: possible vtable (3 methods) +(SI) +0000: feature_alteration_spec_infost + feature_alteration_spec_infost::`vftable' + referencing functions: + .text:005C6090 + .text:005C6310 (feature_alteration_spec_infost::`scalar deleting destructor') + .text:005C63C0 (feature_alteration_spec_info_underworld_spike_level_infost::~feature_alteration_spec_info_underworld_spike_level_infost) + scalar deleting destructor: 005C6310h + +00911830h: possible vtable (3 methods) +(SI) +0000: feature_alteration_spec_info_underworld_spike_level_infost +0000: feature_alteration_spec_infost + feature_alteration_spec_info_underworld_spike_level_infost::`vftable' + referencing functions: + .text:005C63C0 (feature_alteration_spec_info_underworld_spike_level_infost::~feature_alteration_spec_info_underworld_spike_level_infost) + .text:005CA790 (feature_alteration_spec_info_underworld_spike_level_infost::feature_alteration_spec_info_underworld_spike_level_infost) + scalar deleting destructor: 005C6450h + destructor: 005C63C0h + constructor: 005CA790h + +00911840h: possible vtable (6 methods) +(SI) +0000: feature_specinfost + feature_specinfost::`vftable' + referencing functions: + .text:005C6470 () + .text:005C6550 (feature_specinfo_cave_underworld_spikest::~feature_specinfo_cave_underworld_spikest) + .text:005C7140 (feature_specinfo_cave_lava_shaftst::`scalar deleting destructor') + scalar deleting destructor: 005C7140h + +0091185Ch: possible vtable (6 methods) +(SI) +0000: feature_specinfo_cave_underworld_spikest +0000: feature_specinfost + feature_specinfo_cave_underworld_spikest::`vftable' + referencing functions: + .text:005C6550 (feature_specinfo_cave_underworld_spikest::~feature_specinfo_cave_underworld_spikest) + .text:005C6C90 (feature_specinfo_cave_underworld_spikest::feature_specinfo_cave_underworld_spikest) + scalar deleting destructor: 005C6620h + destructor: 005C6550h + constructor: 005C6C90h + +00911878h: possible vtable (6 methods) +(SI) +0000: feature_specinfo_cave_lava_shaftst +0000: feature_specinfost + feature_specinfo_cave_lava_shaftst::`vftable' + referencing functions: + .text:004A83D0 + .text:005C6870 + .text:007B9670 + scalar deleting destructor: 005C7140h + +00911894h: possible vtable (31 methods) +(SI) +0000: history_event_demon_releasedst +0000: history_eventst + history_event_demon_releasedst::`vftable' + referencing functions: + .text:005C6A50 + .text:0066E430 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +009161DCh: possible vtable (1 methods) + referencing functions: + .text:005F8AA0 + +009162D0h: possible vtable (1 methods) + referencing functions: + .text:005F8AA0 + +00916B58h: possible vtable (1 methods) + referencing functions: + .text:00613510 + .text:007F52E0 + +00916E70h: possible vtable (1 methods) + referencing functions: + .text:006163F0 + +00916EB0h: possible vtable (1 methods) + referencing functions: + .text:006163F0 + +009180BCh: possible vtable (1 methods) + referencing functions: + .text:006212A0 + +009180CCh: possible vtable (1 methods) + referencing functions: + .text:006212A0 + +009180DCh: possible vtable (1 methods) + referencing functions: + .text:006212A0 + +009180E8h: possible vtable (1 methods) + referencing functions: + .text:006212A0 + +00918220h: possible vtable (1 methods) + referencing functions: + .text:00463670 + .text:0068A6D0 + .text:00867F70 + .text:00874420 + +00918224h: possible vtable (1 methods) + referencing functions: + .text:00458F20 (2 times) + .text:00463670 (2 times) + .text:004647C0 + .text:004E7900 (2 times) + .text:006248C0 + .text:0068A6D0 (2 times) + .text:00760050 + .text:00867F70 (2 times) + .text:00874420 (2 times) + +00918240h: possible vtable (1 methods) + referencing functions: + .text:00458F20 (2 times) + .text:00463670 + .text:004647C0 + .text:004E7900 (2 times) + .text:006248C0 + .text:0068A6D0 + .text:00760050 + .text:00867F70 + .text:00874420 + +00919764h: possible vtable (181 methods) +(SI) +0000: item_seedsst +0000: item_actualst +0000: itemst + item_seedsst::`vftable' + referencing functions: + .text:005D1B10 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +00919A3Ch: possible vtable (181 methods) +(SI) +0000: item_skin_rawst +0000: item_actualst +0000: itemst + item_skin_rawst::`vftable' + referencing functions: + .text:005D1C10 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +00919D14h: possible vtable (181 methods) +(SI) +0000: item_bonesst +0000: item_actualst +0000: itemst + item_bonesst::`vftable' + referencing functions: + .text:005D1C50 + .text:006A0630 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +00919FECh: possible vtable (181 methods) +(SI) +0000: item_skullst +0000: item_actualst +0000: itemst + item_skullst::`vftable' + referencing functions: + .text:005D1D20 + .text:006A06D0 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +0091A2C4h: possible vtable (175 methods) +(SI) +0000: item_threadst +0000: item_actualst +0000: itemst + item_threadst::`vftable' + referencing functions: + .text:005D20D0 + .text:008C6860 + +0091A59Ch: possible vtable (31 methods) +(SI) +0000: history_event_hist_figure_abductedst +0000: history_eventst + history_event_hist_figure_abductedst::`vftable' + referencing functions: + .text:005D6770 + .text:0066C1D0 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0091A61Ch: possible vtable (31 methods) +(SI) +0000: history_event_first_contactst +0000: history_eventst + history_event_first_contactst::`vftable' + referencing functions: + .text:005D67E0 + .text:0066CDF0 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0091A69Ch: possible vtable (31 methods) +(SI) +0000: history_event_first_contact_failedst +0000: history_eventst + history_event_first_contact_failedst::`vftable' + referencing functions: + .text:005D6880 + .text:0066CE70 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0091A71Ch: possible vtable (31 methods) +(SI) +0000: history_event_topicagreement_concludedst +0000: history_eventst + history_event_topicagreement_concludedst::`vftable' + referencing functions: + .text:005D6910 + .text:0066CEF0 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0091A79Ch: possible vtable (31 methods) +(SI) +0000: history_event_topicagreement_rejectedst +0000: history_eventst + history_event_topicagreement_rejectedst::`vftable' + referencing functions: + .text:005D6BD0 + .text:0066CF80 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0091A81Ch: possible vtable (31 methods) +(SI) +0000: history_event_topicagreement_madest +0000: history_eventst + history_event_topicagreement_madest::`vftable' + referencing functions: + .text:005D6D00 + .text:0066D000 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0091A89Ch: possible vtable (31 methods) +(SI) +0000: history_event_diplomat_lostst +0000: history_eventst + history_event_diplomat_lostst::`vftable' + referencing functions: + .text:005D6E10 + .text:0066D180 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0091A91Ch: possible vtable (31 methods) +(SI) +0000: history_event_agreements_voidedst +0000: history_eventst + history_event_agreements_voidedst::`vftable' + referencing functions: + .text:005D6EE0 + .text:0066D770 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0091A99Ch: possible vtable (31 methods) +(SI) +0000: history_event_artifact_createdst +0000: history_eventst + history_event_artifact_createdst::`vftable' + referencing functions: + .text:005D6F90 + .text:0066DD50 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0091AA1Ch: possible vtable (31 methods) +(SI) +0000: history_event_artifact_lostst +0000: history_eventst + history_event_artifact_lostst::`vftable' + referencing functions: + .text:005D7010 + .text:0066DDD0 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0091AA9Ch: possible vtable (31 methods) +(SI) +0000: history_event_item_stolenst +0000: history_eventst + history_event_item_stolenst::`vftable' + referencing functions: + .text:005D7420 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0091AB1Ch: possible vtable (8 methods) +(SI) +0000: viewscreen_export_graphical_mapst +0000: viewscreenst + viewscreen_export_graphical_mapst::`vftable' + referencing functions: + .text:005F1360 (viewscreen_export_graphical_mapst::viewscreen_export_graphical_mapst) + .text:005F1550 (viewscreen_export_graphical_mapst::~viewscreen_export_graphical_mapst) + scalar deleting destructor: 005F1470h + destructor: 005F1550h + constructor: 005F1360h + +0091AB40h: possible vtable (8 methods) +(SI) +0000: viewscreen_export_regionst +0000: viewscreenst + viewscreen_export_regionst::`vftable' + referencing functions: + .text:005F1490 + .text:005F1520 + +0091AB64h: possible vtable (8 methods) +(SI) +0000: viewscreen_new_regionst +0000: viewscreenst + viewscreen_new_regionst::`vftable' + referencing functions: + .text:005F1760 (viewscreen_new_regionst::viewscreen_new_regionst) + .text:005F1B60 (viewscreen_new_regionst::~viewscreen_new_regionst) + scalar deleting destructor: 005F1B40h + destructor: 005F1B60h + constructor: 005F1760h + +0091AB88h: possible vtable (8 methods) +(SI) +0000: viewscreen_legendsst +0000: viewscreenst + viewscreen_legendsst::`vftable' + referencing functions: + .text:005F1CD0 (viewscreen_legendsst::viewscreen_legendsst) + .text:005F1F20 (viewscreen_legendsst::~viewscreen_legendsst) + scalar deleting destructor: 005F1F00h + destructor: 005F1F20h + constructor: 005F1CD0h + +0091ABACh: possible vtable (8 methods) +(SI) +0000: viewscreen_titlest +0000: viewscreenst + viewscreen_titlest::`vftable' + referencing functions: + .text:005DC660 (viewscreen_titlest::~viewscreen_titlest) + .text:005F25C0 (viewscreen_titlest::viewscreen_titlest) + scalar deleting destructor: 005DC900h + destructor: 005DC660h + constructor: 005F25C0h + +0091ABD0h: possible vtable (8 methods) +(SI) +0000: viewscreen_game_cleanerst +0000: viewscreenst + viewscreen_game_cleanerst::`vftable' + referencing functions: + .text:0051BFC0 + .text:005F2500 + scalar deleting destructor: 004647A0h + +0091ABF4h: possible vtable (8 methods) +(SI) +0000: viewscreen_announcelistst +0000: viewscreenst + viewscreen_announcelistst::`vftable' + referencing functions: + .text:00609360 + scalar deleting destructor: 004647A0h + +0091AC18h: possible vtable (8 methods) +(SI) +0000: viewscreen_kitchenprefst +0000: viewscreenst + viewscreen_kitchenprefst::`vftable' + referencing functions: + .text:00611650 + +0091AC3Ch: possible vtable (8 methods) +(SI) +0000: viewscreen_petst +0000: viewscreenst + viewscreen_petst::`vftable' + referencing functions: + .text:00612430 + +0091AC60h: possible vtable (8 methods) +(SI) +0000: viewscreen_pricest +0000: viewscreenst + viewscreen_pricest::`vftable' + referencing functions: + .text:00614440 + scalar deleting destructor: 004647A0h + +0091AC84h: possible vtable (8 methods) +(SI) +0000: viewscreen_justicest +0000: viewscreenst + viewscreen_justicest::`vftable' + referencing functions: + .text:00614650 + scalar deleting destructor: 0061ADE0h + destructor: 0061AE00h + +0091ACA8h: possible vtable (8 methods) +(SI) +0000: viewscreen_overallstatusst +0000: viewscreenst + viewscreen_overallstatusst::`vftable' + referencing functions: + .text:0062F770 + scalar deleting destructor: 004647A0h + +0091ACCCh: possible vtable (8 methods) +(SI) +0000: viewscreen_storesst +0000: viewscreenst + viewscreen_storesst::`vftable' + referencing functions: + .text:0064E750 + +0091ACF0h: possible vtable (8 methods) +(SI) +0000: viewscreen_wagesst +0000: viewscreenst + viewscreen_wagesst::`vftable' + referencing functions: + .text:00616360 + scalar deleting destructor: 004647A0h + +0091AD14h: possible vtable (8 methods) +(SI) +0000: viewscreen_jobmanagementst +0000: viewscreenst + viewscreen_jobmanagementst::`vftable' + referencing functions: + .text:00618AE0 + scalar deleting destructor: 004647A0h + +0091AD38h: possible vtable (8 methods) +(SI) +0000: viewscreen_createquotast +0000: viewscreenst + viewscreen_createquotast::`vftable' + referencing functions: + .text:00619360 (viewscreen_createquotast::viewscreen_createquotast) + .text:00619490 (viewscreen_createquotast::~viewscreen_createquotast) + scalar deleting destructor: 00619470h + destructor: 00619490h + constructor: 00619360h + +0091AD5Ch: possible vtable (8 methods) +(SI) +0000: viewscreen_unitjobsst +0000: viewscreenst + viewscreen_unitjobsst::`vftable' + referencing functions: + .text:0061A1E0 + scalar deleting destructor: 0061ADE0h + destructor: 0061AE00h + +0091AD80h: possible vtable (8 methods) +(SI) +0000: viewscreen_treasurelistst +0000: viewscreenst + viewscreen_treasurelistst::`vftable' + referencing functions: + .text:0061C1D0 + scalar deleting destructor: 004647A0h + +0091ADA4h: possible vtable (8 methods) +(SI) +0000: viewscreen_entityst +0000: viewscreenst + viewscreen_entityst::`vftable' + referencing functions: + .text:0061C710 + +0091ADC8h: possible vtable (8 methods) +(SI) +0000: viewscreen_civlistst +0000: viewscreenst + viewscreen_civlistst::`vftable' + referencing functions: + .text:0061F3E0 + +0091ADECh: possible vtable (8 methods) +(SI) +0000: viewscreen_squadst +0000: viewscreenst + viewscreen_squadst::`vftable' + referencing functions: + .text:00620240 + scalar deleting destructor: 004647A0h + +0091AE10h: possible vtable (8 methods) +(SI) +0000: viewscreen_commandchainst +0000: viewscreenst + viewscreen_commandchainst::`vftable' + referencing functions: + .text:00621150 + scalar deleting destructor: 00621210h + destructor: 00621230h + +0091AE34h: possible vtable (8 methods) +(SI) +0000: viewscreen_buildinglistst +0000: viewscreenst + viewscreen_buildinglistst::`vftable' + referencing functions: + .text:00636670 + scalar deleting destructor: 00636C20h + destructor: 00636C40h + +0091AE58h: possible vtable (8 methods) +(SI) +0000: viewscreen_noblest +0000: viewscreenst + viewscreen_noblest::`vftable' + referencing functions: + .text:0063E950 + scalar deleting destructor: 004647A0h + +0091AE7Ch: possible vtable (8 methods) +(SI) +0000: viewscreen_itemst +0000: viewscreenst + viewscreen_itemst::`vftable' + referencing functions: + .text:006520F0 + +0091AEA0h: possible vtable (8 methods) +(SI) +0000: viewscreen_buildingst +0000: viewscreenst + viewscreen_buildingst::`vftable' + referencing functions: + .text:006550D0 + scalar deleting destructor: 004647A0h + +0091AEC4h: possible vtable (8 methods) +(SI) +0000: viewscreen_jobst +0000: viewscreenst + viewscreen_jobst::`vftable' + referencing functions: + .text:006554A0 + scalar deleting destructor: 004647A0h + +0091AEE8h: possible vtable (8 methods) +(SI) +0000: viewscreen_layer_noblelistst +0000: viewscreen_layerst +0000: viewscreenst + viewscreen_layer_noblelistst::`vftable' + referencing functions: + .text:00638660 (viewscreen_layer_noblelistst::~viewscreen_layer_noblelistst) + .text:00639B80 (viewscreen_layer_noblelistst::viewscreen_layer_noblelistst) + scalar deleting destructor: 00638980h + destructor: 00638660h + constructor: 00639B80h + +0091AF0Ch: possible vtable (8 methods) +(SI) +0000: viewscreen_layer_stone_restrictionst +0000: viewscreen_layerst +0000: viewscreenst + viewscreen_layer_stone_restrictionst::`vftable' + referencing functions: + .text:006384C0 (viewscreen_layer_stone_restrictionst::~viewscreen_layer_stone_restrictionst) + .text:006389A0 (viewscreen_layer_stone_restrictionst::viewscreen_layer_stone_restrictionst) + scalar deleting destructor: 00638590h + destructor: 006384C0h + constructor: 006389A0h + +0091AF30h: possible vtable (8 methods) +(SI) +0000: viewscreen_layer_reactionst +0000: viewscreen_layerst +0000: viewscreenst + viewscreen_layer_reactionst::`vftable' + referencing functions: + .text:006385B0 (viewscreen_layer_reactionst::`scalar deleting destructor') + .text:00639070 + scalar deleting destructor: 006385B0h + +0091AF54h: possible vtable (8 methods) +(SI) +0000: viewscreen_layer_currencyst +0000: viewscreen_layerst +0000: viewscreenst + viewscreen_layer_currencyst::`vftable' + referencing functions: + .text:006385E0 (viewscreen_layer_currencyst::~viewscreen_layer_currencyst) + .text:00639400 (viewscreen_layer_currencyst::viewscreen_layer_currencyst) + scalar deleting destructor: 00638640h + destructor: 006385E0h + constructor: 00639400h + +00928770h: possible vtable (1 methods) + referencing functions: + .text:00677CD0 + .text:0067A520 (2 times) + +009299D4h: possible vtable (1 methods) + referencing functions: + .text:0067AA50 (2 times) + .text:00850E60 + +0092A0F8h: possible vtable (1 methods) + referencing functions: + .text:0067C100 (6 times) + .text:0068FB10 + .text:0074A9A0 + +0092A430h: possible vtable (1 methods) + referencing functions: + .text:0067E720 + +0092A970h: possible vtable (12 methods) +(SI) +0000: history_event_collectionst + history_event_collectionst::`vftable' + referencing functions: + .text:00690F30 (history_event_collectionst::history_event_collectionst) + .text:00691020 (history_event_collection_duelst::~history_event_collection_duelst) + scalar deleting destructor: 00691000h + destructor: 00691020h + constructor: 00690F30h + +0092A9A4h: possible vtable (12 methods) +(SI) +0000: history_event_collection_battlest +0000: history_event_collectionst + history_event_collection_battlest::`vftable' + referencing functions: + .text:0066F2F0 + +0092A9D8h: possible vtable (12 methods) +(SI) +0000: history_event_collection_duelst +0000: history_event_collectionst + history_event_collection_duelst::`vftable' + referencing functions: + .text:0066F550 + .text:007793E0 + scalar deleting destructor: 00691000h + destructor: 00691020h + +0092AA0Ch: possible vtable (12 methods) +(SI) +0000: history_event_collection_site_conqueredst +0000: history_event_collectionst + history_event_collection_site_conqueredst::`vftable' + referencing functions: + .text:0066F950 + scalar deleting destructor: 0066F9D0h + destructor: 0066F9F0h + +0092AA40h: possible vtable (12 methods) +(SI) +0000: history_event_collection_beast_attackst +0000: history_event_collectionst + history_event_collection_beast_attackst::`vftable' + referencing functions: + .text:0066FD90 + +0092AA74h: possible vtable (31 methods) +(SI) +0000: history_eventst + history_eventst::`vftable' + referencing functions: + .text:00670750 (history_eventst::history_eventst) + .text:00670850 (history_event_item_stolenst::~history_event_item_stolenst) + scalar deleting destructor: 005457E0h + destructor: 00670850h + constructor: 00670750h + +0092AAF4h: possible vtable (31 methods) +(SI) +0000: history_event_war_field_battlest +0000: history_eventst + history_event_war_field_battlest::`vftable' + referencing functions: + .text:0066A3D0 + .text:00778E40 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092AB74h: possible vtable (27 methods) +(SI) +0000: history_event_war_attacked_sitest +0000: history_eventst + history_event_war_attacked_sitest::`vftable' + referencing functions: + .text:0066A6C0 + .text:00711E60 + +0092ABF4h: possible vtable (31 methods) +(SI) +0000: history_event_war_destroyed_sitest +0000: history_eventst + history_event_war_destroyed_sitest::`vftable' + referencing functions: + .text:0066A800 + .text:00778EC0 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092AC74h: possible vtable (31 methods) +(SI) +0000: history_event_war_plundered_sitest +0000: history_eventst + history_event_war_plundered_sitest::`vftable' + referencing functions: + .text:0066A920 + .text:00778F30 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092ACF4h: possible vtable (31 methods) +(SI) +0000: history_event_war_site_tribute_forcedst +0000: history_eventst + history_event_war_site_tribute_forcedst::`vftable' + referencing functions: + .text:0066AA00 + .text:00778FA0 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092AD74h: possible vtable (27 methods) +(SI) +0000: history_event_war_site_new_leaderst +0000: history_eventst + history_event_war_site_new_leaderst::`vftable' + referencing functions: + .text:0066AAA0 + .text:00779010 + +0092ADF4h: possible vtable (31 methods) +(SI) +0000: history_event_war_site_taken_overst +0000: history_eventst + history_event_war_site_taken_overst::`vftable' + referencing functions: + .text:0066AD00 + .text:00779090 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092AE74h: possible vtable (31 methods) +(SI) +0000: history_event_hf_destroyed_sitest +0000: history_eventst + history_event_hf_destroyed_sitest::`vftable' + referencing functions: + .text:0066AF60 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092AEF4h: possible vtable (31 methods) +(SI) +0000: history_event_site_diedst +0000: history_eventst + history_event_site_diedst::`vftable' + referencing functions: + .text:0066B040 + .text:0087DBB0 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092AF74h: possible vtable (31 methods) +(SI) +0000: history_event_site_abandonedst +0000: history_eventst + history_event_site_abandonedst::`vftable' + referencing functions: + .text:0066B110 + .text:0087DC20 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092AFF4h: possible vtable (11 methods) +(SI) +0000: history_event_hf_razed_buildingst +0000: history_eventst + history_event_hf_razed_buildingst::`vftable' + referencing functions: + .text:0066B3B0 + .text:00779100 + +0092B074h: possible vtable (31 methods) +(SI) +0000: history_event_creature_devouredst +0000: history_eventst + history_event_creature_devouredst::`vftable' + referencing functions: + .text:0066B540 + .text:00779170 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092B0F4h: possible vtable (31 methods) +(SI) +0000: history_event_hist_figure_woundedst +0000: history_eventst + history_event_hist_figure_woundedst::`vftable' + referencing functions: + .text:0066B760 + .text:007791E0 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092B174h: possible vtable (22 methods) +(SI) +0000: history_event_hist_figure_simple_battle_eventst +0000: history_eventst + history_event_hist_figure_simple_battle_eventst::`vftable' + referencing functions: + .text:0066BD20 + +0092B1F4h: possible vtable (31 methods) +(SI) +0000: history_event_hist_figure_reunionst +0000: history_eventst + history_event_hist_figure_reunionst::`vftable' + referencing functions: + .text:0066C0D0 + scalar deleting destructor: 0066BDA0h + destructor: 0066BDC0h + +0092B274h: possible vtable (31 methods) +(SI) +0000: history_event_add_hf_entity_linkst +0000: history_eventst + history_event_add_hf_entity_linkst::`vftable' + referencing functions: + .text:0066C250 + .text:0066C2C0 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092B2F4h: possible vtable (31 methods) +(SI) +0000: history_event_remove_hf_entity_linkst +0000: history_eventst + history_event_remove_hf_entity_linkst::`vftable' + referencing functions: + .text:0066C360 + .text:0066C3D0 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092B374h: possible vtable (31 methods) +(SI) +0000: history_event_change_hf_statest +0000: history_eventst + history_event_change_hf_statest::`vftable' + referencing functions: + .text:0066C470 + .text:0066C4F0 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092B3F4h: possible vtable (31 methods) +(SI) +0000: history_event_change_hf_jobst +0000: history_eventst + history_event_change_hf_jobst::`vftable' + referencing functions: + .text:0066C6B0 + .text:0066C730 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092B474h: possible vtable (31 methods) +(SI) +0000: history_event_add_hf_hf_linkst +0000: history_eventst + history_event_add_hf_hf_linkst::`vftable' + referencing functions: + .text:0066C8C0 + .text:0066C930 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092B4F4h: possible vtable (31 methods) +(SI) +0000: history_event_remove_hf_hf_linkst +0000: history_eventst + history_event_remove_hf_hf_linkst::`vftable' + referencing functions: + .text:0066CA30 + .text:0066CAA0 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092B574h: possible vtable (31 methods) +(SI) +0000: history_event_add_hf_site_linkst +0000: history_eventst + history_event_add_hf_site_linkst::`vftable' + referencing functions: + .text:0066CB20 + .text:0066CB90 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092B5F4h: possible vtable (31 methods) +(SI) +0000: history_event_remove_hf_site_linkst +0000: history_eventst + history_event_remove_hf_site_linkst::`vftable' + referencing functions: + .text:0066CCA0 + .text:0066CD10 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092B674h: possible vtable (31 methods) +(SI) +0000: history_event_body_abusedst +0000: history_eventst + history_event_body_abusedst::`vftable' + referencing functions: + .text:0066D6E0 + +0092B6F4h: possible vtable (31 methods) +(SI) +0000: history_event_merchantst +0000: history_eventst + history_event_merchantst::`vftable' + referencing functions: + .text:0066DB70 + +0092B774h: possible vtable (31 methods) +(SI) +0000: history_event_artifact_hiddenst +0000: history_eventst + history_event_artifact_hiddenst::`vftable' + referencing functions: + .text:0066DC50 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092B7F4h: possible vtable (31 methods) +(SI) +0000: history_event_artifact_possessedst +0000: history_eventst + history_event_artifact_possessedst::`vftable' + referencing functions: + .text:0066DCD0 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092B874h: possible vtable (31 methods) +(SI) +0000: history_event_artifact_foundst +0000: history_eventst + history_event_artifact_foundst::`vftable' + referencing functions: + .text:0066DE50 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092B8F4h: possible vtable (31 methods) +(SI) +0000: history_event_artifact_recoveredst +0000: history_eventst + history_event_artifact_recoveredst::`vftable' + referencing functions: + .text:0066DFC0 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092B974h: possible vtable (31 methods) +(SI) +0000: history_event_artifact_droppedst +0000: history_eventst + history_event_artifact_droppedst::`vftable' + referencing functions: + .text:0066E200 + +0092B9F4h: possible vtable (31 methods) +(SI) +0000: history_event_demon_encasedst +0000: history_eventst + history_event_demon_encasedst::`vftable' + referencing functions: + .text:0066E2E0 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092BA74h: possible vtable (31 methods) +(SI) +0000: history_event_masterpiece_created_itemst +0000: history_event_masterpiece_createdst +0000: history_eventst + history_event_masterpiece_created_itemst::`vftable' + referencing functions: + .text:0066E6D0 + .text:006A4450 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092BAF4h: possible vtable (31 methods) +(SI) +0000: history_event_masterpiece_created_dye_itemst +0000: history_event_masterpiece_createdst +0000: history_eventst + history_event_masterpiece_created_dye_itemst::`vftable' + referencing functions: + .text:0066EA30 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092BB74h: possible vtable (31 methods) +(SI) +0000: history_event_masterpiece_created_item_improvementst +0000: history_event_masterpiece_createdst +0000: history_eventst + history_event_masterpiece_created_item_improvementst::`vftable' + referencing functions: + .text:0066ECE0 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092BBF4h: possible vtable (31 methods) +(SI) +0000: history_event_masterpiece_created_foodst +0000: history_event_masterpiece_createdst +0000: history_eventst + history_event_masterpiece_created_foodst::`vftable' + referencing functions: + .text:0066ED40 + .text:006FAFC0 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092BC74h: possible vtable (31 methods) +(SI) +0000: history_event_masterpiece_created_engravingst +0000: history_event_masterpiece_createdst +0000: history_eventst + history_event_masterpiece_created_engravingst::`vftable' + referencing functions: + .text:0066EE60 + .text:0087DCF0 + scalar deleting destructor: 005457E0h + destructor: 00670850h + +0092BEA0h: possible vtable (1 methods) + referencing functions: + .text:006978F0 + +0092C464h: possible vtable (8 methods) +(SI) +0000: viewscreen_movieplayerst +0000: viewscreenst + viewscreen_movieplayerst::`vftable' + referencing functions: + .text:00699A50 (viewscreen_movieplayerst::~viewscreen_movieplayerst) + .text:0069A560 (viewscreen_movieplayerst::viewscreen_movieplayerst) + scalar deleting destructor: 00699AF0h + destructor: 00699A50h + constructor: 0069A560h + +0092C4A0h: possible vtable (1 methods) + referencing functions: + .text:006AB1D0 + .text:00850E60 (5 times) + +0092C9D4h: possible vtable (179 methods) +(SI) +0000: itemst + itemst::`vftable' + referencing functions: + .text:006A44E0 (itemst::itemst) + .text:006A7970 (itemst::~itemst) + scalar deleting destructor: 006A4580h + destructor: 006A7970h + constructor: 006A44E0h + +0092CCA4h: possible vtable (14 methods) +(SI) +0000: general_ref_coinbatchst +0000: general_refst + general_ref_coinbatchst::`vftable' + referencing functions: + .text:0069DE10 + .text:006B36A0 (2 times) + .text:00777A20 + .text:00777EB0 + scalar deleting destructor: 00777450h + +0092CCE0h: possible vtable (9 methods) +(SI) +0000: itemimprovementst + itemimprovementst::`vftable' + referencing functions: + .text:0069E500 (itemimprovement_sewn_imagest::`scalar deleting destructor') + scalar deleting destructor: 0069E500h + +0092CD08h: possible vtable (9 methods) +(SI) +0000: itemimprovement_art_imagest +0000: itemimprovementst + itemimprovement_art_imagest::`vftable' + referencing functions: + .text:0069E1D0 + .text:0069E2E0 + scalar deleting destructor: 0069E500h + +0092CD30h: possible vtable (9 methods) +(SI) +0000: itemimprovement_coveredst +0000: itemimprovementst + itemimprovement_coveredst::`vftable' + referencing functions: + .text:0069E310 + .text:0069E380 + scalar deleting destructor: 0069E500h + +0092CD58h: possible vtable (9 methods) +(SI) +0000: itemimprovement_rings_hangingst +0000: itemimprovementst + itemimprovement_rings_hangingst::`vftable' + referencing functions: + .text:0069E3B0 + .text:0069E430 + scalar deleting destructor: 0069E500h + +0092CD80h: possible vtable (9 methods) +(SI) +0000: itemimprovement_bandsst +0000: itemimprovementst + itemimprovement_bandsst::`vftable' + referencing functions: + .text:0069E460 + .text:0069E4D0 + scalar deleting destructor: 0069E500h + +0092CDA8h: possible vtable (9 methods) +(SI) +0000: itemimprovement_spikesst +0000: itemimprovementst + itemimprovement_spikesst::`vftable' + referencing functions: + .text:0069E520 + .text:0069E5A0 + scalar deleting destructor: 0069E500h + +0092CDD0h: possible vtable (9 methods) +(SI) +0000: itemimprovement_itemspecificst +0000: itemimprovementst + itemimprovement_itemspecificst::`vftable' + referencing functions: + .text:0069E5D0 + .text:0069E6B0 + scalar deleting destructor: 0069E500h + +0092CDF8h: possible vtable (1 methods) +(SI) +0000: itemimprovement_threadst +0000: itemimprovementst + itemimprovement_threadst::`vftable' + referencing functions: + .text:0069E6E0 + .text:0069E8E0 + +0092CE20h: possible vtable (9 methods) +(SI) +0000: itemimprovement_clothst +0000: itemimprovementst + itemimprovement_clothst::`vftable' + referencing functions: + .text:0069E930 + .text:0069E9A0 + scalar deleting destructor: 0069E500h + +0092CE48h: possible vtable (10 methods) +(SI) +0000: itemimprovement_sewn_imagest +0000: itemimprovementst + itemimprovement_sewn_imagest::`vftable' + referencing functions: + .text:0069ECA0 + scalar deleting destructor: 0069E500h + +0092CE74h: possible vtable (181 methods) +(SI) +0000: item_barst +0000: item_actualst +0000: itemst + item_barst::`vftable' + referencing functions: + .text:0069EF20 + .text:0070AA60 + .text:0070AFF0 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +0092D14Ch: possible vtable (181 methods) +(SI) +0000: item_smallgemst +0000: item_actualst +0000: itemst + item_smallgemst::`vftable' + referencing functions: + .text:0069F0C0 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +0092D424h: possible vtable (181 methods) +(SI) +0000: item_blocksst +0000: item_actualst +0000: itemst + item_blocksst::`vftable' + referencing functions: + .text:0069F260 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +0092D6FCh: possible vtable (181 methods) +(SI) +0000: item_roughst +0000: item_actualst +0000: itemst + item_roughst::`vftable' + referencing functions: + .text:0069F3B0 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +0092D9D4h: possible vtable (181 methods) +(SI) +0000: item_stonest +0000: item_actualst +0000: itemst + item_stonest::`vftable' + referencing functions: + .text:0069F520 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +0092DCACh: possible vtable (181 methods) +(SI) +0000: item_rockst +0000: item_actualst +0000: itemst + item_rockst::`vftable' + referencing functions: + .text:0069F690 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +0092DF84h: possible vtable (181 methods) +(SI) +0000: item_woodst +0000: item_actualst +0000: itemst + item_woodst::`vftable' + referencing functions: + .text:0069F6E0 + .text:0069F780 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +0092E25Ch: possible vtable (181 methods) +(SI) +0000: item_extractst +0000: item_liquidst +0000: item_liquipowderst +0000: item_actualst +0000: itemst + item_extractst::`vftable' + referencing functions: + .text:0069FAA0 + .text:00709E20 + .text:0070B2D0 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +0092E534h: possible vtable (181 methods) +(SI) +0000: item_potionst +0000: item_liquidst +0000: item_liquipowderst +0000: item_actualst +0000: itemst + item_potionst::`vftable' + referencing functions: + .text:0069FAF0 + .text:0069FB90 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +0092E80Ch: possible vtable (181 methods) +(SI) +0000: item_drinkst +0000: item_liquidst +0000: item_liquipowderst +0000: item_actualst +0000: itemst + item_drinkst::`vftable' + referencing functions: + .text:0069FD90 + .text:00709AD0 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +0092EAE4h: possible vtable (181 methods) +(SI) +0000: item_fish_rawst +0000: item_actualst +0000: itemst + item_fish_rawst::`vftable' + referencing functions: + .text:006A0180 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +0092EDBCh: possible vtable (181 methods) +(SI) +0000: item_petst +0000: item_critterst +0000: item_actualst +0000: itemst + item_petst::`vftable' + referencing functions: + .text:006A0330 + .text:0070A420 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +0092F094h: possible vtable (181 methods) +(SI) +0000: item_skin_tannedst +0000: item_actualst +0000: itemst + item_skin_tannedst::`vftable' + referencing functions: + .text:006A05F0 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +0092F36Ch: possible vtable (181 methods) +(SI) +0000: item_shellst +0000: item_actualst +0000: itemst + item_shellst::`vftable' + referencing functions: + .text:006A0770 + .text:006A0810 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +0092F644h: possible vtable (181 methods) +(SI) +0000: item_leavesst +0000: item_actualst +0000: itemst + item_leavesst::`vftable' + referencing functions: + .text:006A09F0 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +0092F91Ch: possible vtable (181 methods) +(SI) +0000: item_ballistaarrowheadst +0000: item_actualst +0000: itemst + item_ballistaarrowheadst::`vftable' + referencing functions: + .text:006A0B40 + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +0092FBF4h: possible vtable (181 methods) +(SI) +0000: item_cheesest +0000: item_actualst +0000: itemst + item_cheesest::`vftable' + referencing functions: + .text:006A0D50 + .text:0070B6E0 (2 times) + scalar deleting destructor: 00542A10h + destructor: 006A78C0h + +0092FECCh: possible vtable (181 methods) +(SI) +0000: item_foodst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_foodst::`vftable' + referencing functions: + .text:006A1130 (item_foodst::item_foodst) + .text:006A77F0 (item_foodst::~item_foodst) + scalar deleting destructor: 006A11C0h + destructor: 006A77F0h + constructor: 006A1130h + +009301A4h: possible vtable (181 methods) +(SI) +0000: item_clothst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_clothst::`vftable' + referencing functions: + .text:006A11E0 + .text:006A1250 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +0093047Ch: possible vtable (181 methods) +(SI) +0000: item_floodgatest +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_floodgatest::`vftable' + referencing functions: + .text:006A1390 + .text:006A1400 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +00930754h: possible vtable (181 methods) +(SI) +0000: item_hatch_coverst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_hatch_coverst::`vftable' + referencing functions: + .text:006A14A0 + .text:006A1510 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +00930A2Ch: possible vtable (181 methods) +(SI) +0000: item_gratest +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_gratest::`vftable' + referencing functions: + .text:006A15C0 + .text:006A1630 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +00930D04h: possible vtable (181 methods) +(SI) +0000: item_gobletst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_gobletst::`vftable' + referencing functions: + .text:006A18A0 + .text:006A1910 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +00930FDCh: possible vtable (181 methods) +(SI) +0000: item_instrumentst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_instrumentst::`vftable' + referencing functions: + .text:006A19C0 + .text:006A1A50 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +009312B4h: possible vtable (181 methods) +(SI) +0000: item_toyst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_toyst::`vftable' + referencing functions: + .text:006A1B10 + .text:006A1BA0 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +0093158Ch: possible vtable (181 methods) +(SI) +0000: item_windowst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_windowst::`vftable' + referencing functions: + .text:006A1C60 + .text:006A1CD0 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +00931864h: possible vtable (181 methods) +(SI) +0000: item_bucketst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_bucketst::`vftable' + referencing functions: + .text:006A1E70 + .text:006A1EE0 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +00931B3Ch: possible vtable (181 methods) +(SI) +0000: item_animaltrapst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_animaltrapst::`vftable' + referencing functions: + .text:006A1F80 + .text:006A1FF0 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +00931E14h: possible vtable (181 methods) +(SI) +0000: item_coffinst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_coffinst::`vftable' + referencing functions: + .text:006A2100 + .text:006A2170 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +009320ECh: possible vtable (181 methods) +(SI) +0000: item_statuest +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_statuest::`vftable' + referencing functions: + .text:006A2220 + .text:006A2290 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +009323C4h: possible vtable (181 methods) +(SI) +0000: item_quernst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_quernst::`vftable' + referencing functions: + .text:006A2340 + .text:006A23B0 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +0093269Ch: possible vtable (181 methods) +(SI) +0000: item_millstonest +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_millstonest::`vftable' + referencing functions: + .text:006A2460 + .text:006A24D0 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +00932974h: possible vtable (181 methods) +(SI) +0000: item_binst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_binst::`vftable' + referencing functions: + .text:006A2950 + .text:006A29D0 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +00932C4Ch: possible vtable (181 methods) +(SI) +0000: item_armorstandst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_armorstandst::`vftable' + referencing functions: + .text:006A2AE0 + .text:006A2B50 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +00932F24h: possible vtable (181 methods) +(SI) +0000: item_weaponrackst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_weaponrackst::`vftable' + referencing functions: + .text:006A2BF0 + .text:006A2C60 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +009331FCh: possible vtable (181 methods) +(SI) +0000: item_cabinetst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_cabinetst::`vftable' + referencing functions: + .text:006A2D00 + .text:006A2D70 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +009334D4h: possible vtable (181 methods) +(SI) +0000: item_figurinest +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_figurinest::`vftable' + referencing functions: + .text:006A2E10 + .text:006A2E80 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +009337ACh: possible vtable (181 methods) +(SI) +0000: item_amuletst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_amuletst::`vftable' + referencing functions: + .text:006A2F20 + .text:006A2F90 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +00933A84h: possible vtable (181 methods) +(SI) +0000: item_scepterst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_scepterst::`vftable' + referencing functions: + .text:006A3030 + .text:006A30A0 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +00933D5Ch: possible vtable (181 methods) +(SI) +0000: item_crownst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_crownst::`vftable' + referencing functions: + .text:006A31E0 + .text:006A3250 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +00934034h: possible vtable (181 methods) +(SI) +0000: item_ringst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_ringst::`vftable' + referencing functions: + .text:006A32F0 + .text:006A3360 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +0093430Ch: possible vtable (181 methods) +(SI) +0000: item_earringst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_earringst::`vftable' + referencing functions: + .text:006A3400 + .text:006A3470 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +009345E4h: possible vtable (181 methods) +(SI) +0000: item_braceletst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_braceletst::`vftable' + referencing functions: + .text:006A3510 + .text:006A3580 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +009348BCh: possible vtable (181 methods) +(SI) +0000: item_gemst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_gemst::`vftable' + referencing functions: + .text:006A3630 + .text:006A36A0 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +00934B94h: possible vtable (181 methods) +(SI) +0000: item_anvilst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_anvilst::`vftable' + referencing functions: + .text:006A3740 + .text:006A37B0 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +00934E6Ch: possible vtable (181 methods) +(SI) +0000: item_totemst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_totemst::`vftable' + referencing functions: + .text:006A3860 + .text:006A38D0 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +00935144h: possible vtable (181 methods) +(SI) +0000: item_catapultpartsst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_catapultpartsst::`vftable' + referencing functions: + .text:006A3AF0 + .text:006A3B60 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +0093541Ch: possible vtable (181 methods) +(SI) +0000: item_ballistapartsst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_ballistapartsst::`vftable' + referencing functions: + .text:006A3C20 + .text:006A3C90 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +009356F4h: possible vtable (181 methods) +(SI) +0000: item_siegeammost +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_siegeammost::`vftable' + referencing functions: + .text:006A3D50 + .text:006A3DE0 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +009359CCh: possible vtable (181 methods) +(SI) +0000: item_pipe_sectionst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_pipe_sectionst::`vftable' + referencing functions: + .text:006A3EF0 + .text:006A3F60 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +00935CA4h: possible vtable (181 methods) +(SI) +0000: item_trappartsst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_trappartsst::`vftable' + referencing functions: + .text:006A4020 + .text:006A4090 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +00935F7Ch: possible vtable (180 methods) +(SI) +0000: item_trapcompst +0000: item_constructedst +0000: item_craftedst +0000: item_actualst +0000: itemst + item_trapcompst::`vftable' + referencing functions: + .text:006A4140 + .text:006A41D0 + scalar deleting destructor: 00543D40h + destructor: 006A7710h + +00936768h: possible vtable (3 methods) +(SI) +0000: itemdefst + itemdefst::`vftable' + referencing functions: + .text:006CA280 (itemdefst::itemdefst) + .text:006CA310 (itemdefst::~itemdefst) + scalar deleting destructor: 006CA2F0h + destructor: 006CA310h + constructor: 006CA280h + +00936778h: possible vtable (3 methods) +(SI) +0000: itemdef_weaponst +0000: itemdefst + itemdef_weaponst::`vftable' + referencing functions: + .text:006CA370 (itemdef_weaponst::itemdef_weaponst) + .text:006CA500 (itemdef_weaponst::~itemdef_weaponst) + scalar deleting destructor: 006CA4B0h + destructor: 006CA500h + constructor: 006CA370h + +00936788h: possible vtable (3 methods) +(SI) +0000: itemdef_trapcompst +0000: itemdefst + itemdef_trapcompst::`vftable' + referencing functions: + .text:006CA600 (itemdef_trapcompst::itemdef_trapcompst) + .text:006CA730 (itemdef_trapcompst::~itemdef_trapcompst) + scalar deleting destructor: 006CA6E0h + destructor: 006CA730h + constructor: 006CA600h + +00936798h: possible vtable (3 methods) +(SI) +0000: itemdef_toyst +0000: itemdefst + itemdef_toyst::`vftable' + referencing functions: + .text:006CA800 (itemdef_toyst::itemdef_toyst) + .text:006CA910 (itemdef_toyst::~itemdef_toyst) + scalar deleting destructor: 006CA8C0h + destructor: 006CA910h + constructor: 006CA800h + +009367A8h: possible vtable (3 methods) +(SI) +0000: itemdef_instrumentst +0000: itemdefst + itemdef_instrumentst::`vftable' + referencing functions: + .text:006CA9E0 (itemdef_instrumentst::itemdef_instrumentst) + .text:006CAAF0 (itemdef_instrumentst::~itemdef_instrumentst) + scalar deleting destructor: 006CAAA0h + destructor: 006CAAF0h + constructor: 006CA9E0h + +009367B8h: possible vtable (3 methods) +(SI) +0000: itemdef_armorst +0000: itemdefst + itemdef_armorst::`vftable' + referencing functions: + .text:006CAC50 (itemdef_armorst::itemdef_armorst) + .text:006CADD0 (itemdef_armorst::~itemdef_armorst) + scalar deleting destructor: 006CAD80h + destructor: 006CADD0h + constructor: 006CAC50h + +009367C8h: possible vtable (3 methods) +(SI) +0000: itemdef_ammost +0000: itemdefst + itemdef_ammost::`vftable' + referencing functions: + .text:006CAEF0 (itemdef_ammost::itemdef_ammost) + .text:006CB020 (itemdef_ammost::~itemdef_ammost) + scalar deleting destructor: 006CAFC0h + destructor: 006CB020h + constructor: 006CAEF0h + +009367D8h: possible vtable (3 methods) +(SI) +0000: itemdef_siegeammost +0000: itemdefst + itemdef_siegeammost::`vftable' + referencing functions: + .text:006CB0F0 (itemdef_siegeammost::itemdef_siegeammost) + .text:006CB1F0 (itemdef_siegeammost::~itemdef_siegeammost) + scalar deleting destructor: 006CB1A0h + destructor: 006CB1F0h + constructor: 006CB0F0h + +009367E8h: possible vtable (3 methods) +(SI) +0000: itemdef_glovesst +0000: itemdefst + itemdef_glovesst::`vftable' + referencing functions: + .text:006CB2C0 (itemdef_glovesst::itemdef_glovesst) + .text:006CB400 (itemdef_glovesst::~itemdef_glovesst) + scalar deleting destructor: 006CB3B0h + destructor: 006CB400h + constructor: 006CB2C0h + +009367F8h: possible vtable (3 methods) +(SI) +0000: itemdef_shoesst +0000: itemdefst + itemdef_shoesst::`vftable' + referencing functions: + .text:006CB4F0 (itemdef_shoesst::itemdef_shoesst) + .text:006CB630 (itemdef_shoesst::~itemdef_shoesst) + scalar deleting destructor: 006CB5E0h + destructor: 006CB630h + constructor: 006CB4F0h + +00936808h: possible vtable (3 methods) +(SI) +0000: itemdef_shieldst +0000: itemdefst + itemdef_shieldst::`vftable' + referencing functions: + .text:006CB720 (itemdef_shieldst::itemdef_shieldst) + .text:006CB820 (itemdef_shieldst::~itemdef_shieldst) + scalar deleting destructor: 006CB7D0h + destructor: 006CB820h + constructor: 006CB720h + +00936818h: possible vtable (3 methods) +(SI) +0000: itemdef_helmst +0000: itemdefst + itemdef_helmst::`vftable' + referencing functions: + .text:006CB8E0 (itemdef_helmst::itemdef_helmst) + .text:006CBA10 (itemdef_helmst::~itemdef_helmst) + scalar deleting destructor: 006CB9C0h + destructor: 006CBA10h + constructor: 006CB8E0h + +00936828h: possible vtable (3 methods) +(SI) +0000: itemdef_pantsst +0000: itemdefst + itemdef_pantsst::`vftable' + referencing functions: + .text:006CBB00 (itemdef_pantsst::itemdef_pantsst) + .text:006CBC80 (itemdef_pantsst::~itemdef_pantsst) + scalar deleting destructor: 006CBC30h + destructor: 006CBC80h + constructor: 006CBB00h + +00936838h: possible vtable (3 methods) +(SI) +0000: itemdef_foodst +0000: itemdefst + itemdef_foodst::`vftable' + referencing functions: + .text:006CBDA0 (itemdef_foodst::itemdef_foodst) + .text:006CBE80 (itemdef_foodst::~itemdef_foodst) + scalar deleting destructor: 006CBE30h + destructor: 006CBE80h + constructor: 006CBDA0h + +0093C7B4h: possible vtable (1 methods) + referencing functions: + .text:006D6968 + +0093CA98h: possible vtable (8 methods) +(SI) +0000: KeybindingScreen +0000: viewscreenst + KeybindingScreen::`vftable' + referencing functions: + .text:006DD370 + +0093CABCh: possible vtable (8 methods) +(SI) +0000: MacroScreenLoad +0000: viewscreenst + MacroScreenLoad::`vftable' + referencing functions: + .text:006DE830 + +0093CAE0h: possible vtable (8 methods) +(SI) +0000: MacroScreenSave +0000: viewscreenst + MacroScreenSave::`vftable' + referencing functions: + .text:006DECA0 + +0093CEB8h: possible vtable (5 methods) +(SI) +0000: machinest + machinest::`vftable' + referencing functions: + .text:006EE720 + .text:006EEB70 + .text:006EEBF0 (machine_standardst::~machine_standardst) + .text:006EF420 + scalar deleting destructor: 006EE7B0h + destructor: 006EEBF0h + +0093CED0h: possible vtable (5 methods) +(SI) +0000: machine_standardst +0000: machinest + machine_standardst::`vftable' + referencing functions: + .text:006EE6C0 + .text:006EE720 + .text:006EF420 (5 times) + scalar deleting destructor: 006EE7B0h + destructor: 006EEBF0h + +0093CFD8h: possible vtable (1 methods) + referencing functions: + .text:006F0BA0 + +0093D7D4h: possible vtable (14 methods) +(SI) +0000: general_ref_artifactst +0000: general_refst + general_ref_artifactst::`vftable' + referencing functions: + .text:006FAB80 + .text:0070BC10 + .text:00777A20 + .text:00777EB0 + .text:008866E0 + scalar deleting destructor: 00777450h + +0093D810h: possible vtable (14 methods) +(SI) +0000: general_ref_item_typest +0000: general_refst + general_ref_item_typest::`vftable' + referencing functions: + .text:006FAC80 + .text:0070BC10 + .text:00777A20 + .text:00777EB0 + .text:008866E0 + scalar deleting destructor: 00777450h + +009412A4h: possible vtable (8 methods) +(SI) +0000: viewscreen_textviewerst +0000: viewscreenst + viewscreen_textviewerst::`vftable' + referencing functions: + .text:00712190 (viewscreen_textviewerst::viewscreen_textviewerst) + .text:007122B0 (viewscreen_textviewerst::~viewscreen_textviewerst) + scalar deleting destructor: 00712400h + destructor: 007122B0h + constructor: 00712190h + +009412C8h: possible vtable (8 methods) +(SI) +0000: viewscreen_tradelistst +0000: viewscreenst + viewscreen_tradelistst::`vftable' + referencing functions: + .text:0071F130 + +009412ECh: possible vtable (8 methods) +(SI) +0000: viewscreen_tradegoodsst +0000: viewscreenst + viewscreen_tradegoodsst::`vftable' + referencing functions: + .text:00723B30 + +00941310h: possible vtable (8 methods) +(SI) +0000: viewscreen_barterst +0000: viewscreenst + viewscreen_barterst::`vftable' + referencing functions: + .text:0071F720 + +00941334h: possible vtable (8 methods) +(SI) +0000: viewscreen_meetingst +0000: viewscreenst + viewscreen_meetingst::`vftable' + referencing functions: + .text:0072DEA0 + .text:0072DF00 + +00941358h: possible vtable (8 methods) +(SI) +0000: viewscreen_topicmeetingst +0000: viewscreenst + viewscreen_topicmeetingst::`vftable' + referencing functions: + .text:0072DF50 + scalar deleting destructor: 004647A0h + +0094137Ch: possible vtable (8 methods) +(SI) +0000: viewscreen_topicmeeting_takerequestsst +0000: viewscreenst + viewscreen_topicmeeting_takerequestsst::`vftable' + referencing functions: + .text:0072E030 (viewscreen_topicmeeting_takerequestsst::viewscreen_topicmeeting_takerequestsst) + .text:0072E7C0 (viewscreen_topicmeeting_takerequestsst::~viewscreen_topicmeeting_takerequestsst) + scalar deleting destructor: 0072E2F0h + destructor: 0072E7C0h + constructor: 0072E030h + +009413A0h: possible vtable (8 methods) +(SI) +0000: viewscreen_tradeagreementst +0000: viewscreenst + viewscreen_tradeagreementst::`vftable' + referencing functions: + .text:0072E390 + .text:0072E560 + +009413C4h: possible vtable (8 methods) +(SI) +0000: viewscreen_requestagreementst +0000: viewscreenst + viewscreen_requestagreementst::`vftable' + referencing functions: + .text:0072E640 + scalar deleting destructor: 004647A0h + +009413E8h: possible vtable (8 methods) +(SI) +0000: viewscreen_layer_assigntradest +0000: viewscreen_layerst +0000: viewscreenst + viewscreen_layer_assigntradest::`vftable' + referencing functions: + .text:0071B2F0 (viewscreen_layer_assigntradest::viewscreen_layer_assigntradest) + .text:0071C0B0 (viewscreen_layer_assigntradest::~viewscreen_layer_assigntradest) + scalar deleting destructor: 0071C090h + destructor: 0071C0B0h + constructor: 0071B2F0h + +00942658h: possible vtable (1 methods) + referencing functions: + .text:0074A9A0 + +0094382Ch: possible vtable (1 methods) + referencing functions: + .text:0074A9A0 (2 times) + .text:007F52E0 + +00944AC8h: possible vtable (8 methods) +(SI) +0000: proj_magicst +0000: projst + proj_magicst::`vftable' + referencing functions: + .text:00770950 + .text:00810100 + +00944B84h: possible vtable (4 methods) +(SI) +0000: reaction_reagent_itemst +0000: reaction_reagentst + reaction_reagent_itemst::`vftable' + referencing functions: + .text:00775950 + +00944B98h: possible vtable (1 methods) +(SI) +0000: reaction_reagent_metal_orest +0000: reaction_reagentst + reaction_reagent_metal_orest::`vftable' + referencing functions: + .text:00775950 + +00944BACh: possible vtable (4 methods) +(SI) +0000: reaction_reagent_classst +0000: reaction_reagentst + reaction_reagent_classst::`vftable' + referencing functions: + .text:00775950 + +00944BC0h: possible vtable (3 methods) +(SI) +0000: reaction_product_itemst +0000: reaction_productst + reaction_product_itemst::`vftable' + referencing functions: + .text:00775950 + +00944BD0h: possible vtable (14 methods) +(SI) +0000: general_ref_is_artifactst +0000: general_ref_artifactst +0000: general_refst + general_ref_is_artifactst::`vftable' + referencing functions: + .text:00606BF0 + .text:00777390 + .text:00777A20 + .text:00777EB0 + scalar deleting destructor: 00777450h + +00944C0Ch: possible vtable (14 methods) +(SI) +0000: general_ref_nemesisst +0000: general_refst + general_ref_nemesisst::`vftable' + referencing functions: + .text:007773C0 + .text:00777A20 + .text:00777EB0 + scalar deleting destructor: 00777450h + +00944C48h: possible vtable (14 methods) +(SI) +0000: general_ref_is_nemesisst +0000: general_ref_nemesisst +0000: general_refst + general_ref_is_nemesisst::`vftable' + referencing functions: + .text:004C7020 + .text:0070FA50 + .text:007773F0 + .text:00777A20 + .text:00777EB0 + .text:0085A420 + scalar deleting destructor: 00777450h + +00944C84h: possible vtable (14 methods) +(SI) +0000: general_ref_unitst +0000: general_refst + general_ref_unitst::`vftable' + referencing functions: + .text:00777420 + .text:00777A20 + .text:00777EB0 + scalar deleting destructor: 00777450h + +00944CC0h: possible vtable (14 methods) +(SI) +0000: general_ref_contains_unitst +0000: general_ref_unitst +0000: general_refst + general_ref_contains_unitst::`vftable' + referencing functions: + .text:00777480 + .text:00777A20 + .text:00777EB0 + .text:0083CE70 + scalar deleting destructor: 00777450h + +00944CFCh: possible vtable (14 methods) +(SI) +0000: general_ref_unit_traineest +0000: general_ref_unitst +0000: general_refst + general_ref_unit_traineest::`vftable' + referencing functions: + .text:005B16D0 + .text:007774C0 + .text:00777A20 + .text:00777EB0 + scalar deleting destructor: 00777450h + +00944D38h: possible vtable (14 methods) +(SI) +0000: general_ref_unit_cageest +0000: general_ref_unitst +0000: general_refst + general_ref_unit_cageest::`vftable' + referencing functions: + .text:0042B9E0 (2 times) + .text:00430F40 + .text:007774F0 + .text:00777A20 + .text:00777EB0 + scalar deleting destructor: 00777450h + +00944D74h: possible vtable (14 methods) +(SI) +0000: general_ref_unit_beateest +0000: general_ref_unitst +0000: general_refst + general_ref_unit_beateest::`vftable' + referencing functions: + .text:00777520 + .text:00777A20 + .text:00777EB0 + scalar deleting destructor: 00777450h + +00944DB0h: possible vtable (14 methods) +(SI) +0000: general_ref_unit_foodreceiverst +0000: general_ref_unitst +0000: general_refst + general_ref_unit_foodreceiverst::`vftable' + referencing functions: + .text:00777560 + .text:00777A20 + .text:00777EB0 + .text:00842780 + scalar deleting destructor: 00777450h + +00944DECh: possible vtable (14 methods) +(SI) +0000: general_ref_unit_kidnapeest +0000: general_ref_unitst +0000: general_refst + general_ref_unit_kidnapeest::`vftable' + referencing functions: + .text:00777590 + .text:00777A20 + .text:00777EB0 + scalar deleting destructor: 00777450h + +00944E28h: possible vtable (14 methods) +(SI) +0000: general_ref_unit_patientst +0000: general_ref_unitst +0000: general_refst + general_ref_unit_patientst::`vftable' + referencing functions: + .text:007775D0 + .text:00777A20 + .text:00777EB0 + .text:00841D20 + scalar deleting destructor: 00777450h + +00944E64h: possible vtable (14 methods) +(SI) +0000: general_ref_unit_infantst +0000: general_ref_unitst +0000: general_refst + general_ref_unit_infantst::`vftable' + referencing functions: + .text:00777600 + .text:00777A20 + .text:00777EB0 + scalar deleting destructor: 00777450h + +00944EA0h: possible vtable (14 methods) +(SI) +0000: general_ref_unit_slaughtereest +0000: general_ref_unitst +0000: general_refst + general_ref_unit_slaughtereest::`vftable' + referencing functions: + .text:00777630 + .text:00777A20 + .text:00777EB0 + scalar deleting destructor: 00777450h + +00944EDCh: possible vtable (14 methods) +(SI) +0000: general_ref_unit_itemownerst +0000: general_ref_unitst +0000: general_refst + general_ref_unit_itemownerst::`vftable' + referencing functions: + .text:00575D30 + .text:005FB590 + .text:006B1F40 + .text:006BCB90 + .text:006C4A90 + .text:0072B680 (2 times) + .text:00777660 + .text:00777A20 + .text:00777EB0 + .text:00869930 + scalar deleting destructor: 00777450h + +00944F18h: possible vtable (14 methods) +(SI) +0000: general_ref_unit_tradebringerst +0000: general_ref_unitst +0000: general_refst + general_ref_unit_tradebringerst::`vftable' + referencing functions: + .text:006B1FA0 + .text:007776A0 + .text:00777A20 + .text:00777EB0 + scalar deleting destructor: 00777450h + +00944F54h: possible vtable (14 methods) +(SI) +0000: general_ref_unit_holderst +0000: general_ref_unitst +0000: general_refst + general_ref_unit_holderst::`vftable' + referencing functions: + .text:007776E0 + .text:00777A20 + .text:00777EB0 + .text:00811FC0 + scalar deleting destructor: 00777450h + +00944F90h: possible vtable (14 methods) +(SI) +0000: general_ref_unit_workerst +0000: general_ref_unitst +0000: general_refst + general_ref_unit_workerst::`vftable' + referencing functions: + .text:00777710 + .text:00777A20 + .text:00777EB0 + .text:00811D80 + scalar deleting destructor: 00777450h + +00944FCCh: possible vtable (14 methods) +(SI) +0000: general_ref_itemst +0000: general_refst + general_ref_itemst::`vftable' + referencing functions: + .text:00777750 + .text:00777A20 + .text:00777EB0 + scalar deleting destructor: 00777450h + +00945008h: possible vtable (14 methods) +(SI) +0000: general_ref_contains_itemst +0000: general_ref_itemst +0000: general_refst + general_ref_contains_itemst::`vftable' + referencing functions: + .text:006AF750 + .text:00777780 + .text:00777A20 + .text:00777EB0 + scalar deleting destructor: 00777450h + +00945044h: possible vtable (14 methods) +(SI) +0000: general_ref_contained_in_itemst +0000: general_ref_itemst +0000: general_refst + general_ref_contained_in_itemst::`vftable' + referencing functions: + .text:006AF750 + .text:007777C0 + .text:00777A20 + .text:00777EB0 + .text:0083CE70 + scalar deleting destructor: 00777450h + +00945080h: possible vtable (14 methods) +(SI) +0000: general_ref_projectilest +0000: general_refst + general_ref_projectilest::`vftable' + referencing functions: + .text:0042E450 + .text:0042EEB0 (2 times) + .text:0062AB40 + .text:007777F0 + .text:00777A20 + .text:00777EB0 + .text:00812DE0 + .text:00831DC0 + .text:00832360 + scalar deleting destructor: 00777450h + +009450BCh: possible vtable (14 methods) +(SI) +0000: general_ref_building_civzone_assignedst +0000: general_ref_buildingst +0000: general_refst + general_ref_building_civzone_assignedst::`vftable' + referencing functions: + .text:0043AA70 + .text:0043AAD0 + .text:00777820 + .text:00777A20 + .text:00777EB0 + scalar deleting destructor: 00777450h + +009450F8h: possible vtable (14 methods) +(SI) +0000: general_ref_building_triggerst +0000: general_ref_buildingst +0000: general_refst + general_ref_building_triggerst::`vftable' + referencing functions: + .text:005B8D50 + .text:00777850 + .text:00777A20 + .text:00777EB0 + scalar deleting destructor: 00777450h + +00945134h: possible vtable (14 methods) +(SI) +0000: general_ref_building_triggertargetst +0000: general_ref_buildingst +0000: general_refst + general_ref_building_triggertargetst::`vftable' + referencing functions: + .text:005B8D50 + .text:00777880 + .text:00777A20 + .text:00777EB0 + scalar deleting destructor: 00777450h + +00945170h: possible vtable (14 methods) +(SI) +0000: general_ref_building_chainst +0000: general_ref_buildingst +0000: general_refst + general_ref_building_chainst::`vftable' + referencing functions: + .text:007778C0 + .text:00777A20 + .text:00777EB0 + scalar deleting destructor: 00777450h + +009451ACh: possible vtable (14 methods) +(SI) +0000: general_ref_building_cagedst +0000: general_ref_buildingst +0000: general_refst + general_ref_building_cagedst::`vftable' + referencing functions: + .text:00434940 + .text:007778F0 + .text:00777A20 + .text:00777EB0 + scalar deleting destructor: 00777450h + +009451E8h: possible vtable (14 methods) +(SI) +0000: general_ref_building_holderst +0000: general_ref_buildingst +0000: general_refst + general_ref_building_holderst::`vftable' + referencing functions: + .text:00420460 + .text:004204F0 + .text:00420820 + .text:004316E0 + .text:0043DC00 + .text:00497690 + .text:00527490 + .text:005B16D0 (2 times) + .text:00647C80 + .text:00777920 + .text:00777A20 + .text:00777EB0 + .text:00841D20 + scalar deleting destructor: 00777450h + +00945224h: possible vtable (14 methods) +(SI) +0000: general_ref_entityst +0000: general_refst + general_ref_entityst::`vftable' + referencing functions: + .text:00777950 + .text:00777A20 + .text:00777EB0 + scalar deleting destructor: 00777450h + +00945260h: possible vtable (14 methods) +(SI) +0000: general_ref_entity_stolenst +0000: general_ref_entityst +0000: general_refst + general_ref_entity_stolenst::`vftable' + referencing functions: + .text:006BCB90 + .text:006C4A90 + .text:00726BC0 + .text:00777980 + .text:00777A20 + .text:00777EB0 + scalar deleting destructor: 00777450h + +0094529Ch: possible vtable (14 methods) +(SI) +0000: general_ref_entity_offeredst +0000: general_ref_entityst +0000: general_refst + general_ref_entity_offeredst::`vftable' + referencing functions: + .text:006BCB90 + .text:006C4A90 + .text:00726BC0 + .text:007779C0 + .text:00777A20 + .text:00777EB0 + .text:0084A4A0 (2 times) + .text:0084A860 + scalar deleting destructor: 00777450h + +009452D8h: possible vtable (14 methods) +(SI) +0000: general_ref_entity_itemownerst +0000: general_ref_entityst +0000: general_refst + general_ref_entity_itemownerst::`vftable' + referencing functions: + .text:006B8F90 (2 times) + .text:006BCB90 + .text:006C4A90 + .text:007779F0 + .text:00777A20 + .text:00777EB0 + scalar deleting destructor: 00777450h + +00946D54h: possible vtable (1 methods) +(SI) +0000: script_varst + script_varst::`vftable' + referencing functions: + .text:007EBA70 + .text:007EBB60 + +00946D5Ch: possible vtable (1 methods) +(SI) +0000: script_var_unitst +0000: script_varst + script_var_unitst::`vftable' + referencing functions: + .text:007EBA70 + +00946D64h: possible vtable (1 methods) +(SI) +0000: script_var_longst +0000: script_varst + script_var_longst::`vftable' + referencing functions: + .text:007EBB60 + +00946D6Ch: possible vtable (4 methods) +(SI) +0000: script_stepst + script_stepst::`vftable' + referencing functions: + .text:007EBBD0 + .text:007EBE00 + .text:007EBFB0 + .text:007EC180 + .text:007EC200 (script_step_diphistoryst::`scalar deleting destructor') + .text:007EC490 + .text:007EC4C0 + .text:007EC650 + .text:007ECDF0 + scalar deleting destructor: 007EC200h + +00946D80h: possible vtable (4 methods) +(SI) +0000: script_step_conditionalst +0000: script_stepst + script_step_conditionalst::`vftable' + referencing functions: + .text:007EBC60 + +00946D94h: possible vtable (4 methods) +(SI) +0000: script_step_simpleactionst +0000: script_stepst + script_step_simpleactionst::`vftable' + referencing functions: + .text:007EBF00 + +00946DA8h: possible vtable (4 methods) +(SI) +0000: script_step_setvarst +0000: script_stepst + script_step_setvarst::`vftable' + referencing functions: + .text:007EC090 + +00946DBCh: possible vtable (4 methods) +(SI) +0000: script_step_topicdiscussionst +0000: script_stepst + script_step_topicdiscussionst::`vftable' + referencing functions: + .text:007ECDF0 + scalar deleting destructor: 007EC200h + +00946DD0h: possible vtable (4 methods) +(SI) +0000: script_step_constructtopiclistst +0000: script_stepst + script_step_constructtopiclistst::`vftable' + referencing functions: + .text:007ECDF0 + scalar deleting destructor: 007EC200h + +00946DE4h: possible vtable (4 methods) +(SI) +0000: script_step_discussst +0000: script_stepst + script_step_discussst::`vftable' + referencing functions: + .text:007ECDF0 + scalar deleting destructor: 007EC200h + +00946DF8h: possible vtable (4 methods) +(SI) +0000: script_step_textviewerst +0000: script_stepst + script_step_textviewerst::`vftable' + referencing functions: + .text:007EC290 + +00946E0Ch: possible vtable (4 methods) +(SI) +0000: script_step_diphistoryst +0000: script_stepst + script_step_diphistoryst::`vftable' + referencing functions: + .text:007ECDF0 + scalar deleting destructor: 007EC200h + +00946E20h: possible vtable (4 methods) +(SI) +0000: script_step_dipeventst +0000: script_step_eventst +0000: script_stepst + script_step_dipeventst::`vftable' + referencing functions: + .text:007EC3A0 + +00946E34h: possible vtable (4 methods) +(SI) +0000: script_step_invasionst +0000: script_step_eventst +0000: script_stepst + script_step_invasionst::`vftable' + referencing functions: + .text:007EC5C0 + +00947A44h: possible vtable (8 methods) +(SI) +0000: viewscreen_choose_start_sitest +0000: viewscreenst + viewscreen_choose_start_sitest::`vftable' + referencing functions: + .text:00803200 (viewscreen_choose_start_sitest::viewscreen_choose_start_sitest) + .text:00808B70 (viewscreen_choose_start_sitest::~viewscreen_choose_start_sitest) + scalar deleting destructor: 008041F0h + destructor: 00808B70h + constructor: 00803200h + +00947A68h: possible vtable (8 methods) +(SI) +0000: viewscreen_setupdwarfgamest +0000: viewscreenst + viewscreen_setupdwarfgamest::`vftable' + referencing functions: + .text:00806D90 (viewscreen_setupdwarfgamest::viewscreen_setupdwarfgamest) + .text:00808DB0 (viewscreen_setupdwarfgamest::~viewscreen_setupdwarfgamest) + scalar deleting destructor: 00808830h + destructor: 00808DB0h + constructor: 00806D90h + +00947A8Ch: possible vtable (8 methods) +(SI) +0000: viewscreen_layer_choose_language_namest +0000: viewscreen_layerst +0000: viewscreenst + viewscreen_layer_choose_language_namest::`vftable' + referencing functions: + .text:00804260 (viewscreen_layer_choose_language_namest::viewscreen_layer_choose_language_namest) + .text:00808CD0 (viewscreen_layer_choose_language_namest::~viewscreen_layer_choose_language_namest) + scalar deleting destructor: 00804760h + destructor: 00808CD0h + constructor: 00804260h + +0094947Ch: possible vtable (1 methods) + referencing functions: + .text:00833820 + +0094965Ch: possible vtable (1 methods) + referencing functions: + .text:00834F70 + .text:00837BA0 + +0094966Ch: possible vtable (1 methods) + referencing functions: + .text:00834F70 + .text:00837BA0 + +00949C0Ch: possible vtable (1 methods) + referencing functions: + .text:00837BA0 (2 times) + +0094F500h: possible vtable (3 methods) +(SI) +0000: vegst + vegst::`vftable' + referencing functions: + .text:00879700 + .text:008797B0 + +00951184h: possible vtable (5 methods) +(SI) +0000: world_construction_squarest + world_construction_squarest::`vftable' + referencing functions: + .text:008CF1B0 (world_construction_squarest::~world_construction_squarest) + .text:008CF260 (world_construction_squarest::world_construction_squarest) + scalar deleting destructor: 008CF2E0h + destructor: 008CF1B0h + constructor: 008CF260h + +0095119Ch: possible vtable (5 methods) +(SI) +0000: world_construction_square_roadst +0000: world_construction_squarest + world_construction_square_roadst::`vftable' + referencing functions: + .text:00544910 + .text:008CF300 (world_construction_square_roadst::`scalar deleting destructor') + scalar deleting destructor: 008CF300h + +009511B4h: possible vtable (5 methods) +(SI) +0000: world_construction_square_tunnelst +0000: world_construction_squarest + world_construction_square_tunnelst::`vftable' + referencing functions: + .text:00544990 + .text:0058F8F0 + .text:008CF330 (world_construction_square_tunnelst::`scalar deleting destructor') + scalar deleting destructor: 008CF330h + +009511CCh: possible vtable (5 methods) +(SI) +0000: world_construction_square_bridgest +0000: world_construction_squarest + world_construction_square_bridgest::`vftable' + referencing functions: + .text:005449F0 + .text:008CF360 (world_construction_square_bridgest::`scalar deleting destructor') + scalar deleting destructor: 008CF360h + +009511E4h: possible vtable (5 methods) +(SI) +0000: world_construction_square_wallst +0000: world_construction_squarest + world_construction_square_wallst::`vftable' + referencing functions: + .text:008CF390 + .text:008CF410 (world_construction_square_wallst::`scalar deleting destructor') + scalar deleting destructor: 008CF410h + +009511FCh: possible vtable (5 methods) +(SI) +0000: world_constructionst + world_constructionst::`vftable' + referencing functions: + .text:008CF4B0 (world_constructionst::~world_constructionst) + .text:008CF510 (world_constructionst::world_constructionst) + scalar deleting destructor: 008CF570h + destructor: 008CF4B0h + constructor: 008CF510h + +00951214h: possible vtable (5 methods) +(SI) +0000: world_construction_roadst +0000: world_constructionst + world_construction_roadst::`vftable' + referencing functions: + .text:008CF590 (world_construction_roadst::~world_construction_roadst) + .text:008CFBB0 (world_construction_roadst::world_construction_roadst) + scalar deleting destructor: 008CF5F0h + destructor: 008CF590h + constructor: 008CFBB0h + +0095122Ch: possible vtable (5 methods) +(SI) +0000: world_construction_tunnelst +0000: world_constructionst + world_construction_tunnelst::`vftable' + referencing functions: + .text:008CF610 (world_construction_tunnelst::~world_construction_tunnelst) + .text:008CFC10 (world_construction_tunnelst::world_construction_tunnelst) + scalar deleting destructor: 008CF670h + destructor: 008CF610h + constructor: 008CFC10h + +00951244h: possible vtable (5 methods) +(SI) +0000: world_construction_wallst +0000: world_constructionst + world_construction_wallst::`vftable' + referencing functions: + .text:008CF710 (world_construction_wallst::~world_construction_wallst) + .text:008CFD60 (world_construction_wallst::world_construction_wallst) + scalar deleting destructor: 008CF770h + destructor: 008CF710h + constructor: 008CFD60h + +0095125Ch: possible vtable (5 methods) +(SI) +0000: world_construction_bridgest +0000: world_constructionst + world_construction_bridgest::`vftable' + referencing functions: + .text:008CF790 (world_construction_bridgest::~world_construction_bridgest) + .text:008CFD00 (world_construction_bridgest::world_construction_bridgest) + scalar deleting destructor: 008CF7F0h + destructor: 008CF790h + constructor: 008CFD00h + diff --git a/reversing/linux-wagon-d19.txt b/reversing/linux-wagon-d19.txt new file mode 100644 index 000000000..bc2e6ed2a --- /dev/null +++ b/reversing/linux-wagon-d19.txt @@ -0,0 +1 @@ +.rodata:08779424 16building_wagonst diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 7dfe314c6..807302bd7 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -14,8 +14,8 @@ ADD_EXECUTABLE(dfprospector prospector.cpp) TARGET_LINK_LIBRARIES(dfprospector dfhack) # cleanmap - removes mud, snow, blood and similar stuff from a map. farmers beware -ADD_EXECUTABLE(dfcleanmap cleanmap.cpp) -TARGET_LINK_LIBRARIES(dfcleanmap dfhack) +#ADD_EXECUTABLE(dfcleanmap cleanmap.cpp) +#TARGET_LINK_LIBRARIES(dfcleanmap dfhack) IF(UNIX) # incrementalsearch - a bit like cheat engine, only DF-specific, very basic @@ -26,33 +26,33 @@ ENDIF(UNIX) # bauxite - turn all mechanisms into bauxite mechanisms # Author: Alex Legg -ADD_EXECUTABLE(dfbauxite dfbauxite.cpp) -TARGET_LINK_LIBRARIES(dfbauxite dfhack) +#ADD_EXECUTABLE(dfbauxite dfbauxite.cpp) +#TARGET_LINK_LIBRARIES(dfbauxite dfhack) # digger - designate for digging by tile class # Author: mizipzor -ADD_EXECUTABLE(dfdigger digger.cpp) -TARGET_LINK_LIBRARIES(dfdigger dfhack) +#ADD_EXECUTABLE(dfdigger digger.cpp) +#TARGET_LINK_LIBRARIES(dfdigger dfhack) # itemdesignator - change some item designations (dump, forbid, on-fire) for all # items of a given type and material # Author: belal -ADD_EXECUTABLE(dfitemdesignator itemdesignator.cpp) -TARGET_LINK_LIBRARIES(dfitemdesignator dfhack) +#ADD_EXECUTABLE(dfitemdesignator itemdesignator.cpp) +#TARGET_LINK_LIBRARIES(dfitemdesignator dfhack) # a magma creation tool # Author: Aleric -ADD_EXECUTABLE(dfmagma_create magma_create.cpp) -TARGET_LINK_LIBRARIES(dfmagma_create dfhack) +#ADD_EXECUTABLE(dfmagma_create magma_create.cpp) +#TARGET_LINK_LIBRARIES(dfmagma_create dfhack) IF(UNIX) install(TARGETS -dfbauxite -dfcleanmap -dfdigger +#dfbauxite +#dfcleanmap +#dfdigger dfincremental -dfitemdesignator -dfmagma_create +#dfitemdesignator +#dfmagma_create dfprospector dfreveal RUNTIME DESTINATION bin diff --git a/tools/digger.cpp b/tools/digger.cpp index d23595c76..5e877b766 100644 --- a/tools/digger.cpp +++ b/tools/digger.cpp @@ -16,7 +16,7 @@ using namespace std; #include #include #include -#include +#include // counts the occurances of a certain element in a vector // used to determine of a given tile is a target diff --git a/tools/prospector.cpp b/tools/prospector.cpp index d07a7ae23..f944638dc 100644 --- a/tools/prospector.cpp +++ b/tools/prospector.cpp @@ -13,11 +13,14 @@ #include #include #include +#include using namespace std; #include #include #include +#include +#include int main (int argc, const char* argv[]) { @@ -68,8 +71,12 @@ int main (int argc, const char* argv[]) return 1; } + + DFHack::Maps * Maps = DF.getMaps(); + DFHack::Materials * Mats = DF.getMaterials(); + // init the map - if(!DF.InitMap()) + if(!Maps->Start()) { cerr << "Can't init map." << endl; #ifndef LINUX_BUILD @@ -77,10 +84,10 @@ int main (int argc, const char* argv[]) #endif return 1; } - DF.getSize(x_max,y_max,z_max); + Maps->getSize(x_max,y_max,z_max); // get stone matgloss mapping - if(!DF.ReadStoneMatgloss(stonetypes)) + if(!Mats->ReadInorganicMaterials(stonetypes)) { //DF.DestroyMap(); cerr << "Can't get the materials." << endl; @@ -91,7 +98,7 @@ int main (int argc, const char* argv[]) } // get region geology - if(!DF.ReadGeology( layerassign )) + if(!Maps->ReadGeology( layerassign )) { cerr << "Can't get region geology." << endl; #ifndef LINUX_BUILD @@ -103,6 +110,8 @@ int main (int argc, const char* argv[]) int16_t tempvein [16][16]; vector veins; vector iceveins; + uint32_t maximum_regionoffset = 0; + uint32_t num_overflows = 0; // walk the map! for(uint32_t x = 0; x< x_max;x++) { @@ -110,28 +119,36 @@ int main (int argc, const char* argv[]) { for(uint32_t z = 0; z< z_max;z++) { - if(!DF.isValidBlock(x,y,z)) + if(!Maps->isValidBlock(x,y,z)) continue; // read data - DF.ReadTileTypes(x,y,z, &tiletypes); - DF.ReadDesignations(x,y,z, &designations); + Maps->ReadTileTypes(x,y,z, &tiletypes); + Maps->ReadDesignations(x,y,z, &designations); memset(tempvein, -1, sizeof(tempvein)); veins.clear(); - DF.ReadVeins(x,y,z,veins,iceveins); + Maps->ReadVeins(x,y,z,veins,iceveins); if(showbaselayers) { - DF.ReadRegionOffsets(x,y,z, ®ionoffsets); + Maps->ReadRegionOffsets(x,y,z, ®ionoffsets); // get the layer materials for(uint32_t xx = 0;xx<16;xx++) { for (uint32_t yy = 0; yy< 16;yy++) { + uint8_t test = designations[xx][yy].bits.biome; + if(test > maximum_regionoffset) + maximum_regionoffset = test; + if( test >= sizeof(regionoffsets)) + { + num_overflows++; + continue; + } tempvein[xx][yy] = layerassign - [regionoffsets[designations[xx][yy].bits.biome]] + [regionoffsets[test]] [designations[xx][yy].bits.geolayer_index]; } } @@ -182,6 +199,14 @@ int main (int argc, const char* argv[]) } } // print report + cout << "Maximal regionoffset seen: " << maximum_regionoffset << "."; + if(maximum_regionoffset >= sizeof(regionoffsets) ) + { + cout << " This is above the regionoffsets array size!" << endl; + cout << "Number of overflows: " << num_overflows; + } + cout << endl; + map::iterator p; for(p = materials.begin(); p != materials.end(); p++) { diff --git a/tools/reveal.cpp b/tools/reveal.cpp index 654252e32..de1304e34 100644 --- a/tools/reveal.cpp +++ b/tools/reveal.cpp @@ -7,6 +7,7 @@ using namespace std; #include #include +#include int main (void) { @@ -27,8 +28,9 @@ int main (void) return 1; } + DFHack::Maps *Maps =DF.getMaps(); // init the map - if(!DF.InitMap()) + if(!Maps->Start()) { cerr << "Can't init map." << endl; #ifndef LINUX_BUILD @@ -37,7 +39,7 @@ int main (void) return 1; } - DF.getSize(x_max,y_max,z_max); + Maps->getSize(x_max,y_max,z_max); // walk the map for(uint32_t x = 0; x< x_max;x++) @@ -46,17 +48,17 @@ int main (void) { for(uint32_t z = 0; z< z_max;z++) { - if(DF.isValidBlock(x,y,z)) + if(Maps->isValidBlock(x,y,z)) { // read block designations - DF.ReadDesignations(x,y,z, &designations); + Maps->ReadDesignations(x,y,z, &designations); // change the hidden flag to 0 for (uint32_t i = 0; i < 16;i++) for (uint32_t j = 0; j < 16;j++) { designations[i][j].bits.hidden = 0; } // write the designations back - DF.WriteDesignations(x,y,z, &designations); + Maps->WriteDesignations(x,y,z, &designations); } } }