Changeset 1831

Show
Ignore:
Timestamp:
10/27/08 01:13:55 (2 months ago)
Author:
ddb174
Message:

Some more dynamictextmap work.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • drizzle/DrizzlePrp/src/automation/inplaceModifications.java

    r1828 r1831  
    2525        prpfile prp = prpfile.createFromFile(filename, true); 
    2626         
    27         //create the dynamictextmap 
    2827        //the images written in python must be no greater than this size, or it won't draw it. 
    2928        //the width and height are each rounded up to the nearest power of 2. 
     
    3130        //int width = 350; int height = 604; 
    3231        //int width = 512; int height = 1024; 
    33         int width = 1024; int height = 1024; 
    34         PrpRootObject dtmroot = automation.hackFactory.createAndAddDynamicTextMap(prp, "dustDynamicBookTexture", width, height); 
    35          
    36         //replace the texture with our dynamictextmap: 
    37         PrpRootObject layerroot = prp.findObject("Map #8251", Typeid.plLayer); 
    38         layerroot.hasChanged = true; 
    39         x0006Layer layer = layerroot.castTo(); 
    40         layer.texture = dtmroot.getref(); 
    41          
    42         //add ptAttribDynamicMap to the pythonfilemod. 
    43         PrpRootObject pfmroot = prp.findObject("cPythMachineBrain", Typeid.plPythonFileMod); 
    44         pfmroot.hasChanged = true; 
    45         x00A2Pythonfilemod pfm = pfmroot.castTo(); 
    46         pfm.addListing(Pythonlisting.createWithRef(9, 90, dtmroot.getref())); 
     32         
     33        if(filename.toLowerCase().endsWith("nexus_district_nxusbookmachine.prp")) 
     34        { 
     35            //replace the texture with our dynamictextmap: 
     36            //PrpRootObject layerroot = prp.findObject("Map #8251", Typeid.plLayer); 
     37            PrpRootObject layerroot = prp.findObject("Map #825", Typeid.plLayer); 
     38            layerroot.hasChanged = true; 
     39            x0006Layer layer = layerroot.castTo(); 
     40            Uruobjectref dtmref = Uruobjectref.createDefaultWithTypeNamePagePagetype(Typeid.plDynamicTextMap, "dustDynamicBookTexture", Pageid.createFromPrefixSuffix(-2, 64), Pagetype.createWithType(4)); 
     41            //layer.texture = dtmroot.getref(); 
     42            layer.texture = dtmref; 
     43 
     44            //add ptAttribDynamicMap to the pythonfilemod. 
     45            //PrpRootObject pfmroot = prp.findObject("cPythMachineBrain", Typeid.plPythonFileMod); 
     46            //pfmroot.hasChanged = true; 
     47            //x00A2Pythonfilemod pfm = pfmroot.castTo(); 
     48            //pfm.addListing(Pythonlisting.createWithRef(9, 90, dtmroot.getref())); 
     49 
     50        } 
     51        if(filename.toLowerCase().endsWith("gui_district_kiblackbar.prp")) 
     52        { 
     53            //create the dynamictextmap 
     54            int width = 1024; int height = 1024; 
     55            PrpRootObject dtmroot = automation.hackFactory.createAndAddDynamicTextMap(prp, "dustDynamicBookTexture", width, height); 
     56 
     57            //add ptAttribDynamicMap to the pythonfilemod. 
     58            PrpRootObject pfmroot = prp.findObject("KIHandler", Typeid.plPythonFileMod); 
     59            pfmroot.hasChanged = true; 
     60            x00A2Pythonfilemod pfm = pfmroot.castTo(); 
     61            pfm.addListing(Pythonlisting.createWithRef(9, 90, dtmroot.getref())); 
     62 
     63            //create references to the dynamictextmaps used by the book gui. 
     64            Uruobjectref bkref = Uruobjectref.createDefaultWithTypeNamePagePagetype(Typeid.plDynamicTextMap, "LeftDTMap2_dynText", Pageid.createFromPrefixSuffix(-2, 54), Pagetype.createWithType(4)); 
     65            pfm.addListing(Pythonlisting.createWithRef(9, 91, bkref)); 
     66            Uruobjectref bkref2 = Uruobjectref.createDefaultWithTypeNamePagePagetype(Typeid.plDynamicTextMap, "RightDTMap2_dynText", Pageid.createFromPrefixSuffix(-2, 54), Pagetype.createWithType(4)); 
     67            pfm.addListing(Pythonlisting.createWithRef(9, 92, bkref2)); 
     68        } 
    4769         
    4870        //save 
  • drizzle/DrizzlePrp/src/uru/moulprp/Typeid.java

    r1816 r1831  
    245245    //GUI_jalakControlPanel 
    246246    pfGUIDragBarCtrl, 
     247    pfGUICheckBoxCtrl, 
     248    pfGUIRadioGroupCtrl, 
     249    pfGUIPopUpMenu, 
    247250     
    248251    plLeafController, 
     
    458461         
    459462        tri( 0x0B9, 0x0B9, -2, pfGUIDragBarCtrl), 
     463        tri( 0x0BA, -2, -2, pfGUICheckBoxCtrl), 
     464        tri( 0x0BB, -2, -2, pfGUIRadioGroupCtrl), 
     465        tri( 0x119, -2, -2, pfGUIPopUpMenu), 
    460466         
    461467