Minor clean up, HE games should always copy strings directly.
svn-id: r17838
This commit is contained in:
parent
f6971f847c
commit
f5189c323b
5 changed files with 11 additions and 11 deletions
|
@ -836,7 +836,7 @@ protected:
|
|||
|
||||
/* HE version 72 script opcodes */
|
||||
void o72_pushDWord();
|
||||
void o72_addMessageToStack();
|
||||
void o72_getScriptString();
|
||||
void o72_isAnyOf();
|
||||
void o72_resetCutscene();
|
||||
void o72_findObjectWithClassOf();
|
||||
|
|
|
@ -159,7 +159,7 @@ void ScummEngine_v100he::setupOpcodes() {
|
|||
/* 5C */
|
||||
OPCODE(o6_pushByte),
|
||||
OPCODE(o72_pushDWord),
|
||||
OPCODE(o72_addMessageToStack),
|
||||
OPCODE(o72_getScriptString),
|
||||
OPCODE(o6_pushWord),
|
||||
/* 60 */
|
||||
OPCODE(o6_pushWordVar),
|
||||
|
@ -487,7 +487,7 @@ void ScummEngine_v100he::o100_actorOps() {
|
|||
int slot = pop();
|
||||
|
||||
int len = resStrLen(string) + 1;
|
||||
addMessageToStack(string, a->_heTalkQueue[slot].sentence, len);
|
||||
memcpy(a->_heTalkQueue[slot].sentence, string, len);
|
||||
|
||||
a->_heTalkQueue[slot].posX = a->_talkPosX;
|
||||
a->_heTalkQueue[slot].posY = a->_talkPosY;
|
||||
|
|
|
@ -49,7 +49,7 @@ void ScummEngine_v72he::setupOpcodes() {
|
|||
OPCODE(o72_pushDWord),
|
||||
OPCODE(o6_pushWordVar),
|
||||
/* 04 */
|
||||
OPCODE(o72_addMessageToStack),
|
||||
OPCODE(o72_getScriptString),
|
||||
OPCODE(o6_invalid),
|
||||
OPCODE(o6_invalid),
|
||||
OPCODE(o6_wordArrayRead),
|
||||
|
@ -610,9 +610,9 @@ void ScummEngine_v72he::decodeScriptString(byte *dst, bool scriptString) {
|
|||
|
||||
// Get string
|
||||
if (scriptString) {
|
||||
addMessageToStack(_scriptPointer, string, sizeof(string));
|
||||
len = resStrLen(_scriptPointer);
|
||||
_scriptPointer += len + 1;
|
||||
len = resStrLen(_scriptPointer) + 1;
|
||||
memcpy(string, _scriptPointer, len);
|
||||
_scriptPointer += len;
|
||||
} else {
|
||||
copyScriptString(string, sizeof(string));
|
||||
len = resStrLen(string) + 1;
|
||||
|
@ -776,7 +776,7 @@ void ScummEngine_v72he::o72_pushDWord() {
|
|||
push(a);
|
||||
}
|
||||
|
||||
void ScummEngine_v72he::o72_addMessageToStack() {
|
||||
void ScummEngine_v72he::o72_getScriptString() {
|
||||
byte chr;
|
||||
|
||||
while ((chr = fetchScriptByte()) != 0) {
|
||||
|
@ -1305,7 +1305,7 @@ void ScummEngine_v72he::o72_actorOps() {
|
|||
int slot = pop();
|
||||
|
||||
int len = resStrLen(string) + 1;
|
||||
addMessageToStack(string, a->_heTalkQueue[slot].sentence, len);
|
||||
memcpy(a->_heTalkQueue[slot].sentence, string, len);
|
||||
|
||||
a->_heTalkQueue[slot].posX = a->_talkPosX;
|
||||
a->_heTalkQueue[slot].posY = a->_talkPosY;
|
||||
|
|
|
@ -49,7 +49,7 @@ void ScummEngine_v80he::setupOpcodes() {
|
|||
OPCODE(o72_pushDWord),
|
||||
OPCODE(o6_pushWordVar),
|
||||
/* 04 */
|
||||
OPCODE(o72_addMessageToStack),
|
||||
OPCODE(o72_getScriptString),
|
||||
OPCODE(o6_invalid),
|
||||
OPCODE(o6_invalid),
|
||||
OPCODE(o6_wordArrayRead),
|
||||
|
|
|
@ -47,7 +47,7 @@ void ScummEngine_v90he::setupOpcodes() {
|
|||
OPCODE(o72_pushDWord),
|
||||
OPCODE(o6_pushWordVar),
|
||||
/* 04 */
|
||||
OPCODE(o72_addMessageToStack),
|
||||
OPCODE(o72_getScriptString),
|
||||
OPCODE(o6_invalid),
|
||||
OPCODE(o6_invalid),
|
||||
OPCODE(o6_wordArrayRead),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue