Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* ManRNG - a cross-platform command-line RNG generator for Pokémon games
- (c) M.andrew 2012
- This utility provides the user with access to the full range of RNG
- operations available in the popular Pokémon series of games, allowing
- him to find shiny and/or flawless Pokémon no matter what type of computer
- he is using. By default, positive results are send to stdout in CSV format,
- allowing them to be easily piped into bash text manipulation utilities
- or simply saved directly into text files.
- The ultimate goal of this program is to match the seed-generation capabilities
- of the widely-known RNG Reporter utility for Windows while supporting all
- of its major file formats, including the XML profiles of the alpha-stage
- RNGR 9.96. Once this goal is realized and a standarized format for args
- is set in place, I foresee writing frontends for the program to improve
- its ease of use for the public.
- */
- #include <stdio.h>
- #include <cstdlib>
- char RNGMethodHandler(int Generation, char Method)
- {
- switch (Generation)
- {
- case 3:
- // options supported:
- // -t [--timefinder]
- // -p [--pandora]
- if (Method[1] == "-")
- {
- // long options
- }
- else
- {
- // short options
- }
- break;
- case 4:
- // options supported:
- // -t [--timefinder]
- // -v [--pidfromivs]
- // -c [--chainsidfinder]
- // -m [--seed2time]
- // -p [--pandora]
- if (Method[1] == "-")
- {
- // long options
- }
- else
- {
- // short options
- }
- break;
- case 5:
- // options supported:
- // -t [--timefinder]
- // -r [--parameters]
- // -m [--seed2time] (c-gear)
- // -p [--pandora]
- if (Method[1] == "-")
- {
- // long options
- }
- else
- {
- // short options
- }
- break;
- }
- return 0;
- }
- int main(int argc, char* argv[])
- {
- char GenFlag = argv[1][1]; //this should be a 3, 4, or 5
- char MethodSearch;
- if (GenFlag == '3' || GenFlag == '4' || GenFlag == '5')
- {
- MethodSearch = *argv[2];
- if (MethodSearch == "")
- {
- fprintf(stderr,"ManRNG requires a method as its second argument.");
- }
- RNGMethodHandler(atoi(GenFlag),MethodSearch);
- }
- else if (GenFlag = "r")
- {
- Researcher();
- }
- else
- {
- fprintf(stderr,"ManRNG requires -3, -4, -5, or -r as its first argument.");
- exit(1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment