Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sinden lightgun #69

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open

Sinden lightgun #69

wants to merge 16 commits into from

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_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

@@ -25,8 +25,9 @@
#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.

None yet

2 participants