Oolite
Loading...
Searching...
No Matches
OOTrumble Class Reference

#include <OOTrumble.h>

Inheritance diagram for OOTrumble:
Collaboration diagram for OOTrumble:

Instance Methods

(id) - initForPlayer:
(id) - initForPlayer:digram:
(void) - setupForPlayer:digram:
(void) - spawnFrom:
(void) - calcGrowthRate
(unichar *) - digram
(NSPoint) - position
(NSPoint) - movement
(GLfloat) - rotation
(GLfloat) - size
(GLfloat) - hunger
(GLfloat) - discomfort
(void) - actionIdle
(void) - actionBlink
(void) - actionSnarl
(void) - actionProot
(void) - actionShudder
(void) - actionStoned
(void) - actionPop
(void) - actionSleep
(void) - actionSpawn
(void) - randomizeMotionX
(void) - randomizeMotionY
(void) - drawTrumble:
(void) - updateTrumble:
(void) - updateIdle:
(void) - updateBlink:
(void) - updateSnarl:
(void) - updateProot:
(void) - updateShudder:
(void) - updateStoned:
(void) - updatePop:
(void) - updateSleep:
(void) - updateSpawn:
(NSDictionary *) - dictionary
(void) - setFromDictionary:
(id) - init [implementation]
(void) - dealloc [implementation]

Private Attributes

PlayerEntity * player
unichar digram [2]
GLfloat colorBase [4]
GLfloat colorPoint1 [4]
GLfloat colorPoint2 [4]
GLfloat colorEyes [4]
GLfloat * pointColor [6]
GLfloat hunger
GLfloat discomfort
GLfloat size
GLfloat max_size
GLfloat growth_rate
GLfloat rotation
GLfloat rotational_velocity
NSPoint position
NSPoint movement
NSPoint eye_position
NSPoint mouth_position
double animationTime
double animationDuration
enum trumble_animation animation
enum trumble_animation nextAnimation
int animationStage
enum trumble_mouth mouthFrame
enum trumble_eyes eyeFrame
OOTexture * texture
GLfloat saved_float1
GLfloat saved_float2
BOOL readyToSpawn

Detailed Description

Definition at line 65 of file OOTrumble.h.

Method Documentation

◆ actionBlink

- (void) actionBlink

Definition at line 300 of file OOTrumble.m.

301{
303 animationDuration = 0.5 + 0.5 * randf(); // time until next animation
304}
@ TRUMBLE_ANIM_BLINK
Definition OOTrumble.h:40
double animationDuration
Definition OOTrumble.h:94
enum trumble_animation nextAnimation
Definition OOTrumble.h:97
float randf(void)

References actionBlink, animationDuration, nextAnimation, randf(), and TRUMBLE_ANIM_BLINK.

Referenced by actionBlink, discomfort, updateBlink:, updateIdle:, updateProot:, updateShudder:, and updateSnarl:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionIdle

- (void) actionIdle

Definition at line 294 of file OOTrumble.m.

295{
297 animationDuration = 1.5 + 3.0 * randf(); // time until next animation
298}
@ TRUMBLE_ANIM_IDLE
Definition OOTrumble.h:39

References actionIdle, animationDuration, nextAnimation, randf(), and TRUMBLE_ANIM_IDLE.

Referenced by actionIdle, discomfort, updateBlink:, updateIdle:, updateProot:, updateShudder:, updateSleep:, and updateSnarl:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionPop

- (void) actionPop

Definition at line 330 of file OOTrumble.m.

331{
333 animationDuration = 1.5 + randf() * 3.0; // time until next animation
334}
@ TRUMBLE_ANIM_DIE
Definition OOTrumble.h:47

References actionPop, animationDuration, nextAnimation, randf(), and TRUMBLE_ANIM_DIE.

Referenced by actionPop, discomfort, and updateIdle:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionProot

- (void) actionProot

Definition at line 312 of file OOTrumble.m.

313{
315 animationDuration = 1.5 + 0.5 * randf(); // time until next animation
316}
@ TRUMBLE_ANIM_PROOT
Definition OOTrumble.h:42

References actionProot, animationDuration, nextAnimation, randf(), and TRUMBLE_ANIM_PROOT.

Referenced by actionProot, discomfort, updateBlink:, updateIdle:, updateSleep:, and updateSpawn:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionShudder

- (void) actionShudder

Definition at line 318 of file OOTrumble.m.

319{
321 animationDuration = 2.25 + randf() * 1.5; // time until next animation
322}
@ TRUMBLE_ANIM_SHUDDER
Definition OOTrumble.h:43

References actionShudder, animationDuration, nextAnimation, randf(), and TRUMBLE_ANIM_SHUDDER.

Referenced by actionShudder, discomfort, and updateIdle:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionSleep

- (void) actionSleep

Definition at line 336 of file OOTrumble.m.

337{
339 animationDuration = 12.0 + 12.0 * randf(); // time until next animation
340}
@ TRUMBLE_ANIM_SLEEP
Definition OOTrumble.h:46

References actionSleep, animationDuration, nextAnimation, randf(), and TRUMBLE_ANIM_SLEEP.

Referenced by actionSleep, discomfort, spawnFrom:, and updateIdle:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionSnarl

- (void) actionSnarl

Definition at line 306 of file OOTrumble.m.

307{
309 animationDuration = 4.0 + 1.0 * randf(); // time until next animation
310}
@ TRUMBLE_ANIM_SNARL
Definition OOTrumble.h:41

References actionSnarl, animationDuration, nextAnimation, randf(), and TRUMBLE_ANIM_SNARL.

Referenced by actionSnarl, discomfort, and updateIdle:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionSpawn

- (void) actionSpawn

Definition at line 342 of file OOTrumble.m.

343{
345 animationDuration = 9.0 + 3.0 * randf(); // time until next animation
346}
@ TRUMBLE_ANIM_SPAWN
Definition OOTrumble.h:45

References actionSpawn, animationDuration, nextAnimation, randf(), and TRUMBLE_ANIM_SPAWN.

Referenced by actionSpawn, discomfort, and updateIdle:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionStoned

- (void) actionStoned

Definition at line 324 of file OOTrumble.m.

325{
327 animationDuration = 1.5 + randf() * 3.0; // time until next animation
328}
@ TRUMBLE_ANIM_STONED
Definition OOTrumble.h:44

References actionStoned, animationDuration, nextAnimation, randf(), and TRUMBLE_ANIM_STONED.

Referenced by actionStoned, and discomfort.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calcGrowthRate

- (void) calcGrowthRate

Definition at line 252 of file OOTrumble.m.

253{
254 float rsize = size / max_size;
255 growth_rate = TRUMBLE_GROWTH_RATE * (1.0 - rsize);
256}
#define TRUMBLE_GROWTH_RATE
Definition OOTrumble.h:35
GLfloat size
Definition OOTrumble.m:278
GLfloat max_size
Definition OOTrumble.h:81
GLfloat growth_rate
Definition OOTrumble.h:82

References calcGrowthRate, growth_rate, max_size, size, and TRUMBLE_GROWTH_RATE.

Referenced by calcGrowthRate, setupForPlayer:digram:, spawnFrom:, and updateTrumble:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dealloc

- (void) dealloc
implementation

Definition at line 210 of file OOTrumble.m.

211{
212 [texture release];
213
214 [super dealloc];
215}

References dealloc.

Referenced by dealloc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dictionary

- (NSDictionary *) dictionary

Definition at line 906 of file OOTrumble.m.

907{
908 return [NSDictionary dictionaryWithObjectsAndKeys:
909 [NSString stringWithCharacters:digram
910 length:2],
911 @"digram",
912 [NSNumber numberWithFloat:hunger], @"hunger",
913 [NSNumber numberWithFloat:discomfort], @"discomfort",
914 [NSNumber numberWithFloat:size], @"size",
915 [NSNumber numberWithFloat:growth_rate], @"growth_rate",
916 [NSNumber numberWithFloat:rotation], @"rotation",
917 [NSNumber numberWithFloat:rotational_velocity], @"rotational_velocity",
918 StringFromPoint(position), @"position",
919 StringFromPoint(movement), @"movement",
920 nil];
921}

References dictionary.

Referenced by dictionary, discomfort, and PlayerEntity::trumbleValue.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ digram

- (unichar *) digram

References digram.

◆ discomfort

- (GLfloat) discomfort

References actionBlink, actionIdle, actionPop, actionProot, actionShudder, actionSleep, actionSnarl, actionSpawn, actionStoned, dictionary, discomfort, randomizeMotionX, and randomizeMotionY.

Here is the call graph for this function:

◆ drawTrumble:

- (void) drawTrumble: (double) z

Definition at line 362 of file OOTrumble.m.

362 :(double)z
363{
364 /*
365 draws a trumble body as a fan of triangles...
366 2-------3-------4
367 | \ | / |
368 | \ | / |
369 | \ | / |
370 1-------0-------5
371
372 */
373 GLfloat wd = 96 * size;
374 GLfloat ht = 96 * size;
375 OOGL(glShadeModel(GL_SMOOTH));
376 OOGL(glEnable(GL_TEXTURE_2D));
377
379
382
383 [texture apply];
384
385 //
386 // Body..
387 //
388 OOGLBEGIN(GL_TRIANGLE_FAN);
389 glColor4fv(pointColor[3]);
390 glTexCoord2f(0.25, 0.5);
391 glVertex2f(0.0, -0.5 * ht);
392
393 glColor4fv(pointColor[0]);
394 glTexCoord2f(0.0, 0.5);
395 glVertex2f(-0.5 * wd, -0.5 * ht);
396
397 glColor4fv(pointColor[1]);
398 glTexCoord2f(0.0, 0.0);
399 glVertex2f(-0.5 * wd, 0.5 * ht);
400
401 glColor4fv(pointColor[2]);
402 glTexCoord2f(0.25, 0.0);
403 glVertex2f(0.0, 0.5 * ht);
404
405 glColor4fv(pointColor[4]);
406 glTexCoord2f(0.5, 0.0);
407 glVertex2f(0.5 * wd, 0.5 * ht);
408
409 glColor4fv(pointColor[5]);
410 glTexCoord2f(0.5, 0.5);
411 glVertex2f(0.5 * wd, -0.5 * ht);
412 OOGLEND();
413
414 //
415 // Eyes
416 //
417 GLfloat eyeTextureOffset = 0.0;
418 switch (eyeFrame) {
421 eyeTextureOffset = 0.0;
422 break;
424 eyeTextureOffset = 0.25;
425 break;
427 eyeTextureOffset = 0.5;
428 break;
429 }
430
432
433 OOGL(glColor4fv(colorEyes));
434 OOGLBEGIN(GL_QUADS);
435 glTexCoord2f(0.5, eyeTextureOffset);
436 glVertex2f(-0.5 * wd, 0.20 * ht);
437
438 glTexCoord2f(1.0, eyeTextureOffset);
439 glVertex2f(0.5 * wd, 0.20 * ht);
440
441 glTexCoord2f(1.0, eyeTextureOffset + 0.25);
442 glVertex2f(0.5 * wd, -0.30 * ht);
443
444 glTexCoord2f(0.5, eyeTextureOffset + 0.25);
445 glVertex2f(-0.5 * wd, -0.30 * ht);
446 OOGLEND();
447
448 //
449 // Mouth
450 //
451 GLfloat mouthTextureOffset = 0.0;
452 switch (mouthFrame) {
454 mouthTextureOffset = 0.500;
455 break;
458 mouthTextureOffset = 0.625;
459 break;
461 mouthTextureOffset = 0.750;
462 break;
464 mouthTextureOffset = 0.875;
465 break;
466 }
467
469
470 OOGL(glColor4fv(colorBase));
471 OOGLBEGIN(GL_QUADS);
472 glTexCoord2f(0.0, mouthTextureOffset);
473 glVertex2f(-0.25 * wd, -0.10 * ht);
474
475 glTexCoord2f(0.25, mouthTextureOffset);
476 glVertex2f(0.25 * wd, -0.10 * ht);
477
478 glTexCoord2f(0.25, mouthTextureOffset + 0.125);
479 glVertex2f(0.25 * wd, -0.35 * ht);
480
481 glTexCoord2f(0.0, mouthTextureOffset + 0.125);
482 glVertex2f(-0.25 * wd, -0.35 * ht);
483 OOGLEND();
484
485 // finally..
487 OOGL(glDisable(GL_TEXTURE_2D));
488}
OOINLINE OOMatrix OOMatrixForRotationZ(OOScalar angle) INLINE_CONST_FUNC
Definition OOMatrix.h:219
void OOGLPushModelView(void)
void OOGLTranslateModelView(Vector vector)
void OOGLMultModelView(OOMatrix matrix)
OOMatrix OOGLPopModelView(void)
#define OOGLBEGIN
Definition OOOpenGL.h:269
#define OOGL(statement)
Definition OOOpenGL.h:262
#define OOGLEND
Definition OOOpenGL.h:270
@ TRUMBLE_MOUTH_NONE
Definition OOTrumble.h:58
@ TRUMBLE_MOUTH_GROWL
Definition OOTrumble.h:60
@ TRUMBLE_MOUTH_NORMAL
Definition OOTrumble.h:62
@ TRUMBLE_MOUTH_POUT
Definition OOTrumble.h:59
@ TRUMBLE_MOUTH_SNARL
Definition OOTrumble.h:61
@ TRUMBLE_EYES_OPEN
Definition OOTrumble.h:52
@ TRUMBLE_EYES_NONE
Definition OOTrumble.h:51
@ TRUMBLE_EYES_WIDE
Definition OOTrumble.h:54
@ TRUMBLE_EYES_SHUT
Definition OOTrumble.h:53
OOINLINE Vector make_vector(OOScalar vx, OOScalar vy, OOScalar vz) INLINE_CONST_FUNC
Definition OOVector.h:149
NSPoint mouth_position
Definition OOTrumble.h:91
NSPoint position
Definition OOTrumble.m:263
GLfloat rotation
Definition OOTrumble.m:273
GLfloat colorBase[4]
Definition OOTrumble.h:71
enum trumble_eyes eyeFrame
Definition OOTrumble.h:102
GLfloat colorEyes[4]
Definition OOTrumble.h:74
enum trumble_mouth mouthFrame
Definition OOTrumble.h:101
GLfloat * pointColor[6]
Definition OOTrumble.h:75
NSPoint eye_position
Definition OOTrumble.h:90

References OOTexture::apply, colorBase, colorEyes, eye_position, eyeFrame, make_vector(), mouth_position, mouthFrame, OOGL, OOGLBEGIN, OOGLEND, OOGLMultModelView(), OOGLPopModelView(), OOGLPushModelView(), OOGLTranslateModelView(), OOMatrixForRotationZ(), pointColor, position, rotation, size, TRUMBLE_EYES_NONE, TRUMBLE_EYES_OPEN, TRUMBLE_EYES_SHUT, TRUMBLE_EYES_WIDE, TRUMBLE_MOUTH_GROWL, TRUMBLE_MOUTH_NONE, TRUMBLE_MOUTH_NORMAL, TRUMBLE_MOUTH_POUT, and TRUMBLE_MOUTH_SNARL.

Referenced by HeadUpDisplay(Private)::drawTrumbles:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hunger

- (GLfloat) hunger

References hunger.

◆ init

- (id) init
implementation

Definition at line 41 of file OOTrumble.m.

42{
43 self = [super init];
44
45 int i;
46 for (i = 0; i < 4; i++) {
47 colorPoint1[i] = 1.0;
48 colorPoint2[i] = 1.0;
49 }
50
51 return self;
52}
GLfloat colorPoint1[4]
Definition OOTrumble.h:72
GLfloat colorPoint2[4]
Definition OOTrumble.h:73

References colorPoint1, colorPoint2, and init.

Referenced by init.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initForPlayer:

- (id) initForPlayer: (PlayerEntity*) p1

Definition at line 54 of file OOTrumble.m.

54 :(PlayerEntity*)p1
55{
56 self = [super init];
57
58 [self setupForPlayer:p1 digram:@"a1"];
59
60 return self;
61}

References setupForPlayer:digram:.

Here is the call graph for this function:

◆ initForPlayer:digram:

- (id) initForPlayer: (PlayerEntity*) p1
digram: (NSString*) digramString 

Definition at line 63 of file OOTrumble.m.

63 :(PlayerEntity*)p1 digram:(NSString*)digramString
64{
65 self = [super init];
66
67 [self setupForPlayer:p1 digram:digramString];
68
69 return self;
70}
unichar digram[2]
Definition OOTrumble.m:258

References setupForPlayer:digram:.

Here is the call graph for this function:

◆ movement

- (NSPoint) movement

References movement.

◆ position

- (NSPoint) position

References position.

◆ randomizeMotionX

- (void) randomizeMotionX

Definition at line 348 of file OOTrumble.m.

349{
350 movement.x = 36 * (randf() - 0.5);
351 movement.x += (movement.x > 0) ? 2.0 : -2.0;
353}
float x
#define TRUMBLE_MAX_ROTATIONAL_VELOCITY
Definition OOTrumble.h:33
NSPoint movement
Definition OOTrumble.m:268
GLfloat rotational_velocity
Definition OOTrumble.h:85

References movement, randf(), randomizeMotionX, rotational_velocity, and TRUMBLE_MAX_ROTATIONAL_VELOCITY.

Referenced by discomfort, randomizeMotionX, setupForPlayer:digram:, spawnFrom:, updateIdle:, updateSpawn:, and updateTrumble:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ randomizeMotionY

- (void) randomizeMotionY

Definition at line 355 of file OOTrumble.m.

356{
357 movement.y = 36 * (randf() - 0.5);
358 movement.y += (movement.y > 0) ? 2.0 : -2.0;
360}
float y

References movement, randf(), randomizeMotionY, rotational_velocity, and TRUMBLE_MAX_ROTATIONAL_VELOCITY.

Referenced by discomfort, randomizeMotionY, setupForPlayer:digram:, spawnFrom:, updateIdle:, and updateTrumble:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rotation

- (GLfloat) rotation

References rotation.

◆ setFromDictionary:

- (void) setFromDictionary: (NSDictionary*) dict

Definition at line 923 of file OOTrumble.m.

923 :(NSDictionary*)dict
924{
925 NSString* digramString = (NSString*)[dict objectForKey:@"digram"];
926 [self setupForPlayer:player digram:digramString];
927 hunger = [[dict objectForKey:@"hunger"] floatValue];
928 discomfort = [[dict objectForKey:@"discomfort"] floatValue];
929 size = [[dict objectForKey:@"size"] floatValue];
930 growth_rate = [[dict objectForKey:@"growth_rate"] floatValue];
931 rotation = [[dict objectForKey:@"rotation"] floatValue];
932 rotational_velocity = [[dict objectForKey:@"rotational_velocity"] floatValue];
933 position = PointFromString([dict objectForKey:@"position"]);
934 movement = PointFromString([dict objectForKey:@"movement"]);
935}
NSPoint PointFromString(NSString *xyString)
GLfloat discomfort
Definition OOTrumble.m:288
GLfloat hunger
Definition OOTrumble.m:283

References discomfort, growth_rate, hunger, movement, PointFromString(), position, rotation, rotational_velocity, setupForPlayer:digram:, and size.

Here is the call graph for this function:

◆ setupForPlayer:digram:

- (void) setupForPlayer: (PlayerEntity*) p1
digram: (NSString*) digramString 

Definition at line 72 of file OOTrumble.m.

72 :(PlayerEntity*)p1 digram:(NSString*)digramString
73{
74 // set digram
75 //
76 digram[0] = [digramString characterAtIndex:0];
77 digram[1] = [digramString characterAtIndex:1];
78
79 // set player
80 //
81 player = p1;
82
83 // set color points
84 int r0 = (int)digram[0];
85 int r1 = (int)digram[1];
86 int pointscheme[6] = { 1, 1, 0, 0, 1, 1 };
87 int ps = r0 >> 2; // first digram determines pattern of points
88 pointscheme[0] = (ps >> 3) & 1;
89 pointscheme[1] = (ps >> 2) & 1;
90 pointscheme[2] = (ps >> 1) & 1;
91 pointscheme[3] = ps & 1;
92 pointscheme[4] = (ps >> 2) & 1;
93 pointscheme[5] = (ps >> 3) & 1;
94
95 GLfloat c1[4] = { 1.0, 1.0, 1.0, 1.0 };
96 GLfloat c2[4] = { 1.0, 0.0, 0.0, 1.0 };
97
98 // I am missing something. Please clarify the intent of the following statement.
99 // The next statement shift the result of adding two masked values
100 // max_size = 0.90 + 0.50 * (((r0 & 0x38) + (r1 & 0x38)) >> 3) / 63.0; // inheritable
101 // The next statement adds masked(r0) to shifted(masked(r1)
102 // max_size = 0.90 + 0.50 * ((r0 & 0x38) + ((r1 & 0x38) >> 3)) / 63.0; // inheritable
103 // Sorry, but I cannot determine what you intended to do here.
104 //
105 // GILES: It's the second one, we're just determining a pseudo random max_size from the first digram
106 max_size = 0.90 + 0.50 * ((r0 & 0x38) + ((r1 & 0x38) >> 3)) / 63.0; // inheritable
107
108 // seed the random number generator
109 //
110 ranrot_srand(r0 + r1 * 256);
111
112 // set random colors
113 int col1 = r0 & 7;
114 int col2 = r1 & 7;
115 while (((col1 == 7) || (col1 == 0)) && ((col2 == 7) || (col2 == 0))) // monochrome not allowed
116 {
117 if (col1 == col2)
118 col1 = ranrot_rand() & 7;
119 else
120 col2 = ranrot_rand() & 7;
121 }
122 c1[0] = (GLfloat)(col1 & 1);
123 c1[1] = (GLfloat)((col1 >> 1) & 1);
124 c1[2] = (GLfloat)((col1 >> 2) & 1);
125 c2[0] = (GLfloat)(col2 & 1);
126 c2[1] = (GLfloat)((col2 >> 1) & 1);
127 c2[2] = (GLfloat)((col2 >> 2) & 1);
128 if (col1 == 0) {
129 c1[0] = 0.5 + 0.1 * c2[1];
130 c1[1] = 0.5 + 0.1 * c2[2];
131 c1[2] = 0.5;
132 }
133 if (col1 == 7) {
134 c1[0] = 1.0 - 0.1 * c2[1];
135 c1[1] = 1.0 - 0.1 * c2[2];
136 c1[2] = 0.9;
137 }
138 if (col2 == 0) {
139 c2[0] = 0.5 + 0.1 * c1[2];
140 c2[1] = 0.5 + 0.1 * c1[0];
141 c2[2] = 0.5;
142 }
143 if (col2 == 7) {
144 c2[0] = 1.0 - 0.1 * c1[2];
145 c2[1] = 1.0 - 0.1 * c1[0];
146 c2[2] = 0.9;
147 }
148
149 // position and motion
150 //
151 position.x = (ranrot_rand() & 15) * 28 - 210;
152 position.y = (ranrot_rand() & 15) * 28 - 210;
153 //
154 [self randomizeMotionX];
155 [self randomizeMotionY];
156
157 // rotation
158 //
161
162 //
163 int i;
164 for (i = 0; i < 4; i++) {
165 colorPoint1[i] = c1[i];
166 colorPoint2[i] = c2[i];
167 }
168 //
169 for (i = 0; i < 6; i++) {
171 if (pointscheme[i] == 0)
173 if (pointscheme[i] == 1)
175 }
176 //
177 for (i = 0; i < 4; i++) {
178 colorEyes[i] = 0.2 * (2.0 * pointColor[3][i] + 2.0 * pointColor[1][i] + 1.0); // eyes - paler than average
179 colorBase[i] = 0.5 * (pointColor[2][i] + pointColor[3][i]); // mouth
180 }
181 //
182 size = 0.5 * (1.0 + randf());
183 [self calcGrowthRate];
184 hunger = 0.0;
185 discomfort = 0.0;
186 //
187 eye_position = NSMakePoint(0.0, 0.075 * (randf() - randf()));
189 //
190 mouth_position = NSMakePoint(0.0, 0.035 * (randf() - randf()));
192 //
195 animationTime = 0.0;
196 animationDuration = 1.5 + randf() * 3.0; // time until next animation
197 //
198 texture = [OOTexture textureWithName:@"trumblekit.png"
199 inFolder:@"Textures"
200 options:kOOTextureDefaultOptions | kOOTextureNoShrink
201 anisotropy:0.0f
202 lodBias:kOOTextureDefaultLODBias];
203 [texture retain];
204
206
207 readyToSpawn = NO;
208}
#define TRUMBLE_MAX_ROTATION
Definition OOTrumble.h:32
static void InitTrumbleSounds(void)
Definition OOTrumble.m:943
id textureWithName:inFolder:options:anisotropy:lodBias:(NSString *name,[inFolder] NSString *directory,[options] OOTextureFlags options,[anisotropy] GLfloat anisotropy,[lodBias] GLfloat lodBias)
Definition OOTexture.m:132
enum trumble_animation animation
Definition OOTrumble.h:96
OOTexture * texture
Definition OOTrumble.h:104
BOOL readyToSpawn
Definition OOTrumble.h:108
PlayerEntity * player
Definition OOTrumble.h:67
double animationTime
Definition OOTrumble.h:93
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque
void ranrot_srand(uint32_t seed)
#define ranrot_rand()

References animation, animationDuration, animationTime, calcGrowthRate, colorBase, colorEyes, colorPoint1, colorPoint2, digram, discomfort, eye_position, eyeFrame, hunger, InitTrumbleSounds(), int(), max_size, mouth_position, mouthFrame, nextAnimation, player, pointColor, position, randf(), randomizeMotionX, randomizeMotionY, ranrot_rand, ranrot_srand(), readyToSpawn, rotation, rotational_velocity, size, texture, OOTexture::textureWithName:inFolder:options:anisotropy:lodBias:, TRUMBLE_ANIM_IDLE, TRUMBLE_EYES_OPEN, TRUMBLE_MAX_ROTATION, TRUMBLE_MAX_ROTATIONAL_VELOCITY, and TRUMBLE_MOUTH_NORMAL.

Referenced by initForPlayer:, initForPlayer:digram:, setFromDictionary:, and spawnFrom:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ size

- (GLfloat) size

References size.

◆ spawnFrom:

- (void) spawnFrom: (OOTrumble*) parentTrumble

Definition at line 217 of file OOTrumble.m.

217 :(OOTrumble*)parentTrumble
218{
219 if (parentTrumble) {
220 // mutate..
221 unichar mutation1 = ranrot_rand() & ranrot_rand() & ranrot_rand() & 0xff; // each bit has a 1/8 chance of being set
222 unichar mutation2 = ranrot_rand() & ranrot_rand() & ranrot_rand() & 0xff; // each bit has a 1/8 chance of being set
223 unichar* parentdigram = [parentTrumble digram];
224 unichar newdigram[2];
225 newdigram[0] = parentdigram[0] ^ mutation1;
226 newdigram[1] = parentdigram[1] ^ mutation2;
227 //
228 [self setupForPlayer:player digram:[NSString stringWithCharacters:newdigram length:2]];
229 //
230 size = [parentTrumble size] * 0.4;
231 if (size < 0.5)
232 size = 0.5; // minimum size
233 position = [parentTrumble position];
234 rotation = [parentTrumble rotation];
235 movement = [parentTrumble movement];
236 movement.y += 8.0; // emerge!
237 } else {
238 size = 0.5; // minimum size
239 position.x = (ranrot_rand() & 15) * 28 - 210;
240 position.y = (ranrot_rand() & 15) * 28 - 210;
241 [self randomizeMotionX];
242 [self randomizeMotionY];
245 }
246 hunger = 0.25;
247 [self calcGrowthRate];
248 discomfort = 0.0;
249 [self actionSleep];
250}

References actionSleep, calcGrowthRate, digram, discomfort, hunger, movement, position, randf(), randomizeMotionX, randomizeMotionY, ranrot_rand, rotation, rotational_velocity, setupForPlayer:digram:, size, TRUMBLE_MAX_ROTATION, and TRUMBLE_MAX_ROTATIONAL_VELOCITY.

Referenced by PlayerEntity::addTrumble:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateBlink:

- (void) updateBlink: (double) delta_t

Definition at line 689 of file OOTrumble.m.

689 :(double)delta_t
690{
692 animationTime += delta_t;
694 // blink or proot or idle
695 [self actionIdle];
696 if (randf() < 0.05)
697 [self actionBlink];
698 if (randf() < 0.1)
699 [self actionProot];
701 animationTime = 0.0;
703 }
704}

References actionBlink, actionIdle, actionProot, animation, animationDuration, animationTime, eyeFrame, nextAnimation, randf(), TRUMBLE_EYES_OPEN, and TRUMBLE_EYES_SHUT.

Referenced by updateTrumble:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateIdle:

- (void) updateIdle: (double) delta_t

Definition at line 652 of file OOTrumble.m.

652 :(double)delta_t
653{
654 animationTime += delta_t;
656 // blink or proot or idle and/or change direction
657 [self actionIdle];
658 if (randf() < 0.25)
659 [self actionBlink];
660 if (randf() < 0.10)
661 [self randomizeMotionX];
662 if (randf() < 0.10)
663 [self randomizeMotionY];
664 if (randf() < 0.05)
665 [self actionProot];
666 if (randf() < 0.01)
667 [self actionSleep];
668 if (randf() < 0.01)
669 [self actionSnarl];
670 //
671 if (readyToSpawn) {
672 [self actionSpawn];
673 readyToSpawn = NO;
674 }
675 //
676 if (discomfort > 0.5 + randf()) {
677 [self actionShudder];
678 }
679 //
680 if (discomfort > 0.96) {
681 [self actionPop];
682 }
683 //
685 animationTime = 0.0;
686 }
687}

References actionBlink, actionIdle, actionPop, actionProot, actionShudder, actionSleep, actionSnarl, actionSpawn, animation, animationDuration, animationTime, discomfort, nextAnimation, randf(), randomizeMotionX, randomizeMotionY, and readyToSpawn.

Referenced by updateTrumble:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updatePop:

- (void) updatePop: (double) delta_t

Definition at line 812 of file OOTrumble.m.

812 :(double)delta_t
813{
814 if (!animationTime) {
817 movement.y = (ranrot_rand() & 7);
818 if (randf() < 0.5)
819 rotational_velocity = 63 + (ranrot_rand() & 127);
820 else
821 rotational_velocity = -63 - (ranrot_rand() & 127);
822 // squeal here!
824 }
825 float pc = animationTime / animationDuration;
826
827 // fading alpha
828 colorPoint1[1] *= (1.0 - delta_t);
829 colorPoint2[1] *= (1.0 - delta_t);
830 colorPoint1[2] *= (1.0 - delta_t);
831 colorPoint2[2] *= (1.0 - delta_t);
832 colorPoint1[3] = (1.0 - pc);
833 colorPoint2[3] = (1.0 - pc);
834 colorBase[3] = (1.0 - pc);
835
836 // falling
837 movement.y -= delta_t * 98.0;
838 rotational_velocity *= (1.0 + delta_t);
839
840 // shrinking
841 size -= delta_t * (1.0 - pc) * size;
842
843 animationTime += delta_t;
845 // kaputnik!
846 [player removeTrumble:self];
847 }
848}
static void PlayTrumbleSqueal(void)
Definition OOTrumble.m:962

References animationDuration, animationTime, colorBase, colorPoint1, colorPoint2, eyeFrame, mouthFrame, movement, PlayTrumbleSqueal(), randf(), ranrot_rand, PlayerEntity::removeTrumble:, rotational_velocity, size, TRUMBLE_EYES_SHUT, and TRUMBLE_MOUTH_GROWL.

Referenced by updateTrumble:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateProot:

- (void) updateProot: (double) delta_t

Definition at line 742 of file OOTrumble.m.

742 :(double)delta_t
743{
744 if (!animationTime) {
745 animationStage = 0;
746 }
747 int pc = 100 * animationTime / animationDuration;
748 if (pc < 10) {
751 }
752 if (pc >= 10) {
753 double vibr = (pc & 2) ? -1.0 : 1.0;
754 position.x += size * vibr * 0.25;
757 if (!animationStage) {
758 animationStage = 1;
760 }
761 }
762 animationTime += delta_t;
764 // blink or idle
765 [self actionIdle];
766 if (randf() < 0.1)
767 [self actionBlink];
769 animationTime = 0.0;
772 }
773}
static void PlayTrumbleIdle(void)
Definition OOTrumble.m:952
int animationStage
Definition OOTrumble.h:99

References actionBlink, actionIdle, animation, animationDuration, animationStage, animationTime, eyeFrame, mouthFrame, nextAnimation, PlayTrumbleIdle(), position, randf(), size, TRUMBLE_EYES_OPEN, TRUMBLE_EYES_SHUT, TRUMBLE_MOUTH_GROWL, TRUMBLE_MOUTH_NORMAL, and TRUMBLE_MOUTH_POUT.

Referenced by updateTrumble:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateShudder:

- (void) updateShudder: (double) delta_t

Definition at line 775 of file OOTrumble.m.

775 :(double)delta_t
776{
777 if (!animationTime) {
781 }
782 int pc = 100 * animationTime / animationDuration;
783 if (pc < 10) {
786 }
787 if (pc >= 10) {
788 double vibr = (pc & 2) ? -0.25 : 0.25;
789 position.x += size * vibr;
792 }
793 animationTime += delta_t;
795 // feel better
796 discomfort *= 0.9;
797 // blink or idle
798 [self actionIdle];
799 if (randf() < 0.1)
800 [self actionBlink];
802 animationTime = 0.0;
805 }
806}

References actionBlink, actionIdle, animation, animationDuration, animationTime, discomfort, eyeFrame, mouthFrame, nextAnimation, PlayTrumbleSqueal(), position, randf(), size, TRUMBLE_EYES_OPEN, TRUMBLE_EYES_WIDE, TRUMBLE_MOUTH_GROWL, and TRUMBLE_MOUTH_NORMAL.

Referenced by updateTrumble:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSleep:

- (void) updateSleep: (double) delta_t

Definition at line 850 of file OOTrumble.m.

850 :(double)delta_t
851{
852 if (!animationTime) {
855 }
857 int pc = 512 * animationTime / animationDuration;
858 if (pc & 16) {
859 double vibr = (pc & 2) ? -0.0025 : 0.0025;
860 eye_position.y += size * vibr;
861 mouth_position.y += size * vibr * -0.5;
862 } else {
865 }
866 animationTime += delta_t;
868 // idle or proot
871 [self actionIdle];
872 if (randf() < 0.25)
873 [self actionProot];
875 animationTime = 0.0;
877 }
878}
GLfloat saved_float2
Definition OOTrumble.h:106
GLfloat saved_float1
Definition OOTrumble.h:106

References actionIdle, actionProot, animation, animationDuration, animationTime, eye_position, eyeFrame, mouth_position, nextAnimation, randf(), saved_float1, saved_float2, size, TRUMBLE_EYES_OPEN, and TRUMBLE_EYES_SHUT.

Referenced by updateTrumble:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSnarl:

- (void) updateSnarl: (double) delta_t

Definition at line 706 of file OOTrumble.m.

706 :(double)delta_t
707{
708 int pc = 100 * animationTime / animationDuration;
709 if (pc < 25) {
712 }
713 if ((pc >= 25) && (pc < 90)) {
714 double vibr = (pc & 1) ? -1.0 : 1.0;
715 if (digram[1] & 4)
716 position.x += size * vibr * 0.5;
717 else
718 position.y += size * vibr * 0.5;
720 if (pc & 2)
722 else
724 }
725 if ((pc >= 90) && (pc < 100)) {
728 }
729 animationTime += delta_t;
731 // blink or idle
732 [self actionIdle];
733 if (randf() < 0.1)
734 [self actionBlink];
736 animationTime = 0.0;
739 }
740}

References actionBlink, actionIdle, animation, animationDuration, animationTime, digram, eyeFrame, mouthFrame, nextAnimation, position, randf(), size, TRUMBLE_EYES_OPEN, TRUMBLE_EYES_SHUT, TRUMBLE_EYES_WIDE, TRUMBLE_MOUTH_GROWL, TRUMBLE_MOUTH_NORMAL, and TRUMBLE_MOUTH_SNARL.

Referenced by updateTrumble:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSpawn:

- (void) updateSpawn: (double) delta_t

Definition at line 880 of file OOTrumble.m.

880 :(double)delta_t
881{
882 movement.x *= (1.0 - delta_t);
883 movement.y *= (1.0 - delta_t);
884 rotation *= (1.0 - delta_t);
885 rotational_velocity *= (1.0 - delta_t);
888 int pc = 256 * animationTime / animationDuration;
889 double vibr = (pc & 2) ? -0.002 * pc : 0.002 * pc;
890 position.x += size * vibr;
891 animationTime += delta_t;
893 // proot
896 [self actionProot];
898 animationTime = 0.0;
901 [self randomizeMotionX];
902 [player addTrumble:self];
903 }
904}

References actionProot, PlayerEntity::addTrumble:, animation, animationDuration, animationTime, eye_position, eyeFrame, mouth_position, mouthFrame, movement, nextAnimation, position, randomizeMotionX, rotation, rotational_velocity, saved_float1, saved_float2, size, TRUMBLE_EYES_OPEN, TRUMBLE_EYES_WIDE, TRUMBLE_MOUTH_NORMAL, and TRUMBLE_MOUTH_POUT.

Referenced by updateTrumble:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateStoned:

- (void) updateStoned: (double) delta_t

Definition at line 808 of file OOTrumble.m.

808 :(double)delta_t
809{
810}

Referenced by updateTrumble:.

Here is the caller graph for this function:

◆ updateTrumble:

- (void) updateTrumble: (double) delta_t

Definition at line 490 of file OOTrumble.m.

490 :(double)delta_t
491{
492 // player movement
493 NSPoint p_mov = NSMakePoint(TRUMBLE_MAX_ROTATIONAL_VELOCITY * [player dialPitch], TRUMBLE_MAX_ROTATIONAL_VELOCITY * [player dialRoll]);
494 switch ([UNIVERSE viewDirection]) {
495 GLfloat t;
496 case VIEW_AFT:
497 p_mov.x = -p_mov.x;
498 p_mov.y = -p_mov.y;
499 break;
500 case VIEW_STARBOARD:
501 t = p_mov.x;
502 p_mov.x = -p_mov.y;
503 p_mov.y = t;
504 break;
505 case VIEW_PORT:
506 t = p_mov.x;
507 p_mov.x = p_mov.y;
508 p_mov.y = -t;
509 break;
510
511 default:
512 break;
513 }
514 p_mov.x *= -4.0;
515
516 // movement
517 //
518 GLfloat wd = 0.5 * 96 * size;
519 GLfloat ht = 0.5 * 96 * size;
520 //
521 GLfloat bumpx = 320 * 1.5 - wd;
522 GLfloat bumpy = 240 * 1.5 - ht;
523 //
524 position.x += delta_t * movement.x;
525 if ((position.x < -bumpx) || (position.x > bumpx)) {
526 position.x = (position.x < -bumpx) ? -bumpx : bumpx;
527 [self randomizeMotionX];
528 }
529 position.y += delta_t * (movement.y + p_mov.x);
530 if ((position.y < -bumpy) || (position.y > bumpy)) {
531 position.y = (position.y < -bumpy) ? -bumpy : bumpy;
532 [self randomizeMotionY];
533 }
534
535 // rotation
536 //
537 rotation += delta_t * (rotational_velocity + p_mov.y);
542 }
546 }
547 }
548 // growth
549 //
550 size += delta_t * growth_rate;
551 hunger += delta_t * (growth_rate + TRUMBLE_GROWTH_RATE);
552 if (size > max_size) // fully_grown.. stop growing
553 {
554 size = max_size;
555 growth_rate = 0.0;
556 }
557 [self calcGrowthRate];
558 if (hunger > 0.75)
559 growth_rate = 0.0;
560 if (hunger > 1.0)
561 hunger = 1.0; // clamp
562
563 // feelings
564 //
565 GLfloat temp = [player hullHeatLevel];
566 discomfort += delta_t * hunger * 0.02 * (1.0 - hunger);
567 if (temp > 0.33)
568 discomfort += delta_t * (temp - 0.33) * (temp - 0.33) * 0.05;
569 if (discomfort > 1.0)
570 discomfort = 1.0; // clamp
571
572 // feeding & reproducing
573 //
574 // am I really hungry?
575 if (hunger > 0.50) {
576 // consult menu...
577 ShipEntity* selectedCargopod = nil;
578 float mostYummy = 0.0;
579 NSMutableArray* cargopods = [player cargo]; // the cargo pods
580 NSUInteger i, n_pods = [cargopods count];
581 for (i = 0; i < n_pods; i++) {
582 ShipEntity* cargopod = [cargopods objectAtIndex:i];
583 OOCommodityType cargo_type = [cargopod commodityType];
584 float yumminess = (1.0 + randf()) * [[UNIVERSE commodityMarket] trumbleOpinionForGood:cargo_type];
585 if (yumminess > mostYummy) {
586 selectedCargopod = cargopod;
587 mostYummy = yumminess;
588 }
589 }
590 if (selectedCargopod) {
591 // feed
592 float trumbleAppetiteAccumulator = [player trumbleAppetiteAccumulator];
593
594 trumbleAppetiteAccumulator += hunger;
595 hunger = 0.0;
596 discomfort -= mostYummy * 0.5;
597 if (discomfort < 0.0)
598 discomfort = 0.0;
599 if (trumbleAppetiteAccumulator > 10.0) {
600 // eaten all of this cargo!
601 NSString* ms = [NSString stringWithFormat:DESC(@"trumbles-eat-@"),
602 [UNIVERSE displayNameForCommodity:[selectedCargopod commodityType]]];
603
604 [UNIVERSE addMessage:ms forCount:4.5];
605 [cargopods removeObject:selectedCargopod];
606 trumbleAppetiteAccumulator -= 10.0;
607
608 // consider breeding - must be full grown and happy
609 if ((size > 0.95) && (discomfort < 0.25)) {
610 readyToSpawn = YES;
611 }
612
613 [player setTrumbleAppetiteAccumulator:trumbleAppetiteAccumulator];
614 }
615 }
616 }
617
618 // animations
619 //
620 switch (animation) {
622 [self updateSnarl:delta_t];
623 break;
625 [self updateShudder:delta_t];
626 break;
628 [self updateStoned:delta_t];
629 break;
630 case TRUMBLE_ANIM_DIE:
631 [self updatePop:delta_t];
632 break;
634 [self updateBlink:delta_t];
635 break;
637 [self updateProot:delta_t];
638 break;
640 [self updateSleep:delta_t];
641 break;
643 [self updateSpawn:delta_t];
644 break;
646 default:
647 [self updateIdle:delta_t];
648 break;
649 }
650}
return nil
NSString * OOCommodityType
Definition OOTypes.h:97
#define UNIVERSE
Definition Universe.h:827
OOCommodityType commodityType()

References animation, calcGrowthRate, ShipEntity::cargo, ShipEntity::commodityType, discomfort, growth_rate, ShipEntity::hullHeatLevel, hunger, max_size, movement, nil, player, position, randf(), randomizeMotionX, randomizeMotionY, readyToSpawn, rotation, rotational_velocity, PlayerEntity::setTrumbleAppetiteAccumulator:, size, TRUMBLE_ANIM_BLINK, TRUMBLE_ANIM_DIE, TRUMBLE_ANIM_IDLE, TRUMBLE_ANIM_PROOT, TRUMBLE_ANIM_SHUDDER, TRUMBLE_ANIM_SLEEP, TRUMBLE_ANIM_SNARL, TRUMBLE_ANIM_SPAWN, TRUMBLE_ANIM_STONED, TRUMBLE_GROWTH_RATE, TRUMBLE_MAX_ROTATION, TRUMBLE_MAX_ROTATIONAL_VELOCITY, PlayerEntity::trumbleAppetiteAccumulator, UNIVERSE, updateBlink:, updateIdle:, updatePop:, updateProot:, updateShudder:, updateSleep:, updateSnarl:, updateSpawn:, and updateStoned:.

Referenced by PlayerEntity(OOPrivate)::updateTrumbles:.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ animation

◆ animationDuration

◆ animationStage

- (int) animationStage
private

Definition at line 99 of file OOTrumble.h.

Referenced by updateProot:.

◆ animationTime

- (double) animationTime
private

◆ colorBase

- (GLfloat colorBase[4])
private

Definition at line 71 of file OOTrumble.h.

Referenced by drawTrumble:, setupForPlayer:digram:, and updatePop:.

◆ colorEyes

- (GLfloat colorEyes[4])
private

Definition at line 74 of file OOTrumble.h.

Referenced by drawTrumble:, and setupForPlayer:digram:.

◆ colorPoint1

- (GLfloat colorPoint1[4])
private

Definition at line 72 of file OOTrumble.h.

Referenced by init, setupForPlayer:digram:, and updatePop:.

◆ colorPoint2

- (GLfloat colorPoint2[4])
private

Definition at line 73 of file OOTrumble.h.

Referenced by init, setupForPlayer:digram:, and updatePop:.

◆ digram

- (unichar *) digram
private

Definition at line 258 of file OOTrumble.m.

259{
260 return digram;
261}

Referenced by digram, setupForPlayer:digram:, spawnFrom:, and updateSnarl:.

◆ discomfort

- (GLfloat) discomfort
private

Definition at line 288 of file OOTrumble.m.

289{
290 return discomfort;
291}

Referenced by discomfort, setFromDictionary:, setupForPlayer:digram:, spawnFrom:, updateIdle:, updateShudder:, and updateTrumble:.

◆ eye_position

- (NSPoint) eye_position
private

Definition at line 90 of file OOTrumble.h.

Referenced by drawTrumble:, setupForPlayer:digram:, updateSleep:, and updateSpawn:.

◆ eyeFrame

◆ growth_rate

- (GLfloat) growth_rate
private

Definition at line 82 of file OOTrumble.h.

Referenced by calcGrowthRate, setFromDictionary:, and updateTrumble:.

◆ hunger

- (GLfloat) hunger
private

Definition at line 283 of file OOTrumble.m.

284{
285 return hunger;
286}

Referenced by hunger, setFromDictionary:, setupForPlayer:digram:, spawnFrom:, and updateTrumble:.

◆ max_size

- (GLfloat) max_size
private

Definition at line 81 of file OOTrumble.h.

Referenced by calcGrowthRate, setupForPlayer:digram:, and updateTrumble:.

◆ mouth_position

- (NSPoint) mouth_position
private

Definition at line 91 of file OOTrumble.h.

Referenced by drawTrumble:, setupForPlayer:digram:, updateSleep:, and updateSpawn:.

◆ mouthFrame

- (enum trumble_mouth) mouthFrame
private

◆ movement

- (NSPoint) movement
private

Definition at line 268 of file OOTrumble.m.

269{
270 return movement;
271}

Referenced by movement, randomizeMotionX, randomizeMotionY, setFromDictionary:, spawnFrom:, updatePop:, updateSpawn:, and updateTrumble:.

◆ nextAnimation

◆ player

- (PlayerEntity*) player
private

Definition at line 67 of file OOTrumble.h.

Referenced by setupForPlayer:digram:, and updateTrumble:.

◆ pointColor

- (GLfloat* pointColor[6])
private

Definition at line 75 of file OOTrumble.h.

Referenced by drawTrumble:, and setupForPlayer:digram:.

◆ position

- (NSPoint) position
private

◆ readyToSpawn

- (BOOL) readyToSpawn
private

Definition at line 108 of file OOTrumble.h.

Referenced by setupForPlayer:digram:, updateIdle:, and updateTrumble:.

◆ rotation

- (GLfloat) rotation
private

Definition at line 273 of file OOTrumble.m.

274{
275 return rotation;
276}

Referenced by drawTrumble:, rotation, setFromDictionary:, setupForPlayer:digram:, spawnFrom:, updateSpawn:, and updateTrumble:.

◆ rotational_velocity

- (GLfloat) rotational_velocity
private

◆ saved_float1

- (GLfloat) saved_float1
private

Definition at line 106 of file OOTrumble.h.

Referenced by updateSleep:, and updateSpawn:.

◆ saved_float2

- (GLfloat) saved_float2
private

Definition at line 106 of file OOTrumble.h.

Referenced by updateSleep:, and updateSpawn:.

◆ size

◆ texture

- (OOTexture*) texture
private

Definition at line 104 of file OOTrumble.h.

Referenced by setupForPlayer:digram:.


The documentation for this class was generated from the following files: