2012-04-21 23:13:50 +02:00
|
|
|
/* RetroArch - A frontend for libretro.
|
2014-01-01 01:50:59 +01:00
|
|
|
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
2017-01-22 13:40:32 +01:00
|
|
|
* Copyright (C) 2011-2017 - Daniel De Matteis
|
2011-04-17 13:30:59 +02:00
|
|
|
*
|
2012-04-21 23:13:50 +02:00
|
|
|
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
2011-04-17 13:30:59 +02:00
|
|
|
* of the GNU General Public License as published by the Free Software Found-
|
|
|
|
* ation, either version 3 of the License, or (at your option) any later version.
|
|
|
|
*
|
2012-04-21 23:13:50 +02:00
|
|
|
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
2011-04-17 13:30:59 +02:00
|
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
|
|
*
|
2012-04-21 23:31:57 +02:00
|
|
|
* You should have received a copy of the GNU General Public License along with RetroArch.
|
2011-04-17 13:30:59 +02:00
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2016-05-09 20:05:09 +02:00
|
|
|
#ifndef __CHEAT_MANAGER_H
|
|
|
|
#define __CHEAT_MANAGER_H
|
2011-04-17 13:30:59 +02:00
|
|
|
|
2014-12-06 15:47:25 +01:00
|
|
|
#include <boolean.h>
|
2016-06-03 05:49:46 +02:00
|
|
|
#include <retro_common_api.h>
|
2014-12-06 15:47:25 +01:00
|
|
|
|
2016-06-03 05:49:46 +02:00
|
|
|
RETRO_BEGIN_DECLS
|
2014-11-29 21:18:45 +01:00
|
|
|
|
2011-04-17 13:30:59 +02:00
|
|
|
typedef struct cheat_manager cheat_manager_t;
|
|
|
|
|
2015-12-01 02:55:07 +01:00
|
|
|
unsigned cheat_manager_get_size(void);
|
2015-09-06 03:51:08 +02:00
|
|
|
|
2015-12-01 03:00:31 +01:00
|
|
|
bool cheat_manager_load(const char *path);
|
2014-12-06 15:47:25 +01:00
|
|
|
|
2015-01-19 19:00:26 +01:00
|
|
|
/**
|
|
|
|
* cheat_manager_save:
|
|
|
|
* @path : Path to cheats file (absolute path).
|
|
|
|
*
|
|
|
|
* Saves cheats to file on disk.
|
|
|
|
*
|
|
|
|
* Returns: true (1) if successful, otherwise false (0).
|
|
|
|
**/
|
2017-01-17 19:39:12 +01:00
|
|
|
bool cheat_manager_save(const char *path, const char *cheat_database);
|
2015-01-19 19:00:26 +01:00
|
|
|
|
2015-12-01 02:55:07 +01:00
|
|
|
bool cheat_manager_realloc(unsigned new_size);
|
2014-09-07 05:47:18 +02:00
|
|
|
|
2015-12-01 02:55:07 +01:00
|
|
|
void cheat_manager_set_code(unsigned index, const char *str);
|
2015-09-06 03:51:08 +02:00
|
|
|
|
2015-12-01 03:00:31 +01:00
|
|
|
void cheat_manager_free(void);
|
2011-04-17 13:30:59 +02:00
|
|
|
|
2017-05-21 13:14:21 +02:00
|
|
|
void cheat_manager_index_next(void);
|
2014-09-07 05:47:18 +02:00
|
|
|
|
2017-05-21 13:14:21 +02:00
|
|
|
void cheat_manager_index_prev(void);
|
2014-09-07 05:47:18 +02:00
|
|
|
|
2017-05-21 13:14:21 +02:00
|
|
|
void cheat_manager_toggle(void);
|
2011-04-17 13:30:59 +02:00
|
|
|
|
2015-12-01 02:43:34 +01:00
|
|
|
void cheat_manager_apply_cheats(void);
|
2014-12-06 15:47:25 +01:00
|
|
|
|
2014-12-16 05:14:22 +01:00
|
|
|
void cheat_manager_update(cheat_manager_t *handle, unsigned handle_idx);
|
2014-12-16 02:20:06 +01:00
|
|
|
|
2015-12-01 03:03:33 +01:00
|
|
|
void cheat_manager_toggle_index(unsigned i);
|
2015-09-06 03:51:08 +02:00
|
|
|
|
2015-12-01 02:43:34 +01:00
|
|
|
unsigned cheat_manager_get_buf_size(void);
|
2015-09-06 03:51:08 +02:00
|
|
|
|
2015-12-01 03:07:16 +01:00
|
|
|
const char *cheat_manager_get_desc(unsigned i);
|
2015-09-06 03:51:08 +02:00
|
|
|
|
2015-12-01 02:49:27 +01:00
|
|
|
const char *cheat_manager_get_code(unsigned i);
|
2015-09-06 03:51:08 +02:00
|
|
|
|
2015-12-01 02:49:27 +01:00
|
|
|
bool cheat_manager_get_code_state(unsigned i);
|
2015-09-06 03:51:08 +02:00
|
|
|
|
2015-12-01 02:43:34 +01:00
|
|
|
void cheat_manager_state_free(void);
|
|
|
|
|
2015-12-01 03:07:16 +01:00
|
|
|
bool cheat_manager_alloc_if_empty(void);
|
|
|
|
|
2016-06-03 05:49:46 +02:00
|
|
|
RETRO_END_DECLS
|
2014-11-29 21:18:45 +01:00
|
|
|
|
2011-04-17 13:30:59 +02:00
|
|
|
#endif
|