Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - steelepdx

Pages: [1]
1
General / Inserting a delay before "CRT glow" effect happens
« on: February 26, 2025, 08:23:56 PM »
I am using Yaron's most excellent "MS-DOS Vintage" (10.4) layout for my classic PC games. I am very inexperienced with Squirrel and how to achieve this. I want the CRT glow effect to basically wait until the game selection screen fades before the glow effect happens. As it stands now, the glow effect happens immediately in the game select screen, before it fades to the snap of the game (currently set to 1000ms). I'd like the CRT glow effect to fade in right as the snap is fading in. I have tried a couple of different things to no avail. Is there someone who can help me out? A minor detail, for sure, but I just thought I would ask. Here is the pertinent code for the glow effect in the layout.nut:

//////////////////////////////////////////////////////////////////////////////////////////////////
// Screen glow

if( my_config["enable_crt_glow"] == "Yes" && ShadersAvailable == 1 )
{
   local shadow_radius = 1600
   local shadow_xoffset = -75
   local shadow_yoffset = -50
   local shadow_alpha = 255
   local shadow_downsample = 0.018

   // creation of first surface with safeguards area
   local xsurf1 = fe.add_surface( shadow_downsample * (video.width + 2*shadow_radius), shadow_downsample * (video.height + 2*shadow_radius) )

   // add a clone of the picture to topmost surface
   local pic1 = xsurf1.add_clone(video)
   pic1.set_pos( shadow_radius*shadow_downsample, shadow_radius*shadow_downsample, video.width*shadow_downsample, video.height*shadow_downsample )

   // creation of second surface
   local xsurf2 = fe.add_surface( xsurf1.width, xsurf1.height )

   // nesting of surfaces
   xsurf1.visible = false
   xsurf1 = xsurf2.add_clone( xsurf1 )
   xsurf1.visible = true

   // deifine and apply blur shaders
   local blursizex = 1.0/xsurf2.width
   local blursizey = 1.0/xsurf2.height
   local kernelsize = shadow_downsample * (shadow_radius * 2) + 1
   local kernelsigma = shadow_downsample * shadow_radius * 0.3

   local shaderH1 = fe.add_shader( Shader.Fragment, fe.script_dir + "gauss_kernsigma_o.glsl" )
   shaderH1.set_texture_param("texture")
   shaderH1.set_param("kernelData", kernelsize, kernelsigma)
   shaderH1.set_param("offsetFactor", blursizex, 0.0)
   xsurf1.shader = shaderH1

   local shaderV1 = fe.add_shader( Shader.Fragment, fe.script_dir + "gauss_kernsigma_o.glsl" )
   shaderV1.set_texture_param("texture")
   shaderV1.set_param("kernelData", kernelsize, kernelsigma)
   shaderV1.set_param("offsetFactor", 0.0, blursizey)
   xsurf2.shader = shaderV1

   // apply black color and alpha channel to shadow
   pic1.alpha = shadow_alpha
   pic1.width = 21
   pic1.height = 16

   // reposition and upsample shadow surface stack
   xsurf2.set_pos( video.x-shadow_radius+shadow_xoffset, video.y-shadow_radius+shadow_yoffset, video.width + 2 * shadow_radius, video.height + 2 * shadow_radius )
}

2
General / Romlists and ESRB rating?
« on: February 24, 2025, 05:55:34 PM »
I've tried to find this information but cannot find anything. I have two questions:

1) How do you label the entry in the romlist (MAME, for example) so that a theme that is looking for this information will read it? It looks like the very last item in any entry in the romlist is defined as "rating", but no matter what I try in that spot (numeric, initial letters of the ratings, full text), my layout (Arcade Bliss Information Overload Edition) doesn't read the info (It is supposed to, I think).

2) Is there an "extras" file that has all of this information (similar to catver.ini) that I can point the MAME cfg file to read when building the romlist?

Thanks for any help you can offer.

Pages: [1]