Remove extern global variable from bios_disk.h
This way interface of swapInDisks function is cleaner and we avoid a warning when comparing (previously) signed swap position with an unsigned array size or index. Also, add some documentation to swapInDisks function.
This commit is contained in:
		
							parent
							
								
									8f81eb199a
								
							
						
					
					
						commit
						c81269eebe
					
				
					 3 changed files with 21 additions and 12 deletions
				
			
		| 
						 | 
				
			
			@ -84,12 +84,22 @@ void incrementFDD(void);
 | 
			
		|||
extern std::array<std::shared_ptr<imageDisk>, MAX_DISK_IMAGES> imageDiskList;
 | 
			
		||||
extern std::array<std::shared_ptr<imageDisk>, MAX_SWAPPABLE_DISKS> diskSwap;
 | 
			
		||||
 | 
			
		||||
extern Bit32s swapPosition;
 | 
			
		||||
extern Bit16u imgDTASeg; /* Real memory location of temporary DTA pointer for fat image disk access */
 | 
			
		||||
extern RealPt imgDTAPtr; /* Real memory location of temporary DTA pointer for fat image disk access */
 | 
			
		||||
extern DOS_DTA *imgDTA;
 | 
			
		||||
 | 
			
		||||
void swapInDisks(void);
 | 
			
		||||
/**
 | 
			
		||||
 * Insert 2 boot disks starting at swap_position into the drives A and B.
 | 
			
		||||
 *
 | 
			
		||||
 * Selected disks are wrapped around, so swapping in the last boot disk
 | 
			
		||||
 * will place the first disk into drive B.
 | 
			
		||||
 *
 | 
			
		||||
 * When there's only 1 disk, it will be placed into both A and B drives.
 | 
			
		||||
 *
 | 
			
		||||
 * When there's no boot disks loaded, this function has no effect.
 | 
			
		||||
 */
 | 
			
		||||
void swapInDisks(unsigned int swap_position);
 | 
			
		||||
 | 
			
		||||
void swapInNextDisk(void);
 | 
			
		||||
bool getSwapRequest(void);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue