mirror of
				https://github.com/coop-deluxe/sm64coopdx.git
				synced 2025-10-30 08:01:01 +00:00 
			
		
		
		
	Merge in small changes. (#63)
This commit is contained in:
		
							parent
							
								
									a31ddaff9d
								
							
						
					
					
						commit
						f51f1d6c4a
					
				
					 8 changed files with 24 additions and 16 deletions
				
			
		|  | @ -618,6 +618,14 @@ void Print(const char *aFmt, Args... aArgs) { | |||
|     aGfxData->mErrorCount++; \ | ||||
| } | ||||
| 
 | ||||
| #if DEBUG | ||||
| #define PrintDebug(...) { Print(__VA_ARGS__); } | ||||
| #define PrintDebugNoNewLine(...) { PrintNoNewLine(__VA_ARGS__); } | ||||
| #else | ||||
| #define PrintDebug(...) | ||||
| #define PrintDebugNoNewLine(...) | ||||
| #endif | ||||
| 
 | ||||
| template <typename... Args> | ||||
| SysPath fstring(const char *aFmt, Args... aArgs) { | ||||
|     char buffer[1024]; | ||||
|  |  | |||
|  | @ -159,4 +159,4 @@ void DynOS_Tex_Load(FILE *aFile, GfxData *aGfxData) { | |||
| 
 | ||||
|     // Append
 | ||||
|     aGfxData->mTextures.Add(_Node); | ||||
| } | ||||
| } | ||||
|  | @ -23,12 +23,14 @@ void DynOS_Actor_AddCustom(const SysPath &aFilename, const char *aActorName) { | |||
| 
 | ||||
|     GfxData *_GfxData = DynOS_Actor_LoadFromBinary(aFilename, actorName, aFilename); | ||||
|     if (!_GfxData) { | ||||
|         Print("  ERROR: Couldn't load Actor Binary \"%s\" from \"%s\"", actorName, aPackFolder.c_str()); | ||||
|         free(actorName); | ||||
|         return; | ||||
|     } | ||||
| 
 | ||||
|     void* geoLayout = (*(_GfxData->mGeoLayouts.end() - 1))->mData; | ||||
|     if (!geoLayout) { | ||||
|         Print("  ERROR: Couldn't load geo layout for \"%s\"", actorName); | ||||
|         free(actorName); | ||||
|         return; | ||||
|     } | ||||
|  |  | |||
|  | @ -136,8 +136,9 @@ static void _RelocateGraphNodePointers(struct GraphNode *aHead, u64 aOffset) { | |||
|     } while (_Node != aHead); | ||||
| } | ||||
| 
 | ||||
| static Array<Pair<void *, void *>> sLoadedGraphNodes = {}; | ||||
| 
 | ||||
| void *DynOS_Geo_GetGraphNode(const void *aGeoLayout, bool aKeepInMemory) { | ||||
|     static Array<Pair<void *, void *>> sLoadedGraphNodes; | ||||
|     if (aKeepInMemory) { | ||||
|         s32 _LoadedGraphNodeIndex = sLoadedGraphNodes.FindIf([&aGeoLayout](const Pair<void *, void *> &aLoadedGraphNode) { return aLoadedGraphNode.first == aGeoLayout; }); | ||||
|         if (_LoadedGraphNodeIndex != -1) { | ||||
|  |  | |||
|  | @ -76,8 +76,7 @@ typedef struct { | |||
| 
 | ||||
| /* Functions */ | ||||
| 
 | ||||
| s32 osPiStartDma(OSIoMesg *mb, s32 priority, s32 direction, uintptr_t devAddr, void *vAddr, | ||||
|                  size_t nbytes, OSMesgQueue *mq); | ||||
| s32 osPiStartDma(OSIoMesg *mb, s32 priority, s32 direction, uintptr_t devAddr, void *vAddr, size_t nbytes, OSMesgQueue *mq); | ||||
| void osCreatePiManager(OSPri pri, OSMesgQueue *cmdQ, OSMesg *cmdBuf, s32 cmdMsgCnt); | ||||
| OSMesgQueue *osPiGetCmdQueue(void); | ||||
| s32 osPiWriteIo(uintptr_t devAddr, u32 data); | ||||
|  |  | |||
|  | @ -665,8 +665,7 @@ extern s32        osPiRawReadIo(u32, u32 *); | |||
| extern s32        osPiRawStartDma(s32, u32, void *, u32); | ||||
| extern s32        osPiWriteIo(u32, u32); | ||||
| extern s32        osPiReadIo(u32, u32 *); | ||||
| extern s32        osPiStartDma(OSIoMesg *, s32, s32, u32, void *, u32, | ||||
|                      OSMesgQueue *); | ||||
| extern s32        osPiStartDma(OSIoMesg *, s32, s32, u32, void *, u32, OSMesgQueue *); | ||||
| extern void        osCreatePiManager(OSPri, OSMesgQueue *, OSMesg *, s32); | ||||
| 
 | ||||
| /* Video interface (Vi) */ | ||||
|  |  | |||
|  | @ -28,17 +28,17 @@ s8 gReverbDownsampleRate; | |||
| u8 sReverbDownsampleRateLog; // never read
 | ||||
| #endif | ||||
| 
 | ||||
| struct SoundAllocPool gAudioSessionPool; | ||||
| struct SoundAllocPool gAudioInitPool; | ||||
| struct SoundAllocPool gNotesAndBuffersPool; | ||||
| struct SoundAllocPool gAudioSessionPool = {}; | ||||
| struct SoundAllocPool gAudioInitPool = {}; | ||||
| struct SoundAllocPool gNotesAndBuffersPool = {}; | ||||
| u8 sAudioHeapPad[0x20]; // probably two unused pools
 | ||||
| struct SoundAllocPool gSeqAndBankPool; | ||||
| struct SoundAllocPool gPersistentCommonPool; | ||||
| struct SoundAllocPool gTemporaryCommonPool; | ||||
| struct SoundAllocPool gSeqAndBankPool = {}; | ||||
| struct SoundAllocPool gPersistentCommonPool = {}; | ||||
| struct SoundAllocPool gTemporaryCommonPool = {}; | ||||
| 
 | ||||
| struct SoundMultiPool gSeqLoadedPool; | ||||
| struct SoundMultiPool gBankLoadedPool; | ||||
| struct SoundMultiPool gUnusedLoadedPool; | ||||
| struct SoundMultiPool gSeqLoadedPool = {}; | ||||
| struct SoundMultiPool gBankLoadedPool = {}; | ||||
| struct SoundMultiPool gUnusedLoadedPool = {}; | ||||
| 
 | ||||
| #ifdef VERSION_SH | ||||
| struct Unk1Pool gUnkPool1; | ||||
|  |  | |||
|  | @ -18,7 +18,6 @@ u64 osClockRate = 62500000; | |||
| s32 osPiStartDma(UNUSED OSIoMesg *mb, UNUSED s32 priority, UNUSED s32 direction, | ||||
|                  uintptr_t devAddr, void *vAddr, size_t nbytes, | ||||
|                  UNUSED OSMesgQueue *mq) { | ||||
|     //printf("osPiStartDma: Copying %u bytes from %p to %p!\n", nbytes, (void *)devAddr, vAddr);
 | ||||
|     memcpy(vAddr, (const void *) devAddr, nbytes); | ||||
|     return 0; | ||||
| } | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Prince Frizzy
						Prince Frizzy