Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,449 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Save Edited Bitmap? [Re: jcl] #101327
12/07/06 15:32
12/07/06 15:32
Joined: Nov 2006
Posts: 141
South Africa
quasarchangel Offline OP
Member
quasarchangel  Offline OP
Member

Joined: Nov 2006
Posts: 141
South Africa
Ok, thanks, I checked my code.

While typing here again, I realized that the effect was using the alpha channel, quite obvious, and that I was only changing the color of the bmap. After fixing it, all works well. Thanks for the suggestions, atlast I can do what I wanted. Now I feel a lot better, after I had to work overtime a few hours today .

EDIT | Where can I get help on the "write tgas with cscript" code? I am getting this message: D3D error: D3DXERR_INVALIDDATA

I've realized that in the trial version I cannot change the save_dir, I think. Is this correct? When changing it the game starts up and goes into the menu, but as soon as I load my actual map the engine just exits completely, no errors, nothing.

Last edited by quasarchangel; 12/07/06 16:56.

God DID give us a manual on how to change this world...
Re: Save Edited Bitmap? [Re: quasarchangel] #101328
12/07/06 17:41
12/07/06 17:41
Joined: Nov 2006
Posts: 141
South Africa
quasarchangel Offline OP
Member
quasarchangel  Offline OP
Member

Joined: Nov 2006
Posts: 141
South Africa
* DELETED *

I got everything to work except for one problem, have a look at these screenshots and tell me how could this be happening? Theres not supposed to be any grass on the lower areas, but there is. I've noticed that it is when viewing the surface from a certain angle. When you walk closer, the grass dissapears!






I am editing a tga file skin on each of the terrains with this code below, and without the edit my effect works perfect, so I doubt that it could be my effect. Has it got something to do with my alpha value or the color vector? Please help?

temp1.x=0;
temp1.y=0;
x=0;
y=0;
a=0;
b=0;
temp2=0;
while(b<5)
{
while(a<5)
{
you=terrain_ent[temp2];

canvas=bmap_for_entity(you,0);
format = bmap_lock(canvas,0);
y=0;
x=0;
while(y<80)
{
while(x<80)
{
temp1.z=heightmap[((x+(a*79))*400)+(y+(b*79))];
vec_to_mesh(temp1.x,you,(x+1)+(y*80));

temp3=(100/500)*heightmap[((x+(a*79))*400)+(y+(b*79))];
if(heightmap[((x+(a*79))*400)+(y+(b*79))]<15)
{
temp=100;
}
else
{
temp=temp3;
}
pixel = pixel_for_vec(vector(temp3,temp3,temp3),clamp(temp,0,100),format);
pixel_to_bmap(canvas,x,y,pixel);
x+=1;
}
x=0;
y+=1;
}
bmap_unlock(canvas);
a+=1;
temp2+=1;
}
a=0;
b+=1;
}

Last edited by quasarchangel; 12/07/06 21:32.
Re: Save Edited Bitmap? [Re: quasarchangel] #101329
12/08/06 09:57
12/08/06 09:57
Joined: Jul 2000
Posts: 28,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
Frankfurt
When a texture changes on walking closer, it's most likely a wrong mipmap.

Make sure that you update the mipmaps (bmap_to_mipmap) after modifying a texture.

Re: Save Edited Bitmap? [Re: jcl] #101330
12/08/06 15:30
12/08/06 15:30
Joined: Nov 2006
Posts: 141
South Africa
quasarchangel Offline OP
Member
quasarchangel  Offline OP
Member

Joined: Nov 2006
Posts: 141
South Africa
hmmm, thanks I'l try that.


God DID give us a manual on how to change this world...
Page 2 of 2 1 2

Moderated by  old_bill, Tobias 

Gamestudio download | 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