From 9b0646fde05e370e22337c6485bb678d6bf326fb Mon Sep 17 00:00:00 2001 From: MegaMech Date: Sat, 18 Dec 2021 03:30:41 -0700 Subject: [PATCH] Update progress.py (#103) * Update progress.py * Update Jenkinsfile * Update progress.py * Update README.md --- Jenkinsfile | 19 +++++++++++++++++++ README.md | 9 ++++++++- progress.py | 14 ++++++++++++-- 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4b82a2fcd..566ba13f1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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) } } } diff --git a/README.md b/README.md index 50f25d82b..94c3b986a 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/progress.py b/progress.py index a7b921cf3..11df12143 100644 --- a/progress.py +++ b/progress.py @@ -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"