SHOW:
|
|
- or go back to the newest paste.
| 1 | /* ManRNG - a cross-platform command-line RNG generator for Pokémon games | |
| 2 | (c) M.andrew 2012 | |
| 3 | ||
| 4 | This utility provides the user with access to the full range of RNG | |
| 5 | operations available in the popular Pokémon series of games, allowing | |
| 6 | him to find shiny and/or flawless Pokémon no matter what type of computer | |
| 7 | he is using. By default, positive results are send to stdout in CSV format, | |
| 8 | allowing them to be easily piped into bash text manipulation utilities | |
| 9 | or simply saved directly into text files. | |
| 10 | ||
| 11 | The ultimate goal of this program is to match the seed-generation capabilities | |
| 12 | of the widely-known RNG Reporter utility for Windows while supporting all | |
| 13 | of its major file formats, including the XML profiles of the alpha-stage | |
| 14 | RNGR 9.96. Once this goal is realized and a standarized format for args | |
| 15 | is set in place, I foresee writing frontends for the program to improve | |
| 16 | its ease of use for the public. | |
| 17 | */ | |
| 18 | #include <stdio.h> | |
| 19 | #include <cstdlib> | |
| 20 | - | char RNGMethodHandler(int Generation, char Method) |
| 20 | + | |
| 21 | char Researcher() | |
| 22 | {
| |
| 23 | } | |
| 24 | ||
| 25 | char RNGMethodHandler(int Generation, char* Method) | |
| 26 | {
| |
| 27 | switch (Generation) | |
| 28 | - | if (Method[1] == "-") |
| 28 | + | |
| 29 | case 3: | |
| 30 | // options supported: | |
| 31 | // -t [--timefinder] | |
| 32 | // -p [--pandora] | |
| 33 | if (Method[1] == '-') | |
| 34 | {
| |
| 35 | // long options | |
| 36 | } | |
| 37 | else | |
| 38 | {
| |
| 39 | // short options | |
| 40 | } | |
| 41 | break; | |
| 42 | case 4: | |
| 43 | // options supported: | |
| 44 | - | if (Method[1] == "-") |
| 44 | + | |
| 45 | // -v [--pidfromivs] | |
| 46 | // -c [--chainsidfinder] | |
| 47 | // -m [--seed2time] | |
| 48 | // -p [--pandora] | |
| 49 | if (Method[1] == '-') | |
| 50 | {
| |
| 51 | // long options | |
| 52 | } | |
| 53 | else | |
| 54 | {
| |
| 55 | // short options | |
| 56 | } | |
| 57 | break; | |
| 58 | case 5: | |
| 59 | - | if (Method[1] == "-") |
| 59 | + | |
| 60 | // -t [--timefinder] | |
| 61 | // -r [--parameters] | |
| 62 | // -m [--seed2time] (c-gear) | |
| 63 | // -p [--pandora] | |
| 64 | if (Method[1] == '-') | |
| 65 | {
| |
| 66 | // long options | |
| 67 | } | |
| 68 | else | |
| 69 | {
| |
| 70 | // short options | |
| 71 | } | |
| 72 | break; | |
| 73 | } | |
| 74 | return 0; | |
| 75 | - | char MethodSearch; |
| 75 | + | |
| 76 | ||
| 77 | int main(int argc, char* argv[]) | |
| 78 | - | MethodSearch = *argv[2]; |
| 78 | + | |
| 79 | char GenFlag = argv[1][1]; //this should be a 3, 4, or 5 | |
| 80 | char* MethodSearch; | |
| 81 | if (GenFlag == '3' || GenFlag == '4' || GenFlag == '5') | |
| 82 | {
| |
| 83 | - | RNGMethodHandler(atoi(GenFlag),MethodSearch); |
| 83 | + | MethodSearch = argv[2]; |
| 84 | if (MethodSearch == "") | |
| 85 | - | else if (GenFlag = "r") |
| 85 | + | |
| 86 | fprintf(stderr,"ManRNG requires a method as its second argument."); | |
| 87 | } | |
| 88 | RNGMethodHandler(static_cast<int>(GenFlag),MethodSearch); | |
| 89 | } | |
| 90 | else if (GenFlag == 'r') | |
| 91 | {
| |
| 92 | Researcher(); | |
| 93 | } | |
| 94 | else | |
| 95 | {
| |
| 96 | fprintf(stderr,"ManRNG requires -3, -4, -5, or -r as its first argument."); | |
| 97 | exit(1); | |
| 98 | } | |
| 99 | } |