Skip to content

Conversation

@j-lag
Copy link
Contributor

@j-lag j-lag commented Mar 23, 2023

Add a white border around image to be compatible with "Sinden-like" video based lightgun.
Activate with "-draw-white-border" command line option.
Merged with new Crosshair code.

j-lag and others added 16 commits March 2, 2023 14:01
This is usefull for multiple instance of supermodel networked on the same machine.
-pos=<x>,<y>            Position [Default: centered]
-borderless             Windowed mode with no border

These 2 settings are usefull when setting up a multiplayer game on one machine.

Example for 4 windows in fullHD:

start "Master" /D"Master_P4" Supermodel.exe -input-system=sdl ..\ROMS\dayto2pe.zip -res=960,540 -borderless -pos=0,0
start "Slave1" /D"Slave1_P4" Supermodel.exe -input-system=sdl ..\ROMS\dayto2pe.zip -res=960,540 -borderless -pos=960,0
start "Slave2" /D"Slave2_P4" Supermodel.exe -input-system=sdl ..\ROMS\dayto2pe.zip -res=960,540 -borderless -pos=0,540
start "Slave3" /D"Slave3_P4" Supermodel.exe -input-system=sdl ..\ROMS\dayto2pe.zip -res=960,540 -borderless -pos=960,540
…into sinden-lightgun

REsolved Conflicts:
	Src/OSD/SDL/Main.cpp
…into sinden-lightgun

Rsolved Conflicts:
	Src/OSD/SDL/Crosshair.cpp
	Src/OSD/SDL/Crosshair.h
Copy link
Owner

@trzy trzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am at GDC so I have not yet tested and will test Sunday or Monday when I return home. In the meantime, these are just simple cosmetic changes I easily identified. Also, please update Rules.inc to include WhiteBorder for gcc builds.

: m_config(config)
{
m_vertexShader = nullptr;
m_fragmentShader = nullptr;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why were these moved?


//if we want to draw a white border, we have also to put a black border around it so we are sure lightgun will find it...
if (s_whiteBorder->IsEnabled())
{
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blackborder -> blackBorder

#include "Supermodel.h"
#include "Graphics/New3D/New3D.h"
#include "Inputs/Inputs.h"
#include "basicDrawable.h"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basicDrawable.h should be named BasicDrawable.h. Also please use full path (OSD/SDL/BasicDrawable.h)

CWhiteBorder::CWhiteBorder(const Util::Config::Node& config) : m_config(config)
{
m_drawWhiteBorder = m_config["DrawWhiteBorder"].ValueAs<bool>();
m_vertexShader = nullptr;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of these should probably just be moved up into the initializer list.

#include "Supermodel.h"
#include "Graphics/New3D/New3D.h"
#include "Inputs/Inputs.h"
#include "basicDrawable.h"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OSD/SDL/BasicDrawable.h


void GenQuad(std::vector<CBasicDrawable::BasicVertex>& verts, unsigned int x, unsigned int y, unsigned int w, unsigned int h);
public:
CWhiteBorder(const Util::Config::Node& config);
Copy link
Owner

@trzy trzy Mar 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blank line before public, please.

@trzy
Copy link
Owner

trzy commented Mar 22, 2024

Is this still requested? If so, please resolve conflicts or will close it out without merging next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants