Function tcod::new_context(const TCOD_ContextParams&, TCOD_Error&)

Function Documentation

inline auto tcod::new_context(const TCOD_ContextParams &params, TCOD_Error &out_code) -> ContextPtr

Initialize and return a new libtcod context.

Also returns an error code for non-critical issues.

For critical issues an exception is thrown as usual. Non-critical issues are things such as being unable to create a desired renderer and using to a fallback instead.

New in version 1.19.

Parameters
  • params – Options to configure the new context with.

  • out_code – Will be set to an error code on non-critical issues.

Returns

ContextPtr A pointer to the new context.