Commit 3954101c authored by Scott Hanselman's avatar Scott Hanselman
Browse files

commit message

parents
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
Other files removed:
./OBJ/WIND/ENGINE.LIB
./OBJ/WINS/ENGINE.LIB
./kauai/ELIB/WINUD/AUDIOD.LIB
./kauai/ELIB/WIND/AUDIOD.LIB
./kauai/ELIB/WINUS/AUDIOS.LIB
./kauai/ELIB/WINS/AUDIOS.LIB
./SETUP/TOOLS/INC/MSSETUP.LIB
./DKIT/LIBDKIT.LIB
./ELIB/WIND/BRZBMXR.LIB
./ELIB/WIND/BREN.LIB
./ELIB/WIND/BRFMMXR.LIB
./ELIB/WIND/BRFWMXR.LIB
./ELIB/WINS/BRZBMXR.LIB
./ELIB/WINS/BREN.LIB
./ELIB/WINS/BRFMMXR.LIB
./ELIB/WINS/BRFWMXR.LIB
./BREN/OBJ/WIND/BREN.LIB
./BREN/OBJ/WINS/BREN.LIB
./cd12/OBJ/WIND/ENGINE.LIB
./cd12/OBJ/WINS/ENGINE.LIB
./cd12/SETUP/TOOLS/INC/MSSETUP.LIB
./cd12/DKIT/LIBDKIT.LIB
./cd12/ELIB/WIND/BRZBMXR.LIB
./cd12/ELIB/WIND/BREN.LIB
./cd12/ELIB/WIND/BRFMMXR.LIB
./cd12/ELIB/WIND/BRFWMXR.LIB
./cd12/ELIB/WINS/BRZBMXR.LIB
./cd12/ELIB/WINS/BREN.LIB
./cd12/ELIB/WINS/BRFMMXR.LIB
./cd12/ELIB/WINS/BRFWMXR.LIB
./cd12/BREN/OBJ/WIND/BREN.LIB
./cd12/BREN/OBJ/WINS/BREN.LIB
./cd3/SETUP/MSSETUP.DLL
./cd3/SETUP/3DMSETUP.DLL
./cd3/PSS/IMGWALK.DLL
./cd3/MMCAT/VER.DLL
./cd3/MMCAT/VBRUN300.DLL
./SETUP/D/3DMSETUP.DLL
./cd12/SETUP/TOOLS/U/MSSETUP.DLL
./cd12/SETUP/TOOLS/UD/MSSETUP.DLL
./cd12/SETUP/TOOLS/DD/MSSETUP.DLL
./cd12/SETUP/TOOLS/D/MSSETUP.DLL
./cd12/SETUP/BIN/PSS/IMGWALK.DLL
./cd12/SETUP/BIN/MMCAT/VER.DLL
./cd12/SETUP/BIN/MMCAT/VBRUN300.DLL
./cd12/SETUP/U/3DMSETUP.DLL
./cd12/SETUP/Z/3DMSETUP.DLL
./cd12/SETUP/UD/3DMSETUP.DLL
./cd12/SETUP/D/3DMSETUP.DLL
{
"files.associations": {
"W95INST.C": "cpp",
"STDFILE.C": "cpp",
"STDMEM.C": "cpp"
}
}
\ No newline at end of file
// Temporary brender code
#include "frame.h"
#include "bren.h"
ASSERTNAME
extern br_material test_materials[];
extern int test_materials_count;
br_camera camera_data = {
NULL,
BR_CAMERA_PERSPECTIVE,
BR_ANGLE_DEG(45), /* 45 degree field of view */
BR_SCALAR(1.0), /* Hither */
BR_SCALAR(100.0), /* Yon */
BR_SCALAR(16.0 / 9.0), /* Aspect ratio */
};
br_material texmap = {
"texmap",
BR_COLOUR_RGB(255,255,255), /* colour */
{255}, /* opacity */
BR_UFRACTION(0.05), /* ka */
BR_UFRACTION(0.30), /* kd */
BR_UFRACTION(0.99), /* ks */
BR_SCALAR(20), /* power */
BR_MATF_MAP_COLOUR|BR_MATF_LIGHT|BR_MATF_GOURAUD, /* flags */
0,0, /* shift up/down */
0,63, /* index base/range */
};
static bool FLoadModel(char *szFileName, br_model **pmdl)
{
*pmdl = BrModelLoad(szFileName);
if (*pmdl == NULL)
return fFalse;
else
BrModelAdd(*pmdl);
return fTrue;
}
// create some objects
void BREN::CreateFunStuff(void)
{
int i;
br_pixelmap *pm;
br_pixelmap *shade;
// BrBegin();
// BrZbBegin();
obs_z = BR_SCALAR(5.0);
/*
* Add materials to system
*/
for(i = 0; i < test_materials_count; i++)
BrMaterialAdd(test_materials+i);
shade = BrPixelmapLoad("shade.tab");
BrTableAdd(shade); /* Tell renderer about shading table */
pm = BrPixelmapLoad("jupiter.pix");
BrMapAdd(pm); /* Tell renderer about texture map */
texmap.index_shade = shade;
texmap.colour_map = pm;
BrMaterialAdd(&texmap); /* Tell renderer about material */
// Load all the models
if (!FLoadModel("iceman.dat", &modlMain))
MessageBox (NULL, "Could not load iceman.dat", "ERROR", MB_OK);
if (!FLoadModel("torus.dat", &modlChild))
MessageBox (NULL, "Could not load torus.dat", "ERROR", MB_OK);
if (!FLoadModel("cube.dat", &modlCube))
MessageBox (NULL, "Could not load cube.dat", "ERROR", MB_OK);
/*
* Create the world
*/
// actrWorld = BrActorAllocate(BR_ACTOR_NONE,NULL);
_pbactWorld = BrActorAllocate(BR_ACTOR_NONE,NULL);
_pbactCamera = BrActorAdd(_pbactWorld, BrActorAllocate(BR_ACTOR_CAMERA, &camera_data));
// actrCamera->t.type = BR_TRANSFORM_MATRIX34;
// BrMatrix34Translate(&actrCamera->t.t.mat, BR_SCALAR(0.0), BR_SCALAR(20.0),
// BR_SCALAR(0.0));
/*
* Test shape and child
*/
actrMain = BrActorAdd(_pbactWorld,BrActorAllocate(BR_ACTOR_MODEL,NULL));
actrMain->model = modlMain;
// actrMain->material = BrMaterialFind("texmap");
actrChild = BrActorAdd(actrMain,BrActorAllocate(BR_ACTOR_MODEL,NULL));
actrChild->t.type = BR_TRANSFORM_MATRIX34;
BrMatrix34Translate(&actrChild->t.t.mat,BR_SCALAR(1.5),BR_SCALAR(0.0),BR_SCALAR(0.0));
actrChild->model = modlChild;
/*
* Spinning shape driven by a quaternion
*/
actrQuat = BrActorAdd(_pbactWorld,BrActorAllocate(BR_ACTOR_MODEL,NULL));
actrQuat->model = modlCube;
actrQuat->t.type = BR_TRANSFORM_QUAT;
BrVector3SetInt(&actrQuat->t.t.quat.t,-2,0,0);
/*
* Spinning shape driven by euler angles
*/
actrEuler = BrActorAdd(_pbactWorld,BrActorAllocate(BR_ACTOR_MODEL,NULL));
actrEuler->model = modlCube;
actrEuler->t.type = BR_TRANSFORM_EULER;
actrEuler->t.t.euler.e.order = BR_EULER_YXZ_R;
BrVector3SetInt(&actrEuler->t.t.euler.t,-4,0,0);
/*
* Initialise angles
*/
actrEuler->t.t.euler.e.a = 0;
actrEuler->t.t.euler.e.b = 0;
actrEuler->t.t.euler.e.c = 0;
/*
* Some useful transforms for later
*/
BrMatrix34Identity(&Rotation);
BrMatrix34Identity(&ObsRotation);
}
#define MSCALE BR_SCALAR(0.05)
void BREN::ChangeScene (WPARAM mouseFlags, LPARAM coords)
{
static UINT old_mouse_x;
static UINT old_mouse_y;
WORD mouse_x = LOWORD(coords) - old_mouse_x;
WORD mouse_y = HIWORD(coords) - old_mouse_y;
br_matrix34 tmpmat;
/*
* Mouse control
*/
if(mouse_x !=0 || mouse_y != 0) {
if(mouseFlags & MK_LBUTTON) {
if(mouseFlags & MK_RBUTTON) {
/*
* Move actrCamera in/out
*/
obs_z += BR_MUL(BR_SCALAR(mouse_y),MSCALE);
} else {
/*
* Drag object around
*/
pos_x += BR_MUL(BR_SCALAR(mouse_x),MSCALE);
pos_y -= BR_MUL(BR_SCALAR(mouse_y),MSCALE);
}
} else if(mouseFlags & MK_RBUTTON) {
/*
* Rotate actrCamera via rolling ball interface
*/
BrMatrix34RollingBall(&tmpmat,(br_int_16)-mouse_x,mouse_y,800);
BrMatrix34Pre(&ObsRotation,&tmpmat);
} else {
/*
* Rotate object via rolling ball interface
*/
BrMatrix34RollingBall(&tmpmat,mouse_x,(br_int_16)-mouse_y,200);
BrMatrix34Post(&Rotation,&tmpmat);
}
}
old_mouse_x = LOWORD (coords);
old_mouse_y = HIWORD (coords);
/*
* Modify scene according to controls
*/
BrMatrix34Translate(&_pbactCamera->t.t.mat,obs_x,obs_y,obs_z);
BrMatrix34Post(&_pbactCamera->t.t.mat,&ObsRotation);
/*
* test shape spun with mouse
*/
BrMatrix34Translate(&actrMain->t.t.mat,pos_x,pos_y,pos_z);
BrMatrix34Pre(&actrMain->t.t.mat,&Rotation);
/*
*
Convert angles to a quaternion for second shape
*/
BrEulerToQuat(
&actrQuat->t.t.quat.q,
&actrEuler->t.t.euler.e);
/*
* Roll angles around
*/
actrEuler->t.t.euler.e.a += BR_ANGLE_DEG(3);
actrEuler->t.t.euler.e.b += BR_ANGLE_DEG(5);
actrEuler->t.t.euler.e.c += BR_ANGLE_DEG(7);
}
This diff is collapsed.
/*
* Copyright (c) 1993-1995 by Argonaut Technologies Limited. All rights reserved.
*
* $Id: actor.h 1.14 1995/05/25 13:37:23 sam Exp $
* $Locker: $
*
* Definitons for an Actor
*/
#ifndef _ACTOR_H_
#define _ACTOR_H_
#ifdef __cplusplus
extern "C" {
#endif
/**
** Definition of base actor structure
**/
/*
* Basic types of actor
*/
enum {
BR_ACTOR_NONE,
BR_ACTOR_MODEL,
BR_ACTOR_LIGHT,
BR_ACTOR_CAMERA,
_BR_ACTOR_RESERVED,
BR_ACTOR_BOUNDS,
BR_ACTOR_BOUNDS_CORRECT,
BR_ACTOR_CLIP_PLANE,
BR_ACTOR_MAX
};