1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-25 06:06:05 +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:
Dragorn421 2024-08-01 05:19:46 +02:00 committed by GitHub
parent 8ee485d2e7
commit 9963e7f5d5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 129 additions and 3 deletions

113
docs/c_cpp_properties.json Normal file
View 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
}

View file

@ -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