aboutsummaryrefslogtreecommitdiff
path: root/advtrains_train_steam
Commit message (Collapse)AuthorAge
* lower steel returnThomas Rudin2018-09-28
|
* Fix box wagonsorwell962018-06-14
|
* Fix bugs found while testingorwell962018-06-14
|
* Move driving_ctrl_access property to seat grouporwell962018-01-09
| | | | | there's now a more strict check for the train_operator privilege Also added custom reasons on getting on a train.
* steam locomotive: Add sounds and improve texturesmbb2017-12-23
|
* Implement sound api and some soundsorwell962017-12-06
| | | | | | | - Level crossing bell - Horns - Subway train driving and door sounds ...to be continued...
* Change name of update_animation functionorwell962017-11-29
| | | | I will use this for sounds, and so it needs to be changed to a more general name
* Moved default train track to separate mod, for integration with advcarts.Gabriel Pérez-Cerezo2017-10-25
|
* Remove zip release files, move mod to root, exclude assets from Makefile (#92)rubenwardy2017-09-20
|
* Restructure mod directoryorwell962017-01-04
|
* remove train type concept and calculate train's capabilities based on used ↵orwell962016-12-22
| | | | wagons
* Turning mod into a modpack and separating the trains from the core modorwell962016-12-20
include <windows.h> #ifdef _MSC_VER #include <eh.h> #endif #define __NORETURN __declspec(noreturn) #define __FUNCTION_NAME __FUNCTION__ #else #define __NORETURN __attribute__ ((__noreturn__)) #define __FUNCTION_NAME __PRETTY_FUNCTION__ #endif // Whether to catch all std::exceptions. // Assert will be called on such an event. // In debug mode, leave these for the debugger and don't catch them. #ifdef NDEBUG #define CATCH_UNHANDLED_EXCEPTIONS 1 #else #define CATCH_UNHANDLED_EXCEPTIONS 0 #endif /* Debug output */ #define DTIME (getTimestamp()+": ") extern void debugstreams_init(bool disable_stderr, const char *filename); extern void debugstreams_deinit(); // This is used to redirect output to /dev/null class Nullstream : public std::ostream { public: Nullstream(): std::ostream(0) { } private: }; extern std::ostream dstream; extern std::ostream dstream_no_stderr; extern Nullstream dummyout; /* Include assert.h and immediately undef assert so that it can't override our assert later on. leveldb/slice.h is a notable offender. */ #include <assert.h> #undef assert /* Assert */ __NORETURN extern void assert_fail( const char *assertion, const char *file, unsigned int line, const char *function); #define ASSERT(expr)\ ((expr)\ ? (void)(0)\ : assert_fail(#expr, __FILE__, __LINE__, __FUNCTION_NAME)) #define assert(expr) ASSERT(expr) /* DebugStack */ #define DEBUG_STACK_SIZE 50 #define DEBUG_STACK_TEXT_SIZE 300 extern void debug_stacks_init(); extern void debug_stacks_print_to(std::ostream &os); extern void debug_stacks_print(); struct DebugStack; class DebugStacker { public: DebugStacker(const char *text); ~DebugStacker(); private: DebugStack *m_stack; bool m_overflowed; }; #define DSTACK(msg)\ DebugStacker __debug_stacker(msg); #define DSTACKF(...)\ char __buf[DEBUG_STACK_TEXT_SIZE];\ snprintf(__buf,\ DEBUG_STACK_TEXT_SIZE, __VA_ARGS__);\ DebugStacker __debug_stacker(__buf); /* These should be put into every thread */ #if CATCH_UNHANDLED_EXCEPTIONS == 1 #define BEGIN_PORTABLE_DEBUG_EXCEPTION_HANDLER try{ #define END_PORTABLE_DEBUG_EXCEPTION_HANDLER(logstream)\ }catch(std::exception &e){\ logstream<<"ERROR: An unhandled exception occurred: "\ <<e.what()<<std::endl;\ assert(0);\ } #ifdef _WIN32 // Windows #ifdef _MSC_VER // MSVC void se_trans_func(unsigned int, EXCEPTION_POINTERS*); #define BEGIN_DEBUG_EXCEPTION_HANDLER \ BEGIN_PORTABLE_DEBUG_EXCEPTION_HANDLER\ _set_se_translator(se_trans_func); #define END_DEBUG_EXCEPTION_HANDLER(logstream) \ END_PORTABLE_DEBUG_EXCEPTION_HANDLER(logstream) #else // Probably mingw #define BEGIN_DEBUG_EXCEPTION_HANDLER\ BEGIN_PORTABLE_DEBUG_EXCEPTION_HANDLER #define END_DEBUG_EXCEPTION_HANDLER(logstream)\ END_PORTABLE_DEBUG_EXCEPTION_HANDLER(logstream) #endif #else // Posix #define BEGIN_DEBUG_EXCEPTION_HANDLER\ BEGIN_PORTABLE_DEBUG_EXCEPTION_HANDLER #define END_DEBUG_EXCEPTION_HANDLER(logstream)\ END_PORTABLE_DEBUG_EXCEPTION_HANDLER(logstream) #endif #else // Dummy ones #define BEGIN_DEBUG_EXCEPTION_HANDLER #define END_DEBUG_EXCEPTION_HANDLER(logstream) #endif #endif // DEBUG_HEADER