NSView: Document our header a bit more.

This commit is contained in:
Marco Cawthorne 2022-08-03 18:41:11 -07:00
parent caefb77078
commit 6ce1961792
Signed by: eukara
GPG key ID: CE2032F0A2882A22
2 changed files with 45 additions and 8 deletions

View file

@ -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.
Boxing is important for splitscreen etc. play.
@ -34,16 +50,24 @@ NSView
void(void) NSView;
/* the only method we we want to call setproperty() */
virtual void(void) SetupView;
/* only does one thing: renderscene() */
virtual void(void) RenderView;
virtual void(viewmode_e) SetViewMode;
virtual viewmode_e(void) GetViewMode;
/* when called, will modify 'origin' to vertically smoothed when on ground */
virtual void(void) StairSmooth;
/* applies an punch to our camera angle, temporarily */
virtual void(vector) AddPunchAngle;
/* called every CSQC_UpdateView for each player */
virtual void(void) UpdateView;
/* set/get */
virtual void(viewmode_e) SetViewMode;
virtual viewmode_e(void) GetViewMode;
virtual void(vector) SetViewPosition;
virtual void(vector) SetViewSize;
virtual void(NSEntity) SetViewTarget;
@ -64,5 +88,8 @@ NSView
virtual vector(void) GetCameraAngle;
};
/* one NSView for each seat */
NSView g_viewSeats[4];
/* the current seat run for each draw call, for each player. always use talk to this! */
NSView g_view;

View file

@ -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
NSView::SetupView(void)
{
@ -174,12 +190,6 @@ NSView::AddPunchAngle(vector vecAdd)
void View_PreDraw();
void View_PostDraw();
void View_DrawViewModel();
void Chat_Draw();
void Print_Draw();
void GameText_Draw();
void Voice_DrawHUD();
void Print_DrawCenterprint();
int VGUI_Draw();
void
NSView::UpdateView(void)