Subversion Repositories Games.Carmageddon

Rev

Rev 1 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1 Rev 18
Line 24... Line 24...
24
// All functions have a "_" suffix to avoid collisions with <windows.h>-defined types
24
// All functions have a "_" suffix to avoid collisions with <windows.h>-defined types
25
 
25
 
26
uint32_t GetFileAttributesA_(char* lpFileName) {
26
uint32_t GetFileAttributesA_(char* lpFileName) {
27
 
27
 
28
    FILE* f = fopen(lpFileName, "r");
28
    FILE* f = fopen(lpFileName, "r");
29
    if (!f) {
29
    if (f == NULL) {
30
        return INVALID_FILE_ATTRIBUTES;
30
        return INVALID_FILE_ATTRIBUTES;
31
    }
31
    }
-
 
32
    fclose(f);
32
    return FILE_ATTRIBUTE_NORMAL;
33
    return FILE_ATTRIBUTE_NORMAL;
33
}
34
}
34
 
35
 
35
int SetFileAttributesA_(char* lpFileName, uint32_t dwFileAttributes) {
36
int SetFileAttributesA_(char* lpFileName, uint32_t dwFileAttributes) {
36
    // no-op for now
37
    // no-op for now
Line 232... Line 233...
232
 
233
 
233
void DirectDrawDevice_SetPaletteEntries(PALETTEENTRY_* palette, int pFirst_colour, int pCount) {
234
void DirectDrawDevice_SetPaletteEntries(PALETTEENTRY_* palette, int pFirst_colour, int pCount) {
234
    assert(pFirst_colour == 0);
235
    assert(pFirst_colour == 0);
235
    assert(pCount == 256);
236
    assert(pCount == 256);
236
    gHarness_platform.Renderer_SetPalette(palette);
237
    gHarness_platform.Renderer_SetPalette(palette);
237
    Harness_RenderLastScreen();
-
 
238
}
238
}
239
 
239
 
240
void _splitpath_(char* path, char* drive, char* dir, char* fname, char* ext) {
240
void _splitpath_(char* path, char* drive, char* dir, char* fname, char* ext) {
241
    assert(dir == NULL);
241
    assert(dir == NULL);
242
    assert(fname != NULL);
242
    assert(fname != NULL);