summaryrefslogtreecommitdiff
path: root/include/line_numbers.h
blob: 8ebd3324b2675b65d9b19e6e5f8808294d746e34 (plain)
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
26
27
28
29
#ifndef LINE_NUMBERS_H
#define LINE_NUMBERS_H

#include "versions.h"

// The macros in this file serve to reduce clutter from version differences that are only due to line numbers being different.

// The "LN" macros defined here are not meant to be used directly. See the wrapper macros below.
#if MM_VERSION == N64_JP_1_1
#define LN(n64_jp_1_1, n64_us) (n64_jp_1_1)
#elif MM_VERSION == N64_US
#define LN(n64_jp_1_1, n64_us) (n64_us)
#else
#error "Unsupported MM version"
#endif

/**
 * These wrappers exist to remove duplication of line numbers being passed to LN.
 * The wrappers have ambiguous names purposefully so they are short and don't add clutter.
 *
 * The groupings of different line numbers are difficult to name, as the exact grouping
 * depends on which versions happen to have changes in a given file.
 */

// N64 JP 1.1 and all other versions
#define LN1(n64_jp_1_1, other) \
    LN(n64_jp_1_1, other)

#endif