![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Game engine designer
Join Date: May 2005
Location: Sweden
Posts: 301
Rep Power: 4
![]() |
I read your "Pointer basics" section and played around with pointers, references and arrays, and checked how they were stored in the memory. For about five minutes, I finished the implementation of my lookAt function, and it works great!
![]() Thanks alot for your help! /Klarre |
|
|
|
|
|
#12 |
|
Programmer
Join Date: Nov 2005
Location: Moseley, Birmingham, England, Earth
Posts: 51
Rep Power: 3
![]() |
In C it would be:
void fn(float* array, int length){
int i;
for(i=0;i<length;i++){
// do something with the array
}
}
void caller(void){
float myarray[4]
myarray[0] = 0.2;
// etc
fn(&myarray, 4);
}It's not difficult in assembly. |
|
|
|
|
|
#13 | |
|
Programming Guru
![]() Join Date: Jun 2005
Location: elemental plane
Posts: 1,429
Rep Power: 5
![]() |
Quote:
, someone is learning something. Thank goodness.
__________________
"Employ your time in improving yourself by other men's writings, so that you shall gain easily what others have labored hard for." -- Socrates |
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|