Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
20 May, 2013, 10:14:49 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: 1 [2] 3   Go Down
  Print  
Author Topic: CaDanITE -  (Read 4502 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
Iambian
Project Author
LV7 Elite (Next: 700)
*******
Offline Offline

Gender: Male
Last Login: 14 May, 2013, 14:52:06
Date Registered: 04 September, 2008, 20:12:14
Location: Nowhere in particular
Posts: 636


Topic starter
Total Post Ratings: +167

View Profile
« Reply #15 on: 22 September, 2010, 18:37:37 »
0

Thought of how I am going to store all this data in a sane manner in this CaDanITE project. So I figured I'd go with sort of a miniature file system. The details are below in this code box thinger. I just wanna know if it looks like I'm missing anything, or if you can suggest a better or easier way to do it. Coz right now, I'm not entirely liking the fact that I have to have pretty much a file system for a CaDanITE project file, but it's the best thing I can come up with at the moment.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
CaDanITE project file structure
Objects not part of the initial table structure gets a preallocated 8 byte name.

;----START OF FILE HEADER
.db $BB,$6D     ;denotes a compiled ASM program
.db $C9         ;If you attempt to run this as an ASM program it exits.
.db "CaDanITE:" ;9 characters that identify this as a CaDanITE level
.db 24chars     ;24 character description header for the project
;----START OF THE DATA FILE TABLE
.org $0000      ;addresses are with respect to this for relocatability
.db NN          ;number of 256-height screens
.dw ScreenDat1  ;address of screen data (specified far below)
.dw ...         ;Every 256 height screen has a boss assigned to it and their
.dw ScreenDatN  ;data pointers will be defined with the screen data
;---
.db NN          ;number of scripts
.dw ScriptDat1  ;address of script data (also defined far below)
.dw ...
.dw ScriptDatN
;---
.db NN          ;number of enemies that can be done
.dw EnemyDat1   ;address of enemy data (defined really far below)
.dw ...
.dw EnemyDatN
;---
.db NN          ;number of path data streams
.dw PathDat1    ;address of path data (uhm...)
.dw ...
.dw PathDatN
;---

;Filetype details:
;ScreenDATA    = 01 ;21 bytes total data size. Contains pointers to other files
;ScreenBITMAP  = 02 ;521 bytes total data size.
;BossAddress   = 03 ;16+1+N(2) bytes where N is # of spellcards. Points to other files
;SplCrdDATA    = 04 ;42 bytes total data size.
;BossGRAPHIC   = 05 ;129 bytes total data size
;BossCharSPR   = 06 ;9 bytes total data size
;BossTEXT      = 07 ;1+2+NN bytes where NN is data stream byte size
;ScriptDATA    = 08 ;1+2+NN bytes where NN is data stream byte size. Pts 2 othr files
;EnemyDATA     = 09 ;8 bytes total data size
;PathDATA      = 0A ;9+1+N bytes, where N is number of step pairs in movement path.

;-----BEGINNING OF CADANITE PROJECT FILE SYSTEM
;ScreenDATA
.db 1 byte      ;FILETYPE
.db 8 bytes     ;name of this data
.dw BossAdr     ;address of boss details ($0000=not set yet)
.dw ScreenBtm   ;address of 64x64 area indicating bottom screen
.dw ScreenBtmLp ;address of 64x64 area indicating bottom loop
.dw ScreenTopLp ;address of 64x64 area indicating bottom loop
.dw ScreenTop   ;address of 64x64 area indicating bottom screen (boss)
.db ScrollDelay ;A value between 1-9. A higher value means slower scroll.
.db LevelLoop   ;A value between 1-128. A higher value means the stage loops more.

;ScreenBITMAP
.db 1 byte      ;FILETYPE
.db 8 bytes     ;name of this 512 byte chunk of data
.db 512 bytes   ;screen data

;BossAddress
.db 1 byte      ;FILETYPE
.db 8 bytes     ;name of this entity
.db BossScript  ;Address to the boss script. lumped together with scripts
.dw BossGraphic ;Address to 32x32 boss graphic
.dw BossCharSpr ;Address to 8x8 boss sprite
.dw BossText    ;Address to boss dialog text
.db NN          ;number of spellcards in the game
.dw SplCrdAdr1  ;Address to the spellcard graphic
.dw ...
.dw SplCrdAdrN

;SplCrdDATA
.db 1 byte      ;FILETYPE
.db 8 bytes     ;8 bytes for spellcard graphic name
.db 1 byte      ;indicates normal bracket or special bracket for spells
.db 4*8 bytes   ;32 bytes for spellcard text underlay (overlay will be autobuilt)

;BossGraphic
.db 1 byte      ;FILETYPE
.db 128 bytes   ;graphic. Tied to name of boss

;BossCharSpr
.db 1 byte      ;FILETYPE
.db 8 bytes     ;graphic. Tied to name of boss

;BossText
.db 1 byte      ;FILETYPE
.dw StreamSize  ;size of text file unknown. Tied to name of boss.
.db "textdata"  ;formatted for whatever. Uh. Details unknown. Won't get to it soon :P

;ScriptDATA
.db 1 byte      ;FILETYPE (boss and stage scripts gets a different filetype)
.dw StreamSize  ;size of the script file
.db N bytes     ;Script contents

;EnemyDATA
.db 1 byte      ;FILETYPE
.db 1 byte      ;enemy type flags
.db 2 bytes     ;Starting (x,y) position
.db 1 byte      ;Initial HP
.db 1 byte      ;Script ID
.dw cyclecount  ;Initialize this enemy at this cycle count (0-65535)

;PathDATA
.db 1 byte      ;FILETYPE
.db 8 bytes     ;Name of this path
.db StreamSize  ;number of bytes that this path can take. Up to 128 (256 steps)
.db N bytes     ;bytes in the path stream
Logged

A Cherry-Flavored Iambian draws near... what do you do? ...
Projects in my development environment:
Celtic 3 (83+) 95% (Hold) | CaDan (83+) 15% (Rst) | E:SoR (84+) 10% (Rst) | CaDanITE (83+) 4% (Hold) | FF:TIoC (83+) 2% (Data)
Pages: 1 [2] 3   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.25 seconds with 32 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.