Rev 11 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 11 | Rev 18 | ||
---|---|---|---|
Line 20... | Line 20... | ||
20 | 20 | ||
21 | static int null_get_and_handle_message(MSG_* msg) { |
21 | static int null_get_and_handle_message(MSG_* msg) { |
22 | return 0; |
22 | return 0; |
23 | } |
23 | } |
24 | 24 | ||
25 | static void null_swap_window(void) { |
- | |
26 | } |
- | |
27 | - | ||
28 | static void null_get_keyboard_state(unsigned int count, uint8_t* buffer) { |
25 | static void null_get_keyboard_state(unsigned int count, uint8_t* buffer) { |
29 | } |
26 | } |
30 | 27 | ||
31 | static int null_get_mouse_buttons(int* pButton1, int* pButton2) { |
28 | static int null_get_mouse_buttons(int* pButton1, int* pButton2) { |
32 | return 0; |
29 | return 0; |
33 | } |
30 | } |
34 | 31 | ||
35 | static int null_get_mouse_position(int* pX, int* pY) { |
32 | static int null_get_mouse_position(int* pX, int* pY) { |
36 | return 0; |
33 | return 0; |
37 | } |
34 | } |
38 | 35 | ||
39 | static int null_show_cursor(int show) { |
36 | static int null_show_cursor(int show) { |
40 | return 0; |
37 | return 0; |
41 | } |
- | |
42 | - | ||
43 | static void NullRenderer_BeginScene(br_actor* camera, br_pixelmap* colour_buffer, br_pixelmap* depth_buffer) { |
- | |
44 | } |
- | |
45 | - | ||
46 | static void NullRenderer_EndScene(void) { |
- | |
47 | } |
- | |
48 | - | ||
49 | static void NullRenderer_SetPalette(PALETTEENTRY_* palette) { |
- | |
50 | } |
- | |
51 | - | ||
52 | static void NullRenderer_FullScreenQuad(uint8_t* src) { |
- | |
53 | } |
- | |
54 | - | ||
55 | static void NullRenderer_Model(br_actor* actor, br_model* model, br_material* material, br_token render_type, br_matrix34 model_matrix) { |
- | |
56 | } |
- | |
57 | - | ||
58 | static void NullRenderer_ClearBuffers(void) { |
- | |
59 | } |
- | |
60 | - | ||
61 | static void NullRenderer_BufferTexture(br_pixelmap* pm) { |
- | |
62 | } |
- | |
63 | - | ||
64 | static void NullRenderer_BufferMaterial(br_material* mat) { |
- | |
65 | } |
- | |
66 | - | ||
67 | static void NullRenderer_BufferModel(br_model* model) { |
- | |
68 | } |
- | |
69 | - | ||
70 | static void NullRenderer_FlushBuffers(void) { |
- | |
71 | } |
38 | } |
72 | 39 | ||
73 | static void |
40 | static void null_set_palette(PALETTEENTRY_* palette) { |
74 | } |
41 | } |
75 | 42 | ||
76 | void Null_Platform_Init(tHarness_platform* platform) { |
43 | void Null_Platform_Init(tHarness_platform* platform) { |
77 | platform->ProcessWindowMessages = null_get_and_handle_message; |
44 | platform->ProcessWindowMessages = null_get_and_handle_message; |
78 | // todo: shouldnt depend on sdl... |
45 | // todo: shouldnt depend on sdl... |
79 | platform->Sleep = SDL_Delay; |
46 | platform->Sleep = SDL_Delay; |
80 | platform->GetTicks = SDL_GetTicks; |
47 | platform->GetTicks = SDL_GetTicks; |
81 | platform->CreateWindowAndRenderer = null_create_window_and_renderer; |
48 | platform->CreateWindowAndRenderer = null_create_window_and_renderer; |
82 | platform->ShowCursor = null_show_cursor; |
49 | platform->ShowCursor = null_show_cursor; |
83 | platform->SetWindowPos = null_set_window_pos; |
50 | platform->SetWindowPos = null_set_window_pos; |
84 | platform->SwapWindow = null_swap_window; |
- | |
85 | platform->DestroyWindow = null_destroy_window; |
51 | platform->DestroyWindow = null_destroy_window; |
86 | platform->GetKeyboardState = null_get_keyboard_state; |
52 | platform->GetKeyboardState = null_get_keyboard_state; |
87 | platform->GetMousePosition = null_get_mouse_position; |
53 | platform->GetMousePosition = null_get_mouse_position; |
88 | platform->GetMouseButtons = null_get_mouse_buttons; |
54 | platform->GetMouseButtons = null_get_mouse_buttons; |
89 | platform->DestroyWindow = null_destroy_window; |
55 | platform->DestroyWindow = null_destroy_window; |
90 | platform->ShowErrorMessage = null_show_error_message; |
56 | platform->ShowErrorMessage = null_show_error_message; |
91 | 57 | ||
92 | platform->Renderer_BufferModel = NullRenderer_BufferModel; |
- | |
93 | platform->Renderer_BufferMaterial = NullRenderer_BufferMaterial; |
- | |
94 | platform->Renderer_BufferTexture = NullRenderer_BufferTexture; |
- | |
95 | platform->Renderer_SetPalette = |
58 | platform->Renderer_SetPalette = null_set_palette; |
96 | platform->Renderer_FullScreenQuad = NullRenderer_FullScreenQuad; |
- | |
97 | platform->Renderer_Model = NullRenderer_Model; |
- | |
98 | platform->Renderer_ClearBuffers = NullRenderer_ClearBuffers; |
- | |
99 | platform->Renderer_FlushBuffers = NullRenderer_FlushBuffers; |
- | |
100 | platform->Renderer_BeginScene = NullRenderer_BeginScene; |
- | |
101 | platform->Renderer_EndScene = NullRenderer_EndScene; |
- | |
102 | platform->Renderer_SetViewport = NullRenderer_SetViewport; |
- | |
103 | } |
59 | } |