BRender inline functions (#64)
* convert CollCheck to use inline BR functions * convert CalcForce to use inline BR functions * partial support for demo content * harness interface tidy up * cleaner platform handing
This commit is contained in:
parent
4608bdd8ca
commit
6d21a1c480
|
|
@ -1,18 +1,14 @@
|
|||
add_library(brender STATIC)
|
||||
|
||||
target_include_directories(brender PUBLIC
|
||||
.
|
||||
CORE/DOSIO
|
||||
CORE/FW
|
||||
CORE/HOST
|
||||
CORE/MATH
|
||||
CORE/PIXELMAP
|
||||
CORE/STD
|
||||
CORE/V1DB
|
||||
${CMAKE_SOURCE_DIR}/src/harness
|
||||
target_include_directories(brender
|
||||
PRIVATE
|
||||
.
|
||||
include
|
||||
PUBLIC
|
||||
include
|
||||
)
|
||||
|
||||
target_link_libraries(brender PRIVATE harness miniposix SDL2::SDL2)
|
||||
target_link_libraries(brender PRIVATE harness miniposix)
|
||||
|
||||
if(NOT MSVC)
|
||||
target_compile_options(brender PRIVATE
|
||||
|
|
@ -37,8 +33,10 @@ else()
|
|||
endif()
|
||||
|
||||
target_sources(brender PRIVATE
|
||||
brender.h
|
||||
br_types.h
|
||||
include/brender/brender.h
|
||||
include/brender/br_types.h
|
||||
include/brender/br_defs.h
|
||||
include/brender/br_inline_funcs.h
|
||||
CORE/DOSIO/dosio.c
|
||||
CORE/DOSIO/dosio.h
|
||||
CORE/DOSIO/eventq.c
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "dosio.h"
|
||||
#include "harness_hooks.h"
|
||||
#include "harness_trace.h"
|
||||
#include "pixelmap.h"
|
||||
#include "CORE/PIXELMAP/pixelmap.h"
|
||||
#include "harness/hooks.h"
|
||||
#include "harness/trace.h"
|
||||
#include <stddef.h>
|
||||
|
||||
br_pixelmap* DOSGfxBegin(char* setup_string) {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
#include "br_types.h"
|
||||
#include "include/brender/br_types.h"
|
||||
|
||||
br_pixelmap* DOSGfxBegin(char* setup_string);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "eventq.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
int _DOSEventQEnabled;
|
||||
host_real_memory _DOSEventMemory;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _EVENTQ_H_
|
||||
#define _EVENTQ_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
br_error DOSEventBegin();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "readmse.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
host_real_memory mouseMemory;
|
||||
host_regs regs;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _READMSE_H_
|
||||
#define _READMSE_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
br_error DOSMouseBegin();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "assocarr.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
// IDA: br_associative_array* __cdecl BrAssociativeArrayAllocate()
|
||||
br_associative_array* BrAssociativeArrayAllocate() {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _ASSOCARR_H_
|
||||
#define _ASSOCARR_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
br_associative_array* BrAssociativeArrayAllocate();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "brbegin.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
#include "CORE/HOST/himage.h"
|
||||
#include "CORE/PIXELMAP/pmsetup.h"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _BRBEGIN_H_
|
||||
#define _BRBEGIN_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
br_error BrBegin();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "brbhook.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
// IDA: void __cdecl _BrBeginHook()
|
||||
void _BrBeginHook() {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _BRBHOOK_H_
|
||||
#define _BRBHOOK_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
void _BrBeginHook();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "brlists.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _BRLISTS_H_
|
||||
#define _BRLISTS_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
void BrNewList(br_list* list);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "brprintf.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _BRPRINTF_H_
|
||||
#define _BRPRINTF_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _BRQSORT_H_
|
||||
#define _BRQSORT_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
void BrQsort(void* basep, unsigned int nelems, unsigned int size, br_qsort_cbfn comp);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "bswap.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
// IDA: br_uint_32 __cdecl BrSwap32(br_uint_32 l)
|
||||
br_uint_32 BrSwap32(br_uint_32 l) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _BSWAP_H_
|
||||
#define _BSWAP_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
br_uint_32 BrSwap32(br_uint_32 l);
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include "CORE/FW/resource.h"
|
||||
#include "CORE/STD/brstdlib.h"
|
||||
#include "file.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _DATAFILE_H_
|
||||
#define _DATAFILE_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
void DfPush(int type, void* value, int count);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "devlist.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
// IDA: br_error __cdecl AddRequestedDrivers()
|
||||
br_error AddRequestedDrivers() {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _DEVLIST_H_
|
||||
#define _DEVLIST_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
br_error AddRequestedDrivers();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "devsetup.h"
|
||||
#include "harness_hooks.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/hooks.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _DEVSETUP_H_
|
||||
#define _DEVSETUP_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
br_pixelmap* BrDevLastBeginQuery();
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#include "CORE/STD/brstdlib.h"
|
||||
#include "brprintf.h"
|
||||
#include "fwsetup.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
#include <stdarg.h>
|
||||
|
||||
// Global variables
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _DIAG_H_
|
||||
#define _DIAG_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
void BrFailure(const char* s, ...);
|
||||
|
||||
void BrWarning(const char* s, ...);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "error.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
// IDA: br_error __cdecl BrLastErrorGet(void **valuep)
|
||||
br_error BrLastErrorGet(void** valuep) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _ERROR_H_
|
||||
#define _ERROR_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
br_error BrLastErrorGet(void** valuep);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#include "CORE/FW/fwsetup.h"
|
||||
#include "CORE/FW/resource.h"
|
||||
#include "CORE/STD/brstdlib.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _FILE_H_
|
||||
#define _FILE_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
void _BrFileFree(void* res, br_uint_8 res_class, br_size_t size);
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
#include "CORE/STD/brstddiag.h"
|
||||
#include "CORE/STD/brstdfile.h"
|
||||
#include "CORE/STD/brstdmem.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _FWSETUP_H_
|
||||
#define _FWSETUP_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
extern br_framework_state fw;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "genfile.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
br_file_struct_member file_info_FM[2];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _GENFILE_H_
|
||||
#define _GENFILE_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
int FopRead_END(br_datafile* df, br_uint_32 id, br_uint_32 length, br_uint_32 count);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "image.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
// IDA: br_boolean __cdecl BrImageAdd(br_image *img)
|
||||
br_boolean BrImageAdd(br_image* img) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _IMAGE_H_
|
||||
#define _IMAGE_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
br_boolean BrImageAdd(br_image* img);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "lexer.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
// IDA: void __cdecl lexerError(br_lexer *l, char *string)
|
||||
void lexerError(br_lexer* l, char* string) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _LEXER_H_
|
||||
#define _LEXER_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
void lexerError(br_lexer* l, char* string);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "loader.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
// IDA: br_image* __usercall ImageLoad@<EAX>(char *name@<EAX>)
|
||||
br_image* ImageLoad(char* name) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _LOADER_H_
|
||||
#define _LOADER_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
br_image* ImageLoad(char* name);
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
#include "CORE/FW/fwsetup.h"
|
||||
#include "CORE/STD/brstdlib.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
// IDA: void* __cdecl BrMemAllocate(br_size_t size, br_uint_8 type)
|
||||
void* BrMemAllocate(br_size_t size, br_uint_8 type) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _MEM_H_
|
||||
#define _MEM_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
void* BrMemAllocate(br_size_t size, br_uint_8 type);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "object.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
// IDA: br_error __cdecl _M_br_object_query(br_object *self, br_uint_32 *pvalue, br_token t)
|
||||
br_error _M_br_object_query(br_object* self, br_uint_32* pvalue, br_token t) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _OBJECT_H_
|
||||
#define _OBJECT_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
br_error _M_br_object_query(br_object* self, br_uint_32* pvalue, br_token t);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "objectc.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
// IDA: void* __cdecl BrObjectListAllocate(void *res)
|
||||
void* BrObjectListAllocate(void* res) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _OBJECTC_H_
|
||||
#define _OBJECTC_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
void* BrObjectListAllocate(void* res);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "pattern.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
#include <ctype.h>
|
||||
|
||||
// IDA: br_boolean __cdecl BrNamePatternMatch(char *p, char *s)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _PATTERN_H_
|
||||
#define _PATTERN_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
br_boolean BrNamePatternMatch(char* p, char* s);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "register.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
#include "brlists.h"
|
||||
#include "fwsetup.h"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _REGISTER_H_
|
||||
#define _REGISTER_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
void* BrRegistryNew(br_registry* reg);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
#include "resource.h"
|
||||
|
||||
#include "brlists.h"
|
||||
#include "brstdlib.h"
|
||||
#include "file.h"
|
||||
#include "fwsetup.h"
|
||||
#include "harness_trace.h"
|
||||
#include "mem.h"
|
||||
#include "CORE/FW/brlists.h"
|
||||
#include "CORE/FW/file.h"
|
||||
#include "CORE/FW/fwsetup.h"
|
||||
#include "CORE/FW/mem.h"
|
||||
#include "CORE/STD/brstdlib.h"
|
||||
#include "harness/trace.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _RESOURCE_H_
|
||||
#define _RESOURCE_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
void* ResToUser(resource_header* r);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "resreg.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
#include "CORE/FW/fwsetup.h"
|
||||
#include "CORE/FW/register.h"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _RESREG_H_
|
||||
#define _RESREG_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
br_resource_class* BrResClassAdd(br_resource_class* rclass);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "scratch.h"
|
||||
#include "diag.h"
|
||||
#include "fwsetup.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
#include "resource.h"
|
||||
|
||||
char scratchString[512];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _SCRATCH_H_
|
||||
#define _SCRATCH_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
void* BrScratchAllocate(br_size_t size);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "sys_conf.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
br_token valid_system_config_tokens[5];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _SYS_CONF_H_
|
||||
#define _SYS_CONF_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
br_boolean Is_Valid_Sys_Config_Token(br_token t);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "token.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
br_token_entry predefinedTokens[457];
|
||||
token_type tokenTypes[37];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _TOKEN_H_
|
||||
#define _TOKEN_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
void BrTokenBegin();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "tokenval.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
#include "resource.h"
|
||||
|
||||
// IDA: br_tv_template* __cdecl BrTVTemplateAllocate(void *res, br_tv_template_entry *entries, int n_entries)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _TOKENVAL_H_
|
||||
#define _TOKENVAL_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
br_tv_template* BrTVTemplateAllocate(void* res, br_tv_template_entry* entries, int n_entries);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "himage.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
// IDA: void* __cdecl HostImageLoad(char *name)
|
||||
void* HostImageLoad(char* name) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _HIMAGE_H_
|
||||
#define _HIMAGE_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
void* HostImageLoad(char* name);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "hook.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
// IDA: br_error __cdecl HostInterruptHook(host_interrupt_hook *h, br_uint_8 vector, br_uint_32 off, br_uint_16 sel)
|
||||
br_error HostInterruptHook(host_interrupt_hook* h, br_uint_8 vector, br_uint_32 off, br_uint_16 sel) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _HOOK_H_
|
||||
#define _HOOK_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
br_error HostInterruptHook(host_interrupt_hook* h, br_uint_8 vector, br_uint_32 off, br_uint_16 sel);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "hostcfg.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
// IDA: char* __cdecl HostDefaultDevice()
|
||||
char* HostDefaultDevice() {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _HOSTCFG_H_
|
||||
#define _HOSTCFG_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
char* HostDefaultDevice();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "hstsetup.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
host_info hostInfo;
|
||||
void* functionPointers_BRHOST1[50];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _HSTSETUP_H_
|
||||
#define _HSTSETUP_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
void HostBegin();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "memmgmt.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _MEMMGMT_H_
|
||||
#define _MEMMGMT_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
br_error HostLock(br_uint_32 offset, br_uint_16 sel, br_size_t size);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "angles.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
order_info OrderAxes[32];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _ANGLES_H_
|
||||
#define _ANGLES_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
#include <math.h>
|
||||
|
||||
br_matrix34* BrEulerToMatrix34(br_matrix34* mat, br_euler* euler);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "matrix23.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
br_matrix23 mattmp1_23;
|
||||
br_matrix23 mattmp2_23;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _MATRIX23_H_
|
||||
#define _MATRIX23_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
void BrMatrix23Copy(br_matrix23* A, br_matrix23* B);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "matrix34.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
#include "vector.h"
|
||||
#include <math.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _MATRIX34_H_
|
||||
#define _MATRIX34_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
void BrMatrix34Copy(br_matrix34* A, br_matrix34* B);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "matrix4.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
#include <math.h>
|
||||
|
||||
#define A(x, y) A->m[x][y]
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _MATRIX4_H_
|
||||
#define _MATRIX4_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
void BrMatrix4Copy(br_matrix4* A, br_matrix4* B);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "plane.h"
|
||||
#include "brmath.h"
|
||||
#include "harness_trace.h"
|
||||
#include "CORE/STD/brmath.h"
|
||||
#include "harness/trace.h"
|
||||
#include <math.h>
|
||||
|
||||
// IDA: br_int_32 __cdecl BrPlaneEquation(br_vector4 *eqn, br_vector3 *v0, br_vector3 *v1, br_vector3 *v2)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _PLANE_H_
|
||||
#define _PLANE_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
br_int_32 BrPlaneEquation(br_vector4* eqn, br_vector3* v0, br_vector3* v1, br_vector3* v2);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "quat.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
// IDA: br_quat* __cdecl BrQuatMul(br_quat *q, br_quat *l, br_quat *r)
|
||||
br_quat* BrQuatMul(br_quat* q, br_quat* l, br_quat* r) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _QUAT_H_
|
||||
#define _QUAT_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
br_quat* BrQuatMul(br_quat* q, br_quat* l, br_quat* r);
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#include "CORE/MATH/matrix34.h"
|
||||
#include "CORE/MATH/quat.h"
|
||||
#include "CORE/MATH/vector.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
#define M34 BR_TRANSFORM_MATRIX34
|
||||
#define MLP BR_TRANSFORM_MATRIX34_LP
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _TRANSFRM_H_
|
||||
#define _TRANSFRM_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
extern br_uint_8 _CombineTransforms[7][7];
|
||||
#define BrTransformCombineTypes(a, b) (_CombineTransforms[(a)][(b)])
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "vector.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
#include <math.h>
|
||||
|
||||
// IDA: void __cdecl BrVector2Copy(br_vector2 *v1, br_vector2 *v2)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _VECTOR_H_
|
||||
#define _VECTOR_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
void BrVector2Copy(br_vector2* v1, br_vector2* v2);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#ifndef _FONTPTRS_H_
|
||||
#define _FONTPTRS_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "genclip.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
// IDA: br_clip_result __cdecl PixelmapPointClip(br_point *out, br_point *in, br_pixelmap *pm)
|
||||
br_clip_result PixelmapPointClip(br_point* out, br_point* in, br_pixelmap* pm) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _GENCLIP_H_
|
||||
#define _GENCLIP_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
br_clip_result PixelmapPointClip(br_point* out, br_point* in, br_pixelmap* pm);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "gencopy.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
// IDA: br_error __usercall GeneralRectangleCopy@<EAX>(br_device_pixelmap *dest@<EAX>, br_point *p@<EDX>, br_device_pixelmap *src@<EBX>, br_rectangle *r@<ECX>)
|
||||
br_error GeneralRectangleCopy(br_device_pixelmap* dest, br_point* p, br_device_pixelmap* src, br_rectangle* r) {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _GENCOPY_H_
|
||||
#define _GENCOPY_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
br_error GeneralRectangleCopy(br_device_pixelmap* dest, br_point* p, br_device_pixelmap* src, br_rectangle* r);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "pixelmap.h"
|
||||
#include "harness_trace.h"
|
||||
#include "CORE/PIXELMAP/pixelmap.h"
|
||||
#include "harness/trace.h"
|
||||
#include "pmmem.h"
|
||||
|
||||
// IDA: br_pixelmap* __cdecl BrPixelmapAllocate(br_uint_8 type, br_int_32 w, br_int_32 h, void *pixels, int flags)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _PIXELMAP_H_
|
||||
#define _PIXELMAP_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
br_pixelmap* BrPixelmapAllocate(br_uint_8 type, br_int_32 w, br_int_32 h, void* pixels, int flags);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
#include "pmdsptch.h"
|
||||
|
||||
#include "brstdlib.h"
|
||||
#include "harness_hooks.h"
|
||||
#include "harness_trace.h"
|
||||
#include "pmmem.h"
|
||||
#include "CORE/PIXELMAP/pmmem.h"
|
||||
#include "CORE/STD/brstdlib.h"
|
||||
#include "harness/hooks.h"
|
||||
#include "harness/trace.h"
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
|
@ -98,18 +98,18 @@ br_pixelmap* BrPixelmapClone(br_pixelmap* src) {
|
|||
|
||||
// IDA: void __cdecl BrPixelmapFill(br_pixelmap *dst, br_uint_32 colour)
|
||||
void BrPixelmapFill(br_pixelmap* dst, br_uint_32 colour) {
|
||||
br_uint_8 linear_wholepixels; //added Jeff
|
||||
LOG_TRACE("(%p, %d)", dst, colour);
|
||||
br_uint_32 y;
|
||||
char* d;
|
||||
|
||||
linear_wholepixels = BR_PMF_LINEAR | BR_PMF_ROW_WHOLEPIXELS;
|
||||
if ((dst->flags & linear_wholepixels) == linear_wholepixels) {
|
||||
if (dst->row_bytes > 0) {
|
||||
memset(dst->pixels, colour, dst->row_bytes * dst->height);
|
||||
} else {
|
||||
TELL_ME_IF_WE_PASS_THIS_WAY();
|
||||
}
|
||||
if ((dst->flags & (BR_PMF_LINEAR | BR_PMF_ROW_WHOLEPIXELS)) == (BR_PMF_LINEAR | BR_PMF_ROW_WHOLEPIXELS)) {
|
||||
memset(dst->pixels, colour, dst->row_bytes * dst->height);
|
||||
} else {
|
||||
TELL_ME_IF_WE_PASS_THIS_WAY();
|
||||
d = dst->pixels;
|
||||
for (y = 0; y < dst->height; y++) {
|
||||
memset(d, colour, dst->row_bytes);
|
||||
d += dst->row_bytes;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _PMDSPTCH_H_
|
||||
#define _PMDSPTCH_H_
|
||||
|
||||
#include "br_types.h"
|
||||
#include "brender/br_types.h"
|
||||
|
||||
br_pixelmap* BrPixelmapAllocateSub(br_pixelmap* src, br_int_32 x, br_int_32 y, br_int_32 w, br_int_32 h);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "pmfile.h"
|
||||
#include "harness_trace.h"
|
||||
#include "harness/trace.h"
|
||||
|
||||
#include "CORE/FW/datafile.h"
|
||||
#include "CORE/FW/genfile.h"
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue