Go Back   Forums > Community Chatterbox > Tech Corner > Programming
Memberlist Forum Rules Today's Posts
Search Forums:
Click here to use Advanced Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 01-08-2010, 10:57 PM   #1
The Fifth Horseman
FUTURE SCIENCE BASTARD
 
The Fifth Horseman's Avatar


 
Join Date: Oct 2004
Location: Opole, Poland
Posts: 14,276
Default memcpy... Uh, doesn't?

This is an old project I've decided to complete recently(mostly out of sheer boredom) - a program to extract sprites from Space Hulk and convert them to PCX format.

The program is workin (just compile the version labelled as "working", drop it into the game's CHP_DIR subdirectory and run it), but I'm running into some trouble when I'm trying to modify it to reduce the size of the palette declaration.

Instead of initializing the entire set of palettes on start, I'm trying to assemble five of the palettes from two parts each (because almost half of the palette length from the beginning is common for all five), and then add three entire palettes from another table.

The problem is that while the former part works flawlessly, the latter doesn't. The files using those last three palettes instead have the relevant section filled either with zeroes or garbage.

Frankly, at this point I'm just curious why the test version of the program fails in this fashion - it's just something to tinker around with, since the functional version of the program already performs fine in its' task.

I've attached the source code along with the includes.
Attached Files
File Type: rar chp_advance(working).rar (5.5 KB, 2 views)
File Type: rar chp_advance(not working).rar (6.1 KB, 2 views)
__________________

"God. Can't you people see I'm trying to commit a crime against science and nature here?"
-- Reed Richards
The Fifth Horseman is offline                         Send a private message to The Fifth Horseman
Reply With Quote
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump
 


The current time is 04:08 PM (GMT)

 
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.