The Ur-Quan Masters Home Page Welcome, Guest. Please login or register.
Did you miss your activation email?
October 26, 2021, 12:42:37 am
Home Help Search Login Register
News: Paul & Fred have reached a settlement with Stardock!

  Show Posts
Pages: [1]
1  The Ur-Quan Masters Re-Release / Technical Issues / Re: Compiling with Visual Studio .NET ... on: July 13, 2005, 02:07:27 am
Oh. I coded in a simple task switcher yesterday - it works fine.

Each task is added with a function name and a timeout:

MeleeTaskHandler_AddTask(Melee_PlayerKeyHandler, 20);

The above code would tell the program to run the "Melee_PlayerKeyHandler" function every 20ms (or more, depending on machine speed). I decided to put a limit on the number of tasks, at 30. The main loop then calls the MeleeTaskHandler_CheckTasks routine, which checks the current SDL ticks, and then see if it should run any of the tasks. If a task is run, it's .NextTimeout tag is set to the current SDL tickcount + the timeout for the current task.

It all works quite well. If the tasks are offset, then the whole thing runs nicely at 700MHz- will have to stress-test on all 30 tasks.

Figuring out all the physics and such from scratch is difficult, but i'm going well and i'll have one hell-of-a sence of achievement when the whole thing's done. Anyone interested in submitting ship pictures/designs/music etc. once I have somthing to show for myself? Unlike TimeWarp and other projects, this will be a proper adventure game with a new and exciting(?!) story and BALANCED SHIPS. Stay tuned.

- Dean
2  The Ur-Quan Masters Re-Release / Technical Issues / Re: problem with compiling sourcecode on: July 04, 2005, 06:32:57 pm
C++ is just an extension of C. All C++ compilers can compile regular C code, but NOT vice-versa.

- Dean
3  The Ur-Quan Masters Re-Release / Technical Issues / Re: Compiling with Visual Studio .NET ... on: June 30, 2005, 05:57:42 am
*Sigh*. Ok, Ok, i'll give the asteroids game a look. I've managed to write the interface routines with the SDL, SDL Image, SDL Mixer and SDL Draw libraries so i'm finally ready to start. Made the main menu as a test, all works well.

- Dean :twisted:
4  The Ur-Quan Masters Re-Release / Starbase Café / Re: SDL_Mixer Assistance on: June 29, 2005, 08:25:25 am
Bugger! Just realised I downloaded the pure source version instead of the developer version. Now it works great. Kudos - you guys seem to be very on-the-ball!

- Dean
5  The Ur-Quan Masters Re-Release / Technical Issues / Re: Compiling with Visual Studio .NET ... on: June 29, 2005, 06:16:07 am
Nah, i've never listened to the experts before. I taught myself Visual Basic many years ago, then taught myself C last year. Going against all the experts advice for the latter language, I mamaged to produce a very complicated and *working* project.

I don't have much gaming experience, but I do write C for embedded systems - small microcontroller ICs. That involves a lot of abstract thinking on the best way to acomplish a task with the minimum amount of code, and also multiple threads when using a Real Time Operating System - similar to the SDL libraries's threads.

Worked out how to implement all the music, text image and main SDL libraries now. I've made most fo the helper C files and got the main menu working as a test. I though threads for the Melee is the best way to go - a thread per bullet and ship, what do you think? I could make it to inline, just seemed the best and easiest option.

- Dean
6  The Ur-Quan Masters Re-Release / Starbase Café / SDL_Mixer Assistance on: June 28, 2005, 06:22:16 pm
I'm creating my own game after being inspired by the Star Control port. I've decided to use the SDL libraries to keep things simple. So far ive managed to compile a lot of the libraries correctly, but i'm having trouble with the SDL miser library. I can compile it fine with VC++.net, but when I try to use the .lib file in my project I get a LOT of "unresolved external symbols". Can anyone help?

Compiler output shown below.
- Dean

LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _Timidity_PlaySome referenced in function _music_mixer
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _VC_WriteBytes referenced in function _music_mixer
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _native_midi_detect referenced in function _open_music
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _Timidity_Init referenced in function _open_music
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _MikMod_strerror referenced in function _open_music
SDL_Mixer.lib(music.obj) : error LNK2001: unresolved external symbol _MikMod_errno
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _MikMod_Init referenced in function _open_music
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _MikMod_RegisterAllLoaders referenced in function _open_music
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _MikMod_RegisterAllDrivers referenced in function _open_music
SDL_Mixer.lib(music.obj) : error LNK2001: unresolved external symbol _md_reverb
SDL_Mixer.lib(music.obj) : error LNK2001: unresolved external symbol _md_pansep
SDL_Mixer.lib(music.obj) : error LNK2001: unresolved external symbol _md_sndfxvolume
SDL_Mixer.lib(music.obj) : error LNK2001: unresolved external symbol _md_musicvolume
SDL_Mixer.lib(music.obj) : error LNK2001: unresolved external symbol _md_volume
SDL_Mixer.lib(music.obj) : error LNK2001: unresolved external symbol _md_device
SDL_Mixer.lib(music.obj) : error LNK2001: unresolved external symbol _md_mixfreq
SDL_Mixer.lib(music.obj) : error LNK2001: unresolved external symbol _md_mode
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _Player_Load referenced in function _Mix_LoadMUS
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _Timidity_Error referenced in function _Mix_LoadMUS
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _Timidity_LoadSong referenced in function _Mix_LoadMUS
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _native_midi_error referenced in function _Mix_LoadMUS
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _native_midi_loadsong referenced in function _Mix_LoadMUS
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _Timidity_FreeSong referenced in function _Mix_FreeMusic
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _native_midi_freesong referenced in function _Mix_FreeMusic
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _Player_Free referenced in function _Mix_FreeMusic
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _Timidity_Start referenced in function _music_internal_play
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _native_midi_start referenced in function _music_internal_play
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _Player_Start referenced in function _music_internal_play
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _Player_SetPosition referenced in function _music_internal_position
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _Timidity_SetVolume referenced in function _music_internal_volume
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _native_midi_setvolume referenced in function _music_internal_volume
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _Player_SetVolume referenced in function _music_internal_volume
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _Timidity_Stop referenced in function _music_internal_halt
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _native_midi_stop referenced in function _music_internal_halt
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _Player_Stop referenced in function _music_internal_halt
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _Timidity_Active referenced in function _music_internal_playing
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _native_midi_active referenced in function _music_internal_playing
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _Player_Active referenced in function _music_internal_playing
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _Player_SetSynchroValue referenced in function _Mix_SetSynchroValue
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _Player_GetSynchroValue referenced in function _Mix_GetSynchroValue
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _MikMod_UnregisterAllDrivers referenced in function _close_music
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _MikMod_UnregisterAllLoaders referenced in function _close_music
SDL_Mixer.lib(music.obj) : error LNK2019: unresolved external symbol _MikMod_Exit referenced in function _close_music
Debug/Star Control 2.5.exe : fatal error LNK1120: 43 unresolved externals
7  The Ur-Quan Masters Re-Release / Technical Issues / Re: Compiling with Visual Studio .NET ... on: June 28, 2005, 02:35:07 pm
Hmm, I defined all the libraries I could find, must have missed the OGG one. No matter; I've got the binaries and only wanted to compile the source code so I could make changes/additions. After looking at the code I've decided to scrap that idea and create a new game ("Star Control 2.5", even though I HATE Star Control 3) with the SDL libraries et al. The SDL library is fantastic, isn't it! I've always wanted to make a proper game, just never found the right language and libraries to do it in, no I have.

- Dean :twisted:
8  The Ur-Quan Masters Re-Release / Technical Issues / Re: Linker error; "Unresolved reference to _m on: June 26, 2005, 05:15:33 pm
Never mind: I forgot I had to use the

#pragma comment(lib, "SDL.lib")
#pragma comment(lib, "SDLmain.lib")

commands. Thanks anyway guys!
- Dean :twisted:
9  The Ur-Quan Masters Re-Release / Technical Issues / Linker error; "Unresolved reference to _main& on: June 26, 2005, 04:57:40 pm
If I use the simple C++ code:

#include <stdio.h>
#include "SDL.h"

int main (int argc, char *argv[])
{
fprintf (stderr, "Test");

return(0); // Satisfies Compiler (Main() must return a value)
}


I get the error "LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup" when building in VC++.Net. Can anyone explain this? The code works fine if I don't include the SDL.h header file.

- Dean :twisted:
10  The Ur-Quan Masters Re-Release / Technical Issues / Re: Compiling with Visual Studio .NET ... on: June 26, 2005, 07:49:59 am
I need som help with this also. I've downloaded and compiled all the components, but .NET now goes ape when I try to compile:


libcmtd.lib(dbgheap.obj) : error LNK2005: _malloc already defined in MSVCRTD.lib(MSVCR70D.dll)
libcmtd.lib(dbgheap.obj) : error LNK2005: _calloc already defined in MSVCRTD.lib(MSVCR70D.dll)
libcmtd.lib(dbgheap.obj) : error LNK2005: _realloc already defined in MSVCRTD.lib(MSVCR70D.dll)
libcmtd.lib(dbgheap.obj) : error LNK2005: _free already defined in MSVCRTD.lib(MSVCR70D.dll)
libcmtd.lib(fflush.obj) : error LNK2005: _fflush already defined in MSVCRTD.lib(MSVCR70D.dll)
libcmtd.lib(fpinit.obj) : error LNK2005: __ldused already defined in a previous module
libcmtd.lib(fpinit.obj) : error LNK2005: __fltused already defined in a previous module
libcmtd.lib(write.obj) : error LNK2005: __write already defined in MSVCRTD.lib(MSVCR70D.dll)
libcmtd.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRTD.lib(MSVCR70D.dll)
libcmtd.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRTD.lib(MSVCR70D.dll)
libcmtd.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRTD.lib(MSVCR70D.dll)
libcmtd.lib(crt0dat.obj) : error LNK2005: __c_exit already defined in MSVCRTD.lib(MSVCR70D.dll)
libcmtd.lib(dosmap.obj) : error LNK2005: __errno already defined in MSVCRTD.lib(MSVCR70D.dll)
libcmtd.lib(crt0.obj) : error LNK2005: _mainCRTStartup already defined in MSVCRTD.lib(crtexe.obj)
libcmtd.lib(crt0.obj) : error LNK2005: __amsg_exit already defined in MSVCRTD.lib(MSVCR70D.dll)
libcmtd.lib(open.obj) : error LNK2005: __open already defined in MSVCRTD.lib(MSVCR70D.dll)
libcmtd.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRTD.lib(cinitexe.obj)
libcmtd.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRTD.lib(cinitexe.obj)
libcmtd.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRTD.lib(cinitexe.obj)
libcmtd.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRTD.lib(cinitexe.obj)
libcmtd.lib(winxfltr.obj) : error LNK2005: __XcptFilter already defined in MSVCRTD.lib(MSVCR70D.dll)
libcmtd.lib(read.obj) : error LNK2005: __read already defined in MSVCRTD.lib(MSVCR70D.dll)
libcmtd.lib(lseek.obj) : error LNK2005: __lseek already defined in MSVCRTD.lib(MSVCR70D.dll)
libcmtd.lib(setlocal.obj) : error LNK2005: _setlocale already defined in MSVCRTD.lib(MSVCR70D.dll)
libcmtd.lib(getenv.obj) : error LNK2005: _getenv already defined in MSVCRTD.lib(MSVCR70D.dll)
libcmtd.lib(tolower.obj) : error LNK2005: _tolower already defined in MSVCRTD.lib(MSVCR70D.dll)
MSVCRTD.lib(MSVCR70D.dll) : error LNK2005: __stricmp already defined in libcmtd.lib(stricmp.obj)
MSVCRTD.lib(MSVCR70D.dll) : error LNK2005: __isatty already defined in libcmtd.lib(isatty.obj)
MSVCRTD.lib(MSVCR70D.dll) : error LNK2005: __close already defined in libcmtd.lib(close.obj)
MSVCRTD.lib(MSVCR70D.dll) : error LNK2005: _fopen already defined in libcmtd.lib(fopen.obj)
MSVCRTD.lib(MSVCR70D.dll) : error LNK2005: _fclose already defined in libcmtd.lib(fclose.obj)
MSVCRTD.lib(MSVCR70D.dll) : error LNK2005: __isctype already defined in libcmtd.lib(isctype.obj)
LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
MSVCRTD.lib(cinitexe.obj) : warning LNK4098: defaultlib 'libcmtd.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_sync_clear referenced in function _ov_clear
vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_stream_clear referenced in function _ov_clear
vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_stream_init referenced in function __ov_open1
vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_sync_wrote referenced in function __ov_open1
vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_sync_buffer referenced in function __ov_open1
vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_sync_init referenced in function __ov_open1
vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_stream_packetout referenced in function __fetch_headers
vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_stream_pagein referenced in function __fetch_headers
vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_stream_reset_serialno referenced in function __fetch_headers
vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_page_serialno referenced in function __fetch_headers
vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_sync_pageseek referenced in function __get_next_page
vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_sync_reset referenced in function __seek_helper
vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_page_granulepos referenced in function __prefetch_all_headers
vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_page_eos referenced in function _ov_raw_seek
vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_stream_reset referenced in function _ov_raw_seek
vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_page_continued referenced in function _ov_pcm_seek_page
vorbisfile.lib(vorbisfile.obj) : error LNK2019: unresolved external symbol _ogg_stream_packetpeek referenced in function _ov_pcm_seek_page
vorbisfile.lib(res0.obj) : error LNK2001: unresolved external symbol _oggpack_read
vorbisfile.lib(floor1.obj) : error LNK2019: unresolved external symbol _oggpack_read referenced in function _floor1_fit
vorbisfile.lib(floor0.obj) : error LNK2001: unresolved external symbol _oggpack_read
vorbisfile.lib(info.obj) : error LNK2019: unresolved external symbol _oggpack_read referenced in function _vorbis_synthesis_headerin
vorbisfile.lib(synthesis.obj) : error LNK2001: unresolved external symbol _oggpack_read
vorbisfile.lib(codebook.obj) : error LNK2001: unresolved external symbol _oggpack_read
vorbisfile.lib(mapping0.obj) : error LNK2001: unresolved external symbol _oggpack_read
vorbisfile.lib(info.obj) : error LNK2019: unresolved external symbol _oggpack_readinit referenced in function _vorbis_synthesis_headerin
vorbisfile.lib(synthesis.obj) : error LNK2001: unresolved external symbol _oggpack_readinit
vorbisfile.lib(info.obj) : error LNK2019: unresolved external symbol _oggpack_bytes referenced in function _vorbis_commentheader_out
vorbisfile.lib(analysis.obj) : error LNK2001: unresolved external symbol _oggpack_bytes
vorbisfile.lib(bitrate.obj) : error LNK2001: unresolved external symbol _oggpack_bytes
vorbisfile.lib(mapping0.obj) : error LNK2001: unresolved external symbol _oggpack_bytes
vorbisfile.lib(info.obj) : error LNK2019: unresolved external symbol _oggpack_writeinit referenced in function _vorbis_commentheader_out
vorbisfile.lib(block.obj) : error LNK2001: unresolved external symbol _oggpack_writeinit
vorbisfile.lib(bitrate.obj) : error LNK2001: unresolved external symbol _oggpack_writeinit
vorbisfile.lib(floor1.obj) : error LNK2001: unresolved external symbol _oggpack_write
vorbisfile.lib(info.obj) : error LNK2019: unresolved external symbol _oggpack_write referenced in function __vorbis_pack_comment
vorbisfile.lib(codebook.obj) : error LNK2001: unresolved external symbol _oggpack_write
vorbisfile.lib(mapping0.obj) : error LNK2001: unresolved external symbol _oggpack_write
vorbisfile.lib(res0.obj) : error LNK2001: unresolved external symbol _oggpack_write
vorbisfile.lib(info.obj) : error LNK2019: unresolved external symbol _oggpack_writeclear referenced in function _vorbis_analysis_headerout
vorbisfile.lib(block.obj) : error LNK2001: unresolved external symbol _oggpack_writeclear
vorbisfile.lib(bitrate.obj) : error LNK2001: unresolved external symbol _oggpack_writeclear
vorbisfile.lib(info.obj) : error LNK2019: unresolved external symbol _oggpack_reset referenced in function _vorbis_analysis_headerout
vorbisfile.lib(analysis.obj) : error LNK2001: unresolved external symbol _oggpack_reset
vorbisfile.lib(analysis.obj) : error LNK2019: unresolved external symbol _oggpack_get_buffer referenced in function _vorbis_analysis
vorbisfile.lib(bitrate.obj) : error LNK2019: unresolved external symbol _oggpack_get_buffer referenced in function _vorbis_bitrate_init
vorbisfile.lib(codebook.obj) : error LNK2019: unresolved external symbol _oggpack_adv referenced in function _decode_packed_entry_number
vorbisfile.lib(codebook.obj) : error LNK2019: unresolved external symbol _oggpack_look referenced in function _decode_packed_entry_number
vorbisfile.lib(mapping0.obj) : error LNK2019: unresolved external symbol _oggpack_writealign referenced in function _mapping0_forward
../../uqmdebug.exe : fatal error LNK1120: 28 unresolved externals


Ideas? The OGG .lib files seem to have compiled OK.
- Dean :twisted:
Pages: [1]


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!