mirror of
https://github.com/ksherlock/mpw.git
synced 2024-11-24 13:32:39 +00:00
RM::Count1Types, RM::Get1IndType
This commit is contained in:
parent
b61d082497
commit
0d24388f98
@ -7,7 +7,7 @@
|
||||
- SCpp works, MrC and MrCpp does not currently work
|
||||
|
||||
* DumpCode utility now supported
|
||||
- added HGetState, GetResInfo, LoadResource toolbox calls
|
||||
- added HGetState, GetResInfo, LoadResource, Count1Types, Get1IndType toolbox calls
|
||||
|
||||
|
||||
* Pathname conversion enhancements:
|
||||
|
@ -964,4 +964,39 @@ namespace RM
|
||||
return SetResError(::ResError());
|
||||
}
|
||||
|
||||
uint16_t Count1Types(uint16_t trap)
|
||||
{
|
||||
// FUNCTION Count1Types: Integer;
|
||||
|
||||
uint16_t count;
|
||||
|
||||
Log("%04x Count1Types\n", trap);
|
||||
|
||||
count = ::Count1Types();
|
||||
|
||||
ToolReturn<2>(-1, count);
|
||||
|
||||
return SetResError(::ResError());
|
||||
}
|
||||
|
||||
|
||||
uint16_t Get1IndType(uint16_t trap)
|
||||
{
|
||||
// PROCEDURE Get1IndType (VAR theType: ResType; index: Integer);
|
||||
|
||||
uint32_t theType;
|
||||
uint16_t index;
|
||||
|
||||
StackFrame<6>(theType, index);
|
||||
|
||||
Log("%04x Get1IndType(%08x, %04x)\n", trap, theType, index);
|
||||
|
||||
ResType nativeType = 0;
|
||||
|
||||
::Get1IndType(&nativeType, index);
|
||||
|
||||
memoryWriteLong(nativeType, theType);
|
||||
|
||||
return SetResError(::ResError());
|
||||
}
|
||||
}
|
||||
|
@ -52,6 +52,8 @@ namespace RM
|
||||
uint16_t LoadResource(uint16_t trap);
|
||||
|
||||
uint16_t HomeResFile(uint16_t trap);
|
||||
uint16_t Count1Types(uint16_t trap);
|
||||
uint16_t Get1IndType(uint16_t trap);
|
||||
|
||||
}
|
||||
|
||||
|
@ -324,6 +324,14 @@ namespace ToolBox {
|
||||
d0 = RM::Get1IndResource(trap);
|
||||
break;
|
||||
|
||||
case 0xa80f:
|
||||
d0 = RM::Get1IndType(trap);
|
||||
break;
|
||||
|
||||
case 0xa81c:
|
||||
d0 = RM::Count1Types(trap);
|
||||
break;
|
||||
|
||||
// Get1Resource (theType: ResType; thelD: INTEGER) : Handle;
|
||||
case 0xa81f:
|
||||
d0 = RM::Get1Resource(trap);
|
||||
|
Loading…
Reference in New Issue
Block a user