[12:48] wait... data in header files? [12:48] you're storing data... in header files? [12:48] *** Quits: PeterM (Quit:) [12:51] LordMetroid: throw foo.bar into data/, #include , reference the data as foo_bar [12:51] oh, and you need to add some lines to the Makefile for each filetype you want compiled (not sure which ones it has in there by default) [12:52] BigRedPimp: Yes, I write const variables for my data [12:52] that's so badbear, I dunno where to begin [12:52] Why is it bad? [12:52] lord, they should at least be in source files (asm compiles faster than c but otherwise c source file is fine) [12:53] what's the difference? [12:53] I see... [12:53] data in headers causes "issues" [12:53] Why so? [12:53] What issues? [12:54] every source file that includes the header gains a copy of the data [12:54] well, for one its rather difficult to reference data from two source files if its in a header [12:54] without the multiple copy thing [12:54] :) [12:54] when more than one source file includes the header, the app won't link due to multiple declarations [12:54] also, any time you change your source file wich references it that data has to be recompiled [12:55] time to learn how to do sockets in erlang <3 [12:55] I got #ifndef:s and so far I haven't noticed any problems [12:56] lord, its improper for the reasons stated and no extra work to do it properly so I recomend you update your process :) [12:56] LordMetroid, would you prefer us to be somewhat less diplomatic in our explanations [12:56] There was many proposes... Which one? [12:57] No [12:57] then stop putting data in header files [12:57] Ok, how shall I do it properly, source files, binary files? [12:57] what's the data? [12:57] the easiest way to make your method more correct is to move your data array to a c file [12:58] So far 3D geometry, images and sound will come [12:58] then make an extern reference to the array in your header. [12:58] or, you can simply put the raw data files into a folder and do a make file rule to process them into source files for you as part of your build process [12:58] Ohh and I got a peltte as well [12:58] [20:53] LordMetroid: throw foo.bar into data/, #include , reference the data as foo_bar [12:59] so the reference would be like? [12:59] if the data is being exported as source code by some tool then have it export to a .c file instead of a .h file [12:59] if your .h file contains palette[256] = {blah blah" [12:59] then put that in a c file [13:00] or put it as binary data into a .pal file [13:00] and in the .h file put: extern u16 palette[] [13:00] const Polygon foo_bar? [13:00] * davr is a big fan of the bin2o method [13:00] * WinterMute too [13:00] is your data raw binary to begin with are you getting it directly as a c array from some exporter? [13:00] * LordMetroid better become a fan [13:01] like "3Dstudio supper exporter to c array" [13:02] also...why would you do 3d on gba when you have the DS? [13:02] * dovoto definity uses bin2o if its binary data [13:02] dovoto, being honest I'm not keen on the "put it in a c file" approach either, mainly because people always end up slapping it in their source folder manually [13:02] winter, if they are using an exporter which cant be called from the make file then they are sort of sol [13:02] you want it in a data folder? [13:03] which is why i ask, otherwise of course :) [13:03] people should stop writing shitty exporters too :P [13:03] idealy you can just make a rule for .3ds and use your 3ds2ds.exe in the place of bin2o [13:04] I make use of Blender and have just written an exporter from Blender's objects to .h files [13:04] * dsboi is still a fan of intel hex format [13:04] I suppose I'll have to rewrite some now [13:05] on paper tape [13:05] lord, ahh. well you should change it to make a .c file and a .h file with the extern reference at the least. If you can make it stand alone so you can call your converter from the command line that woudl be best [13:05] you should change it to make a binary file, no point in going through .c if you don't have to [13:06] Yay! My code compiled! And compiling is half the battle. C PLUS PLUUUUUUUS! [13:06] lol [13:06] bin2o converts to source davr ...it just uses asm because its faster (and i think really big c arrays have some issues iirc) [13:06] or maybe you can invoke blender from the command line in such a way as it loads your model and calls your exporter [13:06] oh really? i thought it just slaps an object header on it or something [13:06] fairly medium C arrays have issues too [13:06] I can write binary files as well [13:07] davr, haven't been able to sort alignment going that way yet [13:07] lord do you know if you can invoke blender from the command line with the right options so all it does is export your model using your exporter? [13:07] So how do one structure a binary file to be able to be used with C++ Obects [13:07] dovoto, it doesn't save the source, it pipes it straight through the assembler