Files |  Tutorials |  Articles |  Links |  Home |  Team |  Forum |  Wiki |  Impressum

Aktuelle Zeit: So Jun 16, 2024 18:13

Foren-Übersicht » English » English Programming Forum
Unbeantwortete Themen | Aktive Themen



Ein neues Thema erstellen Auf das Thema antworten  [ 7 Beiträge ] 
Autor Nachricht
BeitragVerfasst: Mi Okt 27, 2004 17:06 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
Iv recently been able to load MDC files with minimal errors (loading errors, b4 it would always crash at rendering due to me loading sections wrong). Anyway there is still errors,

1st being that some surfaces arn't loaded due to them not having an ulindent of 7 (if indent is <> 7 then the rest of the surface header is corrupt/loaded wrong) but for some odd reason the first few surfaces are loaded with no visible errors.

2nd error is that all there surfaces tryangles seem to be drawn on top of each other.

Below is my MCDUnit and a PDF about MDC formats and the C surce for loading mdc's.


Dateianhänge:
Dateikommentar: UnitMDC.pas, Resources.zip(With PDF and 2 lots of source code on MDC and MDS loading)
MDC.zip [153.02 KiB]
327-mal heruntergeladen

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu
Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Do Okt 28, 2004 04:20 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
MDC Info:
http://www.planetwolfenstein.com/themdcfile/intro.htm

I created a MDC view program (Displays the file in a TreeView) which is based on MDC View from the site above. Iv corrected some errors but the current 2 are:

1. TagFrames arn't the same in my MDC view as they are in the site's MDC view
2. Base frames are not loaded right

On an other note, anyone know how to stop a TTreeView from refreshing? The program hangs for about 10 secs while the data is shoved into the TTreeView.

Source Code, Exe's of Both MDC View's and Head.mdc from RTCW can be downloaded from:

Helios_MDCView.zip (330KB)

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Do Okt 28, 2004 08:02 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Aug 28, 2002 19:27
Beiträge: 568
Wohnort: Chemnitz / Sachsen
befor you start loading the data into the treeview, you have to call UpdateBegin (function of treeview) and after you loaded your data into the treeview you call UpdateEnd.

druing this time the treeview doesnt refresh so its faster !!!!

_________________
Aktuelles Projekt :
www.PicPlace.de


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mo Nov 01, 2004 05:05 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
MDC.CPP - void CMDC::PreparePointers (void)
Code:
  1.  
  2.  
  3.   lpTags = new Tag [lpFileHeader->ulNumTags];
  4.   for (ul = 0; ul < lpFileHeader->ulNumTags; ul++)
  5.   {
  6.     lpTags[ul].lpTagName   = &lpTagNames[ul];
  7.     lpTags[ul].lpTagFrames = (TagFrame *)
  8.       (
  9.         lpuc +
  10.         lpFileHeader->ulOffsetTagFrames +
  11.         ul * lpFileHeader->ulNumFrames * sizeof(TagFrame)
  12.       );
  13.   }
  14.  
  15.  


UNITMDC.PAS - Procedure LoadMDC(Var Model : TMDCFile; Const Filename : String);
Code:
  1.  
  2.  
  3. Seek(F,Model.Header.ulOffsetTagNames);
  4. If model.Header.ulNumTags > 0 then
  5. for x := 0 to Model.Header.ulNumTags-1 do
  6. BlockRead(f,Model.TagName[x],sizeof(TMDCTagName));
  7.  
  8. Seek(F,Model.Header.ulOffsetTagFrames);
  9. If model.Header.ulNumTags > 0 then
  10. for x := 0 to Model.Header.ulNumTags-1 do
  11. for y := 0 to Model.Header.ulNumFrames-1 do
  12. BlockRead(f,Model.TagFrame[x][y],sizeof(TMDCTagFrame));
  13.  
  14.  


Looking at the C code the delphi code seems to read from the right part of the file, dispite the fact that ulOffsetTagNames = ulOffsetTagFrames.

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu


Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mo Apr 11, 2005 08:40 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
:) At last i can now load mdc's! (TagFrames don't load right yet....)

Ill post the mdc code and an example once iv made the example and finished the mdc code.


Dateianhänge:
MapViewer10_MDC.jpg [59.2 KiB]
68-mal heruntergeladen

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu
Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mo Apr 11, 2005 23:34 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
Animation working and running smoothly (tho need to work out how to make it run at the same rate even with low fps). Still need to make example app.


Dateianhänge:
MapViewer13_MDC_Textured_Flags.JPG [54.31 KiB]
45-mal heruntergeladen
MapViewer10_MDC_Textured.jpg [96.18 KiB]
45-mal heruntergeladen

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu
Nach oben
 Profil  
Mit Zitat antworten  
 Betreff des Beitrags:
BeitragVerfasst: Mi Apr 13, 2005 01:19 
Offline
DGL Member
Benutzeravatar

Registriert: Mi Jul 21, 2004 22:39
Beiträge: 360
Wohnort: UK, Scotland
OpenSource: MDC Viewer

Still to do
Load TagFrames, currently they don't load the data correctly. Used for things like Flash positions (cordinates that other models can be joined to if im correct)
Make it order the faces by depth. Currently some faces overlap faces when they shouldn't. (only seems to happen with shaders that use blending)

Download

- Exe
- Source (Attached to Post)

Edit:

Always helpful to forget the usage bit....

Usage
Extract rtcw's pk3 files to the directory called RTCW in the folder u place the exe. Or extract any model files u find on the net to there. Program uses <PROGRAM LOCATION>\RTCW\ as the base dir for loading textures and shaders.


Dateianhänge:
MDCModelViewer_Source.zip [136.58 KiB]
312-mal heruntergeladen
MDCModelViewer_Preview1.jpg [148.82 KiB]
24-mal heruntergeladen

_________________
Free Map Editor - Game Requirements - Stucuk.Net
-Stu
Nach oben
 Profil  
Mit Zitat antworten  
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen Auf das Thema antworten  [ 7 Beiträge ] 
Foren-Übersicht » English » English Programming Forum


Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 6 Gäste


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.
Du darfst keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Gehe zu:  
  Powered by phpBB® Forum Software © phpBB Group
Deutsche Übersetzung durch phpBB.de
[ Time : 0.042s | 18 Queries | GZIP : On ]