1
AGI Syntax Help / Re: 1400 pictures?
« on: December 03, 2023, 09:56:20 PM »
If it's just pictures, I think I could create a Power Pack function to allow more than 256. The directory would be the trickiest part- you'd need another DIR file with a custom format. Repurposing VIEWDIR might be an option, if views aren't being used - you could easily double the number of views to 512.
Or (more preferable to me) embed the DIR information in a normal resource. That'd make it easier to allow greater than 512 pictures. Picture 0 is perfect for this, as it's rarely used in games.
For resources other than pictures (I'm looking at you, logics), I'm not sure there's an easy answer - AGI just isn't built to support more than 256 resources because they use byte values for resource numbers. (Pictures are the exception, because nothing else interacts with them, so custom functions would be relatively easy to write.)
You could allow for more than 255 rooms relatively easily using standard AGI code. Use a variable to track a 'page' value; each page can then hold 255 rooms. When a new room is loaded, use the page number and currentRoom number to run the correct code. Depending on complexity of code, you might still be limited, trying to fit enough code for multiple pages into each logic.
The priority screen option wouldn't really work, because when it's shown, the interpreter pauses the game. Without a hack of some kind, you couldn't interact with the priority screen.
Or (more preferable to me) embed the DIR information in a normal resource. That'd make it easier to allow greater than 512 pictures. Picture 0 is perfect for this, as it's rarely used in games.
For resources other than pictures (I'm looking at you, logics), I'm not sure there's an easy answer - AGI just isn't built to support more than 256 resources because they use byte values for resource numbers. (Pictures are the exception, because nothing else interacts with them, so custom functions would be relatively easy to write.)
You could allow for more than 255 rooms relatively easily using standard AGI code. Use a variable to track a 'page' value; each page can then hold 255 rooms. When a new room is loaded, use the page number and currentRoom number to run the correct code. Depending on complexity of code, you might still be limited, trying to fit enough code for multiple pages into each logic.
The priority screen option wouldn't really work, because when it's shown, the interpreter pauses the game. Without a hack of some kind, you couldn't interact with the priority screen.