Merge pull request #512 from octorock/mcss

This commit is contained in:
notyourav 2022-09-05 11:22:59 -07:00 committed by GitHub
commit 11e57bc8e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 96 additions and 23 deletions

View File

@ -7,16 +7,25 @@ on:
jobs:
build:
runs-on: ubuntu-latest
# Ubuntu 22.04 is needed for an up-to-date version of doxygen.
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: generate docs
uses: mattnotmitt/doxygen-action@v1
- name: Checkout m.css
uses: actions/checkout@v2
with:
doxyfile-path: 'Doxyfile'
repository: octorock/m.css
ref: refs/heads/bitfields
path: ./m.css
- name: Install doxygen
run: sudo apt install -y doxygen
- name: Generate docs
run: ./m.css/documentation/doxygen.py doxygen_config.py
- name: deploy docs to github pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/doxygen
publish_dir: ./docs/doxygen/html
# We do not need history for the gh-pages branch.
force_orphan: true

2
.gitignore vendored
View File

@ -15,6 +15,7 @@ translations/*.bin
# doxygen
docs/doxygen/html/
docs/doxygen/xml/
# tools
tools/agbcc
@ -87,3 +88,4 @@ _Deparsed_XSubs.pm
__pycache__
Info.plist
ctx.c
!doxygen_config.py

View File

@ -44,7 +44,7 @@ PROJECT_NUMBER =
# for a project that appears at the top of each page and should give viewer a
# quick idea about the purpose of the project. Keep the description short.
PROJECT_BRIEF = "Decompilation of The Legend of Zelda: The Minish Cap"
PROJECT_BRIEF = "Docs"
# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
# in the documentation. The maximum height of the logo should not exceed 55
@ -1141,7 +1141,7 @@ IGNORE_PREFIX =
# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
# The default value is: YES.
GENERATE_HTML = YES
GENERATE_HTML = NO
# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
@ -1211,7 +1211,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_EXTRA_STYLESHEET = "./docs/doxygen/doxygen-extra.css"
#HTML_EXTRA_STYLESHEET = "./docs/doxygen/doxygen-extra.css"
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note
@ -1221,7 +1221,7 @@ HTML_EXTRA_STYLESHEET = "./docs/doxygen/doxygen-extra.css"
# files will be copied as-is; there are no commands or markers available.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_EXTRA_FILES =
HTML_EXTRA_FILES = docs/doxygen/beanstalk-bg.png
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
# will adjust the colors in the style sheet and background images according to
@ -2015,7 +2015,7 @@ MAN_LINKS = NO
# captures the structure of the code including all documentation.
# The default value is: NO.
GENERATE_XML = NO
GENERATE_XML = YES
# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
@ -2295,14 +2295,14 @@ DOT_NUM_THREADS = 0
# The default value is: Helvetica.
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_FONTNAME = Helvetica
DOT_FONTNAME = Source Sans Pro
# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
# dot graphs.
# Minimum value: 4, maximum value: 24, default value: 10.
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_FONTSIZE = 10
DOT_FONTSIZE = 16
# By default doxygen will tell dot to use the default font as specified with
# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set

View File

@ -38,10 +38,12 @@ It can target the following ROMs:
**Note:** This repository does not include any of the assets necessary to build the ROM.
A prior copy of the game is required to extract the needed assets.
Website: <https://zelda64.dev/>
Website: <https://zelda64.dev>
Discord: <https://discord.zelda64.dev>
Documentation: <https://zeldaret.github.io/tmc>
## Installation
To set up the repository, see [INSTALL.md](INSTALL.md).

View File

@ -1,5 +0,0 @@
body {
background-image: url("../beanstalk-bg.png");
background-attachment: fixed;
background-size: cover;
}

43
docs/doxygen/style.css Normal file
View File

@ -0,0 +1,43 @@
html {
height: 100%;
}
dl {
padding-left: 1em;
}
body {
min-height: 100%;
background-image: url("beanstalk-bg.png");
background-attachment: fixed;
background-size: cover;
}
body > header > nav {
background: #2f363fe5;
}
main>article>.m-container {
padding-top: 1em;
padding-bottom: 1em;
background: #2f363fe5;
}
code {
background: #2f363fe5;
}
body > footer > nav {
background: transparent;
padding: 0;
color: #555;
}
body > footer > nav a {
color: #222;
}
ul.m-doc li.m-doc-expansible > a:first-child::before, ul.m-doc li.m-doc-collapsible > a:first-child::before {
background: transparent;
}
.m-doc-template, dl.m-doc dd, ul.m-doc li > span.m-doc, dl.m-doc dd svg.m-math, ul.m-doc li > span.m-doc svg.m-math {
color: #a4a4a4;
}
img.m-image, svg.m-image {
display: inline-block;
}
main p {
text-indent: 0;
}

22
doxygen_config.py Normal file
View File

@ -0,0 +1,22 @@
# Configuration file for https://mcss.mosra.cz/documentation/doxygen/
DOXYFILE = 'Doxyfile'
MAIN_PROJECT_URL = 'https://github.com/zeldaret/tmc'
SHOW_UNDOCUMENTED = True
SEARCH_RESULT_ID_BYTES = 4
SEARCH_FILE_OFFSET_BYTES = 4
SEARCH_NAME_SIZE_BYTES = 2
SEARCH_DOWNLOAD_BINARY = True
LINKS_NAVBAR1 = [
('Modules', 'modules', []),
('Pages', 'pages', [])
]
LINKS_NAVBAR2 = [
('Classes', 'annotated', []),
('Files', 'files', [])
]
STYLESHEETS = [
'https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600',
'../css/m-dark+documentation.compiled.css',
'docs/doxygen/style.css'
]
FAVICON = 'https://zelda64.dev/favicon.ico'

View File

@ -150,7 +150,7 @@ typedef struct Entity_ {
/*0x15*/ u8 direction; /**< Facing direction. @see Direction */
/*0x16*/ u8 carryFlags; /**< Flags for carrying this Entity. */
/*0x17*/ u8 followerFlag; /**< Controls collisions between followers, unused. */
/*0x18*/ struct {
/*0x18*/ struct SpriteSettings {
/* */ u32 draw : 2; /**< Draw type. 0 = disabled, 1 = clip to screen, 3 = draw always */ /* 0x2 */
/* */ u32 ss2 : 1; /* 4 */
/* */ u32 ss3 : 1; /* 8 */
@ -158,20 +158,20 @@ typedef struct Entity_ {
/* */ u32 flipX : 1; /**< Flip sprite horizontally. */ /* 0x40 */
/* */ u32 flipY : 1; /**< Flip sprite vertically. */ /* 0x80 */
/* */ } PACKED spriteSettings;
/*0x19*/ struct {
/*0x19*/ struct SpriteRendering {
/* */ u32 b0 : 2; /* 1-2 */
/* */ u32 alphaBlend : 2; /* 4-8 */
/* */ u32 b2 : 2; /* 0x10 */
/* */ u32 b3 : 2; /* 0x40 */
/* */ } PACKED spriteRendering;
/*0x1a*/ union {
/*0x1a*/ union Palette {
/* */ u8 raw;
/* */ struct {
/* */ struct PaletteB {
/* */ u8 b0 : 4;
/* */ u8 b4 : 4;
/* */ } PACKED b;
/* */ } PACKED palette;
/*0x1b*/ struct {
/*0x1b*/ struct SpriteOrientation {
/* */ u32 b0 : 1; /* 1 */
/* */ u32 b1 : 5; /* 0x2-0x10 */
/* */ u32 flipY : 2; /* 0x20-0x40 */