You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
764 B
C++
32 lines
764 B
C++
15 years ago
|
#ifndef INTERPRETER_MISCOPCODES_H_INCLUDED
|
||
|
#define INTERPRETER_MISCOPCODES_H_INCLUDED
|
||
|
|
||
|
#include <stdexcept>
|
||
|
#include <vector>
|
||
|
#include <string>
|
||
|
|
||
|
#include "opcodes.hpp"
|
||
|
#include "runtime.hpp"
|
||
|
|
||
|
namespace Interpreter
|
||
|
{
|
||
|
class OpMessageBox : public Opcode1
|
||
|
{
|
||
|
public:
|
||
|
|
||
|
virtual void execute (Runtime& runtime, unsigned int arg0)
|
||
|
{
|
||
|
if (arg0!=0)
|
||
|
throw std::logic_error ("message box buttons not implemented yet");
|
||
|
|
||
|
int index = runtime[0];
|
||
|
runtime.pop();
|
||
|
std::vector<std::string> buttons;
|
||
|
runtime.getContext().messageBox (runtime.getStringLiteral (index), buttons);
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
|
||
|
#endif
|
||
|
|