| 20 | |
| 21 | |
| 22 | void RarVM::Execute(VM_PreparedProgram *Prg) |
| 23 | { |
| 24 | memcpy(R,Prg->InitR,sizeof(Prg->InitR)); |
| 25 | Prg->FilteredData=NULL; |
| 26 | if (Prg->Type!=VMSF_NONE) |
| 27 | { |
| 28 | bool Success=ExecuteStandardFilter(Prg->Type); |
| 29 | uint BlockSize=Prg->InitR[4] & VM_MEMMASK; |
| 30 | Prg->FilteredDataSize=BlockSize; |
| 31 | if (Prg->Type==VMSF_DELTA || Prg->Type==VMSF_RGB || Prg->Type==VMSF_AUDIO) |
| 32 | Prg->FilteredData=2*BlockSize>VM_MEMSIZE || !Success ? Mem:Mem+BlockSize; |
| 33 | else |
| 34 | Prg->FilteredData=Mem; |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | |
| 39 | void RarVM::Prepare(byte *Code,uint CodeSize,VM_PreparedProgram *Prg) |