Begin integrating TX

This commit is contained in:
mkrsym1
2023-08-04 22:17:31 +03:00
parent 592ce62e6b
commit 7eac309372
15 changed files with 104 additions and 20 deletions

View File

@ -0,0 +1 @@
#define JADEITE_VERSION "@version@"

View File

@ -8,11 +8,13 @@
/* CRC-32C (iSCSI) polynomial in reversed bit order. */
#define __POLY 0x82f63b78
static inline uint32_t crc32c(uint32_t crc, const unsigned char *buf, size_t len) {
static inline uint32_t crc32c(uint32_t crc, const void *buf, size_t len) {
const unsigned char *cbuf = (const unsigned char*)buf;
crc = ~crc;
while (len--) {
crc ^= *buf++;
crc ^= *cbuf++;
for (int k = 0; k < 8; k++) {
crc = crc & 1 ? (crc >> 1) ^ __POLY : crc >> 1;
}

View File

@ -24,6 +24,7 @@ struct game_data {
enum game_id id; // Temporary
const char *base_module_name;
const char *assembly_name;
const char *txs_section_name;
const char *tvm_section_name;
unityplayer_callback_t unityplayer_callback;

View File

@ -1,5 +1,7 @@
#pragma once
#define ISSUE_SUFFIX "Please open an issue on the jadeite repository specifying your game edition/region and version"
void unload_ctr_inc();
void unload_ctr_dec();

View File

@ -2,6 +2,6 @@
#include <windows.h>
IMAGE_SECTION_HEADER *pe_find_section(HMODULE module, const char *section);
IMAGE_SECTION_HEADER *pe_find_section(const void *module, const char *section);
void *pe_find_entry_point(HMODULE module);

View File

@ -0,0 +1,3 @@
#include <game.h>
void tx_table_file(struct game_data *game, wchar_t *buf);