File: cheat_search.h

package info (click to toggle)
sameboy 1.0.2%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 10,528 kB
  • sloc: ansic: 29,948; objc: 22,249; asm: 1,424; pascal: 1,373; makefile: 1,065; xml: 111
file content (25 lines) | stat: -rw-r--r-- 831 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once
#ifndef GB_DISABLE_CHEAT_SEARCH
#include "defs.h"
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>

typedef struct {
    uint16_t addr;
    uint16_t bank;
    uint16_t value;
} GB_cheat_search_result_t;

typedef enum {
    GB_CHEAT_SEARCH_DATA_TYPE_8BIT = 0,
    GB_CHEAT_SEARCH_DATA_TYPE_16BIT = 1,
    GB_CHEAT_SEARCH_DATA_TYPE_BE_BIT = 2, // Not used alone
    GB_CHEAT_SEARCH_DATA_TYPE_16BIT_BE = GB_CHEAT_SEARCH_DATA_TYPE_16BIT | GB_CHEAT_SEARCH_DATA_TYPE_BE_BIT,
} GB_cheat_search_data_type_t;

void GB_cheat_search_reset(GB_gameboy_t *gb);
bool GB_cheat_search_filter(GB_gameboy_t *gb, const char *expression, GB_cheat_search_data_type_t data_type);
size_t GB_cheat_search_result_count(GB_gameboy_t *gb);
void GB_cheat_search_get_results(GB_gameboy_t *gb, GB_cheat_search_result_t *results);
#endif