WOWCube Docs logo
WOWCube Docs
Mission Control
Section Shortcuts
APIExamplesSourceWOWConnectChangelog
Filters
SDK and language defaults persist in cookies.
SDK version
Navigation Tree
Collapsed by default, focused on the active path.
Made byMcKay Seamons
GitHub
  1. Home
  2. Docs
  3. Source
  4. native.cpp
Mission NodeSDK 6.1C++native.cpp

native.cpp

SDK Source File: native.cpp

Source / SDK 6.1 / C++ / Core

native.cpp

native.cpp
CPP
1/* Copyright Statement:
2 *
3 * (C) 2021-2024 Cubios Inc. All rights reserved.
4 */
5#include <stdint.h>
6#include "native_access.h"
7#include "native.h"
8#include <stdarg.h>
9#include "AppManager.h"
10
11namespace Cubios {
12uint32_t cubeN = 0;
13}
14
15Cubios::AppManager mngr;
16
17extern void OnInit(Cubios::AppManager& mngr);
18
19
20WASM_EXPORT
21void on_init(uint32_t cid) {
22 Cubios::cubeN = cid;
23 OnInit(mngr);
24}
25
26WASM_EXPORT
27void run() {
28 mngr.Main();
29}
30
31namespace Cubios {
32
33#define LOG_LINE_BUF_SIZE 128
34
35static char log_buf[LOG_LINE_BUF_SIZE] = { 0 };
36
37void log(uint8_t logLvl, const char *format, ...) {
38 va_list args;
39 va_start(args, format);
40 vsnprintf(log_buf, LOG_LINE_BUF_SIZE, format, args);
41 va_end(args);
42 LOG(logLvl, log_buf);
43
44}
45
46}
47
48
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.
Context Rail

Related nodes

AppManager.cpp
Source / SDK 6.1 / C++ / Core
AppManager.h
Source / SDK 6.1 / C++ / Core
Gfx.h
Source / SDK 6.1 / C++ / Core
native access.h
Source / SDK 6.1 / C++ / Core
Previous Node
native defines.h
Source / SDK 6.1 / C++ / Core
Next Node
native.h
Source / SDK 6.1 / C++ / Core