diff options
| author | lukaslw | 2014-06-16 21:33:30 +0200 | 
|---|---|---|
| committer | lukaslw | 2014-06-22 20:09:11 +0200 | 
| commit | e452e088f43d88a11c3fb8e820345269957da13e (patch) | |
| tree | 30d7fadc41ecf923996a19eba73607977192f55a | |
| parent | 2ba814516c3044f541181911f0e3d24fae683d91 (diff) | |
| download | scummvm-rg350-e452e088f43d88a11c3fb8e820345269957da13e.tar.gz scummvm-rg350-e452e088f43d88a11c3fb8e820345269957da13e.tar.bz2 scummvm-rg350-e452e088f43d88a11c3fb8e820345269957da13e.zip | |
PRINCE: Beginning of makeInvCursor and dialog functions
| -rw-r--r-- | engines/prince/prince.cpp | 28 | ||||
| -rw-r--r-- | engines/prince/prince.h | 11 | ||||
| -rw-r--r-- | engines/prince/script.cpp | 1 | 
3 files changed, 38 insertions, 2 deletions
| diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp index ed29e5f5c2..2d08aa1115 100644 --- a/engines/prince/prince.cpp +++ b/engines/prince/prince.cpp @@ -436,6 +436,22 @@ void PrinceEngine::changeCursor(uint16 curId) {  	CursorMan.showMouse(true);  } +void PrinceEngine::makeInvCursor(int itemNr) { +	const Graphics::Surface *cur1Surface = nullptr; +	cur1Surface = _cursor1->getSurface(); +	int cur1W = cur1Surface->w; +	int cur1H = cur1Surface->h; + +	const Graphics::Surface *itemSurface = nullptr; +	itemSurface = _allInvList[itemNr].getSurface(); +	int itemW = itemSurface->w; +	int itemH = itemSurface->h; + +	int cur2W = cur1W + itemW / 2; +	int cur2H = cur1H + itemH / 2; +	//TODO +} +  bool PrinceEngine::playNextFrame() {  	if (!_flicPlayer.isVideoLoaded())  		return false; @@ -1919,7 +1935,17 @@ void PrinceEngine::displayInventory() {  	}  } -void PrinceEngine::makeInvCursor(int itemNr) { +void PrinceEngine::createDialogBox(Common::Array<DialogLine> &dialogData) { +	int lineSpace = 10; +	int dBoxWidth = 600; + +	int dialogLines = 0; + +	int nrOfDialogLines = 0; // ebp +	int nrOfSentence = 0; // edx +} + +void PrinceEngine::runDialog() {  } diff --git a/engines/prince/prince.h b/engines/prince/prince.h index d3843e78cf..9f4dd57f03 100644 --- a/engines/prince/prince.h +++ b/engines/prince/prince.h @@ -199,6 +199,11 @@ struct DrawNode {  	void (*drawFunction)(Graphics::Surface *, DrawNode *);  }; +struct DialogLine { +	int _nr; +	Common::String _line; +}; +  struct DebugChannel {  enum Type { @@ -260,6 +265,7 @@ public:  	Common::Array<AnimListItem> _animList;  	Common::Array<BackgroundAnim> _backAnimList; +	Common::Array<Common::Array<DialogLine>> _dialogBoxList;  	Common::RandomSource _randomSource; @@ -340,6 +346,9 @@ public:  	void inventoryLeftMouseButton();  	void inventoryRightMouseButton(); +	void createDialogBox(Common::Array<DialogLine> &dialogData); +	void runDialog(); +  	int testAnimNr;  	int testAnimFrame; @@ -386,7 +395,7 @@ private:  	Common::SeekableReadStream *_voiceStream[MAX_SAMPLES];  	Audio::SoundHandle _soundHandle[MAX_SAMPLES]; -	Animation *_zoom; +	//Animation *_zoom;  	Common::Array<PScr *> _pscrList;  	Common::Array<Mob> _mobList;  	Common::Array<Object *> _objList; diff --git a/engines/prince/script.cpp b/engines/prince/script.cpp index 9c915ca6bc..944de69c29 100644 --- a/engines/prince/script.cpp +++ b/engines/prince/script.cpp @@ -1235,6 +1235,7 @@ void Interpreter::O_DISABLEDIALOGOPT() {  void Interpreter::O_SHOWDIALOGBOX() {  	uint16 box = readScriptFlagValue();  	debugInterpreter("O_SHOWDIALOGBOX box %d", box); +	_vm->createDialogBox(_vm->_dialogBoxList[box]);  }  void Interpreter::O_STOPSAMPLE() { | 
