Subversion Repositories Games.Carmageddon

Rev

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

Rev 1 Rev 11
Line 2... Line 2...
2
#include "audio.h"
2
#include "audio.h"
3
#include "backends/backend.h"
3
#include "backends/backend.h"
-
 
4
#include "harness/hooks.h"
4
#include "harness/trace.h"
5
#include "harness/trace.h"
5
#include "resource.h"
6
#include "resource.h"
6
#include <stdio.h>
7
#include <stdio.h>
7
#include <stdlib.h>
8
#include <stdlib.h>
8
#include <string.h>
9
#include <string.h>
Line 142... Line 143...
142
    FILE* f;
143
    FILE* f;
143
    long file_len;
144
    long file_len;
144
    size_t bytes_read;
145
    size_t bytes_read;
145
    char* buf;
146
    char* buf;
146
 
147
 
147
    f = fopen(pFile_name, "rb");
148
    f = Harness_Hook_fopen (pFile_name, "rb");
148
    if (f == NULL) {
149
    if (f == NULL) {
149
        gS3_last_error = eS3_error_readfile;
150
        gS3_last_error = eS3_error_readfile;
150
        return 0;
151
        return 0;
151
    }
152
    }
152
    fseek(f, 0, SEEK_END);
153
    fseek(f, 0, SEEK_END);
Line 183... Line 184...
183
    tWAVEFORMATEX_* wav_format; // [esp+C4h] [ebp-10h] BYREF
184
    tWAVEFORMATEX_* wav_format; // [esp+C4h] [ebp-10h] BYREF
184
    char* data_ptr;             // [esp+C8h] [ebp-Ch] BYREF
185
    char* data_ptr;             // [esp+C8h] [ebp-Ch] BYREF
185
    // char* locked_buffer_data;   // [esp+CCh] [ebp-8h] BYREF
186
    // char* locked_buffer_data;   // [esp+CCh] [ebp-8h] BYREF
186
    size_t file_len; // [esp+D0h] [ebp-4h]
187
    size_t file_len; // [esp+D0h] [ebp-4h]
187
 
188
 
188
    f = fopen(pFile_name, "rb");
189
    f = Harness_Hook_fopen (pFile_name, "rb");
189
    if (f == NULL) {
190
    if (f == NULL) {
190
        gS3_last_error = eS3_error_readfile;
191
        gS3_last_error = eS3_error_readfile;
191
        return 0;
192
        return 0;
192
    }
193
    }
193
    fseek(f, 0, SEEK_END);
194
    fseek(f, 0, SEEK_END);