Jump to content
SSForum.net is back!

Samapico

Administrator
  • Posts

    7972
  • Joined

  • Last visited

Everything posted by Samapico

  1. Actually it doesn't... But it keeps the lvz's packed, so files cannot be in conflict Some projects have this: #include "SDL.h" #include "SDL_thread.h" While others have the SDL/ folder in front... shouldn't they all have the SDL/ ? Also, SDL_image.h and SDL_net.h seem to be missing in my install... I have a bunch of other stuff, but not these 2 I downloaded this one: SDL-devel-1.2.14-mingw32.tar.gz (Mingw32)
  2. hmmm, how do you plan to handle zones with multiple subarenas using different graphics? Can the uniqueimage module handle folders? The zone folders could get quite messy otherwise...
  3. Nothing much official here, buddy I still don't have write access to the SVN, so I guess I'm not official yet lol A quick question... my brain is starting to think about the UniqueImages and Animation and settings... The keys in the settings don't need to be the filename, right? Cause otherwise, that will give me some problems... LVZ's can have multiple image definitions from the same file
  4. Some projects use SDL/... includes. It gives me unresolved inclusion errors. I can see where the required files are at, but what's the trick to get eclipse to look for them?
  5. (I thought I posted this, but apparently I didn't hit the big button) I don't need to fread the struct, cause the block is read as one byte block of a definite size, uncompressed, and only then I know it's a bunch of object definitions. So I just scroll through the byte buffer. But thanks, that pack push, pop thing seems to work fine
  6. And now that I think about it... another struct I use has 3 i16 fields, and its sizeof() comes out as 6... so why can't this one be 10? The bitfields messing it up?
  7. hmmm, is the padding only at the end of the whole struct? Could I just do: for (ii = 0; ii < objHeader.objectCount; ii++) { addObjectDefinition(currentLvzFile, (LvzObjectDefinition*)dataPtr, objSectionType); dataPtr += 10; //instead of += sizeof(LvzObjectDefinition); } ?? I got the data already in a larger byte buffer, I don't even need to fread() them individually. I hate using a magic number (10) in there, but it would be so much easier
  8. Almost there... It skipped about 4 image definitions at the beginning, so it messed up at the end too... hmm... I hope fread()'ing a struct with unions in it works fine... It seems this LVZ doesn't even have screenobjects, so there's definitely something wrong in there Oh well... c++ is dumb... sizeof(a struct with unions) = combined size of the unions wadafak? typedef struct { unsigned isMapObject :1; unsigned objectID :15; union /* Unnamed union */ { struct { signed xCoord :16; signed yCoord :16; }mapObjectCoord; struct { unsigned xReference :4; //Coordinate reference in x, see LvzScreenObjectReference signed xCoord :12; //X coordinate unsigned yReference :4; //Coordinate reference in y, see LvzScreenObjectReference signed yCoord :12; //Y coordinate }screenObjectCoord; //Only used for CLV2 screenobjects }; unsigned imageNumber :8; unsigned objectLayer :8; unsigned displayTime :12; unsigned displayMode :4; } LvzObjectDefinition; Aren't the 2 32bits structs in the union supposed to share the same memory space? I also tried to typedef the union on its own, then use a field of that type in the big struct, but got the same result. sizeof(LvzObjectDefinition) gives me 12 bytes instead of 10
  9. Gotta love that debugging phase where you keep getting one step working at a time... adding printf's everywhere, then the console is clogged with crap Getting somewhere... Only problem is, there isn't 196608 objects in that LVZ, and there isn't 0 image definitions either I was fread'ing from the file that part, but it was already read and decompressed in a byte buffer... bleh.
  10. ok thanks... I didn't assign the interface function pointers properly in the init... works now. I think I'm almost done with step 1: Open a lvz file and scan all the data in it (easy) step 2: Save the files somewhere (easy) step 3: Open the lvz files after they were downloaded, while loading the level (medium) (Does ASSS already sends the lvz files to it? Or does the client have to request them?) step 4: Create UniqueImages and Animations for the mapobjects (hard) step 5: Make Animations support screenobjects (easy I guess) step 6: Make it override default graphics with the files in the lvz's (no idea)
  11. Ok, it's kinda late, it's probably nothing but... Trying to load my LVZ module; placed it in bin\modules\lvz, added it in modules.conf, and when I run discretion.bat, I get: Using debug terminal trick... (cskinviewer ..\main.cpp, line 1788) Zone description does not contain update site! SUCCESS: CHECK FOR UPDATES SUCCEEDED! SEGFAULT - debug information printed to bin/errorlog.txt Do I need to hack out some security check or something? (and wtf is the debug terminal trick?)
  12. I hate the STL lists and crap... I feel like copy-pasting Mervbot's implementation of linked list... so much easier to use
  13. Holy crap, I just used a union for the first time in my life (to make something useful, that is) typedef struct LvzObjectDefinition { unsigned isMapObject :1; unsigned objectID :15; union /* Unnamed union */ { struct { signed xCoord :16; signed yCoord :16; }mapObjectCoord; struct { unsigned xReference :4; //Coordinate reference in x signed xCoord :12; //X coordinate unsigned yReference :4; //Coordinate reference in y signed yCoord :12; //Y coordinate }screenObjectCoord; //Only used for CLV2 screenobjects }; unsigned imageNumber :8; unsigned objectLayer :8; unsigned displayTime :12; unsigned displayMode :4; } LvzObjectDefinition;
  14. Awesome, all makes sense
  15. How do you do this? Window -> preferences -> General -> workspace ; Save automatically before build
  16. Oh, that's pretty dumb... it doesn't even build what you see by default... pft. weee, first successful build (after the Hello world program)
  17. Ok... what the hell is wrong with Eclipse? It gives me compiling errors on comment lines, and when I double-click an error in the 'Problems' tab, it brings me to a totally unrelated line, sometimes changing the selected problem at the same time... I get a lot of 'chat was not declared in this scope' , and the same for every imaginable module... even if I comment them out (The code you see is a copy-paste of the DCME code to import LVZ's, commented out... unless eclipse doesn't support //comments?)
  18. Settings are sent to the clients in packets, they are not written to a file. If it was the case, that 's' file would be in text format, and it isn't.
  19. That's usually caused by a LevelFile with its name cut off, due to this issue being discussed. I think... I have it in a couple of my folders: -BlueT Jackpot SVS -Speedball -SSCX ChaosLeague Zone SVS -SSCX Warzone CTF -SSCX WarzoneASWZ CTF -SSST Starship Troopers -and a couple of dev zones Why always "s" though, no idea... all are 128 bytes too. Do they all have the same contents as well?
  20. I'd guess 4MB .LVZ might be required for Continuum to do something about the file, but not to download it. You can make it download any file off the server.
  21. hmmm, I think I'm starting to get the hang of eclipse a bit; but I'm wondering, with Visual Studio you could make a huge "Solution" that contains every project, and you could mass-build them, or work them individually. Is there a way to do the same with eclipse? Or do I need to get another junk to use the makefile thing? ---------------------- And is there any reason why you're not using classes entirely? Correct me if I'm wrong: Each module has a class with the public functions (declared as function pointers), and the functions are defined in the .cpp as a public function, and these functions are assigned to the function pointers when the module is initialized... Why not simply use classes, with public functions for interface, and private for the rest? Is it easier to do some part (maybe memory protection?) if all the data is simply public? ---------------------- Callbacks... basically they're events that a module can trigger, and another module could "listen" for a specific callback and do something about it, right? For example, I could have a callback that says a specific LVZ file is done loading (or all lvz's requested are loaded, or they didn't load right), and whatever module loads the map/graphics when entering an arena will have to wait for this before loading stuff, cause the lvz might override graphics. (Or not, since it would just be a function call, no delay involved) I'll also need to somehow listen for the objon/off/set/move packets, and mess with the animations. I think I seen some code that told the Net module to pass on every packet about "something", or something like that... Anyway, I'll start by unpacking some lvz's ---------------------- If I understand it right, I'd use SettingsHandler to add [Animations] (these settings are regenerated entirely for each arena, correct?) Then I'd use UniqueImage because some images can belong to thousands of animations. Then I'd start/stop the animations through the Animation interface. That makes sense? This will be able to handle 65000 map objects? ---------------------- I see you use BOOL's and bool's, any reason for this, or it just depends on your mood?
  22. http://wave.google.com/help/wave/about.html
  23. no problem
  24. The path crap was when I did something with eclipse, tried to import a project, or something like that... it decided to import it recursively or something. Thanks for the heads up
×
×
  • Create New...