🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
549 B

  1. #include <cr.h>
  2. #include <entt/signal/emitter.hpp>
  3. #include "types.h"
  4. CR_EXPORT int cr_main(cr_plugin *ctx, cr_op operation) {
  5. switch(operation) {
  6. case CR_STEP:
  7. static_cast<test_emitter *>(ctx->userdata)->publish<event>();
  8. static_cast<test_emitter *>(ctx->userdata)->publish<message>(42);
  9. static_cast<test_emitter *>(ctx->userdata)->publish<message>(3);
  10. break;
  11. case CR_CLOSE:
  12. case CR_LOAD:
  13. case CR_UNLOAD:
  14. // nothing to do here, this is only a test.
  15. break;
  16. }
  17. return 0;
  18. }