Ejemplo n.º 1
0
void cheat_manager_index_next(cheat_manager_t *handle)
{
   if (!handle)
      return;

   handle->ptr = (handle->ptr + 1) % handle->size;
   cheat_manager_update(handle, handle->ptr);
}
Ejemplo n.º 2
0
void cheat_manager_index_prev(cheat_manager_t *handle)
{
   if (handle->ptr == 0)
      handle->ptr = handle->size - 1;
   else
      handle->ptr--;

   cheat_manager_update(handle);
}
Ejemplo n.º 3
0
void cheat_manager_toggle(cheat_manager_t *handle)
{
   if (!handle)
      return;

   handle->cheats[handle->ptr].state ^= true;
   cheat_manager_apply_cheats(handle);
   cheat_manager_update(handle, handle->ptr);
}
Ejemplo n.º 4
0
void cheat_manager_toggle_index(unsigned i)
{
    cheat_manager_t *handle = cheat_manager_state;
    if (!handle)
        return;

    handle->cheats[i].state = !handle->cheats[i].state;
    cheat_manager_update(handle, i);
}
Ejemplo n.º 5
0
static int action_left_cheat(unsigned type, const char *label,
      bool wraparound)
{
   global_t *global       = global_get_ptr();
   cheat_manager_t *cheat = global->cheat;
   size_t idx             = type - MENU_SETTINGS_CHEAT_BEGIN;

   if (!cheat)
      return -1;

   cheat->cheats[idx].state = !cheat->cheats[idx].state;
   cheat_manager_update(cheat, idx);

   return 0;
}
Ejemplo n.º 6
0
static int action_toggle_cheat(unsigned type, const char *label,
      unsigned action)
{
   cheat_manager_t *cheat = g_extern.cheat;
   size_t idx = type - MENU_SETTINGS_CHEAT_BEGIN;

   if (!cheat)
      return -1;

   switch (action)
   {
      case MENU_ACTION_LEFT:
      case MENU_ACTION_RIGHT:
         cheat->cheats[idx].state = !cheat->cheats[idx].state;
         cheat_manager_update(cheat, idx);
         break;
   }

   return 0;
}
Ejemplo n.º 7
0
static int action_toggle_cheat(unsigned type, const char *label,
      unsigned action, bool wraparound)
{
   global_t *global       = global_get_ptr();
   cheat_manager_t *cheat = global->cheat;
   size_t idx             = type - MENU_SETTINGS_CHEAT_BEGIN;

   if (!cheat)
      return -1;

   switch (action)
   {
      case MENU_ACTION_LEFT:
      case MENU_ACTION_RIGHT:
         cheat->cheats[idx].state = !cheat->cheats[idx].state;
         cheat_manager_update(cheat, idx);
         break;
   }

   return 0;
}
Ejemplo n.º 8
0
void cheat_manager_index_next(cheat_manager_t *handle)
{
   handle->ptr = (handle->ptr + 1) % handle->size;
   cheat_manager_update(handle);
}
Ejemplo n.º 9
0
void cheat_manager_toggle(cheat_manager_t *handle)
{
   handle->cheats[handle->ptr].state ^= true;
   cheat_manager_apply_cheats(handle);
   cheat_manager_update(handle);
}