Hallo.
Ich persönlich würde Dir von view ents abraten.

So weit ich weiss ist bei view ents auch die XYZ Position Auflösungsabhängig.
Ich benutze aber nie View ents muss ich dazu sagen, weiss aber das die sich nicht so einfach anklicken lassen.

Ich würde Dir empfehlen das ohne View ents aufzubauen.
Dann bist Du auch nicht von der Auflösung abhängig und hast meiner Meinung nach nur Vorteile.

Ich habe Dir hier ein Beispiel verfasst wie Du das gleiche ohne View ents bauen könntest:
Code
// example needs:
// backgr1.tga = 1024x768 background image
// backgr2.tga = same
// door1.tga   = a door image
// door2.tga   = same
// cursor.tga  = mouse cursor
BMAP* bmap_arrow = "cursor.tga"; // mouse cursor bitmap

ENTITY* your_background;         // pointer to your used background image 1024x768 in this example
ENTITY* your_door_ent;           // pointer to your door image (any size)


void your_background_ent_event_1(){ // first example event for your background
   if (event_type == EVENT_CLICK){
      printf ("You clicked the background");
   }			
}
void your_background_ent_event_2(){ // second example event for your background room 2
   if (event_type == EVENT_CLICK){
      printf ("You clicked the background in room2");
   }			
}


void your_door_ent_event_1(){      // first example event for your door
   if (event_type == EVENT_CLICK){
      printf ("You clicked the door entity");
   }			
}
void your_door_ent_event_2(){      // second example event for your door in room2
   if (event_type == EVENT_CLICK){
      printf ("You clicked the door entity in room2");
   }			
}

// load the background and the door and give them click events
void init_level_screen1(){
   your_background = ent_create ("backgr1.tga", vector (880,0,0), NULL); // 1024x768 background image for example fills screen at this position
   if (your_background){
      your_background.emask |= ENABLE_CLICK;
      your_background.event = your_background_ent_event_1;
   }	
   your_door_ent = ent_create ("door1.tga", vector (879,0,0), NULL); // in front of the background image
   if (your_door_ent){
      your_door_ent.emask |= ENABLE_CLICK;  
      your_door_ent.event = your_door_ent_event_1;	     
   }
} 

// example how you could switch to another room
void init_next_room (roomnr){
    if (roomnr == 2){
       if (your_background){
          ent_morph (your_background, "backgr2.tga");		
	  your_background.event = your_background_ent_event_2;
      }
      if (your_door_ent){
         //your_door_ent.y = 100;
         //your_door_ent.z = 50;
         ent_morph (your_door_ent, "door2.tga");		
         your_door_ent.event = your_door_ent_event_2;
      }
   }
}

var room_active = 1;

// press enter to switch to room nr2 for example
void main(){ 
   video_mode = 7;
   video_screen = 2;
   level_load (NULL); // or a empty wmb file
  
   init_level_screen1();
    
   mouse_map = bmap_arrow;  
   mouse_mode = 4;       
  
   while (1){
      if (key_enter){
         if (room_active == 1){
            room_active += 1;
            init_next_room (room_active); //change background and the door image for next room now           
         }
      }	
      wait (1);
   }
}

Das Beispiel lädt eine Hintergrundgrafik und platziert eine Türgrafik darauf. Mit der Enter Taste kannst Du in den zweiten Raum wechseln.

Das script als main.c speichern und ausführen. backgr1.tga(1024x768), backgr2.tga, door1.tga, door2.tga und cursor.tga dazu.
Wenn Du für die Backgrounds eine andere Auflösung willst als 1024x768, musst Du einfach nur den X Wert (880) anpassen, solange bis das Image das Fenster wieder füllt.

Das Beispiel ermöglicht nun auch scrollen (z.B. per camera.yz) oder zoomen (z.B. per camera.arc oder camera.x).


Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;