Last change
on this file since 486 was 153, checked in by Nicholas Riley, 21 years ago |
Integrates SCPatch and mach_inject; unfinished, buggy.
|
File size:
935 bytes
|
Rev | Line | |
---|
[153] | 1 | #include "SCPatchPrivate.h"
|
---|
| 2 |
|
---|
| 3 | //-------------------------------------------------------------------------------------------------------------
|
---|
| 4 | char *SCPatchGetStringPointer(SCPatchLoaderParams *params, short patchNumber)
|
---|
| 5 | {
|
---|
| 6 | char *cp = params->patchData[0].urlData;
|
---|
| 7 | long ii;
|
---|
| 8 |
|
---|
| 9 | for(ii = 0; ii < patchNumber; ii++)
|
---|
| 10 | {
|
---|
| 11 | cp += strlen(cp) + 1 + ((long)params->patchData[0].urlData - (long)¶ms->patchData[0].bundleID);
|
---|
| 12 | }
|
---|
| 13 | return cp;
|
---|
| 14 | }
|
---|
| 15 |
|
---|
| 16 | //-------------------------------------------------------------------------------------------------------------
|
---|
| 17 | HFSUniStr255 *SCPatchGetHFSUniStrPointer(SCPatchLoaderParams *params, short patchNumber)
|
---|
| 18 | {
|
---|
| 19 | HFSUniStr255 *hp = ¶ms->patchData[0].bundleID;
|
---|
| 20 | long ii;
|
---|
| 21 |
|
---|
| 22 | for(ii = 0; ii < patchNumber; ii++)
|
---|
| 23 | {
|
---|
| 24 | hp = (HFSUniStr255 *)((long)hp + ((long)params->patchData[0].urlData - (long)¶ms->patchData[0].bundleID));
|
---|
| 25 | hp = (HFSUniStr255 *)((long)hp + strlen((char *)hp) + 1);
|
---|
| 26 | }
|
---|
| 27 | return hp;
|
---|
| 28 | }
|
---|
| 29 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.