Ejemplo n.º 1
0
        internal EclOpp[] LoadEclOpps(int numberOfSets)
        {
            int strIndex = 0;

            List <EclOpp> opps = new List <EclOpp>();

            for (int loop_var = 1; loop_var <= numberOfSets; loop_var++)
            {
                byte code = ecl_ptr[MemBase + ecl_offset + 1];
                byte low  = ecl_ptr[MemBase + ecl_offset + 2];

                EclOpp curOpp = new EclOpp(code, low, this);

                ecl_offset += 2;

                if (code == 1 || code == 2 || code == 3)
                {
                    ecl_offset++;
                    byte high = ecl_ptr[MemBase + ecl_offset];

                    curOpp.SetHigh(high);
                }
                else if (code == 0x80) // Load compressed string
                {
                    strIndex++;

                    short strLen = low;

                    if (strLen > 0)
                    {
                        LoadCompressedEclString(strIndex, strLen);
                    }
                    else
                    {
                        stringTable[strIndex] = string.Empty;
                    }
                }
                else if (code == 0x81)
                {
                    strIndex++;
                    ecl_offset++;
                    byte high = ecl_ptr[MemBase + ecl_offset];

                    curOpp.SetHigh(high);

                    ushort loc = curOpp.Word;

                    stringTable[strIndex] = CopyStringFromMemory(loc);
                }
                else
                {
                }

                opps.Add(curOpp);
            }
            ecl_offset++;

            return(opps.ToArray());
        }
Ejemplo n.º 2
0
        internal EclOpp[] LoadEclOpps(int numberOfSets)
        {
            int strIndex = 0;

            List<EclOpp> opps = new List<EclOpp>();

            for (int loop_var = 1; loop_var <= numberOfSets; loop_var++)
            {
				byte code = ecl_ptr[MemBase + ecl_offset + 1];
				byte low = ecl_ptr[MemBase + ecl_offset + 2];

                EclOpp curOpp = new EclOpp(code, low, this);

                ecl_offset += 2;

                if (code == 1 || code == 2 || code == 3)
                {
                    ecl_offset++;
					byte high = ecl_ptr[MemBase + ecl_offset];

                    curOpp.SetHigh(high);
                }
                else if (code == 0x80) // Load compressed string
                {
                    strIndex++;

                    short strLen = low;

                    if (strLen > 0)
                    {
                        LoadCompressedEclString(strIndex, strLen);
                    }
                    else
                    {
                        stringTable[strIndex] = string.Empty;
                    }
                }
                else if (code == 0x81)
                {
                    strIndex++;
                    ecl_offset++;
					byte high = ecl_ptr[MemBase + ecl_offset];

                    curOpp.SetHigh(high);

                    ushort loc = curOpp.Word;

                    stringTable[strIndex] = CopyStringFromMemory(loc);
                }
                else
                {
                }

                opps.Add(curOpp);
            }
            ecl_offset++;

            return opps.ToArray();
        }