Splitting Assets from Code: Difference between revisions

Jump to navigation Jump to search
m
Fixed spelling mistake
(Almost finished writing this section)
m (Fixed spelling mistake)
Line 103:
All we have to do is create a new C file, and in it we place a global buffer just like we did in the previous section. Except this time, we're not going to link this data to our codesegment, rather we'll tell the N64 to reserve this part of RAM for our buffer. We'll need to modify the makefile somewhat, as we'll need to compile our C file into an object file. Lets assume our buffer is in a C file called <code>texbuf.c</code>.
 
Your makefile should already have a dedicated <code>CODEFILES</code> taargettarget where you put all your C files, and then it gets compiled into one big <code>codesegment.o</code> object file via <code>CODEOBJECTS = $(CODEFILES:.c=.o)</code> and then <code>gcc -o $(CODESEGMENT) -r $(CODEOBJECTS)</code>. The idea now is that you create a new taargettarget, such as <code>DATAFILES</code>, and you place your buffer files here.
 
<syntaxhighlight lang="makefile">
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu