Results 1 to 10 of 557

Thread: OpenSauce Halo CE SDK Update #2 (RC)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    Neanderthal Dwood's Avatar
    Join Date
    Sep 2008
    Location
    Wouldn't u like to know?
    Posts
    4,184

    Re: OpenSauce Halo CE SDK Update #2 (RC)

    In my code I'm just messing around with the values in tag defintions. Can anyone see what's wrong? I'm using scenery.hpp, generated by scythe's os_tool.

    Quick rundown: The idea is for people to call the script by the name of the object, so I go to the name list, to get the index of the name, then go to the sceneries, and iterate through them, checking their scenery type, and checking the name index number to see if they're the same.

    Then, using that, and getting the scenery type, I should be able to iterate through the list of scenery in the scenario tag, getting to the scenery in there.

    After that, the idea is to iterate through the list, and getting a pointer to the desired scenario object. Guess it's not that simple. Or, I'm just overcomplicating it. Anyways, if I can't figure this out, I'm just going to stuff it and make my own tag for these kinds of things.

    Code:
    		cstring changeBitmapByObjName(cstring ObjName, cstring nextBMP) { 
                                          //objname in the name list of scenario
                                          //nextBMP is more filler than anything right now                              
    			bool found_object = false;
    			int16  index = NULL;
    		 
    			for (int i = 0; i < Scenarion->object_names.Count; i++) {
    				if (strcmp (Scenarion->object_names[i].name, ObjName) == 0){
    						found_object = true;
    						index = i;
    						continue;
    				}
    			}
    		
    			if (found_object) {
    				for (int i = 0; i < Scenarion->scenery.Count; i++) {
    					if (Scenarion->scenery[i].name == index){
    						return getShaderPathScenery(Scenarion->scenery_palette[i].name.name);
                                                    //it's always: players/cyborg/cyborg or whatever. NOT a scenery tag path like we want
    
                                               
    						}
    				}
    			} 
    			cstring untrue = "false";
    			return untrue;
    		}
    
    		cstring getShaderPathScenery (cstring tagName) {
    		
    			cstring string;
    			int x = 0;
    		for (x = 0; x < Yelo::TagGroups::Index()->count; x++)
    			{
    				if(Yelo::TagGroups::Instances()[x].group_tag == 0x7363656E)  //Scenery
    					string = tagName; 
    				//if (strcmp (string, tagName) == 0)					 
    				//	return "true";                                    If It were working, the two if staments would be combined....
    
    			}
    			return string;
    		}
    Last edited by Dwood; January 13th, 2011 at 03:37 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •