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