Update progress.py (#103)

* Update progress.py

* Update Jenkinsfile

* Update progress.py

* Update README.md
This commit is contained in:
MegaMech 2021-12-18 03:30:41 -07:00 committed by GitHub
parent 45f8d5b5ca
commit 9b0646fde0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 3 deletions

19
Jenkinsfile vendored
View File

@ -2,6 +2,10 @@ def totalProgBadge = addEmbeddableBadgeConfiguration(id: "totalProgress", subjec
def gameCodeProgBadge = addEmbeddableBadgeConfiguration(id: "codeProgress", subject: "Game Code Progress")
def audioProgBadge = addEmbeddableBadgeConfiguration(id: "audioProgress", subject: "Audio Code Progress")
def bytesToDecompile = addEmbeddableBadgeConfiguration(id: "bytesLeft", subject: "Remaining Decompilable Bytes")
def m2cFuncs = addEmbeddableBadgeConfiguration(id: "m2c", subject: "Remaining Functions")
def nonmatchingFuncs = addEmbeddableBadgeConfiguration(id: "nonmatching", subject: "Non-matching Functions")
pipeline {
agent any
stages {
@ -41,6 +45,21 @@ pipeline {
script: "python3 progress.py audioBadge",
returnStdout: true).trim()
audioProgBadge.setStatus(progress)
progress = sh(
script: "python3 progress.py bytesToDecompile",
returnStdout: true).trim()
bytesToDecompile.setStatus(progress)
progress = sh(
script: "python3 progress.py m2cFuncs",
returnStdout: true).trim()
m2cFuncs.setStatus(progress)
progress = sh(
script: "python3 progress.py nonmatchingFuncs",
returnStdout: true).trim()
nonmatchingFuncs.setStatus(progress)
}
}
}

View File

@ -1,4 +1,11 @@
Total Progress: 19.14%       Game code: 10.62%        C Files left: ~23 out of 35
[![Build Status](https://ci.valandil.ca/buildStatus/icon?job=mk64%2Fmaster&config=totalProgress)](https://ci.valandil.ca/job/mk64/job/master/)
[![Build Status](https://ci.valandil.ca/buildStatus/icon?job=mk64%2Fmaster&config=codeProgress)](https://ci.valandil.ca/job/mk64/job/master/)
[![Build Status](https://ci.valandil.ca/buildStatus/icon?job=mk64%2Fmaster&config=audioProgress)](https://ci.valandil.ca/job/mk64/job/master/)
[![Build Status](https://ci.valandil.ca/buildStatus/icon?job=mk64%2Fmaster&config=bytesLeft)](https://ci.valandil.ca/job/mk64/job/master/)
[![Build Status](https://ci.valandil.ca/buildStatus/icon?job=mk64%2Fmaster&config=m2c)](https://ci.valandil.ca/job/mk64/job/master/)
[![Build Status](https://ci.valandil.ca/buildStatus/icon?job=mk64%2Fmaster&config=nonmatching)](https://ci.valandil.ca/job/mk64/job/master/)
C Files left: ~23 out of 35
# Mario Kart 64
This repo contains a work-in-progress decompilation of Mario Kart 64 (U). The project pursues historical and educational elements within the game found via taking it apart and putting it back together. Inspiration to do so not only emanates from the game's hardware and technology but also its immensely positive effects on the cultures and families of nearly every nationality. See [progress](#Progress) for more information.

View File

@ -7,7 +7,7 @@ import os
import re
parser = argparse.ArgumentParser(description="Computes current progress throughout the whole project.")
parser.add_argument("format", nargs="?", default="text", choices=["text", "shield-json", "badge1"])
parser.add_argument("format", nargs="?", default="text", choices=["text", "shield-json", "totalBadge", "gameBadge", "audioBadge", "bytesToDecompile", "m2cFuncs", "nonmatchingFuncs"])
parser.add_argument("-m", "--matching", dest='matching', action='store_true',
help="Output matching progress instead of decompilation progress")
args = parser.parse_args()
@ -279,8 +279,18 @@ if args.format == 'shield-json':
"message": f"{srcPct:.3g}%",
"color": 'yellow',
}))
elif args.format == 'badge1':
elif args.format == 'totalBadge':
print(str(round(((mk64Code_size - text_size) * mk64Code_size) * 100, 2))+"%")
elif args.format == 'gameBadge':
print(str(round(srcPct, 2))+"%")
elif args.format == 'audioBadge':
print(str(round(audioPct, 2))+"%")
elif args.format == 'bytesToDecompile':
print(str(text_size)+" of "+str(mk64Code_size)+"\n")
elif args.format == 'm2cFuncs':
print(str(TotalMipsToCFunctions))
elif args.format == 'nonmatchingFuncs':
print(str(TotalNonMatchingFunctions))
elif args.format == 'text':
adjective = "decompiled" if not args.matching else "matched"