Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

Help with strip faces

Featured Replies

  • Author
  • Localization

h3x3r, posted Sat Aug 13, 2022 3:11 pm (72996)


Hi everyone. Can somebody please help me out output strip faces with 010 hex editor template?
I wrote base template but i need compose other code to it and i don't know how...

This is base template:
Code:
//------------------------------------------------
//--- 010 Editor v11.0.1 Binary Template
//
//      File:
//   Authors:
//   Version:
//   Purpose:
//  Category:
// File Mask:
//  ID Bytes:
//   History:
//------------------------------------------------
local int i;
local string VT="vt",V="v",F="f";
uint MAGIC,UNK0,UNK1,NULL;
float VAL0,VAL1,VAL2,VAL3;
float VAL4,VAL5,VAL6,VAL7;
uint FLAG,FACE_COUNT,VTX_BLOCK_SIZE,NULL;
local uint VERTEX_COUNT=VTX_BLOCK_SIZE-48;

struct {
    for( i = 0; i < VERTEX_COUNT/28; i )
    struct{
        float X,Y,Z,UVU,UVV,UNK0,UNK1;
        Printf("%s %f %f %f\n",V,X,Y,Z);
        Printf("%s %f %f\n",VT,UVU,-UVV);
    }VTX;
}VTX_BLOCK;

struct {
    for( i = 0; i < FACE_COUNT/3; i )
    {
        WORD f1,f2,f3;
        Printf("%s %u %u %u\n",F,f1 1,f2 1,f3 1);
    }
}FACE_INDICES;


And code for implementing:
Code:
void build_TriList (WORD VertexCount)
{   
   int faceDir, startDir= -1 ;
   WORD a=0, b=1, cnt=0, f1,f2,f3 ;

   f1 = a 1 ;
   f2 = b 1 ;
   faceDir = startDir ;
   do {
      cnt ;   f3 = cnt ;
      faceDir *= -1 ;
      if ((f1!=f2)&&(f2!=f3)&&(f3!=f1)) {
         if (faceDir > 0) fprintf( stream, "f %d %d %d\n", f1, f2, f3 ) ;
         else fprintf( stream, "f %d %d %d\n", f1, f3, f2 ) ;
      }
      f1 = f2 ;
      f2 = f3 ;
   } while (cnt < VertexCount) ;
}

Attached sample file. I appreciate any help. Thanks in advance!
Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.