Lumenarium/src/foldhaus_app.h

83 lines
2.0 KiB
C
Raw Normal View History

2019-07-19 20:56:21 +00:00
#include "../meta/gs_meta_lexer.h"
#include "gs_font.h"
#include "interface.h"
#include "foldhaus_network_ordering.h"
2019-11-23 00:07:25 +00:00
#include "dmx/dmx.h"
#include "sacn/sacn.h"
2019-07-19 20:56:21 +00:00
2019-11-23 00:07:25 +00:00
#include "foldhaus_assembly.h"
2019-07-19 20:56:21 +00:00
#include "assembly_parser.h"
#include "foldhaus_node.h"
#include "assembly_parser.cpp"
#include "test_patterns.h"
#include "foldhaus_interface.h"
typedef struct app_state app_state;
#include "foldhaus_command_dispatch.h"
#include "foldhaus_command_dispatch.cpp"
#include "foldhaus_operation_mode.h"
#include "foldhaus_text_entry.h"
#include "foldhaus_default_nodes.h"
2019-07-19 20:56:21 +00:00
#include "generated/foldhaus_nodes_generated.cpp"
2019-09-21 20:19:02 +00:00
#include "foldhaus_search_lister.h"
2019-07-19 20:56:21 +00:00
2019-11-23 00:07:25 +00:00
enum network_protocol
{
NetworkProtocol_SACN,
NetworkProtocol_ArtNet,
NetworkProtocol_Count,
};
2019-07-19 20:56:21 +00:00
struct app_state
{
memory_arena* Permanent;
memory_arena* Transient;
memory_arena SACNMemory;
2019-11-23 00:07:25 +00:00
s32 NetworkProtocolHeaderSize;
network_protocol NetworkProtocol;
2019-11-03 21:12:25 +00:00
streaming_acn SACN;
2019-11-23 00:07:25 +00:00
2019-11-03 21:12:25 +00:00
s32 TotalLEDsCount;
2019-11-23 00:07:25 +00:00
// TODO(Peter): Make this dynamic. We want them contiguous in memory since we'll be accessing them
// mostly by looping through them. On the other hand, I don't expect there to ever be more than 100
// of them at once.
#define ASSEMBLY_LIST_LENGTH 32
assembly AssemblyList[ASSEMBLY_LIST_LENGTH];
s32 AssembliesCount;
2019-11-03 21:12:25 +00:00
2019-07-19 20:56:21 +00:00
camera Camera;
2019-11-03 21:12:25 +00:00
r32 PixelsToWorldScale;
2019-07-19 20:56:21 +00:00
operation_mode_system Modes;
input_command_registry DefaultInputCommandRegistry;
2019-10-30 14:28:02 +00:00
input_command_queue CommandQueue;
2019-09-21 20:19:02 +00:00
text_entry ActiveTextEntry;
2019-07-19 20:56:21 +00:00
node_list* NodeList;
node_header* OutputNode;
2019-07-19 20:56:21 +00:00
2019-11-01 14:38:44 +00:00
node_render_settings NodeRenderSettings;
2019-11-03 21:12:25 +00:00
bitmap_font* Font;
interface_config Interface;
2019-07-19 20:56:21 +00:00
};
internal void OpenColorPicker(app_state* State, v4* Address);
2019-11-23 00:07:25 +00:00
#include "foldhaus_assembly.cpp"
2019-11-03 21:12:25 +00:00
#include "foldhaus_node.cpp"
2019-09-21 20:19:02 +00:00
#include "foldhaus_debug_visuals.h"
2019-11-23 00:07:25 +00:00
//#include "foldhaus_sacn_view.cpp"
#include "foldhaus_text_entry.cpp"
2019-11-01 12:46:40 +00:00
#include "foldhaus_search_lister.cpp"
#include "foldhaus_interface.cpp"