Rev 18 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | pmbaty | 1 | #include "null.h" |
2 | |||
3 | // todo: shouldnt depend on sdl... |
||
4 | #include <SDL.h> |
||
5 | |||
6 | static void* null_create_window_and_renderer(char* title, int x, int y, int width, int height) { |
||
7 | return 0; |
||
8 | } |
||
9 | |||
10 | static int null_set_window_pos(void* hWnd, int x, int y, int nWidth, int nHeight) { |
||
11 | return 0; |
||
12 | } |
||
13 | |||
14 | static void null_destroy_window(void* hWnd) { |
||
15 | } |
||
16 | |||
11 | pmbaty | 17 | static int null_show_error_message(void* window, char* text, char* caption) { |
18 | return 0; |
||
19 | } |
||
20 | |||
1 | pmbaty | 21 | static int null_get_and_handle_message(MSG_* msg) { |
22 | return 0; |
||
23 | } |
||
24 | |||
20 | pmbaty | 25 | static void null_swap_window(void) { |
26 | } |
||
27 | |||
1 | pmbaty | 28 | static void null_get_keyboard_state(unsigned int count, uint8_t* buffer) { |
29 | } |
||
30 | |||
31 | static int null_get_mouse_buttons(int* pButton1, int* pButton2) { |
||
32 | return 0; |
||
33 | } |
||
34 | |||
35 | static int null_get_mouse_position(int* pX, int* pY) { |
||
36 | return 0; |
||
37 | } |
||
38 | |||
39 | static int null_show_cursor(int show) { |
||
40 | return 0; |
||
41 | } |
||
42 | |||
20 | pmbaty | 43 | static void NullRenderer_BeginScene(br_actor* camera, br_pixelmap* colour_buffer, br_pixelmap* depth_buffer) { |
1 | pmbaty | 44 | } |
45 | |||
20 | pmbaty | 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 | } |
||
72 | |||
73 | static void NullRenderer_SetViewport(int x, int y, int width, int height) { |
||
74 | } |
||
75 | |||
1 | pmbaty | 76 | void Null_Platform_Init(tHarness_platform* platform) { |
77 | platform->ProcessWindowMessages = null_get_and_handle_message; |
||
78 | // todo: shouldnt depend on sdl... |
||
79 | platform->Sleep = SDL_Delay; |
||
80 | platform->GetTicks = SDL_GetTicks; |
||
81 | platform->CreateWindowAndRenderer = null_create_window_and_renderer; |
||
82 | platform->ShowCursor = null_show_cursor; |
||
83 | platform->SetWindowPos = null_set_window_pos; |
||
20 | pmbaty | 84 | platform->SwapWindow = null_swap_window; |
1 | pmbaty | 85 | platform->DestroyWindow = null_destroy_window; |
86 | platform->GetKeyboardState = null_get_keyboard_state; |
||
87 | platform->GetMousePosition = null_get_mouse_position; |
||
88 | platform->GetMouseButtons = null_get_mouse_buttons; |
||
89 | platform->DestroyWindow = null_destroy_window; |
||
11 | pmbaty | 90 | platform->ShowErrorMessage = null_show_error_message; |
1 | pmbaty | 91 | |
20 | pmbaty | 92 | platform->Renderer_BufferModel = NullRenderer_BufferModel; |
93 | platform->Renderer_BufferMaterial = NullRenderer_BufferMaterial; |
||
94 | platform->Renderer_BufferTexture = NullRenderer_BufferTexture; |
||
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; |
||
1 | pmbaty | 103 | } |