Swadge 2024 2.0.0
APIs to develop games for the Magfest Swadge
Loading...
Searching...
No Matches
modeIncludeList.h File Reference

Detailed Description

Usage

This file simplifies adding your mode to the emulator, main menu, and other systems that require knowledge of multiple modes.

Changes

To add a new mode, simply add #include "your_mode_name.h" to the bottom of the includes list in modeIncludesList.h before going to modeIncludeList.c and performing the following two actions:

  • Add extern swadgemode_t from your_mode_name.h to allSwadgeModes. Don't forget the &.
  • Add a new addSingleItemToMenu(menu, yourMode.modeName); line in the appropriate section of modeListSetMenu()

Currently, there's three categories: Games, Music, and Utilities. Add a new mode to the correct section of the modeListSetMenu() to avoid causing confusion.

Devs can also get the count of mode via the modeListGetCount() function, which just returns the count of items in the allSwadgeModes array.

Go to the source code of this file.

Functions

int modeListGetCount (void)
 Gets the current number of swadgeModes present int he file.
 
void modeListSetMenu (menu_t *menu)
 Iniitalizes a menu with all the current swadge modes.
 

Variables

swadgeMode_t *const allSwadgeModes []
 Add swadgeMode_t pointers to this struct to include them in emulator and main menu.
 

Function Documentation

◆ modeListGetCount()

int modeListGetCount ( void )

Gets the current number of swadgeModes present int he file.

Returns
int num of modes

◆ modeListSetMenu()

void modeListSetMenu ( menu_t * menu)

Iniitalizes a menu with all the current swadge modes.

Parameters
menuMenu to set

Variable Documentation

◆ allSwadgeModes

swadgeMode_t* const allSwadgeModes[]
extern

Add swadgeMode_t pointers to this struct to include them in emulator and main menu.