Platforms are contained in specific directories which start with `p_`.
Usually platforms contain no additional header files.
+## Portability
+
+The codebase should be as portable as possible.
+To achive this the following restrictions are in place:
+- Software rendering only
+- No fpu use in core code
+- Prefer 32 bit integers
+
Currently supported platforms are:
- p_pc: generic PC implementation of functionality using the C stdlib
- stdarg.h: for va_list va_start and va_end
- assert.h: for debug build asserts
+
## Vendoring
All 3rd party libraries should be forked and included as a submodule.
#ifndef T_COMMAND_H__
#define T_COMMAND_H__
+#include "u_defs.h"
+
/**
* A command is an order for a unit.
* each unit has a command queue.
#define T_COMMANDS_MAX 8
enum t_command_type {
- T_COMMAND_NONE = 0
+ T_COMMAND_NONE = 0,
+ /* moves camera in the direction of a
+ * provided vector
+ */
+ T_COMMAND_MOVE_CAMERA
};
enum t_command_flags {
T_COMMAND_F_NONE = 0
};
+union t_command_data {
+ struct u_vec2 move_camera;
+};
+
struct t_command {
enum t_command_type type;
enum t_command_flags flags;
+ union t_command_data d;
};
/**
struct t_command buffer[T_COMMANDS_MAX];
};
+/* executes a command. Returns true if command was executed. */
+lrts_bool t_command_exec(struct t_command *c);
+
#endif