~ubuntu-branches/ubuntu/raring/scummvm/raring

« back to all changes in this revision

Viewing changes to engines/sci/engine/kernel.cpp

  • Committer: Package Import Robot
  • Author(s): Moritz Muehlenhoff
  • Date: 2012-01-14 11:39:15 UTC
  • mfrom: (21.1.5 sid)
  • Revision ID: package-import@ubuntu.com-20120114113915-hy9kyzbyncrqen3y
Tags: 1.4.1-1
* New upstream release
* Install translations.dat into scummvm-data    

Show diffs side-by-side

added added

removed removed

Lines of Context:
914
914
// TODO: script_adjust_opcode_formats should probably be part of the
915
915
// constructor (?) of a VirtualMachine or a ScriptManager class.
916
916
void script_adjust_opcode_formats() {
 
917
 
 
918
        g_sci->_opcode_formats = new opcode_format[128][4];
 
919
        memcpy(g_sci->_opcode_formats, g_base_opcode_formats, 128*4*sizeof(opcode_format));
 
920
 
917
921
        if (g_sci->_features->detectLofsType() != SCI_VERSION_0_EARLY) {
918
 
                g_opcode_formats[op_lofsa][0] = Script_Offset;
919
 
                g_opcode_formats[op_lofss][0] = Script_Offset;
 
922
                g_sci->_opcode_formats[op_lofsa][0] = Script_Offset;
 
923
                g_sci->_opcode_formats[op_lofss][0] = Script_Offset;
920
924
        }
921
925
 
922
926
#ifdef ENABLE_SCI32
923
927
        // In SCI32, some arguments are now words instead of bytes
924
928
        if (getSciVersion() >= SCI_VERSION_2) {
925
 
                g_opcode_formats[op_calle][2] = Script_Word;
926
 
                g_opcode_formats[op_callk][1] = Script_Word;
927
 
                g_opcode_formats[op_super][1] = Script_Word;
928
 
                g_opcode_formats[op_send][0] = Script_Word;
929
 
                g_opcode_formats[op_self][0] = Script_Word;
930
 
                g_opcode_formats[op_call][1] = Script_Word;
931
 
                g_opcode_formats[op_callb][1] = Script_Word;
 
929
                g_sci->_opcode_formats[op_calle][2] = Script_Word;
 
930
                g_sci->_opcode_formats[op_callk][1] = Script_Word;
 
931
                g_sci->_opcode_formats[op_super][1] = Script_Word;
 
932
                g_sci->_opcode_formats[op_send][0] = Script_Word;
 
933
                g_sci->_opcode_formats[op_self][0] = Script_Word;
 
934
                g_sci->_opcode_formats[op_call][1] = Script_Word;
 
935
                g_sci->_opcode_formats[op_callb][1] = Script_Word;
932
936
        }
933
937
 
934
938
        if (getSciVersion() >= SCI_VERSION_3) {
935
939
                // TODO: There are also opcodes in
936
940
                // here to get the superclass, and possibly the species too.
937
 
                g_opcode_formats[0x4d/2][0] = Script_None;
938
 
                g_opcode_formats[0x4e/2][0] = Script_None;
 
941
                g_sci->_opcode_formats[0x4d/2][0] = Script_None;
 
942
                g_sci->_opcode_formats[0x4e/2][0] = Script_None;
939
943
        }
940
944
#endif
941
945
}