Normand Briere
2019-10-05 8768a855af9ccc482a9520ce708ef32e0e6e0e7d
Composite.java
....@@ -279,11 +279,15 @@
279279
280280 Composite compo = new Composite();
281281
282
- super.deepCopySelf(compo);
282
+ super.deepCopyNode(compo);
283
+
284
+ compo.count = 2;
283285
284286 for (int i = 0; i < Children().size(); i++)
285287 {
286288 Object3D obj = (Object3D) Children().reserve(i);
289
+ if (obj == null)
290
+ continue;
287291 compo.addChild(obj.copyExpand());
288292 Children().release(i);
289293 }
....@@ -293,9 +297,9 @@
293297 return compo;
294298 }
295299
296
- protected void deepCopySelf(Object3D other)
300
+ protected void deepCopyNode(Object3D other)
297301 {
298
- super.deepCopySelf(other);
302
+ super.deepCopyNode(other);
299303
300304 if (false)
301305 {
....@@ -401,7 +405,6 @@
401405 {
402406 child = (Object3D) e.nextElement();
403407 }
404
-
405408 }
406409
407410 void createEditWindow(GroupEditor callee, boolean newWindow) //, boolean root)
....@@ -790,6 +793,8 @@
790793
791794 void draw(ClickInfo info, int level, boolean select)
792795 {
796
+ new Exception().printStackTrace();
797
+
793798 ClickInfo newInfo = new ClickInfo();
794799 newInfo.flags = info.flags;
795800 newInfo.bounds = info.bounds;
....@@ -867,15 +872,29 @@
867872 tex = GetTextures();
868873 }
869874
875
+ boolean failedPigment = false;
876
+ boolean failedBump = false;
877
+
870878 try
871879 {
872
- display.BindTextures(tex, texres);
880
+ display.BindPigmentTexture(tex, texres);
873881 }
874882 catch (Exception e)
875883 {
876
- System.err.println("FAILED: " + this);
884
+ // System.err.println("FAILED: " + this);
885
+ failedPigment = true;
877886 }
878
-
887
+
888
+ try
889
+ {
890
+ display.BindBumpTexture(tex, texres);
891
+ }
892
+ catch (Exception e)
893
+ {
894
+ //System.err.println("FAILED: " + this);
895
+ failedBump = true;
896
+ }
897
+
879898 if (//true) // new NORMAND
880899 touched || softtouched)
881900 {
....@@ -937,7 +956,11 @@
937956 }
938957 }
939958
940
- display.ReleaseTextures(tex);
959
+ if (!failedBump)
960
+ display.ReleaseBumpTexture(tex);
961
+
962
+ if (!failedPigment)
963
+ display.ReleasePigmentTexture(tex);
941964 }
942965
943966 void Reset0()