diff --git a/docs/c_cpp_properties.json b/docs/c_cpp_properties.json new file mode 100644 index 0000000000..ed8c0feaae --- /dev/null +++ b/docs/c_cpp_properties.json @@ -0,0 +1,113 @@ +{ + "configurations": [ + { + "name": "oot-gc-us", + "compilerArgs": [ + "-m32" + ], + "includePath": [ + "include", + "include/libc", + "src", + "build/gc-us", + ".", + "extracted/gc-us" + ], + "defines": [ + "_LANGUAGE_C", + "OOT_VERSION=OOT_GC_US", + "OOT_REGION=REGION_US", + "OOT_NTSC=1", + "OOT_MQ=0", + "OOT_DEBUG=0", + "NDEBUG", + "F3DEX_GBI_2", + "F3DEX_GBI_PL", + "GBI_DOWHILE" + ], + "cStandard": "gnu89" + }, + { + "name": "oot-gc-eu", + "compilerArgs": [ + "-m32" + ], + "includePath": [ + "include", + "include/libc", + "src", + "build/gc-eu", + ".", + "extracted/gc-eu" + ], + "defines": [ + "_LANGUAGE_C", + "OOT_VERSION=OOT_GC_EU", + "OOT_REGION=REGION_EU", + "OOT_PAL=1", + "OOT_MQ=0", + "OOT_DEBUG=0", + "NDEBUG", + "F3DEX_GBI_2", + "F3DEX_GBI_PL", + "GBI_DOWHILE" + ], + "cStandard": "gnu89" + }, + { + "name": "oot-gc-eu-mq", + "compilerArgs": [ + "-m32" + ], + "includePath": [ + "include", + "include/libc", + "src", + "build/gc-eu-mq", + ".", + "extracted/gc-eu-mq" + ], + "defines": [ + "_LANGUAGE_C", + "OOT_VERSION=OOT_GC_EU_MQ", + "OOT_REGION=REGION_EU", + "OOT_PAL=1", + "OOT_MQ=1", + "OOT_DEBUG=0", + "NDEBUG", + "F3DEX_GBI_2", + "F3DEX_GBI_PL", + "GBI_DOWHILE" + ], + "cStandard": "gnu89" + }, + { + "name": "oot-gc-eu-mq-dbg", + "compilerArgs": [ + "-m32" + ], + "includePath": [ + "include", + "include/libc", + "src", + "build/gc-eu-mq-dbg", + ".", + "extracted/gc-eu-mq-dbg" + ], + "defines": [ + "_LANGUAGE_C", + "OOT_VERSION=OOT_GC_EU_MQ_DBG", + "OOT_REGION=REGION_EU", + "OOT_PAL=1", + "OOT_MQ=1", + "OOT_DEBUG=1", + "F3DEX_GBI_2", + "F3DEX_GBI_PL", + "GBI_DOWHILE", + "GBI_DEBUG" + ], + "cStandard": "gnu89" + } + ], + "version": 4 +} diff --git a/docs/vscode.md b/docs/vscode.md index c88b85c072..c5cd0fc2ea 100644 --- a/docs/vscode.md +++ b/docs/vscode.md @@ -35,13 +35,17 @@ Many of VS Code's other shortcuts can be found on [its getting started page](htt ## C/C++ configuration -You can create a `.vscode/c_cpp_properties.json` file with `C/C++: Edit Configurations (JSON)` in the command box to customise how IntelliSense reads the repository (stuff like where to look for includes, flags, compiler defines, etc.) to make VSCode's IntelliSense plugin better able to understand the structure of the repository. This is a good default one to use for this project's repository: +You can create a `.vscode/c_cpp_properties.json` file with `C/C++: Edit Configurations (JSON)` in the command box to customise how IntelliSense reads the repository (stuff like where to look for includes, flags, compiler defines, etc.) to make VSCode's IntelliSense plugin better able to understand the structure of the repository. + +Below is a good default one to use for this project's repository, for the oot-gc-eu-mq-dbg version specifically. + +A more complete `c_cpp_properties.json` with configurations for all supported versions [can be found here](c_cpp_properties.json). ```jsonc { "configurations": [ { - "name": "N64 oot-gc-eu-mq-dbg", + "name": "oot-gc-eu-mq-dbg", "compilerPath": "${default}", // Needs to not be "" for -m32 to work "compilerArgs": [ "-m32" // Removes integer truncation warnings with gbi macros @@ -57,7 +61,16 @@ You can create a `.vscode/c_cpp_properties.json` file with `C/C++: Edit Configur ], "defines": [ "_LANGUAGE_C", // For gbi.h - "OOT_DEBUG=1" // If targeting a debug version + // Version-specific + "OOT_VERSION=OOT_GC_EU_MQ_DBG", + "OOT_REGION=REGION_EU", + "OOT_PAL=1", + "OOT_MQ=1", + "OOT_DEBUG=1", + "F3DEX_GBI_2", + "F3DEX_GBI_PL", + "GBI_DOWHILE", + "GBI_DEBUG" ], "cStandard": "gnu89", // C89 + some GNU extensions from C99 like C++ comments "cppStandard": "${default}" // Only ZAPD uses C++, so doesn't really matter