From f511871a9e5730a2bd356e7a5cd6c2dc569a72cc Mon Sep 17 00:00:00 2001 From: FireMario211 <17692105+FireMario211@users.noreply.github.com> Date: Wed, 7 Feb 2024 15:43:02 -0500 Subject: [PATCH] show hidden obj, noclip accuracy, etc --- README.md | 7 +- changelog.md | 3 + package-lock.json | 692 ++++++++++++++++++++++++++++++++++ package.json | 8 + resources/hacks/global.json | 6 + resources/hacks/misc.json | 13 + resources/hacks/player.json | 8 +- resources/hacks/settings.json | 2 +- server/.gitignore | 3 + server/package.json | 34 ++ server/src/index.ts | 12 + server/src/typings/Theme.ts | 23 ++ server/tsconfig.json | 26 ++ src/Dropdown.h | 6 +- src/GatoSim.hpp | 1 + src/Hacks/Global.cpp | 35 +- src/Hacks/Player.cpp | 4 +- src/ImGui.cpp | 13 +- src/PrismUI.cpp | 61 +-- src/Utils.hpp | 7 + src/main.cpp | 74 +++- 21 files changed, 967 insertions(+), 71 deletions(-) create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 server/.gitignore create mode 100644 server/package.json create mode 100644 server/src/index.ts create mode 100644 server/src/typings/Theme.ts create mode 100644 server/tsconfig.json diff --git a/README.md b/README.md index 0089d61..62976c9 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ A mod menu made in Geode for Geometry Dash - Add credits screen for cocos2d ui - Allow for dragging the button - Add "Render Hitbox" (Basically enables hitbox even if not in practice mode) -- Add "Disable Shaders" +- Add menu scale for the cocos ui +- Add "No Shaders" - Add "uncomplete level" hack - Add "Custom Object Bypass" (basically allows you to store more than 1000 objects in custom object) - Add "Show Hitboxes" @@ -17,12 +18,12 @@ A mod menu made in Geode for Geometry Dash - Allow for resizing the menu with a minimum size and maximum size (Only imgui) - Add light theme - Add animated background support (Custom theme only unless I add a theme that supports it) -- Add noclip accuracy - Add startpos switcher - Add a way to customize keybinds -- Add a "Replay Bot" +- Add a "Replay Bot" (Might turn this into another mod instead) - Add "Randomize Gamemode" just for fun - Add a "Custom Themes Marketplace" (use aws or idk what server) +- Allow users to upload their macros for other users to use (If I decide to make Replay Bot on this mod, same story with another mod if i end up making it as another mod) - maybe switch to ArianaPro-Regular font? looks nice imo. make a font switcher - Add "Coin Finder" (look at https://discord.com/channels/1199008625683869787/1199008626451423275/1201272567244275903) diff --git a/changelog.md b/changelog.md index b26bee9..8d9d7e6 100644 --- a/changelog.md +++ b/changelog.md @@ -9,6 +9,9 @@ - Added Layout Mode for Android - Added Solid Wave Trail - Added Force Platformer Mode & Change Gravity for Android + - Added Show Hidden Objects (For Layout Mode) + - Added Noclip Accuracy + - Added a "Show Graphic Options" button (For Android users) # v1.3.2 - Removed Dear ImGui :( - Removed Menu Style. diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..8c8a2f1 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,692 @@ +{ + "name": "Prism-Menu", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "express": "^4.18.2" + }, + "devDependencies": { + "typescript": "^5.3.3" + } + }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==" + }, + "node_modules/body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/call-bind": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.6.tgz", + "integrity": "sha512-Mj50FLHtlsoVfRfnHaZvyrooHcrlceNZdL/QBvJJVd9Ta55qCQK0gs4ss2oZDeV9zFCs6ewzYgVE5yfVmfFpVg==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.3", + "set-function-length": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==" + }, + "node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/define-data-property": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.2.tgz", + "integrity": "sha512-SRtsSqsDbgpJBbW3pABMCOt6rQyeM8s8RiyeSN8jYG8sYmt/kGJejbydttUsnDs1tadr19tvhT4ShwMyoqAm4g==", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.2", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/depd": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", + "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/destroy": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", + "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==" + }, + "node_modules/encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==" + }, + "node_modules/etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", + "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", + "dependencies": { + "get-intrinsic": "^1.2.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hasown": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz", + "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/http-errors": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", + "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", + "dependencies": { + "depd": "2.0.0", + "inherits": "2.0.4", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "toidentifier": "1.0.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==" + }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/object-inspect": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/parseurl": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", + "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==" + }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/range-parser": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", + "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/send": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", + "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", + "dependencies": { + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "mime": "1.6.0", + "ms": "2.1.3", + "on-finished": "2.4.1", + "range-parser": "~1.2.1", + "statuses": "2.0.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/send/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/serve-static": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", + "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", + "dependencies": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.3", + "send": "0.18.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/set-function-length": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.1.tgz", + "integrity": "sha512-j4t6ccc+VsKwYHso+kElc5neZpjtq9EnRICFZtWyBsLojhmeF/ZBd/elqm22WJh/BziDe/SBiOeAt0m2mfLD0g==", + "dependencies": { + "define-data-property": "^1.1.2", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.3", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/setprototypeof": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", + "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" + }, + "node_modules/side-channel": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.5.tgz", + "integrity": "sha512-QcgiIWV4WV7qWExbN5llt6frQB/lBven9pqliLXfGPB+K9ZYXxDozp0wLkHS24kWCm+6YXH/f0HhnObZnZOBnQ==", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/toidentifier": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", + "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", + "engines": { + "node": ">=0.6" + } + }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/typescript": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz", + "integrity": "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "engines": { + "node": ">= 0.8" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..f286552 --- /dev/null +++ b/package.json @@ -0,0 +1,8 @@ +{ + "devDependencies": { + "typescript": "^5.3.3" + }, + "dependencies": { + "express": "^4.18.2" + } +} diff --git a/resources/hacks/global.json b/resources/hacks/global.json index a51730d..67bd446 100644 --- a/resources/hacks/global.json +++ b/resources/hacks/global.json @@ -48,6 +48,12 @@ "opcodes": [], "type": "bool" }, + { + "name": "Show Hidden Objects", + "desc": "Shows all hidden objects. This will reset the objects primary color. This will not work on objects with the \"Hide\" attribute. (Useful with Layout Mode)", + "opcodes": [], + "type": "bool" + }, { "name": "No Transition", "desc": "Shorterns scene transition time to 0s.", diff --git a/resources/hacks/misc.json b/resources/hacks/misc.json index cb3f9df..df56eca 100644 --- a/resources/hacks/misc.json +++ b/resources/hacks/misc.json @@ -22,5 +22,18 @@ "desc": "Disables glow on all objects.", "opcodes": [], "type": "bool" + }, + { + "name": "Noclip Accuracy", + "desc": "Informs you how accurate your noclip run is. (Will not work without Anticheat Bypass enabled)", + "opcodes": [], + "type": "bool" + }, + { + "name": "Show Graphic Options", + "desc": "Shows you Geometry Dash's graphic options! Useful for Android as the option is normally not available.", + "opcodes": [], + "type": "button", + "default": "button" } ] diff --git a/resources/hacks/player.json b/resources/hacks/player.json index efdd56b..04e6681 100644 --- a/resources/hacks/player.json +++ b/resources/hacks/player.json @@ -71,8 +71,7 @@ "name": "Force Platformer Mode", "desc": "Forces you to be in platformer mode when playing a level.", "opcodes": [], - "type": "bool", - "win": true + "type": "bool" }, { @@ -89,7 +88,7 @@ }, { "name": "Solid Wave Trail", - "desc": "Removes the bledning of both icon colors on the wave trail.", + "desc": "Removes the blending of both icon colors on the wave trail.", "opcodes": [], "type": "bool" }, @@ -98,8 +97,7 @@ "name": "Change Gravity", "desc": "Allows you to change gravity when jumping or falling.", "opcodes": [], - "type": "bool", - "win": true + "type": "bool" }, { "name": "Gravity Value", diff --git a/resources/hacks/settings.json b/resources/hacks/settings.json index f5bd600..32cc840 100644 --- a/resources/hacks/settings.json +++ b/resources/hacks/settings.json @@ -30,7 +30,7 @@ "opcodes": [], "type": "dropdown", "default": 0, - "values": ["English [100%]", "Français [100%]", "Português (Brasil) [100%]", "Deutsch [100%]", "Русский [100%]", "Čeština [100%]", "Indonesia [100%]", "Español [100%]", "Polskie [100%]", "Melayu [100%]"] + "values": ["English [100%]", "Français [90%]", "Português (Brasil) [90%]", "Deutsch [90%]", "Русский [90%]", "Čeština [90%]", "Indonesia [90%]", "Español [90%]", "Polskie [90%]", "Melayu [90%]"] }, { "name": "Theme", diff --git a/server/.gitignore b/server/.gitignore new file mode 100644 index 0000000..320c107 --- /dev/null +++ b/server/.gitignore @@ -0,0 +1,3 @@ +node_modules/ +dist/ +package-lock.json diff --git a/server/package.json b/server/package.json new file mode 100644 index 0000000..07a9b93 --- /dev/null +++ b/server/package.json @@ -0,0 +1,34 @@ +{ + "name": "server", + "version": "1.0.0", + "description": "A server for Prism Menu. Used to store macros, themes, etc.", + "main": "dist/index.js", + "scripts": { + "lint": "eslint src/**/*.ts", + "lintfix": "eslint src/**/*.ts --fix", + "build": "rm -rf dist && mkdir dist && cp -r src/* dist/ && npx tsc -p .", + "clean": "rm -rf dist", + "start": "npm run build && node .", + "watch": "npx tsc -p . --watch" + }, + "author": "Firee", + "license": "GPL-3.0", + "devDependencies": { + "@types/body-parser": "^1.19.5", + "@types/express": "^4.17.21", + "@types/multer": "^1.4.11", + "@types/node": "^20.11.16", + "@typescript-eslint/eslint-plugin": "^6.21.0", + "@typescript-eslint/parser": "^6.21.0", + "eslint": "^8.56.0", + "ts-node": "^10.9.2", + "typescript": "^5.3.3" + }, + "dependencies": { + "body-parser": "^1.20.2", + "crypto": "^1.0.1", + "express": "^4.18.2", + "multer": "^1.4.5-lts.1", + "redis": "^4.6.13" + } +} diff --git a/server/src/index.ts b/server/src/index.ts new file mode 100644 index 0000000..1f56e0b --- /dev/null +++ b/server/src/index.ts @@ -0,0 +1,12 @@ +// Prism Menu Server +import express from 'express' +import bodyParser from 'body-parser' + +const app = express(); +const port = 3000; + +app.use(bodyParser.json()); + +app.listen(port, () => { + console.log(`Server is running on port @${port}`); +}) diff --git a/server/src/typings/Theme.ts b/server/src/typings/Theme.ts new file mode 100644 index 0000000..1645621 --- /dev/null +++ b/server/src/typings/Theme.ts @@ -0,0 +1,23 @@ +export interface UserData { + userID: number; + userName: string; + token: string; // based on a hashed ip addr + timestamp: string; +}; + +export interface ThemeData { + timestamp: string; + userID: number; + name: string; + desc: string; + screenshots?: Array; + data: string; +}; + +export interface MacroData { + timestamp: string; + userID: number; + name: string; + levelID: string; + data: string; +}; diff --git a/server/tsconfig.json b/server/tsconfig.json new file mode 100644 index 0000000..9064f2b --- /dev/null +++ b/server/tsconfig.json @@ -0,0 +1,26 @@ +{ + "include": ["src/**/*.ts"], + "compilerOptions": { + "target": "ES2020", + "module": "NodeNext", + "moduleResolution": "nodenext", + "esModuleInterop": true, + "sourceMap": true, + "outDir": "./dist", + "baseUrl": ".", + "resolveJsonModule": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true, + "strictPropertyInitialization": false, + "paths": { + "@/*": ["src/*"] + } + }, + "exclude": [ + "node_modules", + "**/*.spec.ts", + "dist", + "old" + ] +} diff --git a/src/Dropdown.h b/src/Dropdown.h index f636a99..b1d7b42 100644 --- a/src/Dropdown.h +++ b/src/Dropdown.h @@ -32,6 +32,7 @@ class Dropdown : public CCMenu { int h = ddmenu->getChildrenCount() + 1; h = expanded ? h : 1; ddmenu->setVisible(expanded); + ddmenu->setZOrder(3); background->setContentSize({background->getContentSize().width, (25 / background->getScale()) * h}); auto menuButtons = static_cast(parent->getParent()->getParent()->getParent()); auto hack = static_cast(parent->getUserData()); @@ -40,7 +41,10 @@ class Dropdown : public CCMenu { if (Utils::getNodeName(objN) == "PrismUIButton") { auto prismUIButton = static_cast(objN); auto pHack = prismUIButton->getHack(); - if (pHack == hack) continue; + if (pHack == hack) { + prismUIButton->setZOrder((expanded) ? 1 : 0); + continue; + }; auto pMenu = prismUIButton->getMenu(); if (pHack->type == "bool") { static_cast(pMenu->getChildren()->objectAtIndex(1))->setEnabled(!expanded); diff --git a/src/GatoSim.hpp b/src/GatoSim.hpp index a1cadcd..aeea0d9 100644 --- a/src/GatoSim.hpp +++ b/src/GatoSim.hpp @@ -12,6 +12,7 @@ using namespace geode::prelude; class GatoSim : public CCLayer, public FLAlertLayerProtocol { // TODO: add some json file // maybe turn this into some sort of "cookie clicker" because why not + std::string name; int fod = 0; int drank = 0; std::vector toi; diff --git a/src/Hacks/Global.cpp b/src/Hacks/Global.cpp index 097855e..d2841bc 100644 --- a/src/Hacks/Global.cpp +++ b/src/Hacks/Global.cpp @@ -41,8 +41,13 @@ class $modify(GameObject) { if (Hacks::isHackEnabled("No Glow")) { // easier than having to check for glow sprite lol this->m_hasNoGlow = true; } + if (Hacks::isHackEnabled("Show Hidden Objects")) { + m_activeMainColorID = -1; + if (m_isHide) v = true; + m_isHide = false; + // ok but why doesnt this work + } if (!Hacks::isHackEnabled("Layout Mode")) return GameObject::setVisible(v); - GameObject::setVisible(v); //m_hasGroupParent == 0 std::vector outerPortal = {}; //i really dont want to have to check every single object id @@ -52,6 +57,19 @@ class $modify(GameObject) { GameObject::setVisible(v); } } + /* + void makeInvisible() { // 0x13bf20 + std::cout << "make it invisible" << std::endl; + if (!Hacks::isHackEnabled("Show Hidden Objects")) return GameObject::makeInvisible(); + } + */ + static GameObject* createWithKey(int p0) { + auto gameObject = GameObject::createWithKey(p0); + if (Hacks::isHackEnabled("Show Hidden Objects")) { + if (p0 == 1007 && PlayLayer::get() != nullptr) return nullptr; + } + return gameObject; + } }; #endif @@ -91,20 +109,5 @@ class $modify(CCSprite) { if (m_fields->isGradient) { CCSprite::setColor({255,255,255}); } - /* - // taken from devtools because why not - if (auto texture = this->getTexture()) { - auto* cachedTextures = CCTextureCache::sharedTextureCache()->m_pTextures; - // probably a bad idea to loop, might cause some lag idk - // honestly i should hook the create method instead to give more performance because this is BAD! - for (auto [key, obj] : CCDictionaryExt(cachedTextures)) { - if (obj == texture) { - if (strstr(key.c_str(), "GJ_gradientBG") != NULL) { - CCSprite::setColor({255,255,255}); // original color - } - break; - } - } - }*/ } }; diff --git a/src/Hacks/Player.cpp b/src/Hacks/Player.cpp index 0c3a594..0ea28af 100644 --- a/src/Hacks/Player.cpp +++ b/src/Hacks/Player.cpp @@ -52,11 +52,11 @@ class $modify(PlayerObject) { m_fields->was_platformer = this->m_isPlatformer; PlayerObject::playerDestroyed(p0); } - #endif void pushButton(PlayerButton p0) { if (!Hacks::isHackEnabled("Enable Patching") && Hacks::isHackEnabled("Jump Hack")) PlayerObject::boostPlayer(10.0F); // idk if i should make this customizable PlayerObject::pushButton(p0); } + #endif void toggleDartMode(bool p0, bool p1) { // this is the fix until someone actually creates pads for android32 and android64, because i cant use m_isDart m_fields->isActuallyDart = p0; @@ -81,6 +81,7 @@ class $modify(GJBaseGameLayer) { #endif }; +#ifndef GEODE_IS_MACOS // Solid Wave Trail class $modify(CCDrawNode) { bool drawPolygon(CCPoint *p0, unsigned int p1, const ccColor4F &p2, float p3, const ccColor4F &p4) { @@ -91,3 +92,4 @@ class $modify(CCDrawNode) { return CCDrawNode::drawPolygon(p0,p1,p2,p3,p4); } }; +#endif diff --git a/src/ImGui.cpp b/src/ImGui.cpp index c343bb8..90e8b92 100644 --- a/src/ImGui.cpp +++ b/src/ImGui.cpp @@ -6,7 +6,6 @@ #include "Languages.hpp" #include "Themes.hpp" -bool showMenu = false; int currentMenuIndex; struct EditMode { @@ -79,11 +78,9 @@ class $modify(MenuLayer) { ImGuiCocos::get().setup([] { Themes::LoadTheme(Themes::getCurrentTheme()); }).draw([] { - auto prismButton = CCScene::get()->getChildByID("prism-icon"); - if (prismButton != nullptr) { - showMenu = static_cast(prismButton)->showImGuiMenu; - } - if (showMenu) { + auto prismButton = typeinfo_cast(CCScene::get()->getChildByID("prism-icon")); + if (prismButton == nullptr) return; + if (prismButton->showImGuiMenu) { // i cant use LoadTheme because 0160:err:virtual:allocate_virtual_memory out of memory for allocation, base (nil) size // well just in case if (Hacks::isHackEnabled("Live Theme Editing") || changedMenuScale) { @@ -393,7 +390,7 @@ class $modify(MenuLayer) { hack->value.intValue = i; Hacks::Settings::setSettingValue(&settings, *hack, hack->value.intValue); if (name == "Menu Style") { - showMenu = !showMenu; + prismButton->showImGuiMenu = !prismButton->showImGuiMenu; } } // Set the initial focus when opening the combo (scrolling + keyboard navigation focus) @@ -424,7 +421,7 @@ class $modify(MenuLayer) { } } if (ImGui::Button("X")) { - showMenu = !showMenu; + prismButton->showImGuiMenu = !prismButton->showImGuiMenu; } ImGui::PopStyleVar(); ImGui::EndTable(); diff --git a/src/PrismUI.cpp b/src/PrismUI.cpp index ad95be7..a2a6490 100644 --- a/src/PrismUI.cpp +++ b/src/PrismUI.cpp @@ -55,26 +55,26 @@ float calculateYPosition(float x) { // love floating points int getYPosBasedOnCategory() { // someone give me a proper math formula ok thanks switch (currentMenuIndexGD) { case 0: // Global - return -90; + return 20; case 1: // Player - return -70; + return 70; case 2: // Bypass - return 57; + return -100; case 3: // Creator - return 29; + return -100; case 4: // Misc - return 85; + return -100; case 5: // Settings - return -60; + return 115; default: return 0; } } float getContentSizeBasedOnCategory() { // someone give me a proper math formula ok thanks switch (currentMenuIndexGD) { case 0: // Global - return 280; // 260 + return 350; // 260 case 1: // Player - return 328; + return 400; case 2: // Bypass return 230; // 230 case 3: // Creator @@ -82,8 +82,8 @@ float getContentSizeBasedOnCategory() { // someone give me a proper math formula case 4: // Misc return 230; // 230 case 5: // Settings - return 420; // 400 - default: return 328; + return 450; // 400 + default: return 320; } } @@ -91,12 +91,6 @@ float getSliderValue(float current, float min, float max, bool inverse) { return (inverse) ? (current * (max - min) + min) : (current - min) / (max - min); } -std::string setPrecision(float value, int streamsize) { - std::ostringstream oss; - oss << std::fixed << std::setprecision(streamsize) << value; - return oss.str(); -} - // since SimpleTextArea doesnt allow limitLabelWidth float calculateScale(const std::string& input, int charsBeforeShrink, float minScale, float maxScale) { int inputLength = input.length(); @@ -190,7 +184,7 @@ bool PrismUIButton::init(HackItem* hack) { auto max = obj.get("max"); m_input = InputNode::create(100.f, "...", "PrismMenu.fnt"_spr); m_input->getInput()->setString( - name.starts_with("Button Position") ? std::to_string(value) : setPrecision(value, 3) + name.starts_with("Button Position") ? std::to_string(value) : Utils::setPrecision(value, 3) ); m_input->getInput()->setAllowedChars("0123456789."); m_input->setPositionX(21); @@ -290,7 +284,7 @@ void PrismUIButton::onFloatBtn(CCObject* ret) { m_hack->value.intValue = actualValue; } m_input->getInput()->setString( - name.starts_with("Button Position") ? std::to_string(m_hack->value.intValue) : setPrecision(m_hack->value.floatValue, 3) + name.starts_with("Button Position") ? std::to_string(m_hack->value.intValue) : Utils::setPrecision(m_hack->value.floatValue, 3) ); if (name == "Speedhack") { if (m_hack->value.floatValue < 0.0F) return; @@ -349,6 +343,12 @@ void PrismUIButton::onBtn(CCObject* ret) { prismUI->onClose(ret); } else if (name == "Credits") { FLAlertLayer::create("Not working...yet.", "This will be added in a future update!", "OK")->show(); + } else if (name == "Show Graphic Options") { + #ifdef GEODE_IS_ANDROID + VideoOptionsLayer::create()->show(); + #else + FLAlertLayer::create("Error", "This option can only be used on Android!", "OK")->show(); + #endif } else { GatoSim::onButton(); } @@ -399,7 +399,7 @@ void PrismUI::CreateHackItem(HackItem* hack) { auto opcodes = obj.get("opcodes"); if (!((Hacks::isHackEnabled("Enable Patching") && obj.contains("winOnly")) || !obj.contains("winOnly") || name == "Enable Patching")) return; auto btn = PrismUIButton::create(hack, m_currentLang.get()); - float indexY = (currentI * 28) + 100; + float indexY = (currentI * -28) + 310; // TODO: create custom sprite so people dont complain auto infoSpr = CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png"); //infoSpr->setScale(.5F); @@ -413,10 +413,8 @@ void PrismUI::CreateHackItem(HackItem* hack) { if (m_content->getContentSize().height > 230.0F) { //m_scrollLayer->m_contentLayer->setContentSize(m_content->getContentSize() + CCSize { 0.f, 1.0 }); m_scrollLayer->m_contentLayer->setContentSize(m_content->getContentSize()); - //m_content->setPositionY(-0.5f * currentI); } else { m_scrollLayer->m_contentLayer->setContentSize(m_content->getContentSize()); - //m_content->setPositionY(220.0f * currentI); } m_scrollLayer->m_contentLayer->setContentSize({m_content->getContentSize().width, getContentSizeBasedOnCategory()}); infoBtn->setPosition({280, indexY}); @@ -503,7 +501,7 @@ void PrismUIButton::textInputClosed(CCTextInputNode* input) { // basically onInt std::string name = m_hack->name; Themes::RGBAToCC(PrismUI::GetTheme()["Text"], input->m_placeholderLabel); if (m_hack->type == "float") { - input->setString(setPrecision(m_hack->value.floatValue, 3)); + input->setString(Utils::setPrecision(m_hack->value.floatValue, 3)); if (name == "Speedhack") { if (m_hack->value.floatValue < 0.0F) return; m_hack->value.floatValue = std::max(m_hack->value.floatValue, 0.01f); @@ -547,6 +545,7 @@ void PrismUIButton::onDecBtn(CCObject* ret) { void PrismUI::RegenCategory() { std::vector jsonArray; + currentI = 0; switch (currentMenuIndexGD) { case 0: // Global jsonArray = matjson::parse(Hacks::getGlobalHacks()).as_array(); @@ -567,12 +566,12 @@ void PrismUI::RegenCategory() { jsonArray = matjson::parse(Hacks::getSettings()).as_array(); auto createdByLabel = CCLabelBMFont::create(m_currentLang->name("Prism Menu by Firee").c_str(), "PrismMenu.fnt"_spr); auto versionLabel = CCLabelBMFont::create("Unknown.", "PrismMenu.fnt"_spr); + float indexY = (currentI * -28) + 310; createdByLabel->limitLabelWidth(150, 1.0F, .2F); - createdByLabel->setPosition({63, 470}); - versionLabel->setPosition({63, 455}); + createdByLabel->setPosition({63, indexY}); + versionLabel->setPosition({63, indexY + 15}); Themes::RGBAToCC(GetTheme()["Text"], createdByLabel); Themes::RGBAToCC(GetTheme()["Text"], versionLabel); - #ifdef GITHUB_ACTIONS auto version = fmt::format("{} (Geode)", Mod::get()->getVersion().toString()); #else @@ -595,11 +594,19 @@ void PrismUI::RegenCategory() { versionLabel->limitLabelWidth(150, 1.0F, .2F); m_content->addChild(createdByLabel); m_content->addChild(versionLabel); + currentI++; break; } } - currentI = 0; - for (auto it = jsonArray.end() - 1; it != jsonArray.begin() - 1; it--) { + /*for (auto it = jsonArray.end() - 1; it != jsonArray.begin() - 1; it--) { + const auto& obj = *it; + std::string name = obj.get("name"); + HackItem* hack = Hacks::getHack(name); + if (hack != nullptr) { + CreateHackItem(hack); + } + }*/ + for (auto it = jsonArray.begin(); it != jsonArray.end(); it++) { const auto& obj = *it; std::string name = obj.get("name"); HackItem* hack = Hacks::getHack(name); diff --git a/src/Utils.hpp b/src/Utils.hpp index 0c96845..fcd2f1c 100644 --- a/src/Utils.hpp +++ b/src/Utils.hpp @@ -20,4 +20,11 @@ class Utils { } #endif } + static std::string setPrecision(float value, int streamsize) { + std::ostringstream oss; + oss << std::fixed << std::setprecision(streamsize) << value; + return oss.str(); + } + + }; diff --git a/src/main.cpp b/src/main.cpp index 0336a86..8f706f2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -140,26 +140,40 @@ class $modify(PauseLayer) { } }; +// TODO: Check Cheat Indicator position CircleButtonSprite* createCheatIndicator(bool isHacking) { auto winSize = CCDirector::sharedDirector()->getWinSize(); auto cheatIndicator = CircleButtonSprite::create(CCNode::create(), (isHacking) ? CircleBaseColor::Pink : CircleBaseColor::Green, CircleBaseSize::Tiny); //, CircleBaseColor::Geode cheatIndicator->setAnchorPoint({1,1}); - cheatIndicator->setPosition({winSize.width, winSize.height}); + cheatIndicator->setPosition({28, winSize.height}); + cheatIndicator->setZOrder(1000); + cheatIndicator->setTag(10420); // prevent PlayLayer from interfering return cheatIndicator; } + class $modify(PlayLayer) { float previousPositionX = 0.0F; GameObject* antiCheatObject; // removing after lol CircleButtonSprite* cheatIndicator; + CCLabelBMFont* accuracyLabel; bool previousTestMode; + CCNode* prismNode; CCSprite* progressBar; CCLabelBMFont* percentLabel; CCLabelBMFont* attemptLabel; bool isCheating = false; + + // Anticheat Bypass bool initedDeath = false; - int updateInit = 0; + + // Noclip Accuracy + int frame = 0; + int death = 0; + float previousPlayerX = 0.0F; + float previousDeathX = 0.0F; + // Anticheat Bypass, Noclip, No Spikes, No Solids void destroyPlayer(PlayerObject *p0, GameObject *p1) { //bool m_isTestMode = *reinterpret_cast(reinterpret_cast(this) + 0x413); @@ -167,6 +181,7 @@ class $modify(PlayLayer) { if (Hacks::isHackEnabled("Enable Patching")) return PlayLayer::destroyPlayer(p0, p1); bool noclipDisabled = !Hacks::isHackEnabled("No Solids") && !Hacks::isHackEnabled("Noclip"); if ((noclipDisabled && !Hacks::isHackEnabled("No Spikes"))) return PlayLayer::destroyPlayer(p0, p1); + if (Hacks::isHackEnabled("Anticheat Bypass")) { if (!m_fields->initedDeath) { #if !defined(GEODE_IS_ANDROID64) && !defined(GEODE_IS_MACOS) @@ -202,6 +217,15 @@ class $modify(PlayLayer) { if (p1 == m_fields->antiCheatObject) { // nice AC robert return PlayLayer::destroyPlayer(p0, p1); } + if (m_fields->accuracyLabel != nullptr) { + m_fields->accuracyLabel->setColor({255,0,0}); + } + if (m_player1 != nullptr) { + if (m_player1->getPositionX() != m_fields->previousDeathX) { + m_fields->previousDeathX = m_player1->getPositionX(); + m_fields->death += 1; + } + } } } // Instant Complete, Hide Testmode @@ -250,19 +274,53 @@ class $modify(PlayLayer) { if (Hacks::isHackEnabled("Practice Music")) { GameStatsManager::sharedState()->toggleEnableItem(UnlockType::GJItem, 17, true); } + + auto winSize = CCDirector::sharedDirector()->getWinSize(); + m_fields->prismNode = CCNode::create(); + m_fields->prismNode->setTag(10420); m_fields->cheatIndicator = createCheatIndicator(false); m_fields->cheatIndicator->setVisible(Hacks::isHackEnabled("Cheat Indicator")); - this->addChild(m_fields->cheatIndicator); + m_fields->accuracyLabel = CCLabelBMFont::create("100.00%", "bigFont.fnt"); + m_fields->accuracyLabel->setPosition({36, winSize.height - 35}); + m_fields->accuracyLabel->setScale(0.5F); + m_fields->accuracyLabel->setOpacity(255 / 2); + m_fields->accuracyLabel->setVisible(Hacks::isHackEnabled("Noclip Accuracy")); + m_fields->accuracyLabel->setAlignment(CCTextAlignment::kCCTextAlignmentLeft); + m_fields->accuracyLabel->setZOrder(1000); + m_fields->accuracyLabel->setTag(10420); // prevent PlayLayer from interfering + m_fields->prismNode->addChild(m_fields->accuracyLabel); + m_fields->prismNode->addChild(m_fields->cheatIndicator); + this->addChild(m_fields->prismNode); return true; } void onQuit() { if (prismButton != nullptr && Hacks::isHackEnabled("Show Button")) prismButton->setVisible(true); // look at this m_fields->initedDeath = false; + m_fields->frame = 0; + m_fields->death = 0; PlayLayer::onQuit(); } + void resetLevel() { + m_fields->frame = 0; + m_fields->death = 0; + PlayLayer::resetLevel(); + } void postUpdate(float p0) { PlayLayer::postUpdate(p0); - + if (m_player1 != nullptr) { + if (m_player1->getPositionX() != m_fields->previousPlayerX) { + m_fields->previousPlayerX = m_player1->getPositionX(); + m_fields->frame += 1; + } + } + if (m_fields->accuracyLabel != nullptr) { + float accuracy = ((static_cast(m_fields->frame - m_fields->death)) / static_cast(m_fields->frame)) * 100; // for some reason this doesnt work on android, like it goes in the negatives + m_fields->accuracyLabel->setString(fmt::format("{}%", Utils::setPrecision(accuracy, 2)).c_str()); + m_fields->accuracyLabel->setVisible(Hacks::isHackEnabled("Noclip Accuracy")); + if (m_fields->frame % 4 == 0) { // quarter step + m_fields->accuracyLabel->setColor({255,255,255}); + } + } #ifndef GEODE_IS_MACOS if (Hacks::isHackEnabled("Safe Mode")) { m_isTestMode = true; @@ -289,7 +347,7 @@ class $modify(PlayLayer) { if (Hacks::isHackEnabled("Cheat Indicator")) { m_fields->cheatIndicator->removeFromParentAndCleanup(true); m_fields->cheatIndicator = createCheatIndicator(true); - this->addChild(m_fields->cheatIndicator); + m_fields->prismNode->addChild(m_fields->cheatIndicator); } } } else { // not cheating @@ -297,15 +355,14 @@ class $modify(PlayLayer) { m_fields->isCheating = false; m_fields->cheatIndicator->removeFromParentAndCleanup(true); m_fields->cheatIndicator = createCheatIndicator(false); - this->addChild(m_fields->cheatIndicator); + m_fields->prismNode->addChild(m_fields->cheatIndicator); } } - if (Hacks::isHackEnabled("Instant Complete") && m_fields->updateInit < 5) { + if (Hacks::isHackEnabled("Instant Complete") && m_fields->frame < 5) { log::debug("CRIMINAL… criminal… criminal… criminal…"); // funny message FLAlertLayer::create(nullptr, "Cheater!", "Just a warning, you will be banned off leaderboards if you use this on rated levels. Consider this your warning.", "OK", nullptr)->show(); } - m_fields->updateInit = m_fields->updateInit + 1; float attemptOpacity = Hacks::getHack("Attempt Opacity")->value.floatValue; //if (!Hacks::isHackEnabled("Hide Attempts") && attemptOpacity == 1.0F) return PlayLayer::postUpdate(p0); int currentPosition = Hacks::getHack("Progress Bar Position")->value.intValue; @@ -372,7 +429,6 @@ class $modify(PlayLayer) { if (Hacks::isHackEnabled("Enable Patching")) return; if (Hacks::isHackEnabled("Accurate Percentage")) { if (m_fields->percentLabel == nullptr) return; - std::cout << PlayLayer::getCurrentPercent() << "," << PlayLayer::getCurrentPercentInt() << std::endl; std::string percentStr = std::to_string(PlayLayer::getCurrentPercent()) + "%"; m_fields->percentLabel->setString(percentStr.c_str()); }