about summary refs log tree commit diff stats
path: root/data/maps
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2025-09-19 20:14:35 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2025-09-19 20:14:35 -0400
commitab544e78d9f67e00a5ac42b002007d11dd51a659 (patch)
treeb37b114be676eec96d69d1942382d4d1a276df83 /data/maps
parentd7eb421fa42ed03c037026ffa3686b87af35ca84 (diff)
downloadlingo2-archipelago-apworld-v6.6.tar.gz
lingo2-archipelago-apworld-v6.6.tar.bz2
lingo2-archipelago-apworld-v6.6.zip
Diffstat (limited to 'data/maps')
0 files changed, 0 insertions, 0 deletions
679f5cabedd52257fc0c38a600279'>^
6746da6 ^







e1fa4a0 ^
6746da6 ^



e1fa4a0 ^
6746da6 ^




e1fa4a0 ^
6746da6 ^



e1fa4a0 ^
6746da6 ^




e1fa4a0 ^
6746da6 ^
dc210ee ^


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56




                           

                       
 





                            
 




                                                                                 
 







                            
 



                                     
 




                                                  
 



                        
 




                                                   
 
    


                                                      
#ifndef PROGRESS_H_A34EF856
#define PROGRESS_H_A34EF856

#include <string>

namespace verbly {
  namespace generator {

    class progress {
      private:
        std::string message;
        int total;
        int cur = 0;
        int lprint = 0;

      public:
        progress(std::string message, int total) : message(message), total(total)
        {
          std::cout << message << "   0%" << std::flush;
        }

        void update(int val)
        {
          if (val <= total)
          {
            cur = val;
          } else {
            cur = total;
          }

          int pp = cur * 100 / total;
          if (pp != lprint)
          {
            lprint = pp;

            std::cout << "\b\b\b\b" << std::right;
            std::cout.width(3);
            std::cout << pp << "%" << std::flush;
          }
        }

        void update()
        {
          update(cur+1);
        }

        ~progress()
        {
          std::cout << "\b\b\b\b100%" << std::endl;
        }
    };

  };
};

#endif /* end of include guard: PROGRESS_H_A34EF856 */