# FSOverlayID, FS_OVERLAY_ID, FS_EXTERN_OVERLAY

## C Specification

      #include <nitro/fs.h>

      typedef u32 FSOverlayID;
          #define FS_EXTERN_OVERLAY(name) extern u32 SDK_OVERLAY_## name ## _ID[1]
          #define FS_OVERLAY_ID(name)     ((u32)&(SDK_OVERLAY_## name ## _ID))

## Description

This function defines the module ID of the overlay that is specified by the `FS_LoadOverlay` function and by the `FS_UnloadOverlay` function.
This is generated at link time by `makerom`. The program side can use it as shown below.

1. Use an `.lsf` file to specify an overlay.
   Example:`

               Overlay overlay_1
               {
                   After   main
                   Object  func_1.0
               }

   `
2. Use a macro in a program to declare an overlay ID.
   Example:`

               FS_EXTERN_OVERLAY(overlay_1);

   `
3. Specify an overlay ID in the `FS_LoadOverlay` function or the `FS_UnloadOverlay` function.
   Example:`

               FS_LoadOverlay(MI_PROCESSOR_ARM9, FS_OVERLAY_ID(overlay_1));

   `
   Or
   `

               FSOverlayID id = FS_OVERLAY_ID(overlay_1);
               FS_LoadOverlay(MI_PROCESSOR_ARM9, id);

   `

## See Also

`FS_LoadOverlay`, `FS_UnloadOverlay`

## Revision History

11/02/2004 Corrected the structure definition to match the header file.
09/24/2004 Changed links.
04/08/2004 Revised description due to changes in the `FSOverlayID` type.
04/05/2004 Initial version.