NSView: Document our header a bit more.
This commit is contained in:
parent
caefb77078
commit
6ce1961792
2 changed files with 45 additions and 8 deletions
|
@ -1,3 +1,19 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Vera Visions LLC.
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
* copyright notice and this permission notice appear in all copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
/* The job of a NSView is to contain a single player seat.
|
/* The job of a NSView is to contain a single player seat.
|
||||||
Boxing is important for splitscreen etc. play.
|
Boxing is important for splitscreen etc. play.
|
||||||
|
|
||||||
|
@ -34,16 +50,24 @@ NSView
|
||||||
|
|
||||||
void(void) NSView;
|
void(void) NSView;
|
||||||
|
|
||||||
|
/* the only method we we want to call setproperty() */
|
||||||
virtual void(void) SetupView;
|
virtual void(void) SetupView;
|
||||||
|
/* only does one thing: renderscene() */
|
||||||
virtual void(void) RenderView;
|
virtual void(void) RenderView;
|
||||||
|
|
||||||
virtual void(viewmode_e) SetViewMode;
|
/* when called, will modify 'origin' to vertically smoothed when on ground */
|
||||||
virtual viewmode_e(void) GetViewMode;
|
|
||||||
virtual void(void) StairSmooth;
|
virtual void(void) StairSmooth;
|
||||||
|
|
||||||
|
/* applies an punch to our camera angle, temporarily */
|
||||||
virtual void(vector) AddPunchAngle;
|
virtual void(vector) AddPunchAngle;
|
||||||
|
|
||||||
|
/* called every CSQC_UpdateView for each player */
|
||||||
virtual void(void) UpdateView;
|
virtual void(void) UpdateView;
|
||||||
|
|
||||||
|
/* set/get */
|
||||||
|
virtual void(viewmode_e) SetViewMode;
|
||||||
|
virtual viewmode_e(void) GetViewMode;
|
||||||
|
|
||||||
virtual void(vector) SetViewPosition;
|
virtual void(vector) SetViewPosition;
|
||||||
virtual void(vector) SetViewSize;
|
virtual void(vector) SetViewSize;
|
||||||
virtual void(NSEntity) SetViewTarget;
|
virtual void(NSEntity) SetViewTarget;
|
||||||
|
@ -64,5 +88,8 @@ NSView
|
||||||
virtual vector(void) GetCameraAngle;
|
virtual vector(void) GetCameraAngle;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* one NSView for each seat */
|
||||||
NSView g_viewSeats[4];
|
NSView g_viewSeats[4];
|
||||||
|
|
||||||
|
/* the current seat run for each draw call, for each player. always use talk to this! */
|
||||||
NSView g_view;
|
NSView g_view;
|
|
@ -1,3 +1,19 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2022 Vera Visions LLC.
|
||||||
|
*
|
||||||
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
|
* purpose with or without fee is hereby granted, provided that the above
|
||||||
|
* copyright notice and this permission notice appear in all copies.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
|
||||||
|
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
NSView::SetupView(void)
|
NSView::SetupView(void)
|
||||||
{
|
{
|
||||||
|
@ -174,12 +190,6 @@ NSView::AddPunchAngle(vector vecAdd)
|
||||||
void View_PreDraw();
|
void View_PreDraw();
|
||||||
void View_PostDraw();
|
void View_PostDraw();
|
||||||
void View_DrawViewModel();
|
void View_DrawViewModel();
|
||||||
void Chat_Draw();
|
|
||||||
void Print_Draw();
|
|
||||||
void GameText_Draw();
|
|
||||||
void Voice_DrawHUD();
|
|
||||||
void Print_DrawCenterprint();
|
|
||||||
int VGUI_Draw();
|
|
||||||
|
|
||||||
void
|
void
|
||||||
NSView::UpdateView(void)
|
NSView::UpdateView(void)
|
||||||
|
|
Loading…
Reference in a new issue