Thread: OSRS Texture Support

Page 1 of 3 123 LastLast
Results 1 to 10 of 26
  1. #1 OSRS Texture Support 
    Registered Member
    Deku's Avatar
    Join Date
    May 2016
    Posts
    151
    Thanks given
    37
    Thanks received
    123
    Rep Power
    165
    Implemented this from a 130 deob, there's a small anti-leech. Good luck





    ~~~~removed
    wut
    Reply With Quote  
     


  2. #2  
    Rune-Server Affiliate

    Join Date
    Apr 2014
    Posts
    1,761
    Thanks given
    75
    Thanks received
    714
    Rep Power
    1073
    Code:
    if ((flag & 0x2) != 0) {
    					texture_coordinates[face] = (byte) (flag >> 2);
    					texture[face] = color[face];
    					color[face] = 127;
    					if (texture[face] != -1)
    						has_texture_type = true;
    					
    					if(texture[face] == 53) //frozen whip 
    						texture[face] = 1;
    					else
    					if(texture[face] == 56) //lava dragon 
    						texture[face] = 41;
    					else
    					if(texture[face] > 51) 
    						texture[face] = 1;
    					
    				} else {
    					texture_coordinates[face] = -1;
    					texture[face] =  -1;
    				}
    Why not just pack the new textures images?

    Good work on this though.
    Reply With Quote  
     

  3. #3  
    Registered Member
    Deku's Avatar
    Join Date
    May 2016
    Posts
    151
    Thanks given
    37
    Thanks received
    123
    Rep Power
    165
    Quote Originally Posted by Zion View Post
    Code:
    if ((flag & 0x2) != 0) {
    					texture_coordinates[face] = (byte) (flag >> 2);
    					texture[face] = color[face];
    					color[face] = 127;
    					if (texture[face] != -1)
    						has_texture_type = true;
    					
    					if(texture[face] == 53) //frozen whip 
    						texture[face] = 1;
    					else
    					if(texture[face] == 56) //lava dragon 
    						texture[face] = 41;
    					else
    					if(texture[face] > 51) 
    						texture[face] = 1;
    					
    				} else {
    					texture_coordinates[face] = -1;
    					texture[face] =  -1;
    				}
    Why not just pack the new textures images?

    Good work on this though.
    It's there for the snippet, if ya don't need it remove it.
    Personally texture 53 looks like aids, so I would recommend leaving that, but only in decode_new

    Also minor edit, this is a fix for npc/player - can't edit main post
    Spoiler for Fix texture coordinates for npcs / players:
    Code:
    	/*public Model(int length, Model model_segments[]) {
    		this(length, model_segments, false);
    	}*///uncomment AFTER adding the true flag to player / object calls
    	
    	public Model(int length, Model model_segments[], boolean check) {
    		try {
    			aBoolean1618 = true;
    			fits_on_single_square = false;
    			anInt1620++;
    			boolean type_flag = false;
    			boolean priority_flag = false;
    			boolean alpha_flag = false;
    			boolean tSkin_flag = false;
    			boolean color_flag = false;
    			boolean texture_flag = false;
    			boolean coordinate_flag = false;
    			vertices = 0;
    			faces = 0;
    			texture_faces = 0;
    			priority = -1;
    			Model build;
    			for (int segment_index = 0; segment_index < length; segment_index++) {
    				build = model_segments[segment_index];
    				if (build != null) {
    					vertices += build.vertices;
    					faces += build.faces;
    					texture_faces += build.texture_faces;
    					type_flag |= build.render_type != null;
    					alpha_flag |= build.alpha != null;
    					if (build.render_priorities != null) {
    						priority_flag = true;
    					} else {
    						if (priority == -1)
    							priority = build.priority;
    						
    						if (priority != build.priority)
    							priority_flag = true;
    					}
    					tSkin_flag |= build.tSkin != null;
    					color_flag |= build.color != null;
    					texture_flag |= build.texture != null;
    					coordinate_flag |= build.texture_coordinates != null;
    				}
    			}
    			particle_vertices = new int[vertices];
    			vertexX = new int[vertices];
    			vertexY = new int[vertices];
    			vertexZ = new int[vertices];
    			vSkin = new int[vertices];
    			edge_a = new int[faces];
    			edge_b = new int[faces];
    			edge_c = new int[faces];
    			if(color_flag)
    				color = new short[faces];
    			
    			if (type_flag)
    				render_type = new int[faces];
    			
    			if (priority_flag)
    				render_priorities = new byte[faces];
    			
    			if (alpha_flag)
    				alpha = new int[faces];
    			
    			if (tSkin_flag)
    				tSkin = new int[faces];
    			
    			if(texture_flag)
    				texture = new short[faces];
    			
    			if (coordinate_flag)
    				texture_coordinates = new byte[faces];
    			
    			if(texture_faces > 0) {
    				texture_type = new byte[texture_faces];
    				texture_edge_a = new short[texture_faces];
    				texture_edge_b = new short[texture_faces];
    				texture_edge_c = new short[texture_faces];
    			}
    			vertices = 0;
    			faces = 0;
    			texture_faces = 0;
    			for (int segment_index = 0; segment_index < length; segment_index++) {
    				build = model_segments[segment_index];
    				if (build != null) {
    					for (int face = 0; face < build.faces; face++) {
    						/*if (type_flag) {
    							if (build.render_type == null) {
    								render_type[faces] = 0;
    							} else {
    								int type = build.render_type[face];
    								if ((type & 2) == 2)
    									type += texture_face << 2;
    								
    								render_type[faces] = type;
    							}
    						}*/
    						if(type_flag && build.render_type != null)
    							render_type[faces] = build.render_type[face];
    						
    						if (priority_flag)
    							if (build.render_priorities == null)
    								render_priorities[faces] = build.priority;
    							else
    								render_priorities[faces] = build.render_priorities[face];
    						
    						if (alpha_flag && build.alpha != null)
    							alpha[faces] = build.alpha[face];
    
    						if (tSkin_flag && build.tSkin != null)
    							tSkin[faces] = build.tSkin[face];
    						
    						if(texture_flag) {
    							if(build.texture != null) 
    								texture[faces] = build.texture[face];
    							else
    								texture[faces] = -1;
    						}
    						if(coordinate_flag) {
    							if(build.texture_coordinates != null && build.texture_coordinates[face] != -1) {
    								texture_coordinates[faces] = (byte) (build.texture_coordinates[face] + texture_faces);
    							} else {
    								texture_coordinates[faces] = -1;
    							}
    						}
    						color[faces] = build.color[face];
    						edge_a[faces] = method465(build, build.edge_a[face]);
    						edge_b[faces] = method465(build, build.edge_b[face]);
    						edge_c[faces] = method465(build, build.edge_c[face]);
    						faces++;
    					}
    					for (int texture_edge = 0; texture_edge < build.texture_faces; texture_edge++) {
    						byte opcode = texture_type[texture_faces] = build.texture_type[texture_edge];
    						if(opcode == 0) {
    							texture_edge_a[texture_faces] = (short) method465(build, build.texture_edge_a[texture_edge]);
    							texture_edge_b[texture_faces] = (short) method465(build, build.texture_edge_b[texture_edge]);
    							texture_edge_c[texture_faces] = (short) method465(build, build.texture_edge_c[texture_edge]);
    							if(check)
    								texture_faces++;
    						}
    						if(opcode >= 1 && opcode <= 3) {
    							texture_edge_a[texture_faces] = build.texture_edge_a[texture_edge];
    							texture_edge_b[texture_faces] = build.texture_edge_b[texture_edge];
    							texture_edge_c[texture_faces] = build.texture_edge_c[texture_edge];
    						}
    						if(opcode == 2) {
    							
    						}
    					}
    					if(!check)
    						texture_faces++;
    				}
    			}
    		} catch (Exception e) {
    			e.printStackTrace();
    		}
    	}
    Add a 'true' to any player/object calls, for example,
    Code:
    model = new Model(k1, aModelArray741s, true);
    wut
    Reply With Quote  
     

  4. #4  
    🎶 As you're falling down 🎶


    uint32_t's Avatar
    Join Date
    Feb 2015
    Posts
    1,396
    Thanks given
    6,177
    Thanks received
    776
    Rep Power
    5000
    Nice release, repped.
    Quote Originally Posted by Idiot Bird View Post
    Quote Originally Posted by Velocity View Post
    lol np mate looks like the community brought ur rep down to ur IQ
    Not too sure about that, it's at 0 . It would have to go minus to even be remotely close to his IQ.
    Reply With Quote  
     

  5. #5  
    Registered Member
    Zivik's Avatar
    Join Date
    Oct 2007
    Age
    28
    Posts
    4,421
    Thanks given
    891
    Thanks received
    1,527
    Rep Power
    3285
    Thanks for the share.
    Reply With Quote  
     

  6. #6  
    Banned
    Join Date
    Apr 2016
    Posts
    357
    Thanks given
    65
    Thanks received
    16
    Rep Power
    0
    Thanks for the share will use for sure!
    Reply With Quote  
     

  7. #7  
    Rune-Server Affiliate

    Join Date
    Apr 2014
    Posts
    1,761
    Thanks given
    75
    Thanks received
    714
    Rep Power
    1073
    Would you be upset if I released a full unrenamed version?
    Reply With Quote  
     

  8. #8  
    Registered Member
    Deku's Avatar
    Join Date
    May 2016
    Posts
    151
    Thanks given
    37
    Thanks received
    123
    Rep Power
    165
    Quote Originally Posted by Zivik View Post
    Thanks for the share.
    Quote Originally Posted by TA TA View Post
    Thanks for the share will use for sure!
    Np

    Quote Originally Posted by Zion View Post
    Would you be upset if I released a full unrenamed version?
    Wouldn't bother me, as long I'm credited
    wut
    Reply With Quote  
     

  9. #9  
    Rune-Server Affiliate

    Join Date
    Apr 2014
    Posts
    1,761
    Thanks given
    75
    Thanks received
    714
    Rep Power
    1073
    Quote Originally Posted by Deku View Post
    Np



    Wouldn't bother me, as long I'm credited
    What is the anti leech?
    Reply With Quote  
     

  10. #10  
    Registered Member
    Deku's Avatar
    Join Date
    May 2016
    Posts
    151
    Thanks given
    37
    Thanks received
    123
    Rep Power
    165
    Quote Originally Posted by Zion View Post
    What is the anti leech?
    Ruins the fun tho :-(
    Here's a hint, has to do with an x and y swap of viewport triangles
    wut
    Reply With Quote  
     

Page 1 of 3 123 LastLast

Thread Information
Users Browsing this Thread

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


User Tag List

Similar Threads

  1. Replies: 58
    Last Post: 06-10-2017, 07:21 AM
  2. osrs texture support
    By _Patrick_ in forum Buying
    Replies: 1
    Last Post: 10-14-2015, 11:30 PM
  3. Model Texturing Support 317 [Project]
    By OnCue in forum Projects
    Replies: 68
    Last Post: 02-14-2014, 06:54 AM
  4. 508 Model Header with 80% texture support
    By Mr Reece in forum Snippets
    Replies: 10
    Last Post: 12-16-2012, 01:57 PM
  5. [WIP] New(er) Header Texture Support
    By Mr Reece in forum Show-off
    Replies: 13
    Last Post: 11-30-2012, 09:45 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •