99
1010DECOMP_SIZE_ASSERT (GolStream, 0x30 )
1111
12+ // GLOBAL: GOLDP 0x10065d68
1213// GLOBAL: LEGORACERS 0x4c7284
1314LegoChar g_pathBuffer[256 ];
1415
16+ // GLOBAL: GOLDP 0x10065e68
1517// GLOBAL: LEGORACERS 0x4c7384
1618LegoChar* g_unk0x4c7384[4 ];
1719
20+ // GLOBAL: GOLDP 0x10065e78
1821// GLOBAL: LEGORACERS 0x4c7394
1922GolFileSource* g_fileSources;
2023
24+ // GLOBAL: GOLDP 0x10065e7c
2125// GLOBAL: LEGORACERS 0x4c7398
2226LegoU32 g_fileSourceCount;
2327
28+ // GLOBAL: GOLDP 0x10065e80
2429// GLOBAL: LEGORACERS 0x4c739c
2530LegoU32 g_unk0x4c739c;
2631
32+ // GLOBAL: GOLDP 0x10065e84
33+ // GLOBAL: LEGORACERS 0x004c73a0
34+ undefined4* g_unk0x4c73a0;
35+
36+ // GLOBAL: GOLDP 0x1005f04c
37+ // GLOBAL: LEGORACERS 0x004c1848
38+ static const char * const s_errorCodeStrings[] = {
39+ " Not a error" ,
40+ " General I/O error" ,
41+ " Invalid parameter" ,
42+ " Invalid value" ,
43+ " Out of memory error" ,
44+ " I/O Busy error" ,
45+ " Operation not supported" ,
46+ " File not open" ,
47+ " File not found" ,
48+ " Access denied" ,
49+ " File already exists" ,
50+ " Exceeded maximum files open" ,
51+ " Invalid name" ,
52+ " Unable to read" ,
53+ " Unable to write" ,
54+ " Unable to seek" ,
55+ " Attempt to read past file end" ,
56+ " Invalid character encoutered"
57+ };
58+
2759// FUNCTION: LEGORACERS 0x44c920
2860GolStream::GolStream ()
2961{
@@ -56,6 +88,25 @@ void GolStream::Init()
5688 m_buffer = NULL ;
5789}
5890
91+ // STUB: GOLDP 0x10031c90
92+ // STUB: LEGORACERS 0x0044c9c0
93+ undefined4 GolStream::FUN_0044c9c0 (const LegoChar* p_arg1)
94+ {
95+ // TODO
96+ STUB (0x0044c9c0 );
97+ return 0 ;
98+ }
99+
100+ #ifdef BUILDING_GOL
101+ // STUB: GOLDP 0x100320d0
102+ undefined4 GolStream::FUN_100320d0 ()
103+ {
104+ // TODO
105+ STUB (0x100320d0 );
106+ return 0 ;
107+ }
108+ #endif
109+
59110// FUNCTION: LEGORACERS 0x44caa0
60111LegoS32 GolStream::OpenFileSource ()
61112{
@@ -460,6 +511,24 @@ void GolStream::FUN_0044d190(const LegoChar*, const LegoChar*)
460511 STUB (0x44d190 );
461512}
462513
514+ // FUNCTION: GOLDP 0x10031c80
515+ // FUNCTION: LEGORACERS 0x0044d180
516+ const char * GolStream::ErrorCodeToString (int p_code)
517+ {
518+
519+ return s_errorCodeStrings[p_code];
520+ }
521+
522+ // FUNCTION: LEGORACERS 0x0044d4f0
523+ void GolStream::TransformToUpper (char * p_str)
524+ {
525+ size_t i;
526+
527+ for (i = 0 ; *p_str != ' \0 ' && i < 256 ; i++, p_str++) {
528+ *p_str = toupper (*p_str);
529+ }
530+ }
531+
463532// FUNCTION: LEGORACERS 0x44d530
464533LegoS32 GolStream::IsAbsolutePath (LegoChar* p_path)
465534{
@@ -470,6 +539,16 @@ LegoS32 GolStream::IsAbsolutePath(LegoChar* p_path)
470539 return isalpha (p_path[0 ]) && p_path[1 ] == ' :' ;
471540}
472541
542+ #ifdef BUILDING_GOL
543+ // STUB: GOLDP 0x10032110
544+ void GolStream::FUN_10032110 (const char * p_arg1)
545+ {
546+ // FIXME
547+ STUB (0x10032110 );
548+ }
549+ #endif
550+
551+ // FUNCTION: GOLDP 0x10032190
473552// FUNCTION: LEGORACERS 0x44d570
474553LegoS32 GolStream::BufferedWrite (LegoS32 p_offset, const void * p_buf, LegoU32 p_size)
475554{
@@ -528,6 +607,7 @@ LegoS32 GolStream::BufferedWrite(LegoS32 p_offset, const void* p_buf, LegoU32 p_
528607 }
529608}
530609
610+ // FUNCTION: GOLDP 0x100322c0
531611// FUNCTION: LEGORACERS 0x44d6a0
532612LegoS32 GolStream::WriteLine (const void * p_buf, LegoU32 p_size)
533613{
@@ -563,6 +643,7 @@ LegoS32 GolStream::WriteLine(const void* p_buf, LegoU32 p_size)
563643 }
564644}
565645
646+ // FUNCTION: GOLDP 0x100323a0
566647// FUNCTION: LEGORACERS 0x44d780
567648LegoS32 GolStream::FlushWriteBuffer ()
568649{
0 commit comments