mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-15 06:06:04 +00:00
Update vs code config and provide c_cpp_properties.json with all supported versions (#2010)
* Update oot-gc-eu-mq-dbg example vscode config and provide c_cpp_properties.json with all supported versions * remove N64 prefix from config names * newline at end of file
This commit is contained in:
parent
8ee485d2e7
commit
9963e7f5d5
2 changed files with 129 additions and 3 deletions
113
docs/c_cpp_properties.json
Normal file
113
docs/c_cpp_properties.json
Normal file
|
@ -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
|
||||||
|
}
|
|
@ -35,13 +35,17 @@ Many of VS Code's other shortcuts can be found on [its getting started page](htt
|
||||||
|
|
||||||
## C/C++ configuration
|
## 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
|
```jsonc
|
||||||
{
|
{
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "N64 oot-gc-eu-mq-dbg",
|
"name": "oot-gc-eu-mq-dbg",
|
||||||
"compilerPath": "${default}", // Needs to not be "" for -m32 to work
|
"compilerPath": "${default}", // Needs to not be "" for -m32 to work
|
||||||
"compilerArgs": [
|
"compilerArgs": [
|
||||||
"-m32" // Removes integer truncation warnings with gbi macros
|
"-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": [
|
"defines": [
|
||||||
"_LANGUAGE_C", // For gbi.h
|
"_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
|
"cStandard": "gnu89", // C89 + some GNU extensions from C99 like C++ comments
|
||||||
"cppStandard": "${default}" // Only ZAPD uses C++, so doesn't really matter
|
"cppStandard": "${default}" // Only ZAPD uses C++, so doesn't really matter
|
||||||
|
|
Loading…
Reference in a new issue