"Fossies" - the Fresh Open Source Software Archive

Member "stella-6.0.2/src/emucore/DispatchResult.cxx" (11 Oct 2019, 1748 Bytes) of package /linux/privat/stella-6.0.2-src.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "DispatchResult.cxx" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 6.0.1_vs_6.0.2.

    1 //============================================================================
    2 //
    3 // MM     MM  6666  555555  0000   2222
    4 // MMMM MMMM 66  66 55     00  00 22  22
    5 // MM MMM MM 66     55     00  00     22
    6 // MM  M  MM 66666  55555  00  00  22222  --  "A 6502 Microprocessor Emulator"
    7 // MM     MM 66  66     55 00  00 22
    8 // MM     MM 66  66 55  55 00  00 22
    9 // MM     MM  6666   5555   0000  222222
   10 //
   11 // Copyright (c) 1995-2019 by Bradford W. Mott, Stephen Anthony
   12 // and the Stella Team
   13 //
   14 // See the file "License.txt" for information on usage and redistribution of
   15 // this file, and for a DISCLAIMER OF ALL WARRANTIES.
   16 //============================================================================
   17 
   18 #include "DispatchResult.hxx"
   19 
   20 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   21 bool DispatchResult::isSuccess() const
   22 {
   23   return myStatus == Status::debugger || myStatus == Status::ok;
   24 }
   25 
   26 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   27 void DispatchResult::setOk(uInt64 cycles)
   28 {
   29   myStatus = Status::ok;
   30   myCycles = cycles;
   31 }
   32 
   33 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   34 void DispatchResult::setDebugger(uInt64 cycles, const string& message, int address, bool wasReadTrap)
   35 {
   36   myStatus = Status::debugger;
   37   myCycles = cycles;
   38   myMessage = message;
   39   myAddress = address;
   40   myWasReadTrap = wasReadTrap;
   41 }
   42 
   43 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   44 void DispatchResult::setFatal(uInt64 cycles)
   45 {
   46   myCycles = cycles;
   47 
   48   myStatus = Status::fatal;
   49 }
   50 
   51 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
   52 void DispatchResult::setMessage(const string& message)
   53 {
   54   myMessage = message;
   55 }