Subversion Repositories Games.Carmageddon

Rev

Rev 11 | Go to most recent revision | 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
 
25
static void null_get_keyboard_state(unsigned int count, uint8_t* buffer) {
26
}
27
 
28
static int null_get_mouse_buttons(int* pButton1, int* pButton2) {
29
    return 0;
30
}
31
 
32
static int null_get_mouse_position(int* pX, int* pY) {
33
    return 0;
34
}
35
 
36
static int null_show_cursor(int show) {
37
    return 0;
38
}
39
 
18 pmbaty 40
static void null_set_palette(PALETTEENTRY_* palette) {
1 pmbaty 41
}
42
 
43
void Null_Platform_Init(tHarness_platform* platform) {
44
    platform->ProcessWindowMessages = null_get_and_handle_message;
45
    // todo: shouldnt depend on sdl...
46
    platform->Sleep = SDL_Delay;
47
    platform->GetTicks = SDL_GetTicks;
48
    platform->CreateWindowAndRenderer = null_create_window_and_renderer;
49
    platform->ShowCursor = null_show_cursor;
50
    platform->SetWindowPos = null_set_window_pos;
51
    platform->DestroyWindow = null_destroy_window;
52
    platform->GetKeyboardState = null_get_keyboard_state;
53
    platform->GetMousePosition = null_get_mouse_position;
54
    platform->GetMouseButtons = null_get_mouse_buttons;
55
    platform->DestroyWindow = null_destroy_window;
11 pmbaty 56
    platform->ShowErrorMessage = null_show_error_message;
1 pmbaty 57
 
18 pmbaty 58
    platform->Renderer_SetPalette = null_set_palette;
1 pmbaty 59
}