mirror of
https://github.com/electronicarts/CnC_Renegade.git
synced 2025-12-15 23:21:40 -05:00
Initial commit of Command & Conquer Renegade source code.
This commit is contained in:
388
Code/Tests/MeshTest/WINMAIN.CPP
Normal file
388
Code/Tests/MeshTest/WINMAIN.CPP
Normal file
@@ -0,0 +1,388 @@
|
||||
/*
|
||||
** Command & Conquer Renegade(tm)
|
||||
** Copyright 2025 Electronic Arts Inc.
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
** the Free Software Foundation, either version 3 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* $Header: /Commando/Code/Tests/MeshTest/WINMAIN.CPP 9 12/10/98 5:53p Greg_h $ */
|
||||
/***********************************************************************************************
|
||||
*** Confidential - Westwood Studios ***
|
||||
***********************************************************************************************
|
||||
* *
|
||||
* Project Name : Commando *
|
||||
* *
|
||||
* $Archive:: /Commando/Code/Tests/MeshTest/WINMAIN.CPP $*
|
||||
* *
|
||||
* $Author:: Greg_h $*
|
||||
* *
|
||||
* $Modtime:: 12/07/98 12:11p $*
|
||||
* *
|
||||
* $Revision:: 9 $*
|
||||
* *
|
||||
*---------------------------------------------------------------------------------------------*
|
||||
* Functions: *
|
||||
* WinMain -- Win32 Program Entry Point! *
|
||||
* WIN_resize -- Surrender-required function which resizes the main window *
|
||||
* WIN_set_fullscreen -- Surrender-required function for toggling full-screen mode *
|
||||
* Main_Window_Proc -- Windows Proc for the main game window *
|
||||
* Create_Main_Window -- Creates the main game window *
|
||||
* Focus_Loss -- this function is called when the application loses focus *
|
||||
* Focus_Restore -- This function is called when the application gets focus *
|
||||
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
|
||||
#define NOMINMAX
|
||||
|
||||
#include "winmain.h"
|
||||
#include <sr.hpp>
|
||||
#include "win.h"
|
||||
#include "wwmouse.h"
|
||||
#include "init.h"
|
||||
#include "mainloop.h"
|
||||
#include "shutdown.h"
|
||||
#include "_globals.h"
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Globals
|
||||
//----------------------------------------------------------------------------
|
||||
extern "C"
|
||||
{
|
||||
HWND hWndMain;
|
||||
bool WIN_fullscreen = true;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Local functions
|
||||
//----------------------------------------------------------------------------
|
||||
static BOOL Create_Main_Window(HANDLE hInstance, int nCmdShow);
|
||||
long FAR PASCAL Main_Window_Proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
void Focus_Loss(void);
|
||||
void Focus_Restore(void);
|
||||
void Split_Command_Line_Args(HINSTANCE instance, char *path_to_exe, char *command_line);
|
||||
void Set_Working_Directory(char *old_path, char *new_path);
|
||||
|
||||
|
||||
|
||||
/***********************************************************************************************
|
||||
* WinMain -- Win32 Program Entry Point! *
|
||||
* *
|
||||
* INPUT: *
|
||||
* *
|
||||
* Standard WinMain inputs :-) *
|
||||
* *
|
||||
* OUTPUT: *
|
||||
* *
|
||||
* Standard WinMain output *
|
||||
* *
|
||||
* WARNINGS: *
|
||||
* *
|
||||
* HISTORY: *
|
||||
* 07/18/1997 GH : Created. *
|
||||
*=============================================================================================*/
|
||||
int PASCAL WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow )
|
||||
{
|
||||
LPSTR command;
|
||||
HANDLE prev;
|
||||
char path_to_exe[_MAX_PATH];
|
||||
char oldpath[_MAX_PATH];
|
||||
|
||||
command = lpCmdLine;
|
||||
prev = hPrevInstance;
|
||||
|
||||
if (!Create_Main_Window(hInstance, nCmdShow)) return 0;
|
||||
|
||||
// Setup the keyboard system
|
||||
Keyboard = new WWKeyboardClass();
|
||||
|
||||
// Setup the mouse system and take over the mouse.
|
||||
MouseCursor = new WWMouseClass(NULL, MainWindow);
|
||||
|
||||
Split_Command_Line_Args(hInstance, &path_to_exe[0], lpCmdLine);
|
||||
Set_Working_Directory(oldpath, &path_to_exe[0]);
|
||||
|
||||
Init();
|
||||
|
||||
Main_Loop();
|
||||
|
||||
Shutdown();
|
||||
|
||||
delete Keyboard;
|
||||
delete MouseCursor;
|
||||
|
||||
return(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************************************
|
||||
* Main_Window_Proc -- Windows Proc for the main game window *
|
||||
* *
|
||||
* INPUT: *
|
||||
* *
|
||||
* Standard Windows Proc inputs *
|
||||
* *
|
||||
* OUTPUT: *
|
||||
* *
|
||||
* Standard Windows Proc output *
|
||||
* *
|
||||
* WARNINGS: *
|
||||
* *
|
||||
* HISTORY: *
|
||||
* 07/18/1997 GH : Created. *
|
||||
*=============================================================================================*/
|
||||
long FAR PASCAL Main_Window_Proc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam )
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
HDC hdc;
|
||||
|
||||
/*
|
||||
** Pass this message through to the keyboard handler. If the message
|
||||
** was processed and requires no further action, then return with
|
||||
** this information.
|
||||
*/
|
||||
if (Keyboard) {
|
||||
Keyboard->Message_Handler(hwnd, message, wParam, lParam);
|
||||
}
|
||||
|
||||
|
||||
switch (message )
|
||||
{
|
||||
/*
|
||||
** basic management messages
|
||||
*/
|
||||
case WM_ACTIVATEAPP:
|
||||
|
||||
if (WIN_fullscreen) {
|
||||
|
||||
GameInFocus = (wParam != 0);
|
||||
if (!GameInFocus) {
|
||||
Focus_Loss();
|
||||
} else {
|
||||
Focus_Restore();
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
GameInFocus = true;
|
||||
if (wParam != 0) {
|
||||
if (MouseCursor != NULL) MouseCursor->Capture_Mouse();
|
||||
} else {
|
||||
if (MouseCursor != NULL) MouseCursor->Release_Mouse();
|
||||
}
|
||||
|
||||
}
|
||||
return(0);
|
||||
|
||||
case WM_SETCURSOR:
|
||||
SetCursor(NULL);
|
||||
return 1;
|
||||
|
||||
case WM_ERASEBKGND:
|
||||
return 1;
|
||||
|
||||
case WM_PAINT:
|
||||
hdc = BeginPaint( hwnd, &ps);
|
||||
EndPaint( hwnd, &ps);
|
||||
return 1;
|
||||
|
||||
/*
|
||||
** minimize/maximize
|
||||
*/
|
||||
case WM_SYSKEYDOWN:
|
||||
|
||||
if (wParam == VK_RETURN && ((lParam>>16) & KF_ALTDOWN) && !((lParam>>16) & KF_REPEAT))
|
||||
{
|
||||
WIN_fullscreen = !WIN_fullscreen;
|
||||
}
|
||||
break;
|
||||
|
||||
/*
|
||||
** interface open and close
|
||||
*/
|
||||
case WM_CREATE:
|
||||
break;
|
||||
|
||||
case WM_DESTROY:
|
||||
ReleaseCapture();
|
||||
PostQuitMessage( 0);
|
||||
break;
|
||||
|
||||
case WM_SYSCOMMAND:
|
||||
switch (wParam) {
|
||||
|
||||
case SC_CLOSE:
|
||||
/*
|
||||
** Windows sent us a close message. Probably in response to Alt-F4. Ignore it by
|
||||
** pretending to handle the message and returning true;
|
||||
*/
|
||||
return (0);
|
||||
|
||||
case SC_SCREENSAVE:
|
||||
/*
|
||||
** Windoze is about to start the screen saver. If we just return without passing
|
||||
** this message to DefWindowProc then the screen saver will not be allowed to start.
|
||||
*/
|
||||
return (0);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return DefWindowProc(hwnd, message, wParam, lParam);
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************************************
|
||||
* Create_Main_Window -- Creates the main game window *
|
||||
* *
|
||||
* INPUT: *
|
||||
* *
|
||||
* hInstance -- Instance handle of the application *
|
||||
* nCmdShow -- how the window is to be shown *
|
||||
* *
|
||||
* OUTPUT: *
|
||||
* *
|
||||
* TRUE = success, FALSE = failure *
|
||||
* *
|
||||
* WARNINGS: *
|
||||
* *
|
||||
* HISTORY: *
|
||||
* 07/18/1997 GH : Created. *
|
||||
*=============================================================================================*/
|
||||
static BOOL Create_Main_Window(HANDLE hInstance, int nCmdShow)
|
||||
{
|
||||
WNDCLASS wc;
|
||||
BOOL rc;
|
||||
|
||||
ProgramInstance = (HINSTANCE)hInstance;
|
||||
|
||||
wc.style = CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS;
|
||||
wc.lpfnWndProc = Main_Window_Proc;
|
||||
wc.cbClsExtra = 0;
|
||||
wc.cbWndExtra = 0;
|
||||
wc.hInstance = (HINSTANCE)hInstance;
|
||||
wc.hIcon = LoadIcon( NULL, IDI_APPLICATION);
|
||||
wc.hCursor = LoadCursor( NULL, IDC_ARROW);
|
||||
wc.hbrBackground = (HBRUSH)GetStockObject( BLACK_BRUSH);
|
||||
wc.lpszMenuName = NULL;
|
||||
wc.lpszClassName = "SRCLASS";
|
||||
|
||||
rc = RegisterClass( &wc);
|
||||
if (!rc ) return FALSE;
|
||||
|
||||
MainWindow = hWndMain = CreateWindowEx(
|
||||
0, // WS_EX_TOPMOST,
|
||||
"SRClass",
|
||||
"Commando",
|
||||
WS_VISIBLE |
|
||||
WS_CAPTION |
|
||||
WS_BORDER |
|
||||
WS_SYSMENU |
|
||||
WS_MINIMIZEBOX |
|
||||
WS_MAXIMIZEBOX |
|
||||
WS_THICKFRAME,
|
||||
0, 0, // top left corner
|
||||
640,
|
||||
480,
|
||||
NULL, // no parent handle
|
||||
NULL, // no menu handle
|
||||
ProgramInstance, // main program instance
|
||||
NULL); // creation parameters
|
||||
|
||||
if (!MainWindow) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************************************
|
||||
* Focus_Loss -- this function is called when the application loses focus *
|
||||
* *
|
||||
* INPUT: Nothing *
|
||||
* *
|
||||
* OUTPUT: Nothing *
|
||||
* *
|
||||
* WARNINGS: None *
|
||||
* *
|
||||
* HISTORY: *
|
||||
* 07/18/1997 GH : Created. *
|
||||
*=============================================================================================*/
|
||||
void Focus_Loss(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/***********************************************************************************************
|
||||
* Focus_Restore -- This function is called when the application gets focus *
|
||||
* *
|
||||
* INPUT: Nothing *
|
||||
* *
|
||||
* OUTPUT: Nothing *
|
||||
* *
|
||||
* WARNINGS: None *
|
||||
* *
|
||||
* HISTORY: *
|
||||
* 07/18/1997 GH : Created. *
|
||||
*=============================================================================================*/
|
||||
void Focus_Restore(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void Prog_End(void)
|
||||
{
|
||||
// Sound_End();
|
||||
MouseCursor->Release_Mouse();
|
||||
delete MouseCursor;
|
||||
MouseCursor = NULL;
|
||||
}
|
||||
|
||||
|
||||
void Split_Command_Line_Args(HINSTANCE instance, char *path_to_exe, char *command_line)
|
||||
{
|
||||
// first arguement is the path to the executable including file name
|
||||
GetModuleFileName (instance, &path_to_exe[0], 132);
|
||||
Argv[0] = path_to_exe;
|
||||
|
||||
char * token = strtok(command_line, " ");
|
||||
Argc = 1;
|
||||
while (Argc < ARRAY_SIZE(Argv) && token != NULL) {
|
||||
Argv[Argc++] = token;
|
||||
token = strtok(NULL, " ");
|
||||
}
|
||||
}
|
||||
|
||||
void Set_Working_Directory(char *old_path, char *new_path)
|
||||
{
|
||||
char drive[_MAX_DRIVE];
|
||||
char path[_MAX_PATH];
|
||||
char dir[_MAX_DIR];
|
||||
/*
|
||||
** Remember the current working directory and drive.
|
||||
*/
|
||||
GetCurrentDirectory(_MAX_PATH, old_path);
|
||||
|
||||
/*
|
||||
** Change directory to the where the executable is located. Handle the
|
||||
** case where there is no path attached to argv[0].
|
||||
*/
|
||||
_splitpath(new_path, drive, dir, NULL, NULL);
|
||||
_makepath(path, drive, dir, NULL, NULL);
|
||||
SetCurrentDirectory(path);
|
||||
}
|
||||
|
||||
46
Code/Tests/MeshTest/WINMAIN.H
Normal file
46
Code/Tests/MeshTest/WINMAIN.H
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
** Command & Conquer Renegade(tm)
|
||||
** Copyright 2025 Electronic Arts Inc.
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
** the Free Software Foundation, either version 3 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef WINMAIN_H
|
||||
#define WINMAIN_H
|
||||
|
||||
#ifndef ALWAYS_H
|
||||
#include "always.h"
|
||||
#endif
|
||||
|
||||
#ifndef WIN_H
|
||||
#include "win.h"
|
||||
#endif
|
||||
|
||||
#include <sr.hpp>
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
extern HWND hWndMain;
|
||||
|
||||
extern bool WIN_fullscreen;
|
||||
|
||||
#ifdef PORT130
|
||||
SRBOOL SRCALL WIN_resize(SRLONG width, SRLONG height);
|
||||
SRBOOL SRCALL WIN_set_fullscreen(SRBOOL state);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
50
Code/Tests/MeshTest/_GLOBALS.CPP
Normal file
50
Code/Tests/MeshTest/_GLOBALS.CPP
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
** Command & Conquer Renegade(tm)
|
||||
** Copyright 2025 Electronic Arts Inc.
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
** the Free Software Foundation, either version 3 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* $Header: /Commando/Code/Tests/meshtest/_GLOBALS.CPP 4 11/06/97 8:01a Greg_h $ */
|
||||
/***********************************************************************************************
|
||||
*** Confidential - Westwood Studios ***
|
||||
***********************************************************************************************
|
||||
* *
|
||||
* Project Name : Commando *
|
||||
* *
|
||||
* $Archive:: /Commando/Code/Tests/meshtest/_GLOBALS.CPP $*
|
||||
* *
|
||||
* $Author:: Greg_h $*
|
||||
* *
|
||||
* $Modtime:: 10/31/97 9:22a $*
|
||||
* *
|
||||
* $Revision:: 4 $*
|
||||
* *
|
||||
*---------------------------------------------------------------------------------------------*
|
||||
* Functions: *
|
||||
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
|
||||
|
||||
#include "_globals.h"
|
||||
|
||||
bool GameInFocus;
|
||||
Mouse * MouseCursor = NULL;
|
||||
WWKeyboardClass * Keyboard = NULL;
|
||||
SystemTimerClass SystemTimer;
|
||||
|
||||
int Argc;
|
||||
char * Argv[20];
|
||||
|
||||
|
||||
|
||||
75
Code/Tests/MeshTest/_GLOBALS.H
Normal file
75
Code/Tests/MeshTest/_GLOBALS.H
Normal file
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
** Command & Conquer Renegade(tm)
|
||||
** Copyright 2025 Electronic Arts Inc.
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
** the Free Software Foundation, either version 3 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* $Header: /Commando/Code/Tests/MeshTest/_GLOBALS.H 5 5/01/98 11:04a Greg_h $ */
|
||||
/***********************************************************************************************
|
||||
*** Confidential - Westwood Studios ***
|
||||
***********************************************************************************************
|
||||
* *
|
||||
* Project Name : Commando *
|
||||
* *
|
||||
* $Archive:: /Commando/Code/Tests/MeshTest/_GLOBALS.H $*
|
||||
* *
|
||||
* $Author:: Greg_h $*
|
||||
* *
|
||||
* $Modtime:: 4/30/98 2:33p $*
|
||||
* *
|
||||
* $Revision:: 5 $*
|
||||
* *
|
||||
*---------------------------------------------------------------------------------------------*
|
||||
* Functions: *
|
||||
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
|
||||
#ifndef _GLOBALS_H
|
||||
#define _GLOBALS_H
|
||||
|
||||
#ifndef ALWAYS_H
|
||||
#include "always.h"
|
||||
#endif
|
||||
|
||||
#ifndef KEYBOARD_H
|
||||
#include "keyboard.h"
|
||||
#endif
|
||||
|
||||
#ifndef XMOUSE_H
|
||||
#include "xmouse.h"
|
||||
#endif
|
||||
|
||||
#ifndef STIMER_H
|
||||
#include "stimer.h"
|
||||
#endif
|
||||
|
||||
extern bool GameInFocus;
|
||||
extern Mouse * MouseCursor;
|
||||
extern WWKeyboardClass * Keyboard;
|
||||
|
||||
extern int Argc;
|
||||
extern char * Argv[20];
|
||||
|
||||
|
||||
#if 0
|
||||
// 60 Hz Timer
|
||||
extern SystemTimerClass SystemTimer;
|
||||
#define SYSTEM_TIMER_RATE TIMER_SECOND
|
||||
#else
|
||||
// 1 KHz Timer
|
||||
#define SystemTimer() (int)timeGetTime()
|
||||
#define SYSTEM_TIMER_RATE 1000
|
||||
#endif
|
||||
|
||||
#endif
|
||||
40
Code/Tests/MeshTest/_scenes.cpp
Normal file
40
Code/Tests/MeshTest/_scenes.cpp
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
** Command & Conquer Renegade(tm)
|
||||
** Copyright 2025 Electronic Arts Inc.
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
** the Free Software Foundation, either version 3 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/***********************************************************************************************
|
||||
*** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
|
||||
***********************************************************************************************
|
||||
* *
|
||||
* Project Name : MeshTest *
|
||||
* *
|
||||
* $Archive:: /Commando/Code/Tests/MeshTest/_scenes.cpp $*
|
||||
* *
|
||||
* $Author:: Greg_h $*
|
||||
* *
|
||||
* $Modtime:: 4/02/98 2:33p $*
|
||||
* *
|
||||
* $Revision:: 2 $*
|
||||
* *
|
||||
*---------------------------------------------------------------------------------------------*
|
||||
* Functions: *
|
||||
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
|
||||
|
||||
#include "_scenes.h"
|
||||
|
||||
SimpleSceneClass * TheScene = NULL;
|
||||
47
Code/Tests/MeshTest/_scenes.h
Normal file
47
Code/Tests/MeshTest/_scenes.h
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
** Command & Conquer Renegade(tm)
|
||||
** Copyright 2025 Electronic Arts Inc.
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
** the Free Software Foundation, either version 3 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/***********************************************************************************************
|
||||
*** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
|
||||
***********************************************************************************************
|
||||
* *
|
||||
* Project Name : MeshTest *
|
||||
* *
|
||||
* $Archive:: /Commando/Code/Tests/MeshTest/_scenes.h $*
|
||||
* *
|
||||
* $Author:: Greg_h $*
|
||||
* *
|
||||
* $Modtime:: 4/02/98 2:32p $*
|
||||
* *
|
||||
* $Revision:: 2 $*
|
||||
* *
|
||||
*---------------------------------------------------------------------------------------------*
|
||||
* Functions: *
|
||||
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
|
||||
|
||||
#ifndef _SCENES_H
|
||||
#define _SCENES_H
|
||||
|
||||
#ifndef SCENE_H
|
||||
#include "scene.h"
|
||||
#endif
|
||||
|
||||
extern SimpleSceneClass * TheScene;
|
||||
|
||||
#endif
|
||||
67
Code/Tests/MeshTest/_viewpt.cpp
Normal file
67
Code/Tests/MeshTest/_viewpt.cpp
Normal file
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
** Command & Conquer Renegade(tm)
|
||||
** Copyright 2025 Electronic Arts Inc.
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
** the Free Software Foundation, either version 3 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* $Header: /Commando/Code/Tests/meshtest/_viewpt.cpp 2 8/11/97 4:29p Greg_h $ */
|
||||
/***********************************************************************************************
|
||||
*** Confidential - Westwood Studios ***
|
||||
***********************************************************************************************
|
||||
* *
|
||||
* Project Name : Commando *
|
||||
* *
|
||||
* $Archive:: /Commando/Code/Tests/meshtest/_viewpt.cpp $*
|
||||
* *
|
||||
* $Author:: Greg_h $*
|
||||
* *
|
||||
* $Modtime:: 7/18/97 10:47a $*
|
||||
* *
|
||||
* $Revision:: 2 $*
|
||||
* *
|
||||
*---------------------------------------------------------------------------------------------*
|
||||
* Functions: *
|
||||
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
|
||||
|
||||
#include "_viewpt.h"
|
||||
|
||||
|
||||
/*
|
||||
** Current resolution of the screen / game window.
|
||||
** (only the Width and Height fields are valid...)
|
||||
*/
|
||||
Rect ScreenResolution;
|
||||
|
||||
/*
|
||||
** Rectangle within main window for the main viewport
|
||||
*/
|
||||
Rect MainViewport;
|
||||
|
||||
/*
|
||||
** Rectangle within the main window for the status bar
|
||||
*/
|
||||
Rect StatusViewport;
|
||||
|
||||
/*
|
||||
** Rectangle within the main window for the radar / map
|
||||
*/
|
||||
Rect RadarViewport;
|
||||
|
||||
/*
|
||||
** Rectangle within the main window for the PIP viewport
|
||||
*/
|
||||
Rect PIPViewport;
|
||||
|
||||
72
Code/Tests/MeshTest/_viewpt.h
Normal file
72
Code/Tests/MeshTest/_viewpt.h
Normal file
@@ -0,0 +1,72 @@
|
||||
/*
|
||||
** Command & Conquer Renegade(tm)
|
||||
** Copyright 2025 Electronic Arts Inc.
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
** the Free Software Foundation, either version 3 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* $Header: /Commando/Code/Tests/meshtest/_viewpt.h 2 8/11/97 4:29p Greg_h $ */
|
||||
/***********************************************************************************************
|
||||
*** Confidential - Westwood Studios ***
|
||||
***********************************************************************************************
|
||||
* *
|
||||
* Project Name : Commando *
|
||||
* *
|
||||
* $Archive:: /Commando/Code/Tests/meshtest/_viewpt.h $*
|
||||
* *
|
||||
* $Author:: Greg_h $*
|
||||
* *
|
||||
* $Modtime:: 7/19/97 10:12a $*
|
||||
* *
|
||||
* $Revision:: 2 $*
|
||||
* *
|
||||
*---------------------------------------------------------------------------------------------*
|
||||
* Functions: *
|
||||
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
|
||||
|
||||
#ifndef _VIEWPT_H
|
||||
#define _VIEWPT_H
|
||||
|
||||
#ifndef RECT_H
|
||||
#include "rect.h"
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
** Current resolution of the screen / game window.
|
||||
*/
|
||||
extern Rect ScreenResolution;
|
||||
|
||||
/*
|
||||
** Rectangle within main window for the main viewport
|
||||
*/
|
||||
extern Rect MainViewport;
|
||||
|
||||
/*
|
||||
** Rectangle within the main window for the status bar
|
||||
*/
|
||||
extern Rect StatusViewport;
|
||||
|
||||
/*
|
||||
** Rectangle within the main window for the radar / map
|
||||
*/
|
||||
extern Rect RadarViewport;
|
||||
|
||||
/*
|
||||
** Rectangle within the main window for the PIP viewport
|
||||
*/
|
||||
extern Rect PIPViewport;
|
||||
|
||||
#endif
|
||||
56
Code/Tests/MeshTest/init.cpp
Normal file
56
Code/Tests/MeshTest/init.cpp
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
** Command & Conquer Renegade(tm)
|
||||
** Copyright 2025 Electronic Arts Inc.
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
** the Free Software Foundation, either version 3 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* $Header: /Commando/Code/Tests/MeshTest/init.cpp 9 10/12/98 5:59p Greg_h $ */
|
||||
/***********************************************************************************************
|
||||
*** Confidential - Westwood Studios ***
|
||||
***********************************************************************************************
|
||||
* *
|
||||
* Project Name : Commando *
|
||||
* *
|
||||
* $Archive:: /Commando/Code/Tests/MeshTest/init.cpp $*
|
||||
* *
|
||||
* $Author:: Greg_h $*
|
||||
* *
|
||||
* $Modtime:: 10/07/98 2:50p $*
|
||||
* *
|
||||
* $Revision:: 9 $*
|
||||
* *
|
||||
*---------------------------------------------------------------------------------------------*
|
||||
* Functions: *
|
||||
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
|
||||
|
||||
#include "init.h"
|
||||
#include <sr.hpp>
|
||||
#include "_viewpt.h"
|
||||
#include "_scenes.h"
|
||||
#include "ww3d.h"
|
||||
#include "winmain.h"
|
||||
|
||||
bool Init(void)
|
||||
{
|
||||
if (WW3D::Init(hWndMain) != WW3D::WW3D_OK) {
|
||||
return false;
|
||||
}
|
||||
|
||||
WW3D::Create_Debug_Window();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
43
Code/Tests/MeshTest/init.h
Normal file
43
Code/Tests/MeshTest/init.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
** Command & Conquer Renegade(tm)
|
||||
** Copyright 2025 Electronic Arts Inc.
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
** the Free Software Foundation, either version 3 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* $Header: /Commando/Code/Tests/meshtest/init.h 2 8/11/97 4:29p Greg_h $ */
|
||||
/***********************************************************************************************
|
||||
*** Confidential - Westwood Studios ***
|
||||
***********************************************************************************************
|
||||
* *
|
||||
* Project Name : Commando *
|
||||
* *
|
||||
* $Archive:: /Commando/Code/Tests/meshtest/init.h $*
|
||||
* *
|
||||
* $Author:: Greg_h $*
|
||||
* *
|
||||
* $Modtime:: 7/18/97 9:11a $*
|
||||
* *
|
||||
* $Revision:: 2 $*
|
||||
* *
|
||||
*---------------------------------------------------------------------------------------------*
|
||||
* Functions: *
|
||||
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
|
||||
#ifndef INIT_H
|
||||
#define INIT_H
|
||||
|
||||
bool Init(void);
|
||||
|
||||
#endif
|
||||
503
Code/Tests/MeshTest/mainloop.cpp
Normal file
503
Code/Tests/MeshTest/mainloop.cpp
Normal file
@@ -0,0 +1,503 @@
|
||||
/*
|
||||
** Command & Conquer Renegade(tm)
|
||||
** Copyright 2025 Electronic Arts Inc.
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
** the Free Software Foundation, either version 3 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* $Header: /Commando/Code/Tests/MeshTest/mainloop.cpp 47 12/10/98 5:53p Greg_h $ */
|
||||
/***********************************************************************************************
|
||||
*** Confidential - Westwood Studios ***
|
||||
***********************************************************************************************
|
||||
* *
|
||||
* Project Name : Commando *
|
||||
* *
|
||||
* $Archive:: /Commando/Code/Tests/MeshTest/mainloop.cpp $*
|
||||
* *
|
||||
* $Author:: Greg_h $*
|
||||
* *
|
||||
* $Modtime:: 12/07/98 1:30p $*
|
||||
* *
|
||||
* $Revision:: 47 $*
|
||||
* *
|
||||
*---------------------------------------------------------------------------------------------*
|
||||
* Functions: *
|
||||
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
|
||||
#define NOMINMAX
|
||||
|
||||
#include "mainloop.h"
|
||||
#include "mono.h"
|
||||
#include "msgloop.h"
|
||||
#include "wwfile.h"
|
||||
#include "rawfile.h"
|
||||
#include "_globals.h"
|
||||
#include "_viewpt.h"
|
||||
#include <sr.hpp>
|
||||
#include <assert.h>
|
||||
#include "assetmgr.h"
|
||||
#include "sr_util.h"
|
||||
#include "_scenes.h"
|
||||
#include "rendobj.h"
|
||||
#include "r3dobj.h"
|
||||
#include "mesh.h"
|
||||
#include "hmodel.h"
|
||||
#include "light.h"
|
||||
#include "wwdebug.h"
|
||||
#include "ww3d.h"
|
||||
|
||||
|
||||
#define SPIN_MODEL
|
||||
#define SPIN_LIGHT
|
||||
//#define CAPTURE_BONE
|
||||
//#define TEST_DAMAGE
|
||||
//#define TEST_TEXTURE_ANIMATION
|
||||
|
||||
/*
|
||||
** Globals
|
||||
*/
|
||||
|
||||
WW3DAssetManager The3DAssetManager;
|
||||
|
||||
CameraClass * Camera;
|
||||
LightClass * Light;
|
||||
LightClass * Light2;
|
||||
|
||||
RenderObjClass * TestModel = NULL;
|
||||
HAnimClass * TestAnim = NULL;
|
||||
|
||||
float CameraDist = 10.0f;
|
||||
float CameraDir = 0.0f;
|
||||
|
||||
Quaternion ModelOrientation(1);
|
||||
#ifdef SPIN_MODEL
|
||||
Quaternion ModelRotation(Vector3(0,0,1),DEG_TO_RAD(1.5f));
|
||||
#else
|
||||
Quaternion ModelRotation(1);
|
||||
#endif
|
||||
|
||||
Quaternion LightOrientation(1);
|
||||
Quaternion LightRotation(Vector3(.2,1,.1),DEG_TO_RAD(3.0f));
|
||||
|
||||
/*
|
||||
** Local functions
|
||||
*/
|
||||
|
||||
void Render(void);
|
||||
void Create_Scene(void);
|
||||
void Create_Objects(void);
|
||||
void Destroy_Scene(void);
|
||||
void Destroy_Objects(void);
|
||||
void Load_Data(void);
|
||||
void Render_Scene(void);
|
||||
void Time_Step(void);
|
||||
void Init_Debug(void);
|
||||
void Shutdown_Debug(void);
|
||||
void wwdebug_message_handler(const char * message);
|
||||
void wwdebug_assert_handler(const char * message);
|
||||
bool wwdebug_trigger_handler(int trigger_num);
|
||||
void Debug_Refs(void);
|
||||
|
||||
|
||||
/*
|
||||
** delay for time milliseconds
|
||||
*/
|
||||
void Wait( int time )
|
||||
{
|
||||
int start = SystemTimer();
|
||||
while ( 1000 * ( SystemTimer() - start ) < ( time * SYSTEM_TIMER_RATE ) ) ;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** MAIN GAME LOOP
|
||||
*/
|
||||
void Main_Loop(void)
|
||||
{
|
||||
Init_Debug();
|
||||
Create_Scene();
|
||||
Load_Data();
|
||||
Create_Objects();
|
||||
|
||||
while (!Keyboard->Down(VK_ESCAPE)) {
|
||||
|
||||
Time_Step();
|
||||
Render();
|
||||
Windows_Message_Handler();
|
||||
|
||||
if (Keyboard->Down(VK_F1)) {
|
||||
while(Keyboard->Down(VK_F1));
|
||||
WW3D::Set_Next_Render_Device();
|
||||
}
|
||||
if (Keyboard->Down(VK_F2)) {
|
||||
while(Keyboard->Down(VK_F2));
|
||||
}
|
||||
}
|
||||
|
||||
Destroy_Objects();
|
||||
WW3DAssetManager::Get_Instance()->Free_Assets();
|
||||
Destroy_Scene();
|
||||
Shutdown_Debug();
|
||||
Debug_Refs();
|
||||
}
|
||||
|
||||
void Render(void)
|
||||
{
|
||||
ViewportClass view(Vector2(-1,-1),Vector2(1,1));
|
||||
Light->Set_Diffuse(Vector3(1.0f,1.0f,1.0f));
|
||||
TheScene->Set_Ambient_Light(Vector3(0.8f,0.8f,0.8f));
|
||||
WW3D::Begin_Render(true,true,Vector3(0.2f,0.2f,0.5f));
|
||||
WW3D::Gerd_Render(TheScene,Camera);
|
||||
WW3D::End_Render();
|
||||
}
|
||||
|
||||
|
||||
void Create_Scene(void)
|
||||
{
|
||||
int rd_index = 0;
|
||||
int width = 640;
|
||||
int height = 480;
|
||||
int color_depth = 16;
|
||||
bool windowed = true;
|
||||
|
||||
WW3D::Set_Render_Device(rd_index,width,height,color_depth,windowed);
|
||||
TheScene = new SimpleSceneClass();
|
||||
}
|
||||
|
||||
/*
|
||||
** Load initial game data
|
||||
*/
|
||||
void Load_Data(void)
|
||||
{
|
||||
// WW3DAssetManager::Get_Instance()->Load_3D_Assets(RawFileClass("crap.W3D"));
|
||||
// WW3DAssetManager::Get_Instance()->Load_3D_Assets(RawFileClass("HUMAN.W3D"));
|
||||
// WW3DAssetManager::Get_Instance()->Load_3D_Assets(RawFileClass("COMMANDO.W3D"));
|
||||
// WW3DAssetManager::Get_Instance()->Load_3D_Assets(RawFileClass("Mtankl1.W3D"));
|
||||
WW3DAssetManager::Get_Instance()->Load_3D_Assets(RawFileClass("Triangle.W3D"));
|
||||
// WW3DAssetManager::Get_Instance()->Load_3D_Assets(RawFileClass("Sphere.W3D"));
|
||||
// WW3DAssetManager::Get_Instance()->Load_3D_Assets(RawFileClass("new_mtl_test.W3D"));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
*/
|
||||
void Create_Objects(void)
|
||||
{
|
||||
Camera = NEW_REF(CameraClass,());
|
||||
Camera->Set_Viewport(Vector2(0,0),Vector2(640,480));
|
||||
Camera->Set_Clip_Planes(1.0f, 200.0f);
|
||||
Camera->Set_Environment_Range(1.0f, 200.0f);
|
||||
|
||||
// TestModel = WW3DAssetManager::Get_Instance()->Create_Render_Obj("Mtankl1");
|
||||
// TestModel = WW3DAssetManager::Get_Instance()->Create_Render_Obj("Crap");
|
||||
TestModel = WW3DAssetManager::Get_Instance()->Create_Render_Obj("triangle");
|
||||
// TestModel = WW3DAssetManager::Get_Instance()->Create_Render_Obj("new_mtl_test");
|
||||
assert(TestModel);
|
||||
TestModel->Add(TheScene);
|
||||
|
||||
Light = NEW_REF(LightClass,());
|
||||
Matrix3D lighttm(1);
|
||||
lighttm.Set_Translation(Vector3(5,0,0));
|
||||
Light->Set_Transform(lighttm);
|
||||
Light->Add(TheScene);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
*/
|
||||
void Destroy_Scene(void)
|
||||
{
|
||||
TheScene->Release_Ref();
|
||||
TheScene = NULL;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
**
|
||||
*/
|
||||
void Destroy_Objects(void)
|
||||
{
|
||||
if (TestModel) {
|
||||
TestModel->Remove();
|
||||
TestModel->Release_Ref();
|
||||
TestModel = NULL;
|
||||
}
|
||||
|
||||
if (Camera) {
|
||||
Camera->Release_Ref();
|
||||
Camera = NULL;
|
||||
}
|
||||
|
||||
if (Light) {
|
||||
Light->Remove();
|
||||
Light->Release_Ref();
|
||||
Light = NULL;
|
||||
}
|
||||
|
||||
if (Light2) {
|
||||
Light2->Remove();
|
||||
Light2->Release_Ref();
|
||||
Light2 = NULL;
|
||||
}
|
||||
|
||||
WW3DAssetManager::Get_Instance()->Free_Assets();
|
||||
|
||||
}
|
||||
|
||||
|
||||
void Time_Step(void)
|
||||
{
|
||||
if (Keyboard->Down(VK_UP)) {
|
||||
CameraDist = CameraDist * 0.9f;
|
||||
}
|
||||
if (Keyboard->Down(VK_DOWN)) {
|
||||
CameraDist = CameraDist * 1.1f;
|
||||
}
|
||||
if (Keyboard->Down(VK_LEFT)) {
|
||||
CameraDir -= (float)DEG_TO_RAD(10.0f);
|
||||
}
|
||||
if (Keyboard->Down(VK_RIGHT)) {
|
||||
CameraDir += (float)DEG_TO_RAD(10.0f);
|
||||
}
|
||||
|
||||
Matrix3D camtm(1);
|
||||
camtm.Rotate_Z(CameraDir);
|
||||
camtm.Rotate_X(DEG_TO_RAD(35.0f));
|
||||
camtm.Translate(Vector3(0,0,CameraDist));
|
||||
|
||||
Camera->Set_Transform(camtm);
|
||||
|
||||
#ifdef SPIN_MODEL
|
||||
ModelOrientation = ModelOrientation * ModelRotation;
|
||||
ModelOrientation.Normalize();
|
||||
if (TestModel) TestModel->Set_Transform(Build_Matrix3D(ModelOrientation));
|
||||
#else
|
||||
if (TestModel) TestModel->Set_Transform(Matrix3D(1));
|
||||
#endif
|
||||
|
||||
#ifdef SPIN_LIGHT
|
||||
LightOrientation = LightOrientation * LightRotation;
|
||||
LightOrientation.Normalize();
|
||||
Matrix3D ltm = Build_Matrix3D(LightOrientation);
|
||||
ltm.Translate(Vector3(5.0f,0.0f,0.0f));
|
||||
Light->Set_Transform(ltm);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
MeshClass * mesh = NULL;
|
||||
static int _frame = 0;
|
||||
|
||||
if (TestAnim) {
|
||||
_frame++;
|
||||
if (_frame >= TestAnim->Get_Num_Frames()) {
|
||||
_frame = 0;
|
||||
}
|
||||
TestModel->Set_Animation(TestAnim,_frame);
|
||||
|
||||
} else {
|
||||
|
||||
TestModel->Set_Animation();
|
||||
}
|
||||
|
||||
#ifdef CAPTURE_BONE
|
||||
int boneid = TestModel->Get_Bone_Index("Head");
|
||||
if (boneid != -1) {
|
||||
static float r = 10.0f;
|
||||
static float theta = 0.0f;
|
||||
theta += 0.05f;
|
||||
Matrix3D tm(1);
|
||||
tm.Rotate_Z(theta);
|
||||
|
||||
TestModel->Capture_Bone(boneid);
|
||||
TestModel->Control_Bone(boneid,tm);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SPIN_MODEL
|
||||
ModelOrientation = ModelOrientation * ModelRotation;
|
||||
ModelOrientation.Normalize();
|
||||
TestModel->Set_Transform(Build_Matrix3D(ModelOrientation));
|
||||
#else
|
||||
TestModel->Set_Transform(Matrix3D(1));
|
||||
#endif
|
||||
|
||||
Matrix3D camtm(1);
|
||||
camtm.Rotate_X(DEG_TO_RAD(35.0f));
|
||||
camtm.Translate(0,0,20.0f);
|
||||
Camera->Set_Transform(camtm);
|
||||
|
||||
camtm.Make_Identity();
|
||||
camtm.Translate(Vector3(0,0,20.0f));
|
||||
|
||||
Camera->Set_Transform(camtm);
|
||||
Camera->Set_Viewport(Vector2(0,0),Vector2(320,200));
|
||||
Camera->Set_View_Plane(60.0f,4.0f/3.0f * 60.0f);
|
||||
Camera->Set_Clip_Planes(1.0f, 200.0f);
|
||||
Camera->Set_Environment_Range(1.0f, 200.0f);
|
||||
|
||||
#ifdef SPIN_LIGHT
|
||||
LightOrientation = LightOrientation * LightRotation;
|
||||
LightOrientation.Normalize();
|
||||
Matrix3D ltm = Build_Matrix3D(LightOrientation);
|
||||
ltm.Translate(Vector3(5.0f,0.0f,0.0f));
|
||||
Light->Set_Transform(ltm);
|
||||
#endif
|
||||
|
||||
#ifdef TEST_DAMAGE
|
||||
#define DAMAGE_RATE 0.03f;
|
||||
static float _dam_amt = 0.0f;
|
||||
static float _dam_chg = DAMAGE_RATE;
|
||||
|
||||
_dam_amt += _dam_chg;
|
||||
if (_dam_amt >= 1.0f) {
|
||||
_dam_amt = 1.0f;
|
||||
_dam_chg = -DAMAGE_RATE;
|
||||
}
|
||||
if (_dam_amt <= 0.0f) {
|
||||
_dam_amt = 0.0f;
|
||||
_dam_chg = DAMAGE_RATE;
|
||||
}
|
||||
|
||||
mesh = (MeshClass*)TestModel->Get_Sub_Object("Orca01");
|
||||
if (mesh) {
|
||||
mesh->Apply_Damage(0,_dam_amt);
|
||||
mesh->Release_Ref();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef TEST_TEXTURE_ANIMATION
|
||||
|
||||
mesh = (MeshClass*)TestModel->Get_Sub_Object("Box01");
|
||||
if (mesh) {
|
||||
|
||||
MaterialInfoClass * matinfo = mesh->Get_Material_Info();
|
||||
|
||||
if (matinfo) {
|
||||
MaterialClass * mtl = matinfo->Get_Material(0);
|
||||
|
||||
if (mtl && (stricmp(mtl->Get_Name(),"Explosion Material") == 0)) {
|
||||
|
||||
#if 1
|
||||
int curframe = mtl->Get_Channel_Anim_Frame(MaterialClass::DIFFUSE_COLOR);
|
||||
curframe = (curframe+1) % mtl->Get_Channel_Anim_Frame_Count(MaterialClass::DIFFUSE_COLOR);
|
||||
mtl->Set_Channel_Anim_Frame(MaterialClass::DIFFUSE_COLOR,curframe);
|
||||
#else
|
||||
TextureClass * tex = mtl->Get_Channel_Texture(MaterialClass::DIFFUSE_COLOR);
|
||||
assert(tex);
|
||||
|
||||
int curframe = tex->Get_Anim_Frame();
|
||||
curframe = (curframe+1) % tex->Get_Num_Frames();
|
||||
tex->Set_Anim_Frame(curframe);
|
||||
//tex->invalidate();
|
||||
tex->Release_Ref();
|
||||
#endif
|
||||
}
|
||||
|
||||
matinfo->Release_Ref();
|
||||
matinfo = NULL;
|
||||
|
||||
if (mtl) mtl->Release_Ref();
|
||||
}
|
||||
|
||||
mesh->Release_Ref();
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
void Init_Debug(void)
|
||||
{
|
||||
/*
|
||||
** Install message handler functions for the WWDebug messages
|
||||
** and assertion failures.
|
||||
*/
|
||||
WWDebug_Install_Message_Handler(wwdebug_message_handler);
|
||||
WWDebug_Install_Assert_Handler(wwdebug_assert_handler);
|
||||
WWDebug_Install_Trigger_Handler(wwdebug_trigger_handler);
|
||||
|
||||
}
|
||||
|
||||
void Shutdown_Debug(void)
|
||||
{
|
||||
/*
|
||||
** Remove message handler functions for the WWDebug messages
|
||||
** and assertion failures.
|
||||
*/
|
||||
WWDebug_Install_Message_Handler(NULL);
|
||||
WWDebug_Install_Assert_Handler(NULL);
|
||||
WWDebug_Install_Trigger_Handler(NULL);
|
||||
}
|
||||
|
||||
void wwdebug_message_handler(const char * message)
|
||||
{
|
||||
/*
|
||||
** Hand the message off to the scrolling debug screen
|
||||
*/
|
||||
// Debug_Say((message));
|
||||
}
|
||||
|
||||
void wwdebug_assert_handler(const char * message)
|
||||
{
|
||||
/*
|
||||
** Hand the message off to the scrolling debug screen
|
||||
*/
|
||||
// Debug_Say((message));
|
||||
|
||||
/*
|
||||
** break into the debugger
|
||||
*/
|
||||
_asm int 0x03;
|
||||
}
|
||||
|
||||
bool wwdebug_trigger_handler(int trigger_num)
|
||||
{
|
||||
return Keyboard->Down(trigger_num);
|
||||
}
|
||||
|
||||
void Debug_Refs(void)
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
char buf[1024];
|
||||
|
||||
if (RefCountClass::Total_Refs() != 0) {
|
||||
sprintf(buf,"Main Loop End %d refs\n", RefCountClass::Total_Refs() );
|
||||
MessageBox(NULL,buf,"Ref Debugging",MB_OK);
|
||||
}
|
||||
|
||||
RefBaseNodeClass * node = RefBaseClass::ActiveRefList.First();
|
||||
|
||||
while (node->Is_Valid())
|
||||
{
|
||||
RefBaseClass * obj = node->Get();
|
||||
|
||||
ActiveRefStruct * ref = &(obj->ActiveRefInfo);
|
||||
|
||||
sprintf(buf,"Active Ref: %s\nLine: %d\nPointer %p\n", ref->File,ref->Line,obj);
|
||||
if (MessageBox(NULL,buf,"Ref Debugging",MB_OKCANCEL) == IDCANCEL) {
|
||||
break;
|
||||
}
|
||||
|
||||
node = node->Next();
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
43
Code/Tests/MeshTest/mainloop.h
Normal file
43
Code/Tests/MeshTest/mainloop.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
** Command & Conquer Renegade(tm)
|
||||
** Copyright 2025 Electronic Arts Inc.
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
** the Free Software Foundation, either version 3 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* $Header: /Commando/Code/Tests/meshtest/mainloop.h 2 8/11/97 4:29p Greg_h $ */
|
||||
/***********************************************************************************************
|
||||
*** Confidential - Westwood Studios ***
|
||||
***********************************************************************************************
|
||||
* *
|
||||
* Project Name : Commando *
|
||||
* *
|
||||
* $Archive:: /Commando/Code/Tests/meshtest/mainloop.h $*
|
||||
* *
|
||||
* $Author:: Greg_h $*
|
||||
* *
|
||||
* $Modtime:: 7/24/97 6:29p $*
|
||||
* *
|
||||
* $Revision:: 2 $*
|
||||
* *
|
||||
*---------------------------------------------------------------------------------------------*
|
||||
* Functions: *
|
||||
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
|
||||
#ifndef MAINLOOP_H
|
||||
#define MAINLOOP_H
|
||||
|
||||
void Main_Loop(void);
|
||||
|
||||
#endif
|
||||
203
Code/Tests/MeshTest/meshtest.dsp
Normal file
203
Code/Tests/MeshTest/meshtest.dsp
Normal file
@@ -0,0 +1,203 @@
|
||||
# Microsoft Developer Studio Project File - Name="meshtest" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
|
||||
CFG=MESHTEST - WIN32 RELEASE
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "meshtest.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "meshtest.mak" CFG="MESHTEST - WIN32 RELEASE"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "meshtest - Win32 Release" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "meshtest - Win32 Debug" (based on "Win32 (x86) Application")
|
||||
!MESSAGE "meshtest - Win32 Profile" (based on "Win32 (x86) Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""$/Commando/Tests/meshtest", CHFAAAAA"
|
||||
# PROP Scc_LocalPath "."
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "meshtest - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\..\srsdk\include" /I "..\..\wwlib" /I "..\..\WWMath" /I "..\..\ww3d" /I "..\..\wwdebug" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "DIRECTX" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
|
||||
# ADD LINK32 sr.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib winmm.lib wwlib.lib wwmath.lib ww3d.lib wwdebug.lib vfw32.lib /nologo /subsystem:windows /machine:I386 /out:"Run/meshtest_r.exe" /libpath:"..\..\libs\Release" /libpath:"..\..\srsdk\lib"
|
||||
# Begin Special Build Tool
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Desc=Copying Surrender DLL's
|
||||
PostBuild_Cmds=REM del .\run\sr*.dll REM copy ..\..\srsdk\bin\*.dll .\run
|
||||
# End Special Build Tool
|
||||
|
||||
!ELSEIF "$(CFG)" == "meshtest - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "..\..\srsdk\include" /I "..\..\wwlib" /I "..\..\WWMath" /I "..\..\ww3d" /I "..\..\wwdebug" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "DIRECTX" /FR /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386
|
||||
# ADD LINK32 srdb.lib ddraw.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib winmm.lib wwlib.lib wwmath.lib ww3d.lib wwdebug.lib vfw32.lib /nologo /subsystem:windows /profile /map /debug /machine:I386 /out:"Run/meshtest_d.exe" /libpath:"..\..\libs\Debug" /libpath:"..\..\srsdk\lib"
|
||||
# Begin Special Build Tool
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Desc=Copying Surrender DLL's
|
||||
PostBuild_Cmds=REM del .\run\sr*.dll REM copy ..\..\srsdk\bin\*.dll .\run
|
||||
# End Special Build Tool
|
||||
|
||||
!ELSEIF "$(CFG)" == "meshtest - Win32 Profile"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "meshtest"
|
||||
# PROP BASE Intermediate_Dir "meshtest"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Profile"
|
||||
# PROP Intermediate_Dir "Profile"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "..\..\sr\sr.h" /I "..\..\Library" /I "..\..\WWMath" /I "..\..\ww3d" /I "..\..\wwdebug" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "DIRECTX" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /Zi /O2 /I "..\..\srsdk\include" /I "..\..\wwlib" /I "..\..\WWMath" /I "..\..\ww3d" /I "..\..\wwdebug" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "DIRECTX" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 sr.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib ddraw.lib winmm.lib library.lib wwmath.lib ww3d.lib wwdebug.lib /nologo /subsystem:windows /machine:I386 /out:"Run/meshtest_r.exe" /libpath:"..\..\libs\Release" /libpath:"..\..\sr\release"
|
||||
# ADD LINK32 sr.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib winmm.lib wwlib.lib wwmath.lib ww3d.lib wwdebug.lib vfw32.lib /nologo /subsystem:windows /profile /debug /machine:I386 /out:"Run/meshtest_p.exe" /libpath:"..\..\libs\Profile" /libpath:"..\..\srsdk\lib"
|
||||
# Begin Special Build Tool
|
||||
SOURCE="$(InputPath)"
|
||||
PostBuild_Desc=Copying Surrender DLL's
|
||||
PostBuild_Cmds=REm del .\run\sr*.dll REM copy ..\..\srsdk\bin\*.dll .\run
|
||||
# End Special Build Tool
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "meshtest - Win32 Release"
|
||||
# Name "meshtest - Win32 Debug"
|
||||
# Name "meshtest - Win32 Profile"
|
||||
# Begin Group "Source"
|
||||
|
||||
# PROP Default_Filter "cpp;c"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\_GLOBALS.CPP
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\_scenes.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\_viewpt.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\init.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mainloop.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\shutdown.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\WINMAIN.CPP
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Headers"
|
||||
|
||||
# PROP Default_Filter "h"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\_GLOBALS.H
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\_scenes.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\_viewpt.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\init.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\mainloop.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\shutdown.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\WINMAIN.H
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Resources"
|
||||
|
||||
# PROP Default_Filter "rc"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
||||
47
Code/Tests/MeshTest/shutdown.cpp
Normal file
47
Code/Tests/MeshTest/shutdown.cpp
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
** Command & Conquer Renegade(tm)
|
||||
** Copyright 2025 Electronic Arts Inc.
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
** the Free Software Foundation, either version 3 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* $Header: /Commando/Code/Tests/MeshTest/shutdown.cpp 6 4/02/98 3:41p Greg_h $ */
|
||||
/***********************************************************************************************
|
||||
*** Confidential - Westwood Studios ***
|
||||
***********************************************************************************************
|
||||
* *
|
||||
* Project Name : Commando *
|
||||
* *
|
||||
* $Archive:: /Commando/Code/Tests/MeshTest/shutdown.cpp $*
|
||||
* *
|
||||
* $Author:: Greg_h $*
|
||||
* *
|
||||
* $Modtime:: 4/02/98 2:37p $*
|
||||
* *
|
||||
* $Revision:: 6 $*
|
||||
* *
|
||||
*---------------------------------------------------------------------------------------------*
|
||||
* Functions: *
|
||||
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
|
||||
|
||||
#include "shutdown.h"
|
||||
#include "ww3d.h"
|
||||
|
||||
|
||||
void Shutdown(void)
|
||||
{
|
||||
WW3D::Shutdown();
|
||||
}
|
||||
|
||||
46
Code/Tests/MeshTest/shutdown.h
Normal file
46
Code/Tests/MeshTest/shutdown.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
** Command & Conquer Renegade(tm)
|
||||
** Copyright 2025 Electronic Arts Inc.
|
||||
**
|
||||
** This program is free software: you can redistribute it and/or modify
|
||||
** it under the terms of the GNU General Public License as published by
|
||||
** the Free Software Foundation, either version 3 of the License, or
|
||||
** (at your option) any later version.
|
||||
**
|
||||
** This program is distributed in the hope that it will be useful,
|
||||
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
** GNU General Public License for more details.
|
||||
**
|
||||
** You should have received a copy of the GNU General Public License
|
||||
** along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* $Header: /Commando/Code/Tests/meshtest/shutdown.h 2 8/11/97 4:29p Greg_h $ */
|
||||
/***********************************************************************************************
|
||||
*** Confidential - Westwood Studios ***
|
||||
***********************************************************************************************
|
||||
* *
|
||||
* Project Name : Commando *
|
||||
* *
|
||||
* $Archive:: /Commando/Code/Tests/meshtest/shutdown.h $*
|
||||
* *
|
||||
* $Author:: Greg_h $*
|
||||
* *
|
||||
* $Modtime:: 7/18/97 9:42a $*
|
||||
* *
|
||||
* $Revision:: 2 $*
|
||||
* *
|
||||
*---------------------------------------------------------------------------------------------*
|
||||
* Functions: *
|
||||
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
|
||||
|
||||
|
||||
#ifndef SHUTDOWN_H
|
||||
#define SHUTDOWN_H
|
||||
|
||||
|
||||
void Shutdown(void);
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user