DaggerXL is a Modern Daggerfall Engine Recreation for current Operating Systems and hardware – essentially it is a remake in the spirit of a port. It will ultimately fully emulate the game of Daggerfall and then optionally enhance it by refining existing features and adding new gameplay elements that were originally intended. The game will make use of hardware acceleration providing higher resolutions, color depth, greatly improved visibility, better texture filtering, enhanced performance and more. In addition DaggerXL will support full modability, similar to more modern Elder Scrolls games, using custom tools.

Post news Report RSS October 24, 2013 - Missing Code

In the spirit of providing small but more frequent updates as progress is made, here is another – smaller update.

Posted by on

In the spirit of providing small but more frequent updates as progress is made, here is another – smaller update.

It turns out that I missed some code for region loading, so I’ve been filling in the blanks for the last few days.

The core missing functionality was the “map table” which contains simple data for all the locations inside a specific region – loading using the following function:

LoadMapTable(int region) – which loads data from “MAPTABLE.XXX”, where XXX = region number.

Its part of functionality that loads a new region of the map – such as the Daggerfall province (region 17). First it frees all the data from the old region then loads the maptable, then applies flags which are supplied from MAPSAVE.XXX, again XXX = region number. Interestingly MAPSAVE files are contained inside “mapsave.sav” which turns out to have the same archive format as the BSA files. Why not just call it mapsave.BSA then? I have no idea, lol. Anyway its a bit more complicated then that – but you get the idea. :)

Now that the map table is in place, several missing variables can be filled out allowing me to completely finish the Cell and Region loading code, which was only partially complete before. Which means that tomorrow I can go back to working on the actual use of that data.

Here’s some useful code for you:

** func_13DF8F(newRegion)   //eax
   LoadMapTable(int region) //eax
push ebp
mov ebp,esp
push ebx,ecx,edx,esi,edi
sub esp,00000004
mov [ebp-0018],eax   <- Loads the "region" into a local variable
mov eax,[ebp-0018]   <- Copies the local variable back to the register
call 00133DD49       <- Calls the useful function: _LoadMapTable(region)
lea esp,[ebp-0014]
pop edi,esi,edx,ecx,ebx,ebp

Things like this in the Daggerfall code just make me shake my head. :lol:

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Follow Report Profile
Elder Scrolls II: Daggerfall
XL Engine Dev
Send Message
Release date
Mod watch
Post news
Related Games
Related Groups
XL Engine Dev
XL Engine Dev Developer