Jump to content

  • Log In with Google      Sign In   
  • Create Account


Khatharr

Member Since 24 Apr 2010
Offline Last Active Today, 12:15 AM

Posts I've Made

In Topic: pointer value

16 August 2014 - 03:24 AM

float * pin28Value; //create a pointer to some address

*pin28Value = 0.5; //write 0.5 to the location in memory that the pointer is pointing to

XPLMSetDatavf(pnlBri, pin28Value, 10, 1); //russian roulette


In Topic: Sorting out the bits

15 August 2014 - 12:57 PM

// 4 bits: material group
UINT64 makeKey = tr.MatGroup;
// 8 bits: materal ID
makeKey <<= 8; //push it over by 8 bits to make room
makeKey |= tr.Material & 0xFF;
// 8 bits: mesh ID
makeKey <<= 8; //push it over by 8 bits to make room
makeKey |= tr.Mesh & 0xFF;
// 16 bits: mesh inst ID
makeKey <<= 16; //push it over by 16 bits to make room
makeKey |= tr.Instance & 0xFFFF;
// 8 bits: dist to cam
makeKey <<= 8; //push it over by 8 bits to make room
makeKey |= (char)tr.DistToCamConv; //float is usually 32bit, so casting to char will give you an 8-bit value...

In Topic: Sorting out the bits

15 August 2014 - 08:08 AM

You forgot to include testbucket.txt. (I recreated it from what you posted in the chat.)

    UINT64 makeKey = 0;
    makeKey |= (UINT64)tr.MatGroup << 40;
    makeKey |= (UINT64)tr.Material << 32;
    makeKey |= (UINT64)tr.Mesh     << 24;
    makeKey |= (UINT64)tr.Instance << 8;
    makeKey |= tr.DistToCamConv; //this one's a float, I guess

You were shifting int's and then or'ing them into the UINT64. The information was being lost before it was added.

 

Another way to do it is to just or in a value, then use <<= on makeKey to make room for the next value.


In Topic: Creating a Basic Window Tutorial

15 August 2014 - 07:17 AM

If you're trying to avoid booming on the mic, move it to the side of your mouth and speak past it. Try to match the volume level you find on popular channels, such as REACT or ERB, etc. Really, though, compared to the clarity of the background noise, I think you just need to speak a little louder. Breathe deeply and speak from the diaphragm, as if you're talking to someone on the other side of the room.


In Topic: Do i need to know physics before using Unity3D?

14 August 2014 - 08:11 AM

You may want to start casually studying basic physics in any case at Khan Academy or some similar source. The fundamentals are really not difficult, and are often very interesting. You only need to learn a couple basic concepts of Newtonian physics (force, inertia, and acceleration) in order to make something like Super Mario Bros.

 

Do yourself a favor and take a look. You may like it.

 

https://www.khanacademy.org/science/physics


PARTNERS