Author Topic: Having an image display when the romname containts something  (Read 162 times)

BadFurDay

  • Full Member
  • ***
  • Posts: 63
    • View Profile
Having an image display when the romname containts something
« on: August 02, 2017, 07:22:19 AM »
Hi people,

Been trying to suss this out myself but only seem to be able to do this if it matches the words exactly.  Basically I have the Amiga WHDLoad collection on my pi, I'd like an AGA logo I have to pop up every time I'm on an AGA based game.  I have hidden the brackets in the general menu as this makes things look tidier so this logo will help to distinguish between games that have both ECS and AGA versions.  For example the filenames are "James Pond 2" for ECS then "James Pond 2 [AGA]" so if the code could be activating the logo when a romname or title containts [AGA] this would be perfect.

Any help is appreciated.

qqplayer

  • Sr. Member
  • ****
  • Posts: 140
    • View Profile
Re: Having an image display when the romname containts something
« Reply #1 on: August 02, 2017, 09:12:55 AM »
Try this:

http://forum.attractmode.org/index.php?topic=1740.msg12369#msg12369

Look to my post:

Quote
UPDATE:

I found an issue in the code "magic-images.nut" ...

So , you have to edit the file to something like:

Code: [Select]
local tags = fe.game_info(Info.Name, offset).tolower()
Code: [Select]
//return file_name for region
function region( offset ) {
   local supported = [ "aga", "cd32" ... ]

BadFurDay

  • Full Member
  • ***
  • Posts: 63
    • View Profile
Re: Having an image display when the romname containts something
« Reply #2 on: August 02, 2017, 03:08:45 PM »
Try this:

http://forum.attractmode.org/index.php?topic=1740.msg12369#msg12369

Look to my post:

Quote
UPDATE:

I found an issue in the code "magic-images.nut" ...

So , you have to edit the file to something like:

Code: [Select]
local tags = fe.game_info(Info.Name, offset).tolower()
Code: [Select]
//return file_name for region
function region( offset ) {
   local supported = [ "aga", "cd32" ... ]

Thanks for you help. That has worked but it has one draw back, any games with aga anywhere in he name is making the icon appear. I tried to use "[AGA]" instead but then it stops working, any ideas how to fix this?

BadFurDay

  • Full Member
  • ***
  • Posts: 63
    • View Profile
Re: Having an image display when the romname containts something
« Reply #3 on: August 02, 2017, 03:20:15 PM »
Sussed it, it doesn't like capitals. I used [aga] and renamed the .png to match and it works a treat. Thanks again.