Skip to content
Snippets Groups Projects
utils.h 442 B
Newer Older
  • Learn to ignore specific revisions
  • Vicki Pfau's avatar
    Vicki Pfau committed
    #pragma once
    
    #include <string>
    #include <vector>
    
    namespace Retro {
    
    enum class Operation {
    	NOOP,
    	EQUAL,
    	NEGATIVE_EQUAL,
    	NOT_EQUAL,
    	LESS_THAN,
    	GREATER_THAN,
    	LESS_OR_EQUAL,
    	GREATER_OR_EQUAL,
    	NONZERO,
    	ZERO,
    	POSITIVE,
    	NEGATIVE,
    	SIGN,
    };
    
    int64_t calculate(Operation op, int64_t reference, int64_t value);
    
    std::string drillUp(const std::vector<std::string>& targets, const std::string& fail = {}, const std::string& hint = ".");
    }