Mandrew

ManRNG - It begins..

Sep 8th, 2012
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.16 KB | None | 0 0
  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.  
  20. char RNGMethodHandler(int Generation, char* Method)
  21. {
  22.     switch (Generation)
  23.     {
  24.         case 3:
  25.             // options supported:
  26.             // -t [--timefinder]
  27.             // -p [--pandora]
  28.             if (Method[1] == "-")
  29.             {
  30.                 // long options
  31.             }
  32.             else
  33.             {
  34.                 // short options
  35.             }
  36.             break;
  37.         case 4:
  38.             // options supported:
  39.             // -t [--timefinder]
  40.             // -v [--pidfromivs]
  41.             // -c [--chainsidfinder]
  42.             // -m [--seed2time]
  43.             // -p [--pandora]
  44.             if (Method[1] == "-")
  45.             {
  46.                 // long options
  47.             }
  48.             else
  49.             {
  50.                 // short options
  51.             }
  52.             break;
  53.         case 5:    
  54.             // options supported:
  55.             // -t [--timefinder]
  56.             // -r [--parameters]
  57.             // -m [--seed2time] (c-gear)
  58.             // -p [--pandora]
  59.             if (Method[1] == "-")
  60.             {
  61.                 // long options
  62.             }
  63.             else
  64.             {
  65.                 // short options
  66.             }
  67.             break;
  68.     }
  69. }
  70.  
  71. int main(int argc, char* argv[])
  72. {
  73.     char GenFlag = argv[1][1]; //this should be a 3, 4, or 5
  74.     char MethodSearch;
  75.     if (GenFlag == "3" || GenFlag == "4" || GenFlag == "5")
  76.     {
  77.         MethodSearch = argv[2];
  78.         if (MethodSearch == "")
  79.         {
  80.             fprintf("stderr","ManRNG requires a method as its second argument.");
  81.         }
  82.         RNGMethodHandler(atoi(GenFlag),MethodSearch);
  83.     }
  84.     else if (GenFlag = "r")
  85.     {
  86.         Researcher();
  87.     }
  88.     else
  89.     {
  90.         fprintf("stderr","ManRNG requires -3, -4, -5, or -r as its first argument.");
  91.         exit(1);
  92.     }
  93. }
Advertisement
Add Comment
Please, Sign In to add comment