100% found this document useful (3 votes)
17 views

DirectX 8 and Visual Basic Development Keith Sink All Chapters Instant Download

The document provides links to various eBooks related to programming, specifically focusing on Visual Basic and DirectX development. It includes titles such as 'DirectX 8 and Visual Basic Development' by Keith Sink and 'Visual Basic Game Programming with DirectX' by Jonathan S. Harbour, among others. Additionally, it outlines the structure and content of the book on DirectX 8, detailing various programming techniques and components.

Uploaded by

nafsobannodm
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (3 votes)
17 views

DirectX 8 and Visual Basic Development Keith Sink All Chapters Instant Download

The document provides links to various eBooks related to programming, specifically focusing on Visual Basic and DirectX development. It includes titles such as 'DirectX 8 and Visual Basic Development' by Keith Sink and 'Visual Basic Game Programming with DirectX' by Jonathan S. Harbour, among others. Additionally, it outlines the structure and content of the book on DirectX 8, detailing various programming techniques and components.

Uploaded by

nafsobannodm
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

Download the Full Version of the Ebook with Added Features ebookname.

com

DirectX 8 and Visual Basic Development Keith Sink

https://ebookname.com/product/directx-8-and-visual-basic-
development-keith-sink/

OR CLICK HERE

DOWLOAD NOW

Download more ebook instantly today at https://ebookname.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Visual Basic Game Programming with DirectX 1st Edition


Jonathan S. Harbour

https://ebookname.com/product/visual-basic-game-programming-with-
directx-1st-edition-jonathan-s-harbour/

ebookname.com

Ableton Live 8 and Suite 8 Keith Robinson

https://ebookname.com/product/ableton-live-8-and-suite-8-keith-
robinson/

ebookname.com

Clearly Visual Basic Programming with Microsoft Visual


Basic 2012 3rd Edition Diane Zak

https://ebookname.com/product/clearly-visual-basic-programming-with-
microsoft-visual-basic-2012-3rd-edition-diane-zak/

ebookname.com

The Clinician s Guide to Pancreaticobiliary Disorders The


Clinician s Guide to GI Series 1st Edition Gregory
Ginsberg Md
https://ebookname.com/product/the-clinician-s-guide-to-
pancreaticobiliary-disorders-the-clinician-s-guide-to-gi-series-1st-
edition-gregory-ginsberg-md/
ebookname.com
Python Programming for Biology Bioinformatics and Beyond
1st Edition Tim J. Stevens

https://ebookname.com/product/python-programming-for-biology-
bioinformatics-and-beyond-1st-edition-tim-j-stevens/

ebookname.com

Mahdis and Millenarians Shi ite Extremists in Early Muslim


Iraq 1st Edition William Frederick Tucker

https://ebookname.com/product/mahdis-and-millenarians-shi-ite-
extremists-in-early-muslim-iraq-1st-edition-william-frederick-tucker/

ebookname.com

Soil Erosion and Sediment Redistribution in River


Catchments Measurement Modelling and Management Cabi
Publishing First Edition P. N. Owens
https://ebookname.com/product/soil-erosion-and-sediment-
redistribution-in-river-catchments-measurement-modelling-and-
management-cabi-publishing-first-edition-p-n-owens/
ebookname.com

Prepositions in Their Syntactic Semantic and Pragmatic


Context 1st Edition Susanne Feigenbaum (Ed.)

https://ebookname.com/product/prepositions-in-their-syntactic-
semantic-and-pragmatic-context-1st-edition-susanne-feigenbaum-ed/

ebookname.com

Truth in Nonfiction Essays 1st Edition David Lazar

https://ebookname.com/product/truth-in-nonfiction-essays-1st-edition-
david-lazar/

ebookname.com
Symmetry 1st Edition Gracia Arredondo

https://ebookname.com/product/symmetry-1st-edition-gracia-arredondo/

ebookname.com
DirectX 8 and Visual Basic
Development
Keith Sink

800 East 96th Street, Indianapolis, Indiana, 46240 USA


ASSOCIATE PUBLISHER
DirectX 8 and Visual Basic Linda Engelman
Development ACQUISITIONS EDITOR
Sondra Scott
Copyright © 2002 by Sams Publishing
All rights reserved. No part of this book shall be reproduced, stored in a DEVELOPMENT EDITOR
retrieval system, or transmitted by any means, electronic, mechanical, photo- Nancy E. Sixsmith
copying, recording, or otherwise, without written permission from the pub- MANAGING EDITOR
lisher. No patent liability is assumed with respect to the use of the information Charlotte Clapp
contained herein. Although every precaution has been taken in the preparation
of this book, the publisher and author assume no responsibility for errors or PROJECT EDITOR
omissions. Nor is any liability assumed for damages resulting from the use of Heather McNeill
the information contained herein.
COPY EDITOR
International Standard Book Number: 0-672-32225-0 Lisa M. Lord
Library of Congress Catalog Card Number: 10-89223 INDEXER
Printed in the United States of America Sandy Henselmeier

First Printing: November 2001 PROOFREADER


04 03 02 01 4 3 2 1 Andrea Dugan

TECHNICAL EDITORS
Trademarks Andrew Indovina
All terms mentioned in this book that are known to be trademarks or service Joe Johnston
marks have been appropriately capitalized. Sams Publishing cannot attest to William McLoughlin
the accuracy of this information. Use of a term in this book should not be
TEAM COORDINATOR
regarded as affecting the validity of any trademark or service mark.
Lynne Williams
DirectX, DirectDraw, DirectShow, DirectSound, DirectMusic, DirectPlay,
DirectInput, Direct3D, DirectGraphics, Microsoft, Microsoft Visual Basic, and MEDIA DEVELOPER
Windows are registered trademarks of Microsoft Corporation. Dan Scherf

INTERIOR DESIGNER
Warning and Disclaimer Anne Jones
Every effort has been made to make this book as complete and as accurate as COVER DESIGNER
possible, but no warranty or fitness is implied. The information provided is on Gary Adair
an “as is” basis. The author and the publisher shall have neither liability nor
responsibility to any person or entity with respect to any loss or damages aris- PAGE LAYOUT
ing from the information contained in this book or programs accompanying it. Octal Publishing, Inc.
Contents at a Glance
Introduction

Part I Visual Basic and DirectX Development


1 Fundamentals of DirectX Programming
2 Multimedia Programming in the Visual Basic Environment
3 Animation Techniques

Part II DirectX Graphics Programming


4 Creating Graphics with the DirectX Graphics Object
5 Creating Basic Animations with Surface Objects
6 Palettes and Palette Animation
7 3D Geometry
8 Direct3D
9 Using Direct3D

Part III Monitoring User Input with DirectInput


10 Using DirectInput to Manage User Interactions
11 Action Mapping
12 The Keyboard
13 The Joystick
14 The Mouse

Part IV Adding Music and Sounds with DirectAudio


15 DirectX Audio—DirectMusic and DirectSound
16 Composing Music
17 Adding Sounds to Your Application with DirectSound

Part V Streaming Media with DirectShow


18 Introduction to DirectShow
19 Using DirectShow for Digital Editing
20 Multimedia Players
Part VI Multiuser Strategies with DirectPlay
21 Using DirectPlay to Create Multiplayer Games
22 Using Lobbies to Create Player Interactions
23 Managing Games with DirectPlay
24 Using DirectPlay Voice in Your Application

Part VII Finishing Touches


25 DirectSetup

Part VII Appendix


A VB .NET and DirectX

Index
Table of Contents
Introduction 1
Who This Book Is For? ..........................................................................1
What You Need to Know ........................................................................1
What Hardware and Software You Need ................................................1
How This Book Is Organized ................................................................2
Conventions Used in This Book ............................................................3

PART I VB and DirectX Development 5


1 Introduction to DirectX Programming 7
What Is DirectX? ..................................................................................8
A History ................................................................................................8
The Early Days ..................................................................................8
The DOS Days ..................................................................................9
Along Came Windows ......................................................................9
Then There Was DirectX ................................................................10
Why Visual Basic and DirectX? ..........................................................12
The Evolution of Visual Basic ........................................................12
DirectX for the Masses ....................................................................12
Putting DirectX to Work ......................................................................13
Showcasing Products ......................................................................13
Music and Sound ............................................................................13
User Interactions ..............................................................................14
Screensavers and Multimedia ..........................................................15
Game Programming ........................................................................15
Synchronizing Data ........................................................................15
The DirectX Components ....................................................................16
Summary ..............................................................................................18

2 Multimedia Programming in the Visual Basic Environment 19


Installing DirectX ................................................................................20
Setting Up DirectX for Use in Visual Basic ........................................20
Creating a Reference to the DirectX 8.0 type Library ....................21
Classes and Objects ..............................................................................22
COM ..............................................................................................23
Creating DirectX Objects ................................................................23
Programming Tips to Improve Animation ............................................25
Timers ..............................................................................................25
Execution Loops ..............................................................................27
Error Trapping ................................................................................29
Debugging ......................................................................................30
vi
DIRECTX 8 AND VISUAL BASIC DEVELOPMENT

DirectX Utilities ....................................................................................31


DirectX Caps Viewer ......................................................................31
DirectX Error Lookup ....................................................................31
DirectX Texture Tool ......................................................................32
DMO Test Tool ................................................................................32
Force Feedback Editor ....................................................................33
GraphEdit Tool ................................................................................34
Kill Help Utility ..............................................................................35
Mesh Viewer Tool ............................................................................35
Compiling for Speed: Tips and Tricks ..................................................35
Remove Unused Subroutines ..........................................................36
Remove Unused Variables ..............................................................36
Reduce Access Times ......................................................................36
Destroy All Objects ........................................................................36
Remove Debug Statements ..............................................................36
Add DoEvents ................................................................................37
Summary ..............................................................................................37

3 Animation Techniques 39
The Basics ............................................................................................40
The Model Sheet ............................................................................40
The Frame ........................................................................................40
The Cycle ........................................................................................41
Storyboards ......................................................................................41
Keyframes ........................................................................................42
Backgrounds ....................................................................................42
DirectX Objects ....................................................................................43
Frame Rates ....................................................................................43
Blits ..................................................................................................43
Sprites ..............................................................................................44
Drawing Surfaces ............................................................................45
Palettes ............................................................................................45
Rectangles ........................................................................................46
Clippers ............................................................................................46
Billboards ........................................................................................47
Techniques ............................................................................................48
Blitting ............................................................................................48
Page Flipping and Back Buffering ..................................................48
Palette Cycling ................................................................................49
Summary ..............................................................................................50
vii
CONTENTS

PART II DirectX Graphics Programming 51


4 Creating Graphics with DirectDraw 53
Creating Graphics with DirectDraw Classes ........................................54
What Is DirectDraw? ......................................................................54
DirectDraw Architectural Overview ................................................55
HAL Versus HEL ..................................................................................62
Display Modes ......................................................................................63
Standard Display Modes ................................................................64
An Example Using the DirectDraw Class ............................................65
Summary ..............................................................................................68

5 Creating Basic Animations 71


Surfaces ................................................................................................72
Creating Surfaces ............................................................................72
Creating Surfaces from Files ..........................................................74
Surface Descriptions ........................................................................75
Flipping Surfaces ............................................................................77
Blitting to a Surface ........................................................................79
The Many Forms of the BLIT Routine ..........................................79
Gamma and Color Controls ..................................................................82
Overlay Surfaces ..................................................................................83
A DirectDrawSurface Example ............................................................85
Summary ..............................................................................................88

6 Palettes and Palette Animation 91


Palettes ................................................................................................92
Palette Types ....................................................................................92
Palette Entries ..................................................................................92
Sharing Palettes ..............................................................................93
Palette Animation ..................................................................................95
Modifying the Palette ......................................................................96
Switching Palettes ..........................................................................97
A DirectDrawPalette Example ..........................................................100
Summary ............................................................................................101

7 3D Geometry 103
3D Space Coordinate System ............................................................104
3D Objects ..........................................................................................105
Vertices ..........................................................................................106
Polygons ........................................................................................106
Faces ..............................................................................................107
Mesh ..............................................................................................107
Texture ..........................................................................................109
viii
DIRECTX 8 AND VISUAL BASIC DEVELOPMENT

Lights ............................................................................................109
Materials ........................................................................................109
Matrices ..............................................................................................111
Projection Matrix ..........................................................................112
View Matrix ..................................................................................112
World Matrix (World Transformation) ..........................................112
Summary ............................................................................................112

8 Direct3D 115
Direct3D Objects ................................................................................116
The Direct3D8 Class ....................................................................116
The Direct3DBaseTexture8 Class ................................................117
The Direct3DCubeTexture8 Class ................................................118
The Direct3DDevice8 Class ..........................................................119
The Direct3DIndexBuffer8 Class ..................................................123
The Direct3DResource8 Class ......................................................124
The Direct3DSurface8 Class ........................................................125
The Direct3DSwapChain8 Class ..................................................126
The Direct3DTexture8 Class ........................................................126
The Direct3DVertexBuffer8 Class ................................................127
The Direct3DVolume8 Class ........................................................127
The Direct3DVolumeTexture8 Class ............................................128
Creating 3D Applications ..................................................................129
Creating a Direct3D Application ..................................................129
Working with Vertices ..................................................................133
Working with Matrices ..................................................................137
Working with Lights ......................................................................142
Working with Textures ..................................................................146
Working with Meshes ....................................................................149
Summary ............................................................................................153

9 Using Direct3D 155


2D Graphics with Direct3D ................................................................156
Declaring the Objects ....................................................................156
Initializing the Environment ..........................................................157
Creating the Background Vertices ................................................159
Drawing to the Screen ..................................................................161
Updating the Bee’s Coordinates ....................................................162
Creating a Billboard Application ........................................................163
Declaring the Objects ....................................................................163
Initializing the Environment ..........................................................165
Rendering the Scene ......................................................................168
Manipulating Vectors and Vertices ................................................171
Summary ............................................................................................173
ix
CONTENTS

PART III Monitoring User Input with DirectInput 175


10 Using DirectInput to Manage User Interactions 177
Obtaining User Input from DirectInput ..............................................178
Objects in DirectInput ..................................................................179
Cooperative Levels ......................................................................180
DirectInput Architectural Overview ..................................................180
The DirectInput Class ....................................................................181
The DirectInputDevice Class ........................................................183
The DirectInputDeviceObjectInstance Class ................................185
The DirectInputDeviceInstance Class ..........................................186
The DirectInputEffect Class ..........................................................187
The DirectInputEnumEffects Class ..............................................189
DirectInput Technologies and Components ......................................190
Action Mapping ............................................................................190
Force Feedback ..............................................................................190
The Keyboard Component ............................................................191
Joysticks, Yokes, and Steering Wheels ..........................................191
The Mouse Component ................................................................191
Summary ............................................................................................191

11 Action Mapping 193


Managing User Input with Action Maps ............................................194
Preparing the Action Map ............................................................195
Configuring the Action Map ........................................................200
Summary ............................................................................................204

12 The Keyboard 205


Retrieving User Input from the Keyboard ..........................................206
Creating Your Objects ..................................................................206
Setting the Keyboard Parameters ..................................................206
Accessing the Keyboard ................................................................207
Retrieving Immediate Data from the Keyboard ............................207
Two Methods of Analysis ..............................................................214
The Keyboard Example ......................................................................215
Summary ............................................................................................217

13 The Joystick 219


Retrieving User Input from the Joystick ............................................220
Creating Your Objects ..................................................................220
Getting the Joystick Capabilities ..................................................222
Setting Joystick Device Properties ................................................223
Dead Zones ....................................................................................224
Using the Joystick ........................................................................225
Force Feedback ..................................................................................227
Force-Feedback Effects ................................................................228
Force Feedback Properties ............................................................228
The Joystick Example ........................................................................228
Summary ............................................................................................236

14 The Mouse 237


Retrieving User Input from the Mouse ..............................................238
Creating Your Objects ..................................................................238
Setting the Buffer Size ..................................................................239
Event Notification ........................................................................239
Considerations for DirectInput Use of the Mouse ............................240
Retrieving the Mouse Data ............................................................241
Analyzing the DIDEVICEOBJECTDATA Variable ....................241
Immediate Data ..................................................................................244
Summary ............................................................................................244

PART IV Adding Music and Sounds with DirectAudio 245


15 DirectX Audio—DirectMusic and DirectSound 247
What Is DirectMusic? ........................................................................248
DirectMusic Architectural Overview ............................................248
DirectMusic Classes ......................................................................249
What Is DirectSound? ........................................................................250
DirectSound Architectural Overview ............................................251
DirectSound Classes ......................................................................252
Objects for Sound Effects ............................................................253
Sound Buffers ................................................................................254
DirectSound 3D ............................................................................254
When Should I Use DirectSound Versus DirectMusic? ....................256
Summary ............................................................................................256

16 Composing Music 257


The Loader Object ..............................................................................258
Using the DirectMusic Loader Object ..........................................258
The Performance Object ....................................................................259
Using the DirectMusic Performance Object ................................259
The Segment Object ..........................................................................263
Using the DirectMusic Segment Object ........................................263
The Audio Parameter Structure ..........................................................264
Using the DirectMusic Audio Parameter Type ............................264
The Band Object ................................................................................265
Using the DirectMusic Band Object ............................................265
Modifying the Performance ................................................................265
Volume ..........................................................................................266
Tempo ............................................................................................266
A DirectMusic Example ....................................................................266
Declaring the Variables ..................................................................267
Initializing the Performance ..........................................................267
Using the Loader Object ..............................................................267
Using the Segment Object ............................................................268
Using the Performance Object ......................................................268
DirectMusic Producer ........................................................................268
Summary ............................................................................................269

17 Adding Sounds to Your Application with DirectSound 271


The DirectSound8 Object ..................................................................272
Using the DirectSound8 Object ....................................................272
Buffers ................................................................................................273
Primary Sound Buffer ..................................................................273
Secondary Sound Buffer ..............................................................273
The DirectSound Buffer Descriptor ..................................................274
Buffer Descriptor Members ..........................................................275
Creating the DirectSound Buffer Descriptor
(DSBUFFERDESC) ..................................................................275
Using the Sound Buffers ....................................................................277
Enumerating the Sound Driver ......................................................277
Creating the Sound Buffer ............................................................277
Loading the Buffer ........................................................................278
Playing the Buffer ........................................................................278
Modifying the Sound Buffer ..............................................................279
Frequency ......................................................................................279
Panning ..........................................................................................279
Volume ..........................................................................................279
Example ........................................................................................279
Recording ............................................................................................280
Creating the Capture Object ..........................................................280
Creating the Capture Buffer ..........................................................280
Recording ......................................................................................281
Converting the Buffer ....................................................................282
Saving the File ..............................................................................283
DirectSound3D ..................................................................................283
Coordinates ....................................................................................283
Distances ........................................................................................284
The 3D Buffer ..............................................................................284
The 3D Listener ............................................................................285
Summary ............................................................................................286
PART V Streaming Media with DirectShow 287
18 Introduction to DirectShow 289
Uses for DirectShow ..........................................................................290
Objects in DirectShow ........................................................................290
Filter ..............................................................................................290
Filter Graph ..................................................................................291
Pin ..................................................................................................291
DirectShow Architecture ....................................................................291
Supported Media Formats and Codecs ..............................................293
Creating a Reference to the ActiveMovie Type Library ....................295
Summary ............................................................................................296

19 Using DirectShow for Digital Editing 297


DirectShow Editing Services (DES) ..................................................298
The AMTimeLine Class ................................................................298
The AMTimelineComp Class ........................................................299
The AMTimelineEffect Class ........................................................300
The AMTimelineGroup Class ......................................................300
The AMTimelineObj Class ..........................................................301
The AMTimelineSrc Class ............................................................302
The AMTimelineTrack Class ........................................................303
The AMTimelineTrans Class ........................................................303
The IAMErrorLog Class ..............................................................304
The IAMSetErrorLog Class ..........................................................304
The IAMTimelineEffectable Class ................................................304
The IAMTimelineSplittable Class ................................................305
The IAMTimelineTransable Class ................................................305
The IAMTimelineVirtualTrack Class ............................................306
The IEnumFilters Class ................................................................306
The IEnumMediaTypes Class ......................................................306
The IEnumPins Class ....................................................................306
The IErrorLog Class ......................................................................306
The IFilterGraph Class ..................................................................307
The IGraphBuilder Class ..............................................................307
The IMediaFilter Class ..................................................................308
The IMediaSample Class ..............................................................309
The IPersistStream Class ..............................................................309
The IPin Class ..............................................................................310
The IReferenceClock Class ..........................................................310
The ISmartRenderEngine Class ....................................................311
The MediaDet Class ......................................................................311
The MediaLocator Class ..............................................................312
The RenderEngine Class ..............................................................312
The SmartRenderEngine Class ......................................................313
The Xml2Dex Class ......................................................................313
Summary ............................................................................................313

20 Multimedia Players 315


The ActiveMovie DLL ........................................................................316
The FilgraphManager Object ........................................................316
The IAMCollection Class ..............................................................316
The IAMStats Class ......................................................................317
The IBasicAudio Class ..................................................................317
The IBasicVideo Class ..................................................................317
The IBasicVideo2 Class ................................................................319
The IDeferredCommand Class ......................................................319
The IFilterInfo Object ..................................................................319
The IMediaEvent Object ..............................................................320
The IMediaEventEx Object ..........................................................320
The IMediaPosition Object ..........................................................321
The IMediaTypeInfo Object ..........................................................321
The IPinInfo Object ......................................................................321
The IQueueCommand Class ..........................................................322
The IRegFilterInfo Object ............................................................322
The IVideoWindow Class ..............................................................323
An Example Using the ActiveMovie DLL ........................................324
Microsoft Web DVD Control ............................................................330
The DVDRect Class ......................................................................330
The MSDVDAdm Class ................................................................331
The MSWebDVD Class ................................................................332
Summary ............................................................................................336

PART VI Multiuser Strategies with DirectPlay 337


21 Using DirectPlay to Create Multiplayer Games 339
A DirectPlay Primer ..........................................................................340
Service Provider ............................................................................340
Connection ....................................................................................341
Session ..........................................................................................341
Player ............................................................................................341
Group ............................................................................................341
Host ................................................................................................341
Message ........................................................................................342
Network Providers ........................................................................342
System Messages ..........................................................................343
xiv
DIRECTX 8 AND VISUAL BASIC DEVELOPMENT

Lobby ............................................................................................343
GUID ............................................................................................343
Communication Models ......................................................................344
Peer-to-Peer ..................................................................................344
Client/Server ..................................................................................344
DirectPlay Events ..............................................................................346
A DirectPlay Peer-to-Peer Client ......................................................346
Assigning a GUID ........................................................................346
Initializing the DirectPlay Peer-to-Peer Client ............................346
Finding the Available Service Providers ......................................347
Finding the Game Host ................................................................347
Connecting to the Session ............................................................347
Managing the Session ....................................................................348
Sending Messages ........................................................................348
Closing the Session ......................................................................348
A DirectPlay Client/Server Connection ............................................349
Assigning a GUID ........................................................................349
Initializing the DirectPlay Client/Server Client ............................349
Finding the Available Service Providers ......................................349
Finding the Game Host ................................................................350
Connecting to the Session ............................................................350
Managing the Session ....................................................................350
Sending Messages ........................................................................351
Closing the Session ......................................................................351
Summary ............................................................................................351

22 Using Lobbies to Create Player Interaction 353


Lobby Architecture ............................................................................354
Lobby Servers ....................................................................................355
Lobby Clients ......................................................................................356
The DirectPlay8LobbyClient Class ..............................................357
DirectPlay Lobbied Application ........................................................357
The DirectPlay8LobbiedApplication Class ..................................358
DirectPlay Lobby Event ....................................................................358
The DirectPlay8LobbyEvent Class ..............................................359
Summary ............................................................................................359

23 Managing Games with DirectPlay 361


DirectPlay Concepts ..........................................................................362
DirectPlay Architecture ......................................................................363
Using the DirectPlay8Address Class ............................................363
Using the DirectPlay8Client Class ................................................366
xv
CONTENTS

Using the DirectPlay8Event Class ................................................367


Using the DirectPlay8Peer Class ..................................................369
Using the DirectPlay8Server Class ..............................................371
Summary ............................................................................................373

24 Using DirectPlay Voice in Your Application 375


DirectPlay Concepts ..........................................................................376
Voice Session ................................................................................376
Transmission Target ......................................................................376
DirectPlay Voice Architecture ............................................................377
Using the DirectPlayVoiceClient8 Class ......................................378
Using the DirectPlayVoiceEvent8 Class ......................................379
Using the DirectPlayVoiceServer8 Class ......................................380
Using the DirectPlayVoiceTest8 Class ..........................................381
Using DirectPlay Voice ......................................................................381
DirectPlay Voice on a Peer-to-Peer Connection ............................381
DirectPlay Voice on a Forwarding Server Connection ................382
DirectPlay Voice on a Mixing Server Session ..............................382
Summary ............................................................................................382

PART VII Finishing Touches 383


25 DirectSetup 385
Working with the DirectXSetup Libraries ..........................................386
Initializing the DirectXSetup Functions ........................................386
Using the DirectXSetupGetVersion Function ..............................387
Using the DirectXSetup Function ................................................388
Using the Package and Deployment Wizard ......................................389
Creating the Setup Package ..........................................................389
A Little Voodoo ............................................................................393
Deploying the Setup ......................................................................394
Alternatives to the Package and Deployment Wizard ........................395
Summary ............................................................................................395

PART VIII Appendix 397


A VB .NET and DirectX 399
Setting Up DirectX for Use in VB .NET ..........................................400
Converting the DirectX DLLs to VB .NET Format ......................400
Creating a Reference to the DirectX 8 Type Library ....................400
Debugging Your Code in VB .NET ....................................................403
Error Trapping in VB .NET ..........................................................403
New Debugging Features of VB .NET ........................................404

Index 405
Another Random Document on
Scribd Without Any Related Topics
more in quantity. He needs to drink water before his training and at
rest periods during the game.
If he is too fat, he should train off the superfluous amount by
exercise and by judiciously abstaining from much sugars, starches,
and fats.
Diets for reduction, however, must be governed by the condition of
the kidneys and the digestive organs.
Deep breathing habits are imperative though he must be careful
not to overtax lungs or heart by hard continuous straining, either at
breathing or at exercise.

The man engaged in muscular work requires


plenty of food; he can digest foods which the The Laboring
professional or business man, or the man of Man
sedentary habits, cannot. He will probably be able
to drink coffee and tea without any disturbance to nerves or to
digestion. In his muscular work he liberates the waste freely and
needs fats, starches, and sugars to supply the heat and energy. This
is especially true of men who work in the fresh air; the muscular
action liberates waste and heat and the full breathing freely oxidizes
the waste, putting it in condition to be excreted through lungs, skin,
kidneys, and intestines.
He should have more meat, eggs, and nitrogenous foods, and he
also needs more carbonaceous foods to supply heat and energy, as
given in Diet V. Three hearty meals a day are necessary.
His muscular movements keep the circulation forceful and the vital
organs strong so that his diet may be almost as heavy as that of the
football player. Meat or eggs, twice a day, with tea or coffee, and
even pie may be eaten with impunity. He needs a good nourishing
breakfast of bacon and eggs or meat, also potatoes, or a liberal
allowance of bread and butter, corn bread, muffins, etc.
DIET V
Breakfast
Calories
4 tablespoonfuls fresh or stewed fruit with sugar 100
3 tablespoonfuls oatmeal with milk and sugar 200
1 portion ham four inches square with fat 200
2 eggs 140
2 cups coffee with cream and sugar 250
2 slices bread and butter 250
1140
Luncheon
2 sandwiches (cheese) 300
1 sandwich (marmalade) 125
1 pint of milk 200
1 slice cake or pie 100
725
Dinner
1/ pint oyster stew or vegetable purée 100
2
2 baked potatoes 100
4 tablespoonfuls macaroni with tomatoes and butter sauce 200
4 slices thick bread and butter 500
2 portions roast beef (fat) 400
2 cups coffee 250
1 slice pie 100
1650
1140
725
3515

The following constitutes an average which will


Condition of supply the daily requirement for the aged, or for
Age one at any age whose organs are not functioning
strongly.
DIET VI
Breakfast
Cereal, well cooked, with cream or sugar. Oatmeal is preferable because it is
laxative
One egg, boiled, poached, or baked (soft)
One slice of toast
Cereal coffee
Dinner
Bouillon or soup
Meat—small portion
Potato (preferably baked)
One vegetable
Cup custard, or bread, rice, or other light pudding with lemon cream sauce
Supper
Soup
Bread and butter
Stewed fruit
Tea

These individuals need little meat. Tea, if used, should not be


strong and, for reasons given on page 104, should never be allowed
to steep.
If the habit of life is active, if one exercises regularly, and if the
constitution is vigorous and the body not too encumbered with fat, a
greater variety and amount of food may be allowed, but great
regularity should be observed concerning the diet and the hours for
meals. Thorough mastication is more than ever a necessity.
If inclined to constipation, or if the kidneys are inactive, grapes or
an apple, or some fruit, well chewed, may be eaten just before
retiring.
Careful attention must be given to securing thorough removal of
waste by attention to the eliminative organs, not overloading them.

TABLES OF USE IN MAKING UP BALANCED DIETS


The following table from Dudley Roberts is of material help in
making up combinations of foodstuffs for balanced diets:
Calories of Grams of
FOOD STUFF Quantity
Energy Protein
Milk 8 oz. 1 glass 160 8.4
Skim milk 8 oz. 1 glass 80 8.0
Cream 8 gm. 1 tsp. 20 0.2
20
Condensed milk (sweetened) hp. tsp. 50 1.8
gm.
Condensed milk
20 ” ” ” 40 2.0
(unsweetened)
Chocolate powd. 10 ” ” ” 90 1.2
Beef juice, beef tea, bouillon,
5 oz. teacup 5-30 1.3
clear soup
Cream soup 8” soup plate 100-250
10
Sugar hp. tsp. 40
gm.
Egg (whole) 50 ” 1 70
Egg (yolk) — 1 55 2.4
10
Butter 1 in. cube 65 0.6
gm.
Cheese ”” ” ” 45 3.0
Meat and fish (lean) 50 ” hp. tbsp. 60 12.0
Meat (medium fat) ”” ” ” 100 7.0
” (very fat) ”” ” ” 150 4.0
Oysters (small) 8” 1 3 0.5
Oysters (large) 25 ” 1 10 1.5
Crackers 3-10 ” 1 12-30 3-6
30-40
Cereals (cooked) teacup 110-150 3-5

Cereals (prepared) 5-7 ” hp. tsp. 18-25 0.5-0.7
Shredded wheat 30 ” 1 100 3.0
Triscuit 15 ” 1 50 1.5
Peas (fresh or canned) 35 ” hp. tbsp. 25 2.0
Peas (dried) 25 ” ” ” 100 6.0
Bean (dried) 25 ” ” ” 90 5.0
Bean (fresh or canned) 30 ” ” ” 30 1.0
Potatoes (medium size) 90 ” 1, 3 in. long 80 1.0
Jelly (sweet) — teacup 50-100 —
Apples 100 ” 1 40 0.2
Oranges 125 ” 1 med. size 60 0.5
Bananas 50 ” 1 med. size 45 0.7
1 saucer
Dried fruit (prunes, etc.) 100 ” 100-200 1-3
medium

The following tables[11] are exceptionally valuable in compiling


diets in various combinations. One can readily determine the number
of grams in various servings of different foods. For example: a small
serving of beef (round), containing some fat, weighs 36 grams; 40
per cent., 14.4 grams, is protein, and 60 per cent., 21.6 grams, is fat
(no carbohydrates). One ordinary thick slice of white, home-made
bread weighs 38 grams; 13 per cent., 4.94 grams, is protein; 6 per
cent., 2.28 grams, is fat, and 81 per cent., 30.78 grams, is
carbohydrate.
The proportion of proteins, carbohydrates, and fats required by the
average individual as suggested on page 208 can be readily made
up from various combinations of foods. Each individual may
ascertain whether he is taking too much food, or too large a
proportion of proteins or of carbohydrates or fats.

TABLE OF 100 FOOD UNITS

“Portion” Wt. of 100


Containing 100 Per cent. of
NAME OF FOOD Calories
Food Units
(approx.) Grams Oz. Proteid Fat Carbohydrate
COOKED MEATS
[13]Beef, r’nd, boiled
Small serving 36 1.3 40 60 00
(fat)
[13]Beef, r’d, boiled
Large serving 62 2.2 90 10 00
(lean)
[13]Beef, r’d, boiled Small serving 44 1.6 60 40 00
(med.)
[13]Beef, 5th rib,
Half serving 18.5 0.65 12 88 00
roasted
[13]Beef, 5th rib, Very small
25 0.88 18 82 00
roasted s’v’g.
[14]Beef, ribs boiled Small serving 30 1.1 27 73 00
[12]Calves foot jelly 112 4. 19 00 81
[12]Chicken, canned One thin slice 27 0.96 23 77 00
[12]Lamb chops,
broiled, av. One small 27 0.96 24 76 00
chop
[12]Lamb leg, roasted Ord. serving 50 1.8 40 60 00
[13]Mutton, leg, boiled Large serving 34 1.2 35 65 00
[13]Pork, ham, boiled
Small serving 20.5 0.73 14 86 00
(fat)
[13]Pork, ham, boiled Ord. serving 32.5 1.1 28 72 00
[13]Pork, ham, r’st’d
Small Serving 27 0.96 19 81 00
(fat)
[13]Pork, ham, r’st’d
34 1.2 33 67 00
(lean) Small serving
[13]Veal, leg, boiled Large serving 67.5 2.4 73 27 00
VEGETABLES
[12]Artichokes, av.
430 15. 14 0 86
canned
[12]Asparagus, av.
540 19. 33 5 62
canned
[12]Asparagus, av.
206 7.19 18 63 19
cooked
[12]Beans, baked, Small side
75 2.66 21 18 61
canned dish
[12]Beans, Lima, Large side
126 4.44 21 4 75
canned dish
[12]Beans, string,
Five servings 480 16.66 15 48 37
cooked
[12]Beets, edible Three 245 8.7 2 23 75
servings
portion, cooked
[12]Cabbage, edible
310 11 20 8 72
portion
Carrots, cooked Two servings 164 5.81 10 34 56
[12]Cauliflower, as
312 11. 23 15 62
purchased
[12]Celery, edible
540 19. 24 5 71
portion
Corn, sweet, cooked One side dish 99 3.5 13 10 77
[12]Cucumbers, edible
565 20. 18 10 72
pt.
[12]Eggplant, edible pt. 350 12. 17 10 73
Lentils, cooked 89 3.15 27 1 72
[12]Lettuce, edible pt. 505 18. 25 14 61
[12]Mushrooms, as
215 7.6 31 8 61
purchased
Onions, fresh, edible
200 7.1 13 5 82
pt.
[12]Onions, cooked 2 large s’v’gs 240 8.4 12 40 48
Parsnips, cooked 163 5.84 10 34 56
[12]Peas, green,
Two servings 178 6.3 25 3 72
canned
[12]Peas, green,
One serving 85 3. 23 27 50
cooked
One good
Potatoes, baked 86 3.05 11 1 88
sized
[12]Potatoes, boiled One large
102 3.62 11 1 88
sized
[12]Potatoes
mashed(creamed) 89 3.14 10 25 65
One serving
[12]Potatoes, chips One-half s’v’g 17 0.6 4 63 33
[12]Potatoes, sweet, Half av.
49 1.7 6 9 85
cooked potato.
[12]Pumpkins, edible
380 13. 15 4 81
pt.
Radishes, as 480 17. 18 3 79
purchased
Rhubarb, edible pt. 430 15. 10 27 63
[12]Spinach, cooked Two ord.
174 6.1 15 66 19
s’v’gs
Squash, edible pt. 210 7.4 12 10 78
[12]Succotash, canned Ord. serving 100 3.5 15 9 67
[12]Tomatoes, fresh as
Four av. 430 15. 15 16 69
purchased
Tomatoes, canned 431 15.2 21 7 72
[12]Turnips, edible pt. 2 large s’v’gs 246 8.7 13 4 83
Vegetable oysters 273 9.62 10 51 39
FRUITS (DRIED)
[12]Apples, as
34 1.2 3 7 90
purchased
Apricots, as purchased 35 1.24 7 3 90
[12]Dates, edible
Three large 28 0.99 2 7 91
portion
[12]Dates, as
31 1.1 2 7 91
purchased
[12]Figs, edible portion One large 31 1.1 5 0 95
[12]Prunes, edible
Three large 32 1.14 3 0 97
portion
[12]Prunes, as
38 1.35 3 0 97
purchased
[12]Raisins, edible
28 1. 3 9 88
portion
[12]Raisins, as
31 1.1 3 9 88
purchased
FRUITS (FRESH OR COOKED)
[12]Apples, as
Two apples 206 7.3 3 7 90
purchased
Apples, baked 94 3.3 2 5 93
Apples, sauce Ord. serving 111 3.9 2 5 93
Apricots, cooked Large serving 131 4.61 6 0 94
[12]Bananas, edible pt. One large 100 3.5 5 5 90
[12]Blackberries 170 5.9 9 16 75
Blueberries 128 4.6 3 8 89
[12]Blueberries,
165 5.8 4 9 87
canned
Half ord.
Cantaloupe 243 8.6 6 0 94
serv’g
[12]Cherries, edible
124 4.4 5 10 85
portion
[12]Cranberries, as
210 7.5 3 12 85
purchased
[12]Grapes, as
136 4.8 5 15 80
purchased, av.
Grape fruit 215 7.57 7 4 89
Grape juice Small glass 120 4.2 0 0 100
Gooseberries 261 9.2 5 0 95
Lemons 215 7.57 9 14 77
[12]Lemon juice 246 8.77 0 0 100
Nectarines 147 5.18 4 0 96
Olives, ripe About seven 37 1.31 2 91 7
Oranges, as One very
270 9.4 6 3 91
purchased, av. large
[12]Oranges, juice Large glass 188 6.62 0 0 100
Peaches, as Three
290 10. 7 2 91
purchased, av. ordinary
[12]Peaches, sauce Ord. serving 136 4.78 4 2 94
Ordinary
Peaches, juice 136 4.80 0 0 100
glass
One large
Pears 173 5.40 4 7 89
pear
[12]Pears, sauce 113 3.98 3 4 93
Pineapples, edible
226 8. 4 6 90
p’t’n, av.
[12]Raspberries, black 146 5.18 10 14 76
Raspberries, red 178 6.29 8 0 92
Strawberries, av. Two servings 260 9.1 10 15 75
[12]Watermelon, av. 760 27. 6 6 88
DAIRY PRODUCTS
[12]Butter Ordinary pat. 12.5 0.44 0.5 99.5 00
[12]Buttermilk 11/2 glass 275 9.7 34 12 54
[12]Cheese, Am., pale 11/2 cubic in. 22 0.77 25 73 2
[12]Cheese, cottage 4 cubic in. 89 3.12 76 8 16
[12]Cheese, full cream 11/2 cubic in. 23 0.82 25 73 2
[12]Cheese,
11/2 cubic in. 29.5 1.05 22 76 2
Neufchatel
[12]Cheese, Swiss 11/2 cubic in. 23 0.8 25 74 1
[12]Cheese, pineapple 11/2 cubic in. 20 0.72 25 73 2
[12]Cream 1/ ord. glass 49 1.7 5 86 9
4
Kumyss 188 6.7 21 37 42
[12]Milk, condensed,
30 1.06 10 23 67
sweet’nd
[12]Milk, condensed,
59 2.05 24 50 26
unsw’t’nd
[12]Milk, skimmed 11/2 glass 255 9.4 37 7 56
[12]Milk, whole Small glass 140 4.9 19 52 29
Milk, human, 2d week 162 5.7 11 47 42
Milk, human, 3d month 171 6 7 46 47
[12]Whey Two glasses 360 13 15 10 75
CAKES, PASTRY, PUDDINGS, AND DESSERTS
[12]Cake, chocolate Half ord. sq.
28 0.98 7 22 71
layer pc.
[12]Cake, gingerbread Half ord. sq.
27 0.96 6 23 71
pc.
Cake, sponge Small piece 25 0.89 7 25 68
Custard, caramel 71 2.51 19 10 71
Custard, milk Ordinary cup 122 4.29 26 56 18
Two-thirds
Custard, tapioca 69.5 2.45 9 12 79
ord.
[12]Doughnuts Half a
23 0.8 6 45 49
doughnut
[12]Lady fingers Two 27 0.95 10 12 78
[12]Macaroons Four 23 0.82 6 33 61
[12]Pie, apple One-third
38 1.3 5 32 63
piece
[12]Pie, cream One-fourth pc. 30 1.1 5 32 63
[12]Pie, custard One-third
55 1.9 9 32 59
piece
[12]Pie, lemon One-third
38 1.35 6 36 58
piece
[12]Pie, mince One-fourth
35 1.2 8 38 54
piece
[12]Pie, squash One-third
55 1.9 10 42 48
piece
Pudding, apple sago 81 3.02 6 3 91
Pudding, brown betty Half ord. s’v’g 56.6 2. 7 12 81
Very small
Pudding, cream rice 75 2.65 8 13 79
s’v’g
Pudding, Indian meal Half ord. s’v’g 56.6 2. 12 25 63
Pudding, apple tapioca Small serving 79 2.8 1 1 98
Tapioca, cooked Ord. serving 108 3.85 1 1 98
SWEETS AND PICKLES
[12]Catsup, tomato, av. 170 6. 10 3 87
Candy, plain 26 0.9 0 0 100
Candy, chocolate 30 1.1 1 4 95
[12]Honey Four teasp’ns 30 1.05 1 0 99
[12]Marmalade
28.3 1 0.5 2.5 97
(orange)
Molasses, cane 35 1.2 0.5 0 99.5
[12]Olives, green,
edible portion Five to 32 1.1 1 84 15
seven
[12]Olives, ripe, edible
38 1.3 2 91 7
portion Five to seven
[12]Pickles, mixed 415 14.6 18 15 67
Three heap’g
[12]Sugar, granulated tsp. or 11/2 24 0.86 0 0 100
lumps
[12]Sugar, maple Four
29 1.03 0 0 100
teaspoons
[12]Syrup, maple Four
35 1.2 0 0 100
teaspoons
NUTS, EDIBLE PORTION
[12]Almonds, av. Eight to 15 15 0.53 13 77 10
[12]Beechnuts 14.8 0.52 13 79 8
[12]Brazil nuts Three ord.
14 0.49 10 86 4
size
[12]Butternuts 14 0.50 16 82 2
[12]Cocoanuts 16 0.57 4 77 19
[12]Chestnuts, fresh,
40 1.4 10 20 70
av.
[12]Filberts, av. Ten nuts 14 0.48 9 84 7
[12]Hickory nuts 13 0.47 9 85 6
[12]Peanuts, av. Thirteen
18 0.62 20 63 17
double
[12]Pecans, polished About eight 13 0.46 6 87 7
[12]Pine nuts
About eighty 16 0.56 22 74 4
(pignolias)
[12]Walnuts, California About six 14 0.48 10 83 7
CEREALS
[12]Bread, brown, Ord. thick
43 1.5 9 7 84
average slice
[12]Bread, corn (johnny
Small square 38 1.3 12 16 72
cake) av.
[12]Bread, white, home
38 1.3 13 6 81
made Ord. thick slice
[12]Cookies, sugar Two 24 0.83 7 22 71
Corn flakes, toasted Ord. serving 27 0.97 11 1 88
[12]Corn meal, 21/2 level 27 0.96 10 5 85
granular, av. tbsp.
Corn meal, unbolted,
Three tbsp. 26 0.92 9 11 80
av.
[12]Crackers, graham Two crackers 23 0.82 9.5 20.5 70
[12]Crackers, oatmeal Two crackers 23 0.81 11 24 65

[12]Crackers, soda 31/2 24 0.83 9.4 20 70.6


“Uneedas”
[12]Hominy, cooked Large serving 120 4.2 11 2 87
[12]Macaroni, av. 27 0.96 15 2 83
Macaroni, cooked Ord. serving 110 3.85 14 15 71
[12]Oatmeal, boiled 11/2 serving 159 5.6 18 7 75
[12]Popcorn 24 0.86 11 11 78
[12]Rice, uncooked 28 0.98 9 1 90
[12]Rice, boiled Ord. cereal
87 3.1 10 1 89
dish
[12]Rice, flakes Ord. cereal
27 0.94 8 1 91
dish
[12]Rolls, Vienna, av. One large roll 35 1.2 12 7 81
[12]Shredded wheat One biscuit 27 0.94 13 4.5 82.5
[12]Spaghetti, average 28 0.97 12 1 87
[12]Wafers, vanilla Four 24 0.84 8 13 71
Wheat, flour, e’t’e
Four tbsp. 27 0.96 15 5 80
w’h’t, av.
[12]Wheat, flour,
41/2 tbsp. 27 0.96 15 5 80
graham, av.
[12]Wheat, flour,
patent, family and Four tbsp. 27 0.97 12 3 85
straight grade spring
wheat, av.
[12]Zwieback Size of thick
23 0.81 9 21 70
slice of bread
MISCELLANEOUS
[12]Eggs, hen’s, boiled One large egg 59 2.1 32 68 00
[12]Eggs, hen’s, whites Of six eggs 181 6.4 100 0 00
[12]Eggs, hen’s, yolks Two yolks 27 0.94 17 83 00
[12]Omelet 94 3.3 34 60 6
[12]Soup, beef, av. 380 13. 69 14 17
[12]Soup, bean, av. Very large
150 5.4 20 20 60
plate
[12]Soup, cream of
Two plates 180 6.3 16 47 37
celery
[12]Consommé 830 29. 85 00 15
[12]Clam chowder Two plates 230 8.25 17 18 65
[12]]Chocolate, bitter Half-a-square 16 0.56 8 72 20
[12]Cocoa 20 0.69 17 53 30
Ice cream (Phila.) Half serving 45 1.6 5 57 38
Ice cream (New York) Half serving 48 1.7 7 47 46

TABLES SHOWING AVERAGE HEIGHT, WEIGHT,


SKIN SURFACE, AND FOOD UNITS REQUIRED
DAILY WITH VERY LIGHT EXERCISE

Boys
Height in Weight in Surface in Square Calories or Food
Age
Inches Pounds Feet Units
5 41.57 41.09 7.9 816.2
6 43.75 45.17 8.3 855.9
7 45.74 49.07 8.8 912.4
8 47.76 53.92 9.4 981.1
9 49.69 59.23 9.9 1043.7
10 51.58 65.30 10.5 1117.5
11 53.33 70.18 11.0 1178.2
12 55.11 76.92 11.6 1254.8
13 57.21 84.85 12.4 1352.6
14 59.88 94.91 13.4 1471.3

Girls
Height in Weight in Surface in Square Calories or Food
Age
Inches Pounds Feet Units
5 41.29 39.66 7.7 784.5
6 43.35 43.28 8.1 831.9
7 45.52 47.46 8.5 881.7
8 47.58 52.04 9.2 957.1
9 49.37 57.07 9.7 1018.5
10 51.34 62.35 10.2 1081.0
11 53.42 68.84 10.7 1148.5
12 55.88 78.31 11.8 1276.8
Men
Height in Weight in Surface in Calories Food Units
Proteids Total
Inches Pounds Square Feet or Fats Carbohydrates
61 131 15.92 197 591 1182 1970
62 133 16.06 200 600 1200 2000
63 136 16.27 204 612 1224 2040
64 140 16.55 210 630 1260 2100
65 143 16.76 215 645 1290 2150
66 147 17.06 221 663 1326 2210
67 152 17.40 228 684 1368 2280
68 157 17.76 236 708 1416 2360
69 162 18.12 243 729 1458 2430
70 167 18.48 251 753 1506 2510
71 173 18.91 260 780 1560 2600
72 179 19.34 269 807 1614 2690
73 185 19.89 278 834 1668 2780
74 192 20.33 288 864 1728 2880
75 200 20.88 300 900 1800 3000

Women
Height in Weight in Surface in Calories Food Units
Proteids Total
Inches Pounds Square Feet or Fats Carbohydrates
59 119 14.82 179 537 1074 1790
60 122 15.03 183 549 1098 1830
61 124 15.29 186 558 1116 1860
62 127 15.50 191 573 1146 1910
63 131 15.92 197 591 1182 1970
64 134 16.13 201 603 1206 2010
65 139 16.48 209 627 1254 2090
66 143 16.76 215 645 1290 2150
67 147 17.06 221 663 1326 2210
68 151 17.34 227 681 1362 2270
69 155 17.64 232 696 1392 2320
70 159 17.92 239 717 1434 2390
Note.—With active exercise an increase of about 20 per cent. total
food units may be needed.

DIETARY CALCULATION WITH FOOD VALUES IN


CALORIES PER OUNCE
Proteids Fats Carbohydrates Total
Breakfast
Gluten gruel, 5 oz. 23.5 1.0 30.0
Soft-boiled egg 26.3 41.9
Malt honey, 1 oz. 86.2
Creamed potatoes, 5 oz. 15.0 40.0 104.0
Zwieback, 2 oz. 22.8 52.8 171.6
Pecans, 3/4 oz. 8.4 141.0 13.4
Apple, 5 oz. 2.5 6.5 83.0
98.5 283.2 488.2 869.9

DIETARY CALCULATION WITH FOOD SERVED IN 100


CALORIES PORTIONS
Portions in serving Proteids Fats Carbohydrates Total
Dinner
French soup 1/ 10 20 20
2
Nut sauce 1 29 55 16
Macaroni, egg 1 15 59 26
Baked potato 2 22 2 176
Cream gravy 1/ 5 33 12
2
Biscuit 1
1 /2 20 2 128
Butter 1 1 99
Honey 2 200
Celery 1/ 4 21
4
Apple juice 1/ 50
2
101/4 106 270 649 1025
Hourly Outgo in Heat and Energy from the Human Body
as Determined in the Respiration Calorimeter
by the U. S. Dept. of Agriculture
Average (154 lbs.) Calories
Man at rest (asleep) 65
Sitting up (awake) 100
Light exercise 170
Moderate exercise 190
Severe exercise 450
Very severe exercise 600

FOOTNOTES:

[11] These are from Food and Dietetics (Norton), published by


the American School of Home Economics, Chicago. They are
used in a number of schools of Domestic Science and in the
Dietetic kitchens in hospitals.
[12] Chemical Composition of American Food Materials,
Atwater and Bryant, U. S. Department of Agriculture, Bull. 28.
[13] Experiments on Losses in Cooking Meats (1900-03),
Grindley, U. S. Department of Agriculture, Bull. 141.
[14] Laboratory number of specimen, as per Experiments on
Losses in Cooking Meats.
CHAPTER X
DIET IN ABNORMAL CONDITIONS

I N the dietetic treatment of any disordered organ, the object must


be to give that organ as much rest from its regular work as is
consistent with keeping up the general nutrition of the system. The
stomach and intestines and liver are so closely allied that, when one
is affected, the others are liable to affection also, and the dietetic
treatment is regulated accordingly.
In abnormal conditions it is necessary to say that the food must be
regulated according to the case. Yet, broadly speaking, a diet largely
of protein, which is digested in the stomach, rests the intestines and
stimulates the liver, and a diet largely of carbohydrates rests the
stomach, because the gastric juice is not active in starch digestion.
When the body is not in normal condition, because certain
elements are lacking in the blood, these elements must be supplied
in larger proportions in the food, and the case is one for a food
chemist, or for one who has made food conditions a study.
The better medical colleges, recognizing the importance of proper
food in health and disease, have in the last few years broadened
their curriculum to include the subject of dietetics. Educated physical
culturists and food specialists, for the correction of deranged
conditions of the system, due to poor circulation and abnormal nerve
and blood conditions, are doing much of the corrective work, due to
the fact that instruction has not been given in the medical colleges.
Diets for the reduction of an abnormal amount of fat must also be
governed according to the individual condition.
In the early stages of various diseases, when toxins are being
produced, as a rule the system is not properly eliminating the waste,
and it is often advisable to abstain from food for from one to three
days, according to conditions. Brisk exercise, deep breathing, and a
free use of water are desirable. A laxative is often recommended.
The diets given here for abnormal conditions are to enable those
in charge of an invalid to gain an intelligent understanding of the
needs of the system and to supply those needs through the proper
foods. In serious cases, however, special diets will be ordered by the
medical attendant to suit the needs of the individual.
A chemical analysis of the blood and the excretions is often the
only method of determining just the diet in the individual case.
Government chemical laboratories in charge of efficient chemists
should be so located as to be accessible to every physician.
The system readily excretes an excess of vegetable products,
and, as a rule, no acute difficulties result from such an excess. Such
chronic difficulties as constipation, torpid liver, and indigestion,
however, frequently result when an excess of starch is taken above
that consumed in energy.
On account of the readiness with which putrefaction occurs in
protein products, care should be taken not to consume these in too
great proportion.
A study of the physical ailments of thousands of women has
shown, by the constituents in the blood and the condition of the
different organs of the digestive system, the habitual taste for foods.
One can usually determine which food the individual has formed a
habit of eating, because the system will show a lack of the elements
which that patient has denied herself on account of her likes and
dislikes.
It is necessary to change the mental attitude toward certain foods
before the system will readily assimilate them; thus, as stated, a
taste for foods which the body requires should be cultivated.
Every mother, with growing children, should be a thorough student
of the chemistry of food. If the child’s bones do not increase
sufficiently in size and strength after the second year, care in the
selection of foods rich in protein and phosphates of lime and
magnesium may correct it. Such a child should have scraped meat
and whole wheat bread with milk and eggs.
If the child stores up too much fat, increase the amount of exercise
and of oxygen consumed, and either cut down the proportion of
sweets and starches or decrease the quantity of food and require
more thorough mastication.
If one is thin and undernourished, chemical analysis of the
contents of the stomach, intestines, and urine is sometimes
desirable. The nerves should be relaxed, and proper food, exercise,
and breathing should accompany medical treatment, if medicine is
needed. Often an entire change in thought and diet are helpful.
Sometimes a torpid condition of the liver and sluggish activity of
the intestines are indicated. Special exercises to stimulate this
activity and to encourage correct poise and deep breathing are most
essential. The mind must often be stimulated and an interest be
awakened, directing the thoughts in new channels.
Worry and tensity of thought are among the chief causes in the
majority of cases of lack of flesh and of a very large number of blood
and digestive disorders.

In anemia there is either a decrease in the


number of red blood corpuscles or an insufficient Anemia
amount of blood. When there are too few red blood
corpuscles, “oxygen carriers,” the necessary quantity of oxygen is
not furnished the tissues and the system becomes clogged with
waste. The patient easily tires and is disinclined to exercise, thus the
decreased number of red corpuscles are not kept in forceful
circulation and the carbon dioxid is not freely thrown off by the lungs;
this further aggravates the condition.
Since the blood is made from the foods assimilated, the point is to
supply food which builds blood tissue. Exercise and deep breathing
will encourage the elimination of waste and promote a forceful
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookname.com

You might also like