|
Re: save hmp file dll
[Re: Wjbender]
#450252
04/10/15 14:29
04/10/15 14:29
|
Joined: Mar 2012
Posts: 927 cyberspace
Wjbender
OP
User
|
OP
User
Joined: Mar 2012
Posts: 927
cyberspace
|
try the new dll , set skip_original_pixels to 1 if you want the modified pixel data to be saved instead of the original pixel data .
jb
Compulsive compiler
|
|
|
Re: save hmp file dll
[Re: sivan]
#450290
04/11/15 16:55
04/11/15 16:55
|
Joined: Mar 2012
Posts: 927 cyberspace
Wjbender
OP
User
|
OP
User
Joined: Mar 2012
Posts: 927
cyberspace
|
the new function must be declared as :
int save_hmp(char* filename,ENTITY* terrain,int skip_original_pixels);
to save the original pixel data , if you just replaced the skins with other files :
if (save_hmp("hmpfilenamehere.hmp",terrain_entity_here,0)) // success
to save the pixel data that was modified with for example bmap_lock operations ,instead :
if (save_hmp("hmpfilenamehere.hmp",terrain_entity_here,1)) // success
that's how it is for now. yes the link is updated on the first page first post
Last edited by Wjbender; 04/11/15 17:03.
Compulsive compiler
|
|
|
Re: save hmp file dll
[Re: Wjbender]
#450294
04/11/15 20:30
04/11/15 20:30
|
Joined: Mar 2011
Posts: 3,150 Budapest
sivan
Expert
|
Expert
Joined: Mar 2011
Posts: 3,150
Budapest
|
hey, it works! the only issue happens (crash on save), when there is an empty or NULL skin (skin without texture). I have an optimized shader where I sometimes use such an arrangement. and dds support would be great! thanks for the efforts!
|
|
|
Re: save hmp file dll
[Re: sivan]
#450298
04/11/15 20:56
04/11/15 20:56
|
Joined: Mar 2012
Posts: 927 cyberspace
Wjbender
OP
User
|
OP
User
Joined: Mar 2012
Posts: 927
cyberspace
|
okay I'll sort out with more error checking .
I am working on it on and off , between 2 other projects ,sometimes I multitask between all 3 ,coding/ testing and improving a few lines of code at a time .
glad it helps out for now .
edit: <-- am I now the one who's name they dare not speak 666 posts
Last edited by Wjbender; 04/11/15 21:01.
Compulsive compiler
|
|
|
Re: save hmp file dll
[Re: Wjbender]
#450315
04/12/15 11:03
04/12/15 11:03
|
Joined: Mar 2012
Posts: 927 cyberspace
Wjbender
OP
User
|
OP
User
Joined: Mar 2012
Posts: 927
cyberspace
|
fixed ,updated link and info on page 1 , 1st post
Compulsive compiler
|
|
|
Re: save hmp file dll
[Re: Wjbender]
#450365
04/13/15 12:04
04/13/15 12:04
|
Joined: Mar 2011
Posts: 3,150 Budapest
sivan
Expert
|
Expert
Joined: Mar 2011
Posts: 3,150
Budapest
|
thanks, it help me to find some bugs in MapBuilder (some missing protections of null textures) further tests: if the skin texture is not square, and modified, it is not saved, the original is kept (square textures are saved properly)
|
|
|
Re: save hmp file dll
[Re: sivan]
#450368
04/13/15 13:09
04/13/15 13:09
|
Joined: Mar 2012
Posts: 927 cyberspace
Wjbender
OP
User
|
OP
User
Joined: Mar 2012
Posts: 927
cyberspace
|
didn't test it but I believe that should work now .
Compulsive compiler
|
|
|
Re: save hmp file dll
[Re: Wjbender]
#450373
04/13/15 14:04
04/13/15 14:04
|
Joined: Mar 2011
Posts: 3,150 Budapest
sivan
Expert
|
Expert
Joined: Mar 2011
Posts: 3,150
Budapest
|
unfortunately it doesn't work... or the link is old, dll file size is the same, what can rarely happen.
Last edited by sivan; 04/13/15 14:05.
|
|
|
Re: save hmp file dll
[Re: sivan]
#450387
04/13/15 15:32
04/13/15 15:32
|
Joined: Mar 2012
Posts: 927 cyberspace
Wjbender
OP
User
|
OP
User
Joined: Mar 2012
Posts: 927
cyberspace
|
okay I also noticed a size difference with the one on my pc , I uploaded it , let me know because as I read my code it should work .
Compulsive compiler
|
|
|
|