Rev 18 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 18 | Rev 20 | ||
|---|---|---|---|
| Line 18... | Line 18... | ||
| 18 | return 0; |
18 | return 0; |
| 19 | } |
19 | } |
| 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 | } |
|
| - | 24 | ||
| - | 25 | static void null_swap_window(void) { |
|
| 23 | } |
26 | } |
| 24 | 27 | ||
| 25 | static void null_get_keyboard_state(unsigned int count, uint8_t* buffer) { |
28 | static void null_get_keyboard_state(unsigned int count, uint8_t* buffer) { |
| 26 | } |
29 | } |
| 27 | 30 | ||
| Line 35... | Line 38... | ||
| 35 | 38 | ||
| 36 | static int null_show_cursor(int show) { |
39 | static int null_show_cursor(int show) { |
| 37 | return 0; |
40 | return 0; |
| 38 | } |
41 | } |
| 39 | 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 | ||
| 40 | static void |
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 | } |
|
| - | 72 | ||
| - | 73 | static void NullRenderer_SetViewport(int x, int y, int width, int height) { |
|
| 41 | } |
74 | } |
| 42 | 75 | ||
| 43 | void Null_Platform_Init(tHarness_platform* platform) { |
76 | void Null_Platform_Init(tHarness_platform* platform) { |
| 44 | platform->ProcessWindowMessages = null_get_and_handle_message; |
77 | platform->ProcessWindowMessages = null_get_and_handle_message; |
| 45 | // todo: shouldnt depend on sdl... |
78 | // todo: shouldnt depend on sdl... |
| 46 | platform->Sleep = SDL_Delay; |
79 | platform->Sleep = SDL_Delay; |
| 47 | platform->GetTicks = SDL_GetTicks; |
80 | platform->GetTicks = SDL_GetTicks; |
| 48 | platform->CreateWindowAndRenderer = null_create_window_and_renderer; |
81 | platform->CreateWindowAndRenderer = null_create_window_and_renderer; |
| 49 | platform->ShowCursor = null_show_cursor; |
82 | platform->ShowCursor = null_show_cursor; |
| 50 | platform->SetWindowPos = null_set_window_pos; |
83 | platform->SetWindowPos = null_set_window_pos; |
| - | 84 | platform->SwapWindow = null_swap_window; |
|
| 51 | platform->DestroyWindow = null_destroy_window; |
85 | platform->DestroyWindow = null_destroy_window; |
| 52 | platform->GetKeyboardState = null_get_keyboard_state; |
86 | platform->GetKeyboardState = null_get_keyboard_state; |
| 53 | platform->GetMousePosition = null_get_mouse_position; |
87 | platform->GetMousePosition = null_get_mouse_position; |
| 54 | platform->GetMouseButtons = null_get_mouse_buttons; |
88 | platform->GetMouseButtons = null_get_mouse_buttons; |
| 55 | platform->DestroyWindow = null_destroy_window; |
89 | platform->DestroyWindow = null_destroy_window; |
| 56 | platform->ShowErrorMessage = null_show_error_message; |
90 | platform->ShowErrorMessage = null_show_error_message; |
| 57 | 91 | ||
| - | 92 | platform->Renderer_BufferModel = NullRenderer_BufferModel; |
|
| - | 93 | platform->Renderer_BufferMaterial = NullRenderer_BufferMaterial; |
|
| - | 94 | platform->Renderer_BufferTexture = NullRenderer_BufferTexture; |
|
| 58 | platform->Renderer_SetPalette = |
95 | platform->Renderer_SetPalette = NullRenderer_SetPalette; |
| - | 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; |
|
| 59 | } |
103 | } |