Gamestudio Links
Zorro Links
Newest Posts
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
M1 Oversampling
by 11honza11. 04/20/24 20:57
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (frutza, Quad, AndrewAMD), 385 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, howardR, 11honza11, ccorrea, sakolin
19047 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 432 of 554 1 2 430 431 432 433 434 553 554
Re: What are you working on? [Re: Hummel] #451315
05/02/15 08:40
05/02/15 08:40
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Originally Posted By: Hummel
I wish I could stop people using it.
I wish we could mativate you good enough to give us an alternative lightfrog as a parting gift to community grin


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: What are you working on? [Re: 3run] #451323
05/02/15 14:16
05/02/15 14:16
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
a huge update laugh


click to enlarge


time for the specular map

Last edited by txesmi; 05/02/15 14:18.
Re: What are you working on? [Re: txesmi] #451324
05/02/15 14:20
05/02/15 14:20
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Originally Posted By: txesmi
a huge update laugh


click to enlarge


time for the specular map
Talented person, is talented in everything grin Keep it up!


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: What are you working on? [Re: 3run] #451337
05/02/15 19:40
05/02/15 19:40
Joined: Mar 2006
Posts: 2,252
Hummel Offline
Expert
Hummel  Offline
Expert

Joined: Mar 2006
Posts: 2,252
If you need this kind of features use Unity.

Re: What are you working on? [Re: Hummel] #451340
05/02/15 19:52
05/02/15 19:52
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Originally Posted By: Hummel
If you need this kind of features use Unity.
betrayer cry


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: What are you working on? [Re: 3run] #451347
05/03/15 08:16
05/03/15 08:16
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
making a little dynamic array helper to publish soon as a contribution.
functionalities:
create, create with default values, fill with values, set all bytes, destroy, rotation of 2D and 3D arrays. element addition is not finished yet. I don't know whether to implement element removal or not... what do you think, is it okay in this form?

the header:
Code:
///////////////////////////////////////////
// functions


/* 
	allocate memory of a new array with the given number of elements,
	fill all its bytes with zero for safety
	
	example-1 : MYARRAYTYPE* MyArray = array_new( sizeof(MYARRAYTYPE), NULL, 10 );							
					
	example-2 : int MyArrayLength = 10;
					MYARRAYTYPE* MyArray = array_new( sizeof(MYARRAYTYPE), NULL, MyArrayLength );							
					
	example-3 : int MyArrayLength = 0;
					MYARRAYTYPE* MyArray = array_new( sizeof(MYARRAYTYPE), &MyArrayLength, 10 );	
					(now MyArrayLength is set to 10)
						
	(initially MyArray should be NULL)
	(arraylength can be NULL)
	
	returns the array, sets arraylength
*/
void*		array_new(int elementsize, int* arraylength, int newelementscount);


/*
	same as array_new() but initializes all bytes to (char)defaultvalue (instead of zero)
	
	example-1 : MyArray = array_new_initbytes( sizeof(MYARRAYTYPE), NULL, 10, 255 );
	
	example-2 : MyArray = array_new_initbytes( sizeof(MYARRAYTYPE), &MyArrayLength, 10, 255 );
	
	returns the array, sets arraylength	
*/
void*		array_new_initbytes(int elementsize, int* arraylength, int newelementscount, int defaultvalue);


/* 
	fill an array with default data given by one locally created element,
	
	example : 	MYARRAYTYPE NewElement = 10;
					array_fill( MyArray, MyArrayLength, &NewElement );	
	
	returns nothing
*/
void		array_fill(char* arrayin, int arraylength, char newelement);										// by loop and =
void		array_fill(short* arrayin, int arraylength, short newelement);
void		array_fill(int* arrayin, int arraylength, int newelement);
void		array_fill(var* arrayin, int arraylength, var newelement);
void		array_fill(VECTOR* arrayin, int arraylength, VECTOR* newelement);									// by loop and memcpy

void		array_fillbytes(char* arrayin, int arraylength, char bytevalue);									// by one memset (fast)
void		array_fillbytes(short* arrayin, int arraylength, char bytevalue);
void		array_fillbytes(int* arrayin, int arraylength, char bytevalue);
void		array_fillbytes(var* arrayin, int arraylength, char bytevalue);
void		array_fillbytes(VECTOR* arrayin, int arraylength, char bytevalue);

void		array_fillbytes2(void* arrayin, int elementsize, int arraylength, char bytevalue);			// name should differs from the other overloaded functions !

/* 
	reallocate memory of an existing array with a given number of new elements,
	without element value initialization, or decrease array length
	
	example : MyArray = array_realloc( MyArray, sizeof(MYARRAYTYPE), &MyArrayLength, 10 );
	
	returns the array, sets arraylength
*/
void*		array_realloc(void* arrayin, int elementsize, int* arraylength, int newelementscount);


/* 
	reallocate memory of an existing array and a given number of new elements,
	and fill it with default value given by one locally created element,
	or decrease array length
	
	example : 	MYARRAYTYPE newarrayelement = MyDefaultValue or MyDefaultStruct;
					MyArray = array_add( MyArray, sizeof(MYARRAYTYPE), &MyArrayLength, 10, &newarrayelement );	
	(where new_arrayelement is a local variable or struct created/allocated and set before calling it,
	if NULL then new elements will be filled with zeros)
	
	returns the array, sets arraylength
*/
void*		array_add(void* arrayin, int elementsize, int* arraylength, int newelementscount, void* newelement);		// WRONG ! -> char/short/int/var* newelement because of memcpy


/*
	free array memory, set it to NULL for future usage, and set length to zero
	
	example : array_destroy( MyArray, &MyArrayLength );	
	(arraylength can be NULL)
	
	returns nothing, sets the array, arraylength
*/
void		array_destroy(void* arrayin);
void		array_destroy(void* arrayin, int* arraylength);


//----------------------
/*
	pseudo 2D array operations
*/

/*
	2D array helpers
*/
int		array_getx(int sizex, int sizey, int abspos);
int		array_gety(int sizex, int sizey, int abspos);
int		array_getabs(int sizex, int sizey, int posx, int posy);

/*
	reposition array elements as it would be rotated as a 2D matrix
	to the given direction (angle/45), assuming currently looking towards 0
	
	example : 	int* MyArray is the existing array to be rotated
					int MyRotateArrayLength = MyArrayLength;
					int MyRotateSizeX = MySizeX;
					int MyRotateSizeY = MySizeY;
					MYARRAYTYPE* MyRotatedArray = array_rotate_...( MyArray, &MyRotateArrayLength, 2, &MyRotateSizeX, &MyRotateSizeY );	
	(direction 2 means rotation by 90 degrees)
	(no diagonal rotation supported i.e. 1,3,5,7)
	
	returns the new array (it can be used to overwrite the old one, without using new variables).
*/
char*		array_rotate(char* arrayin, int* arraylength, int direction, int* sizex, int* sizey);				
short*	array_rotate(short* arrayin, int* arraylength, int direction, int* sizex, int* sizey);
int*		array_rotate(int* arrayin, int* arraylength, int direction, int* sizex, int* sizey);
var*		array_rotate(var* arrayin, int* arraylength, int direction, int* sizex, int* sizey);				

//----------------------
/*
	pseudo 3D array operations
*/

/*
	3D array helpers
*/
int		array_getx_multi(int sizex, int sizey, int sizez, int abspos);
int		array_gety_multi(int sizex, int sizey, int sizez, int abspos);
int		array_getabs_multi(int sizex, int sizey, int posx, int posy, int posz);

/*
	same as array_rotate() but supports 3D arrays organized level by level
*/
char*		array_rotate_multi(char* arrayin, int* arraylength, int direction, int* sizex, int* sizey);
short*	array_rotate_multi(short* arrayin, int* arraylength, int direction, int* sizex, int* sizey);
int*		array_rotate_multi(int* arrayin, int* arraylength, int direction, int* sizex, int* sizey);
var*		array_rotate_multi(var* arrayin, int* arraylength, int direction, int* sizex, int* sizey);



Free world editor for 3D Gamestudio: MapBuilder Editor
Re: What are you working on? [Re: sivan] #451348
05/03/15 14:10
05/03/15 14:10
Joined: Apr 2005
Posts: 1,988
Canadian, Eh
DLively Offline
Serious User
DLively  Offline
Serious User

Joined: Apr 2005
Posts: 1,988
Canadian, Eh
Hey Sivan! Thanks, I'm on a learning binge so this is will look great in that unoccupied spot in my brain ^_^

Last edited by DLively; 05/03/15 14:11.

A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com
Re: What are you working on? [Re: DLively] #451349
05/03/15 16:59
05/03/15 16:59
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
Last shots

Re: What are you working on? [Re: txesmi] #451425
05/05/15 20:29
05/05/15 20:29
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
things to come, 490p 1024x1024px


click to enlarge

Last edited by txesmi; 05/05/15 20:33.
Re: What are you working on? [Re: txesmi] #451427
05/05/15 20:59
05/05/15 20:59
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Looks great! Are you going to create a race game with those models and your awesome track editor? laugh

Greets


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Page 432 of 554 1 2 430 431 432 433 434 553 554

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1